Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » eclipse-maven-plugin 2.6 and AJDT
eclipse-maven-plugin 2.6 and AJDT [message #73778] Tue, 05 May 2009 12:00 Go to next message
Kaj Hejer is currently offline Kaj HejerFriend
Messages: 8
Registered: July 2009
Junior Member
Hi!

I'm not sure if this is the right forum to ask this question, but I give
it a try :)

After upgrading to eclipse-maven-plugin version 2.6 I get a
"java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException" when
running my unittests from inside eclipse. I have tried to turn on JDT
weaving but get the same exception. I'm on MacOS X 10.5.6 with java
1.6.0_07

When trying to use the new support for AJDT as described on
http://jira.codehaus.org/browse/MECLIPSE-200 and
http://maven.apache.org/plugins/maven-eclipse-plugin/example s/ajdt-projects.html
by using

 
<ajdtVersion>1.6</ajdtVersion>


I don't get aspectjweaver.jar included in my .classpath file and I get the
stacktrace bellow.

If I use

<ajdtVersion>none</ajdtVersion>


I get spectjweaver.jar included in my .classpath file but then I have to
add the following manually for spring-aspects after running mvn
eclipse:eclipse:

<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="true" />
</attributes>


That is why I would like to get the new ajdt support in
eclipse-maven-plugin to work.

The stacktrace I get with eclipse eclipse-jee-ganymede-SR2 (3.4.2) is:


java.lang.IllegalStateException: Failed to load ApplicationContext
at
org.springframework.test.context.TestContext.getApplicationC ontext(TestContext.java:201)
at
org.springframework.test.context.support.DependencyInjection TestExecutionListener.injectDependencies(DependencyInjection TestExecutionListener.java:109)
at
org.springframework.test.context.support.DependencyInjection TestExecutionListener.prepareTestInstance(DependencyInjectio nTestExecutionListener.java:75)
at
org.springframework.test.context.TestContextManager.prepareT estInstance(TestContextManager.java:255)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.createTest(SpringJUnit4ClassRunner.java:111)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.invokeTestMethod(SpringJUnit4ClassRunner.java:148)
at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUni t4ClassRunner.java:51)
at
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4Cla ssRunner.java:44)
at
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassR oadie.java:27)
at
org.junit.internal.runners.ClassRoadie.runProtected(ClassRoa die.java:37)
at
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4Class Runner.java:42)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.run(SpringJUnit4ClassRunner.java:97)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.r un(JUnit4TestReference.java:45)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:196)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreExcepti on:
Unexpected exception parsing XML document from URL
[file:src/main/webapp/WEB-INF/applicationContext.xml]; nested exception is
java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at
org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBeanDefinitions(AbstractBeanDefinitionReader. java:143)
at
org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBeanDefinitions(AbstractBeanDefinitionReader. java:178)
at
org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBeanDefinitions(AbstractBeanDefinitionReader. java:149)
at
org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBeanDefinitions(AbstractBeanDefinitionReader. java:212)
at
org.springframework.test.context.support.AbstractGenericCont extLoader.loadContext(AbstractGenericContextLoader.java:81)
at
org.springframework.test.context.support.AbstractGenericCont extLoader.loadContext(AbstractGenericContextLoader.java:42)
at
org.springframework.test.context.TestContext.loadApplication Context(TestContext.java:173)
at
org.springframework.test.context.TestContext.getApplicationC ontext(TestContext.java:197)
... 17 more
Caused by: java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at
org.springframework.aop.config.ConfigBeanDefinitionParser.cl ass$(ConfigBeanDefinitionParser.java:208)
at
org.springframework.aop.config.ConfigBeanDefinitionParser.cr eatePointcutDefinition(ConfigBeanDefinitionParser.java:539)
at
org.springframework.aop.config.ConfigBeanDefinitionParser.pa rsePointcut(ConfigBeanDefinitionParser.java:476)
at
org.springframework.aop.config.ConfigBeanDefinitionParser.pa rse(ConfigBeanDefinitionParser.java:142)
at
org.springframework.beans.factory.xml.NamespaceHandlerSuppor t.parse(NamespaceHandlerSupport.java:69)
at
org.springframework.beans.factory.xml.BeanDefinitionParserDe legate.parseCustomElement(BeanDefinitionParserDelegate.java: 1297)
at
org.springframework.beans.factory.xml.BeanDefinitionParserDe legate.parseCustomElement(BeanDefinitionParserDelegate.java: 1287)
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionD ocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocu mentReader.java:135)
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionD ocumentReader.registerBeanDefinitions(DefaultBeanDefinitionD ocumentReader.java:92)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
... 27 more



The stacktrace I get with eclipse 3.5M7 is:


java.lang.IllegalStateException: Failed to load ApplicationContext
at
org.springframework.test.context.TestContext.getApplicationC ontext(TestContext.java:201)
at
org.springframework.test.context.support.DependencyInjection TestExecutionListener.injectDependencies(DependencyInjection TestExecutionListener.java:109)
at
org.springframework.test.context.support.DependencyInjection TestExecutionListener.prepareTestInstance(DependencyInjectio nTestExecutionListener.java:75)
at
org.springframework.test.context.TestContextManager.prepareT estInstance(TestContextManager.java:255)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.createTest(SpringJUnit4ClassRunner.java:111)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.invokeTestMethod(SpringJUnit4ClassRunner.java:148)
at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUni t4ClassRunner.java:51)
at
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4Cla ssRunner.java:44)
at
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassR oadie.java:27)
at
org.junit.internal.runners.ClassRoadie.runProtected(ClassRoa die.java:37)
at
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4Class Runner.java:42)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.run(SpringJUnit4ClassRunner.java:97)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.r un(JUnit4TestReference.java:46)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:197)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreExcepti on:
Unexpected exception parsing XML document from URL
[file:src/main/webapp/WEB-INF/applicationContext.xml]; nested exception is
java.lang.NoClassDefFoundError:
org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldEx ception
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at
org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBeanDefinitions(AbstractBeanDefinitionReader. java:143)
at
org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBeanDefinitions(AbstractBeanDefinitionReader. java:178)
at
org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBeanDefinitions(AbstractBeanDefinitionReader. java:149)
at
org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBeanDefinitions(AbstractBeanDefinitionReader. java:212)
at
org.springframework.test.context.support.AbstractGenericCont extLoader.loadContext(AbstractGenericContextLoader.java:81)
at
org.springframework.test.context.support.AbstractGenericCont extLoader.loadContext(AbstractGenericContextLoader.java:42)
at
org.springframework.test.context.TestContext.loadApplication Context(TestContext.java:173)
at
org.springframework.test.context.TestContext.getApplicationC ontext(TestContext.java:197)
... 17 more
Caused by: java.lang.NoClassDefFoundError:
org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldEx ception
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at
org.springframework.aop.config.ConfigBeanDefinitionParser.cl ass$(ConfigBeanDefinitionParser.java:208)
at
org.springframework.aop.config.ConfigBeanDefinitionParser.cr eatePointcutDefinition(ConfigBeanDefinitionParser.java:539)
at
org.springframework.aop.config.ConfigBeanDefinitionParser.pa rsePointcut(ConfigBeanDefinitionParser.java:476)
at
org.springframework.aop.config.ConfigBeanDefinitionParser.pa rse(ConfigBeanDefinitionParser.java:142)
at
org.springframework.beans.factory.xml.NamespaceHandlerSuppor t.parse(NamespaceHandlerSupport.java:69)
at
org.springframework.beans.factory.xml.BeanDefinitionParserDe legate.parseCustomElement(BeanDefinitionParserDelegate.java: 1297)
at
org.springframework.beans.factory.xml.BeanDefinitionParserDe legate.parseCustomElement(BeanDefinitionParserDelegate.java: 1287)
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionD ocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocu mentReader.java:135)
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionD ocumentReader.registerBeanDefinitions(DefaultBeanDefinitionD ocumentReader.java:92)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
... 27 more
Caused by: java.lang.ClassNotFoundException:
org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldEx ception
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288 )
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
... 40 more



From my pom.xml:


<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>

<configuration>
<source>1.5</source>
<target>1.5</target>
<encoding>utf-8</encoding>
<verbose>true</verbose>
<outxml>false</outxml>

<showWeaveInfo>false</showWeaveInfo>
<proceedOnError>true</proceedOnError>

<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>

<weaveDependencies>
<weaveDependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</weaveDependency>
</weaveDependencies>

</configuration>
</plugin>


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.6</version>
<configuration>

<ajdtVersion>1.6</ajdtVersion>

<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>

<projectnatures>

<java.lang.String>org.eclipse.ajdt.ui.ajnature</java.lang.String >

<java.lang.String>org.springframework.ide.eclipse.core.springnature </java.lang.String>

<java.lang.String>org.eclipse.jdt.core.javanature</java.lang.String >
</projectnatures>
<buildcommands>

<buildcommand>org.eclipse.ajdt.core.ajbuilder</buildcommand >
</buildcommands>
</configuration>
</plugin>



-Kaj :)
Re: eclipse-maven-plugin 2.6 and AJDT [message #73798 is a reply to message #73778] Tue, 05 May 2009 18:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andrew.eisenberg.springsource.com

eclipse-maven-plugin version 2.6 is incompatible with AJDT. See:
http://jira.codehaus.org/browse/MECLIPSE-538
http://jira.codehaus.org/browse/MECLIPSE-544

This should be addressed in version 2.7.

For now, you must use version 2.5.x.

This works, but does not automatically add aspect libraries to the aspect
path. There is a work around. See:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=270554


On 05/05/09 5:00 AM, in article
ee04284b043f19143fc401e6cd7d014b$1@www.eclipse.org, "kaj.hejer@usit.uio.no"
<kaj.hejer@usit.uio.no> wrote:

> Hi!
>
> I'm not sure if this is the right forum to ask this question, but I give
> it a try :)
>
> After upgrading to eclipse-maven-plugin version 2.6 I get a
> "java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException" when
> running my unittests from inside eclipse. I have tried to turn on JDT
> weaving but get the same exception. I'm on MacOS X 10.5.6 with java
> 1.6.0_07
>
> When trying to use the new support for AJDT as described on
> http://jira.codehaus.org/browse/MECLIPSE-200 and
> http://maven.apache.org/plugins/maven-eclipse-plugin/example s/ajdt-projects.ht
> ml
> by using
>
>
 
> <ajdtVersion>1.6</ajdtVersion>
> 

>
> I don't get aspectjweaver.jar included in my .classpath file and I get the
> stacktrace bellow.
>
> If I use
>
> <ajdtVersion>none</ajdtVersion>
>
>
> I get spectjweaver.jar included in my .classpath file but then I have to
> add the following manually for spring-aspects after running mvn
> eclipse:eclipse:
>
> <attributes>
> <attribute name="org.eclipse.ajdt.aspectpath" value="true" />
> </attributes>
>
>
> That is why I would like to get the new ajdt support in
> eclipse-maven-plugin to work.
>
> The stacktrace I get with eclipse eclipse-jee-ganymede-SR2 (3.4.2) is:
>
>
> java.lang.IllegalStateException: Failed to load ApplicationContext
> at
> org.springframework.test.context.TestContext.getApplicationC ontext(TestContext
> .java:201)
> at
> org.springframework.test.context.support.DependencyInjection TestExecutionListe
> ner.injectDependencies(DependencyInjectionTestExecutionListe ner.java:109)
> at
> org.springframework.test.context.support.DependencyInjection TestExecutionListe
> ner.prepareTestInstance(DependencyInjectionTestExecutionList ener.java:75)
> at
> org.springframework.test.context.TestContextManager.prepareT estInstance(TestCo
> ntextManager.java:255)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.createTest(Spr
> ingJUnit4ClassRunner.java:111)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.invokeTestMeth
> od(SpringJUnit4ClassRunner.java:148)
> at
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUni t4ClassRunner.java
> :51)
> at
> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4Cla ssRunner.java:44)
> at
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassR oadie.java:27)
> at
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoa die.java:37)
> at
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4Class Runner.java:42)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.run(SpringJUni
> t4ClassRunner.java:97)
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.r un(JUnit4TestRefer
> ence.java:45)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunn
> er.java:460)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunn
> er.java:673)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.ja
> va:386)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.j
> ava:196)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreExcepti on:
> Unexpected exception parsing XML document from URL
> [file:src/main/webapp/WEB-INF/applicationContext.xml]; nested exception is
> java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.doLoadBeanDefini
> tions(XmlBeanDefinitionReader.java:420)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.loadBeanDefiniti
> ons(XmlBeanDefinitionReader.java:342)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.loadBeanDefiniti
> ons(XmlBeanDefinitionReader.java:310)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:143)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:178)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:149)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:212)
> at
> org.springframework.test.context.support.AbstractGenericCont extLoader.loadCont
> ext(AbstractGenericContextLoader.java:81)
> at
> org.springframework.test.context.support.AbstractGenericCont extLoader.loadCont
> ext(AbstractGenericContextLoader.java:42)
> at
> org.springframework.test.context.TestContext.loadApplication Context(TestContex
> t.java:173)
> at
> org.springframework.test.context.TestContext.getApplicationC ontext(TestContext
> .java:197)
> ... 17 more
> Caused by: java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:164)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.cl ass$(ConfigBeanDef
> initionParser.java:208)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.cr eatePointcutDefini
> tion(ConfigBeanDefinitionParser.java:539)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.pa rsePointcut(Config
> BeanDefinitionParser.java:476)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.pa rse(ConfigBeanDefi
> nitionParser.java:142)
> at
> org.springframework.beans.factory.xml.NamespaceHandlerSuppor t.parse(NamespaceH
> andlerSupport.java:69)
> at
> org.springframework.beans.factory.xml.BeanDefinitionParserDe legate.parseCustom
> Element(BeanDefinitionParserDelegate.java:1297)
> at
> org.springframework.beans.factory.xml.BeanDefinitionParserDe legate.parseCustom
> Element(BeanDefinitionParserDelegate.java:1287)
> at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionD ocumentReader.pars
> eBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:13 5)
> at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionD ocumentReader.regi
> sterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java :92)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.registerBeanDefi
> nitions(XmlBeanDefinitionReader.java:507)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.doLoadBeanDefini
> tions(XmlBeanDefinitionReader.java:398)
> ... 27 more
>
>
>
> The stacktrace I get with eclipse 3.5M7 is:
>
>
> java.lang.IllegalStateException: Failed to load ApplicationContext
> at
> org.springframework.test.context.TestContext.getApplicationC ontext(TestContext
> .java:201)
> at
> org.springframework.test.context.support.DependencyInjection TestExecutionListe
> ner.injectDependencies(DependencyInjectionTestExecutionListe ner.java:109)
> at
> org.springframework.test.context.support.DependencyInjection TestExecutionListe
> ner.prepareTestInstance(DependencyInjectionTestExecutionList ener.java:75)
> at
> org.springframework.test.context.TestContextManager.prepareT estInstance(TestCo
> ntextManager.java:255)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.createTest(Spr
> ingJUnit4ClassRunner.java:111)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.invokeTestMeth
> od(SpringJUnit4ClassRunner.java:148)
> at
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUni t4ClassRunner.java
> :51)
> at
> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4Cla ssRunner.java:44)
> at
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassR oadie.java:27)
> at
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoa die.java:37)
> at
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4Class Runner.java:42)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.run(SpringJUni
> t4ClassRunner.java:97)
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.r un(JUnit4TestRefer
> ence.java:46)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunn
> er.java:467)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunn
> er.java:683)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.ja
> va:390)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.j
> ava:197)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreExcepti on:
> Unexpected exception parsing XML document from URL
> [file:src/main/webapp/WEB-INF/applicationContext.xml]; nested exception is
> java.lang.NoClassDefFoundError:
> org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldEx ception
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.doLoadBeanDefini
> tions(XmlBeanDefinitionReader.java:420)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.loadBeanDefiniti
> ons(XmlBeanDefinitionReader.java:342)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.loadBeanDefiniti
> ons(XmlBeanDefinitionReader.java:310)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:143)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:178)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:149)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:212)
> at
> org.springframework.test.context.support.AbstractGenericCont extLoader.loadCont
> ext(AbstractGenericContextLoader.java:81)
> at
> org.springframework.test.context.support.AbstractGenericCont extLoader.loadCont
> ext(AbstractGenericContextLoader.java:42)
> at
> org.springframework.test.context.TestContext.loadApplication Context(TestContex
> t.java:173)
> at
> org.springframework.test.context.TestContext.getApplicationC ontext(TestContext
> .java:197)
> ... 17 more
> Caused by: java.lang.NoClassDefFoundError:
> org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldEx ception
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:169)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.cl ass$(ConfigBeanDef
> initionParser.java:208)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.cr eatePointcutDefini
> tion(ConfigBeanDefinitionParser.java:539)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.pa rsePointcut(Config
> BeanDefinitionParser.java:476)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.pa rse(ConfigBeanDefi
> nitionParser.java:142)
> at
> org.springframework.beans.factory.xml.NamespaceHandlerSuppor t.parse(NamespaceH
> andlerSupport.java:69)
> at
> org.springframework.beans.factory.xml.BeanDefinitionParserDe legate.parseCustom
> Element(BeanDefinitionParserDelegate.java:1297)
> at
> org.springframework.beans.factory.xml.BeanDefinitionParserDe legate.parseCustom
> Element(BeanDefinitionParserDelegate.java:1287)
> at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionD ocumentReader.pars
> eBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:13 5)
> at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionD ocumentReader.regi
> sterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java :92)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.registerBeanDefi
> nitions(XmlBeanDefinitionReader.java:507)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.doLoadBeanDefini
> tions(XmlBeanDefinitionReader.java:398)
> ... 27 more
> Caused by: java.lang.ClassNotFoundException:
> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldEx ception
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288 )
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
> ... 40 more
>
>
>
> From my pom.xml:
>
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>aspectj-maven-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>compile</goal>
> <goal>test-compile</goal>
> </goals>
> </execution>
> </executions>
> <dependencies>
> <dependency>
> <groupId>org.aspectj</groupId>
> <artifactId>aspectjrt</artifactId>
> <version>${aspectj.version}</version>
> </dependency>
> <dependency>
> <groupId>org.aspectj</groupId>
> <artifactId>aspectjtools</artifactId>
> <version>${aspectj.version}</version>
> </dependency>
> </dependencies>
>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> <encoding>utf-8</encoding>
> <verbose>true</verbose>
> <outxml>false</outxml>
>
> <showWeaveInfo>false</showWeaveInfo>
> <proceedOnError>true</proceedOnError>
>
> <aspectLibraries>
> <aspectLibrary>
> <groupId>org.springframework</groupId>
> <artifactId>spring-aspects</artifactId>
> </aspectLibrary>
> </aspectLibraries>
>
> <weaveDependencies>
> <weaveDependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-aspects</artifactId>
> </weaveDependency>
> </weaveDependencies>
>
> </configuration>
> </plugin>
>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-eclipse-plugin</artifactId>
> <version>2.6</version>
> <configuration>
>
> <ajdtVersion>1.6</ajdtVersion>
>
> <downloadSources>true</downloadSources>
> <downloadJavadocs>true</downloadJavadocs>
>
> <projectnatures>
>
> <java.lang.String>org.eclipse.ajdt.ui.ajnature</java.lang.String >
>
> <java.lang.String>org.springframework.ide.eclipse.core.springnature </java.lang
> .String>
>
> <java.lang.String>org.eclipse.jdt.core.javanature</java.lang.String >
> </projectnatures>
> <buildcommands>
>
> <buildcommand>org.eclipse.ajdt.core.ajbuilder</buildcommand >
> </buildcommands>
> </configuration>
> </plugin>
>
>
>
> -Kaj :)
>
Re: eclipse-maven-plugin 2.6 and AJDT [message #73836 is a reply to message #73798] Wed, 06 May 2009 12:26 Go to previous message
Kaj Hejer is currently offline Kaj HejerFriend
Messages: 8
Registered: July 2009
Junior Member
Thanks! :-)
Re: eclipse-maven-plugin 2.6 and AJDT [message #599903 is a reply to message #73778] Tue, 05 May 2009 18:07 Go to previous message
Andrew Eisenberg is currently offline Andrew EisenbergFriend
Messages: 77
Registered: July 2009
Member
eclipse-maven-plugin version 2.6 is incompatible with AJDT. See:
http://jira.codehaus.org/browse/MECLIPSE-538
http://jira.codehaus.org/browse/MECLIPSE-544

This should be addressed in version 2.7.

For now, you must use version 2.5.x.

This works, but does not automatically add aspect libraries to the aspect
path. There is a work around. See:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=270554


On 05/05/09 5:00 AM, in article
ee04284b043f19143fc401e6cd7d014b$1@www.eclipse.org, "kaj.hejer@usit.uio.no"
<kaj.hejer@usit.uio.no> wrote:

> Hi!
>
> I'm not sure if this is the right forum to ask this question, but I give
> it a try :)
>
> After upgrading to eclipse-maven-plugin version 2.6 I get a
> "java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException" when
> running my unittests from inside eclipse. I have tried to turn on JDT
> weaving but get the same exception. I'm on MacOS X 10.5.6 with java
> 1.6.0_07
>
> When trying to use the new support for AJDT as described on
> http://jira.codehaus.org/browse/MECLIPSE-200 and
> http://maven.apache.org/plugins/maven-eclipse-plugin/example s/ajdt-projects.ht
> ml
> by using
>
>
 
> <ajdtVersion>1.6</ajdtVersion>
> 

>
> I don't get aspectjweaver.jar included in my .classpath file and I get the
> stacktrace bellow.
>
> If I use
>
> <ajdtVersion>none</ajdtVersion>
>
>
> I get spectjweaver.jar included in my .classpath file but then I have to
> add the following manually for spring-aspects after running mvn
> eclipse:eclipse:
>
> <attributes>
> <attribute name="org.eclipse.ajdt.aspectpath" value="true" />
> </attributes>
>
>
> That is why I would like to get the new ajdt support in
> eclipse-maven-plugin to work.
>
> The stacktrace I get with eclipse eclipse-jee-ganymede-SR2 (3.4.2) is:
>
>
> java.lang.IllegalStateException: Failed to load ApplicationContext
> at
> org.springframework.test.context.TestContext.getApplicationC ontext(TestContext
> .java:201)
> at
> org.springframework.test.context.support.DependencyInjection TestExecutionListe
> ner.injectDependencies(DependencyInjectionTestExecutionListe ner.java:109)
> at
> org.springframework.test.context.support.DependencyInjection TestExecutionListe
> ner.prepareTestInstance(DependencyInjectionTestExecutionList ener.java:75)
> at
> org.springframework.test.context.TestContextManager.prepareT estInstance(TestCo
> ntextManager.java:255)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.createTest(Spr
> ingJUnit4ClassRunner.java:111)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.invokeTestMeth
> od(SpringJUnit4ClassRunner.java:148)
> at
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUni t4ClassRunner.java
> :51)
> at
> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4Cla ssRunner.java:44)
> at
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassR oadie.java:27)
> at
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoa die.java:37)
> at
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4Class Runner.java:42)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.run(SpringJUni
> t4ClassRunner.java:97)
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.r un(JUnit4TestRefer
> ence.java:45)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunn
> er.java:460)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunn
> er.java:673)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.ja
> va:386)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.j
> ava:196)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreExcepti on:
> Unexpected exception parsing XML document from URL
> [file:src/main/webapp/WEB-INF/applicationContext.xml]; nested exception is
> java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.doLoadBeanDefini
> tions(XmlBeanDefinitionReader.java:420)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.loadBeanDefiniti
> ons(XmlBeanDefinitionReader.java:342)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.loadBeanDefiniti
> ons(XmlBeanDefinitionReader.java:310)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:143)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:178)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:149)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:212)
> at
> org.springframework.test.context.support.AbstractGenericCont extLoader.loadCont
> ext(AbstractGenericContextLoader.java:81)
> at
> org.springframework.test.context.support.AbstractGenericCont extLoader.loadCont
> ext(AbstractGenericContextLoader.java:42)
> at
> org.springframework.test.context.TestContext.loadApplication Context(TestContex
> t.java:173)
> at
> org.springframework.test.context.TestContext.getApplicationC ontext(TestContext
> .java:197)
> ... 17 more
> Caused by: java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:164)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.cl ass$(ConfigBeanDef
> initionParser.java:208)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.cr eatePointcutDefini
> tion(ConfigBeanDefinitionParser.java:539)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.pa rsePointcut(Config
> BeanDefinitionParser.java:476)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.pa rse(ConfigBeanDefi
> nitionParser.java:142)
> at
> org.springframework.beans.factory.xml.NamespaceHandlerSuppor t.parse(NamespaceH
> andlerSupport.java:69)
> at
> org.springframework.beans.factory.xml.BeanDefinitionParserDe legate.parseCustom
> Element(BeanDefinitionParserDelegate.java:1297)
> at
> org.springframework.beans.factory.xml.BeanDefinitionParserDe legate.parseCustom
> Element(BeanDefinitionParserDelegate.java:1287)
> at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionD ocumentReader.pars
> eBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:13 5)
> at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionD ocumentReader.regi
> sterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java :92)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.registerBeanDefi
> nitions(XmlBeanDefinitionReader.java:507)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.doLoadBeanDefini
> tions(XmlBeanDefinitionReader.java:398)
> ... 27 more
>
>
>
> The stacktrace I get with eclipse 3.5M7 is:
>
>
> java.lang.IllegalStateException: Failed to load ApplicationContext
> at
> org.springframework.test.context.TestContext.getApplicationC ontext(TestContext
> .java:201)
> at
> org.springframework.test.context.support.DependencyInjection TestExecutionListe
> ner.injectDependencies(DependencyInjectionTestExecutionListe ner.java:109)
> at
> org.springframework.test.context.support.DependencyInjection TestExecutionListe
> ner.prepareTestInstance(DependencyInjectionTestExecutionList ener.java:75)
> at
> org.springframework.test.context.TestContextManager.prepareT estInstance(TestCo
> ntextManager.java:255)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.createTest(Spr
> ingJUnit4ClassRunner.java:111)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.invokeTestMeth
> od(SpringJUnit4ClassRunner.java:148)
> at
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUni t4ClassRunner.java
> :51)
> at
> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4Cla ssRunner.java:44)
> at
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassR oadie.java:27)
> at
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoa die.java:37)
> at
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4Class Runner.java:42)
> at
> org.springframework.test.context.junit4.SpringJUnit4ClassRun ner.run(SpringJUni
> t4ClassRunner.java:97)
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.r un(JUnit4TestRefer
> ence.java:46)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunn
> er.java:467)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunn
> er.java:683)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.ja
> va:390)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.j
> ava:197)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreExcepti on:
> Unexpected exception parsing XML document from URL
> [file:src/main/webapp/WEB-INF/applicationContext.xml]; nested exception is
> java.lang.NoClassDefFoundError:
> org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldEx ception
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.doLoadBeanDefini
> tions(XmlBeanDefinitionReader.java:420)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.loadBeanDefiniti
> ons(XmlBeanDefinitionReader.java:342)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.loadBeanDefiniti
> ons(XmlBeanDefinitionReader.java:310)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:143)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:178)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:149)
> at
> org.springframework.beans.factory.support.AbstractBeanDefini tionReader.loadBea
> nDefinitions(AbstractBeanDefinitionReader.java:212)
> at
> org.springframework.test.context.support.AbstractGenericCont extLoader.loadCont
> ext(AbstractGenericContextLoader.java:81)
> at
> org.springframework.test.context.support.AbstractGenericCont extLoader.loadCont
> ext(AbstractGenericContextLoader.java:42)
> at
> org.springframework.test.context.TestContext.loadApplication Context(TestContex
> t.java:173)
> at
> org.springframework.test.context.TestContext.getApplicationC ontext(TestContext
> .java:197)
> ... 17 more
> Caused by: java.lang.NoClassDefFoundError:
> org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldEx ception
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:169)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.cl ass$(ConfigBeanDef
> initionParser.java:208)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.cr eatePointcutDefini
> tion(ConfigBeanDefinitionParser.java:539)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.pa rsePointcut(Config
> BeanDefinitionParser.java:476)
> at
> org.springframework.aop.config.ConfigBeanDefinitionParser.pa rse(ConfigBeanDefi
> nitionParser.java:142)
> at
> org.springframework.beans.factory.xml.NamespaceHandlerSuppor t.parse(NamespaceH
> andlerSupport.java:69)
> at
> org.springframework.beans.factory.xml.BeanDefinitionParserDe legate.parseCustom
> Element(BeanDefinitionParserDelegate.java:1297)
> at
> org.springframework.beans.factory.xml.BeanDefinitionParserDe legate.parseCustom
> Element(BeanDefinitionParserDelegate.java:1287)
> at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionD ocumentReader.pars
> eBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:13 5)
> at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionD ocumentReader.regi
> sterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java :92)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.registerBeanDefi
> nitions(XmlBeanDefinitionReader.java:507)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReade r.doLoadBeanDefini
> tions(XmlBeanDefinitionReader.java:398)
> ... 27 more
> Caused by: java.lang.ClassNotFoundException:
> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldEx ception
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288 )
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374 )
> ... 40 more
>
>
>
> From my pom.xml:
>
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>aspectj-maven-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>compile</goal>
> <goal>test-compile</goal>
> </goals>
> </execution>
> </executions>
> <dependencies>
> <dependency>
> <groupId>org.aspectj</groupId>
> <artifactId>aspectjrt</artifactId>
> <version>${aspectj.version}</version>
> </dependency>
> <dependency>
> <groupId>org.aspectj</groupId>
> <artifactId>aspectjtools</artifactId>
> <version>${aspectj.version}</version>
> </dependency>
> </dependencies>
>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> <encoding>utf-8</encoding>
> <verbose>true</verbose>
> <outxml>false</outxml>
>
> <showWeaveInfo>false</showWeaveInfo>
> <proceedOnError>true</proceedOnError>
>
> <aspectLibraries>
> <aspectLibrary>
> <groupId>org.springframework</groupId>
> <artifactId>spring-aspects</artifactId>
> </aspectLibrary>
> </aspectLibraries>
>
> <weaveDependencies>
> <weaveDependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-aspects</artifactId>
> </weaveDependency>
> </weaveDependencies>
>
> </configuration>
> </plugin>
>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-eclipse-plugin</artifactId>
> <version>2.6</version>
> <configuration>
>
> <ajdtVersion>1.6</ajdtVersion>
>
> <downloadSources>true</downloadSources>
> <downloadJavadocs>true</downloadJavadocs>
>
> <projectnatures>
>
> <java.lang.String>org.eclipse.ajdt.ui.ajnature</java.lang.String >
>
> <java.lang.String>org.springframework.ide.eclipse.core.springnature </java.lang
> .String>
>
> <java.lang.String>org.eclipse.jdt.core.javanature</java.lang.String >
> </projectnatures>
> <buildcommands>
>
> <buildcommand>org.eclipse.ajdt.core.ajbuilder</buildcommand >
> </buildcommands>
> </configuration>
> </plugin>
>
>
>
> -Kaj :)
>
Re: eclipse-maven-plugin 2.6 and AJDT [message #599919 is a reply to message #73798] Wed, 06 May 2009 12:26 Go to previous message
Kaj Hejer is currently offline Kaj HejerFriend
Messages: 8
Registered: July 2009
Junior Member
Thanks! :-)
Previous Topic:AspectJ Runtime in its own feature?
Next Topic:AspectJ Runtime in its own feature?
Goto Forum:
  


Current Time: Fri Nov 21 12:30:36 GMT 2014

Powered by FUDForum. Page generated in 0.01843 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software