cancel
Showing results for 
Search instead for 
Did you mean: 

moving contentHits aspect into the repository gives exceptio

pmarreddy
Champ in-the-making
Champ in-the-making
hi,

when i am running the contentHits aspect from the extension sample project it is running fine but wheni move it into the repository project it is giving invalid aspect exception, i have made changes both in core- services-context.xml and i have registered teh model with extension model. can any body point me to the right direction.


org.alfresco.service.cmr.dictionary.InvalidAspectException: The aspect is invalid: {extension.contenthits}contentHits
   at org.alfresco.repo.node.db.DbNodeServiceImpl.addAspect(DbNodeServiceImpl.java:496)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:165)
   at $Proxy2.addAspect(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:212)
   at $Proxy3.addAspect(Unknown Source)
   at org.alfresco.sample.contentHits.ContentHitsAspectTest.testContentHitsApsectBehaviour(ContentHitsAspectTest.java:59)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at junit.framework.TestCase.runTest(TestCase.java:154)
   at junit.framework.TestCase.runBare(TestCase.java:127)
   at junit.framework.TestResult$1.protect(TestResult.java:106)
   at junit.framework.TestResult.runProtected(TestResult.java:124)
   at junit.framework.TestResult.run(TestResult.java:109)
   at junit.framework.TestCase.run(TestCase.java:118)
   at junit.framework.TestSuite.runTest(TestSuite.java:208)
   at junit.framework.TestSuite.run(TestSuite.java:203)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)




thaks prasanth.
4 REPLIES 4

derek
Star Contributor
Star Contributor
Hi,

You should not be modifying any of the shipped config files (except perhaps some of the web client faces config).
http://www.alfresco.org/mediawiki/index.php/Development_Environment#Developer_Runtime_Configuration

Then it is much easier to zip up your standalone configuration files for us to take a look at.

Regards

pmarreddy
Champ in-the-making
Champ in-the-making
hi,

ok then how can i use teh contents hits aspect that is in the extension sample package

i tried to copy the contenthitscontext and model to D:\alfrescosrc\projects\repository\config\alfresco\extension folder and tried to apply htis aspect.

thanks prasanth

gavinc
Champ in-the-making
Champ in-the-making
Are you using one of our bundles? What version are you using?

A 1.2 bundle will have the content hits example placed in the correct location, for tomcat this is in <tomcat>/shared/classes/alfresco/extension and jboss in <jboss>/server/default/conf/alfresco/extension.

You should find a "custom-model-context.xml.sample" file, simply remove the .sample from the file name and it should get picked up.

pmarreddy
Champ in-the-making
Champ in-the-making
i am using the developer version(eclipse projects)

some how now teh problem is solved thanks any way for ur help

thanks prasanth