Re: [aspectj-users] Trying to weave but get error
Hi all, I guess @Martin Gainty<mailto:mgai...@hotmail.com> statement about security was had it's best intentions but not very well substantiated. @Alexander Kriegisch<mailto:alexan...@kriegisch.name> we had the same experience as you and were really pushed to get a new release. Since no answers from project maintainers, that is the least you can ask for in a community based world, we hade to fork and make release. I looked at the new project, nickwongdev' , and it had a one major improvement which was one master pom and modules. So to the final part, yes I let you wait for the best to last. I have solved the issue. This part in the failing pom.xml fixed it: ${project.build.directory}/classes I don't really know why but it does. Found it after googling for sometime ( thinking I cannot be the first person encountering this). All help was greatly appreciated from you all! br, //mike In parent pom for all maven modules we have: 1.12.6 1.9.5 and com.nickwongdev aspectj-maven-plugin ${aspectj.maven.plugin.version} 1.8 **/*.java **/*.aj **/generated-sources/annotations/** src/main/aspect src/test/aspect true com.company.library aspectj-impl compile_with_aspectj compile org.aspectj aspectjrt ${aspectj.version} org.aspectj aspectjtools ${aspectj.version} com.company.library aspectj-impl ${aspectj.impl} And in the module with annotation processing and that failed: com.nickwongdev aspectj-maven-plugin ${aspectj.maven.plugin.version} 1.8 true ignore ${project.build.directory}/classes com.company.library aspectj-impl compile_with_aspectj compile org.aspectj aspectjrt ${aspectj.version} org.aspectj aspectjtools ${aspectj.version} com.company.library aspectj-impl ${aspectj.impl} Från: aspectj-users-boun...@eclipse.org för Alexander Kriegisch Skickat: den 20 mars 2020 14:28 Till: aspectj-users@eclipse.org Ämne: Re: [aspectj-users] Trying to weave but get error Martin Gainty schrieb am 20.03.2020 18:36 (GMT +07:00): > be careful including artifacts from untested repositories..see below This is available on Maven Central. Furthermore, it is open source and as I said, the fork was created because the original plugin was not maintained for a very long time. Both Nick and I contacted the Mojohaus people and asked them to review and accept the pull request, then publish a new upstream release - so far without any effect. For the last few years this 'nickwongdev' fork has been the only clean way to work with AspectJ in Maven with Java versions 9+. So please gather some information next time before irritating other people with unspecific warning messages. Thank you. -- Alexander Kriegisch https://scrum-master.de > From: aspectj-users-boun...@eclipse.org > on behalf of Mikael Petterson > > Sent: Friday, March 20, 2020 3:04 AM > To: aspectj-users@eclipse.org > Subject: Re: [aspectj-users] Trying to weave but get error > > > Hi, > > > I replaced mojohaus version with > > > com.nickwongdev > > aspectj-maven-plugin > > ${aspectj.maven.plugin.version} > > > and these versions: > > > 1.12.6 > 1.9.5 > > > Still the same problem. > > > Two questions comes to my mind: > > >I my multi-module project is it possible to exclude the failing module? >Today I have added settings for aspectj in parent pom.xml > >MG>if you only have one artifact to exclude try >MG>--projects '!module-to-exclude' > >If it is a classpath problem how could it have been working before I >introduced aspectj? Would it not be possible to add generated classes > to >classpath for aspectj? > > > MG> yes using directory parameter within configuration by executing > build-helper-maven-plugin > > org.codehaus.mojo > build-helper-maven-plugin > 1.12 > > > add-test-resource > generate-test-sources > > add-test-resource > > > > > path/to/additional/test/resources > > **/folder-to-exclude/** > MG> > MG>hth MG>Martin > > > //mike > > > > > Från: aspectj-users-boun...@eclipse.org > för Alexander Kriegisch > > Skickat: den 19 mars 2020 07:37 > Till: aspectj-users@eclipse.org > Ämne: Re: [aspectj-users] Trying to weave but get error > > > >>> The version of aspectj-maven-plugin is for jdk 11 support. It was > >>> urgent at the time. > > > > https://github.com/mojohaus/aspectj-maven-plugin/commit/c4164ff > > No, this commit was about Java 9/10 support. > > >> -- AspectJ version > > > [Mikael] 1.9.1 > > That release also was about Java 10 support: &
Re: [aspectj-users] Trying to weave but get error
Martin Gainty schrieb am 20.03.2020 18:36 (GMT +07:00): > be careful including artifacts from untested repositories..see below This is available on Maven Central. Furthermore, it is open source and as I said, the fork was created because the original plugin was not maintained for a very long time. Both Nick and I contacted the Mojohaus people and asked them to review and accept the pull request, then publish a new upstream release - so far without any effect. For the last few years this 'nickwongdev' fork has been the only clean way to work with AspectJ in Maven with Java versions 9+. So please gather some information next time before irritating other people with unspecific warning messages. Thank you. -- Alexander Kriegisch https://scrum-master.de > From: aspectj-users-boun...@eclipse.org > on behalf of Mikael Petterson > > Sent: Friday, March 20, 2020 3:04 AM > To: aspectj-users@eclipse.org > Subject: Re: [aspectj-users] Trying to weave but get error > > > Hi, > > > I replaced mojohaus version with > > > com.nickwongdev > > aspectj-maven-plugin > > ${aspectj.maven.plugin.version} > > > and these versions: > > > 1.12.6 > 1.9.5 > > > Still the same problem. > > > Two questions comes to my mind: > > > I my multi-module project is it possible to exclude the failing module? > Today I have added settings for aspectj in parent pom.xml > > MG>if you only have one artifact to exclude try > MG>--projects '!module-to-exclude' > > If it is a classpath problem how could it have been working before I > introduced aspectj? Would it not be possible to add generated classes to > classpath for aspectj? > > > MG> yes using directory parameter within configuration by executing > build-helper-maven-plugin > > org.codehaus.mojo > build-helper-maven-plugin > 1.12 > > > add-test-resource > generate-test-sources > > add-test-resource > > > > > path/to/additional/test/resources > > **/folder-to-exclude/** > MG> > MG>hth MG>Martin > > > //mike > > > > > Från: aspectj-users-boun...@eclipse.org > för Alexander Kriegisch > > Skickat: den 19 mars 2020 07:37 > Till: aspectj-users@eclipse.org > Ämne: Re: [aspectj-users] Trying to weave but get error > > > >>> The version of aspectj-maven-plugin is for jdk 11 support. It was > >>> urgent at the time. > > > > https://github.com/mojohaus/aspectj-maven-plugin/commit/c4164ff > > No, this commit was about Java 9/10 support. > > >> -- AspectJ version > > > [Mikael] 1.9.1 > > That release also was about Java 10 support: > https://www.eclipse.org/aspectj/doc/released/README-191.html > > Java 11 support came one release later: > https://www.eclipse.org/aspectj/doc/released/README-192.html > > 1.9.3 was Java 12, 1.9.4 had a couple of important bugfixes, 1.9.5 > supports Java 13. > > My recommendation is to use this fork: > https://mvnrepository.com/artifact/com.nickwongdev/aspectj-maven-plugin/1.12.6 > > It should support AspectJ 1.9.5 (please also upgrade) and up to Java 13. > The Mojohaus maintainer knows about it and got a pull request. IntelliJ > IDEA's new 2020.x version will support it too for importing AspectJ > projects. > > > ...\InjectedFunctionForRegressionChecker.java:6:0::0 > > The import ...RegressionSetInjectableFunctionAction cannot be resolved > > This rather seems to be some kind of classpath problem, maybe not even > directly related to AspectJ, but impossible to say for sure without the > MCVE. > > > -- > Alexander Kriegisch > https://scrum-master.de > ___ > aspectj-users mailing list > aspectj-users@eclipse.org > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/aspectj-users > > ___ aspectj-users mailing list aspectj-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] Trying to weave but get error
be careful including artifacts from untested repositories..see below From: aspectj-users-boun...@eclipse.org on behalf of Mikael Petterson Sent: Friday, March 20, 2020 3:04 AM To: aspectj-users@eclipse.org Subject: Re: [aspectj-users] Trying to weave but get error Hi, I replaced mojohaus version with com.nickwongdev aspectj-maven-plugin ${aspectj.maven.plugin.version} and these versions: 1.12.6 1.9.5 Still the same problem. Two questions comes to my mind: 1. I my multi-module project is it possible to exclude the failing module? Today I have added settings for aspectj in parent pom.xml MG>if you only have one artifact to exclude try MG>--projects '!module-to-exclude' 2. If it is a classpath problem how could it have been working before I introduced aspectj? Would it not be possible to add generated classes to classpath for aspectj? MG> yes using directory parameter within configuration by executing build-helper-maven-plugin org.codehaus.mojo build-helper-maven-plugin 1.12 add-test-resource generate-test-sources add-test-resource path/to/additional/test/resources **/folder-to-exclude/** MG> MG>hth MG>Martin //mike Från: aspectj-users-boun...@eclipse.org för Alexander Kriegisch Skickat: den 19 mars 2020 07:37 Till: aspectj-users@eclipse.org Ämne: Re: [aspectj-users] Trying to weave but get error >>> The version of aspectj-maven-plugin is for jdk 11 support. It was >>> urgent at the time. > https://github.com/mojohaus/aspectj-maven-plugin/commit/c4164ff No, this commit was about Java 9/10 support. >> -- AspectJ version > [Mikael] 1.9.1 That release also was about Java 10 support: https://www.eclipse.org/aspectj/doc/released/README-191.html Java 11 support came one release later: https://www.eclipse.org/aspectj/doc/released/README-192.html 1.9.3 was Java 12, 1.9.4 had a couple of important bugfixes, 1.9.5 supports Java 13. My recommendation is to use this fork: https://mvnrepository.com/artifact/com.nickwongdev/aspectj-maven-plugin/1.12.6 It should support AspectJ 1.9.5 (please also upgrade) and up to Java 13. The Mojohaus maintainer knows about it and got a pull request. IntelliJ IDEA's new 2020.x version will support it too for importing AspectJ projects. > ...\InjectedFunctionForRegressionChecker.java:6:0::0 > The import ...RegressionSetInjectableFunctionAction cannot be resolved This rather seems to be some kind of classpath problem, maybe not even directly related to AspectJ, but impossible to say for sure without the MCVE. -- Alexander Kriegisch https://scrum-master.de ___ aspectj-users mailing list aspectj-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/aspectj-users ___ aspectj-users mailing list aspectj-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] Trying to weave but get error
Mikael, I hope you understand that I want to stop speculating until I have an MCVE reproducing the problem. Regards -- Alexander Kriegisch https://scrum-master.de Mikael Petterson schrieb am 20.03.2020 14:04 (GMT +07:00): > > Hi, > > > I replaced mojohaus version with > > > com.nickwongdev > > aspectj-maven-plugin > > ${aspectj.maven.plugin.version} > > > and these versions: > > > 1.12.6 > 1.9.5 > > > Still the same problem. > > > Two questions comes to my mind: > > > I my multi-module project is it possible to exclude the failing module? > Today I have added settings for aspectj in parent pom.xml > If it is a classpath problem how could it have been working before I > introduced aspectj? Would it not be possible to add generated classes to > classpath for aspectj? > > > br, > > > //mike > > > > > Från: aspectj-users-boun...@eclipse.org > för Alexander Kriegisch > > Skickat: den 19 mars 2020 07:37 > Till: aspectj-users@eclipse.org > Ämne: Re: [aspectj-users] Trying to weave but get error > > > >>> The version of aspectj-maven-plugin is for jdk 11 support. It was > >>> urgent at the time. > > > > https://github.com/mojohaus/aspectj-maven-plugin/commit/c4164ff > > No, this commit was about Java 9/10 support. > > >> -- AspectJ version > > > [Mikael] 1.9.1 > > That release also was about Java 10 support: > https://www.eclipse.org/aspectj/doc/released/README-191.html > > Java 11 support came one release later: > https://www.eclipse.org/aspectj/doc/released/README-192.html > > 1.9.3 was Java 12, 1.9.4 had a couple of important bugfixes, 1.9.5 > supports Java 13. > > My recommendation is to use this fork: > https://mvnrepository.com/artifact/com.nickwongdev/aspectj-maven-plugin/1.12.6 > > It should support AspectJ 1.9.5 (please also upgrade) and up to Java 13. > The Mojohaus maintainer knows about it and got a pull request. IntelliJ > IDEA's new 2020.x version will support it too for importing AspectJ > projects. > > > ...\InjectedFunctionForRegressionChecker.java:6:0::0 > > The import ...RegressionSetInjectableFunctionAction cannot be resolved > > This rather seems to be some kind of classpath problem, maybe not even > directly related to AspectJ, but impossible to say for sure without the > MCVE. > > > -- > Alexander Kriegisch > https://scrum-master.de > ___ > aspectj-users mailing list > aspectj-users@eclipse.org > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/aspectj-users > > ___ aspectj-users mailing list aspectj-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] Trying to weave but get error
Hi, I replaced mojohaus version with com.nickwongdev aspectj-maven-plugin ${aspectj.maven.plugin.version} and these versions: 1.12.6 1.9.5 Still the same problem. Two questions comes to my mind: 1. I my multi-module project is it possible to exclude the failing module? Today I have added settings for aspectj in parent pom.xml 2. If it is a classpath problem how could it have been working before I introduced aspectj? Would it not be possible to add generated classes to classpath for aspectj? br, //mike Från: aspectj-users-boun...@eclipse.org för Alexander Kriegisch Skickat: den 19 mars 2020 07:37 Till: aspectj-users@eclipse.org Ämne: Re: [aspectj-users] Trying to weave but get error >>> The version of aspectj-maven-plugin is for jdk 11 support. It was >>> urgent at the time. > https://github.com/mojohaus/aspectj-maven-plugin/commit/c4164ff No, this commit was about Java 9/10 support. >> -- AspectJ version > [Mikael] 1.9.1 That release also was about Java 10 support: https://www.eclipse.org/aspectj/doc/released/README-191.html Java 11 support came one release later: https://www.eclipse.org/aspectj/doc/released/README-192.html 1.9.3 was Java 12, 1.9.4 had a couple of important bugfixes, 1.9.5 supports Java 13. My recommendation is to use this fork: https://mvnrepository.com/artifact/com.nickwongdev/aspectj-maven-plugin/1.12.6 It should support AspectJ 1.9.5 (please also upgrade) and up to Java 13. The Mojohaus maintainer knows about it and got a pull request. IntelliJ IDEA's new 2020.x version will support it too for importing AspectJ projects. > ...\InjectedFunctionForRegressionChecker.java:6:0::0 > The import ...RegressionSetInjectableFunctionAction cannot be resolved This rather seems to be some kind of classpath problem, maybe not even directly related to AspectJ, but impossible to say for sure without the MCVE. -- Alexander Kriegisch https://scrum-master.de ___ aspectj-users mailing list aspectj-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/aspectj-users ___ aspectj-users mailing list aspectj-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] Trying to weave but get error
>>> The version of aspectj-maven-plugin is for jdk 11 support. It was >>> urgent at the time. > https://github.com/mojohaus/aspectj-maven-plugin/commit/c4164ff No, this commit was about Java 9/10 support. >> -- AspectJ version > [Mikael] 1.9.1 That release also was about Java 10 support: https://www.eclipse.org/aspectj/doc/released/README-191.html Java 11 support came one release later: https://www.eclipse.org/aspectj/doc/released/README-192.html 1.9.3 was Java 12, 1.9.4 had a couple of important bugfixes, 1.9.5 supports Java 13. My recommendation is to use this fork: https://mvnrepository.com/artifact/com.nickwongdev/aspectj-maven-plugin/1.12.6 It should support AspectJ 1.9.5 (please also upgrade) and up to Java 13. The Mojohaus maintainer knows about it and got a pull request. IntelliJ IDEA's new 2020.x version will support it too for importing AspectJ projects. > ...\InjectedFunctionForRegressionChecker.java:6:0::0 > The import ...RegressionSetInjectableFunctionAction cannot be resolved This rather seems to be some kind of classpath problem, maybe not even directly related to AspectJ, but impossible to say for sure without the MCVE. -- Alexander Kriegisch https://scrum-master.de ___ aspectj-users mailing list aspectj-users@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] Trying to weave but get error
Hi Alex, Yes I understand what you mean and it is only the generated that does have a problem. Problem is that we have so many dependencies. This will take me a lot of time. I might get some time to do MCVE Here are the answers: -- Java version -- AspectJ version [Mikael] 1.9.1 -- AspectJ Maven version and what exactly was changed in your (or someone else's) fork. There is one semi official fork I also use for Java 9+ AspectJ projects, but I have no idea if you are using that one or not. We did a release on this latest commit ( 2 years ago) https://github.com/mojohaus/aspectj-maven-plugin/commit/c4164ff96d1ca9448ba970bb5cee963059a7e910 And it seems nothing has changed since. -- Is the error an AspectJ problem as it seems from the stack trace or maybe related to the Maven plugin? [Mikael] Yes it seems to be aspectj. But I need to verify. -- Which source file(s) does it fail to compile or weave? [Mikael] Generated ones and it fails on: [ERROR] error Unexpected error during ACG processing: java.lang.NullPointerException [ERROR] error at import com.company.actions.regression.RegressionSetInjectableFunctionAction; [ERROR] ^^ [ERROR] C:\Users\me\git\mje\module-actions\src\main\java\com\company\actions\api\InjectedFunctionForRegressionChecker.java:6:0::0 The import com.company.actions.regression.RegressionSetInjectableFunctionAction cannot be resolved This the generated file.. -- Do you use compile-time or binary weaving? [Mikael] Compile time weaving. br, //mike Från: aspectj-users-boun...@eclipse.org för Alexander Kriegisch Skickat: den 19 mars 2020 04:30 Till: aspectj-users@eclipse.org Ämne: Re: [aspectj-users] Trying to weave but get error > I wish it was that easy. We have 24 modules in a maven multi-module > project. I was not implying for you to expose your full project but to condense it into an MCVE [1] reproducing the problem because there are many things I don't know such as: -- Java version -- AspectJ version -- AspectJ Maven version and what exactly was changed in your (or someone else's) fork. There is one semi official fork I also use for Java 9+ AspectJ projects, but I have no idea if you are using that one or not. -- Is the error an AspectJ problem as it seems from the stack trace or maybe related to the Maven plugin? -- Which source file(s) does it fail to compile or weave? -- Do you use compile-time or binary weaving? And several others. So please provide an MCVE. It could be as simple as a source file reproducing the error when compiled manually by ajc (AspectJ compiler) or a small Maven project. Whether the project also contains the source code generation step or you just copy some generated files into the project is not so important as long as the problem is **reproducible**. [1] https://stackoverflow.com/help/mcve > I guess I need to make sure the generated sources are compiled before > ajc. Actually no, that should not be necessary. Ajc is a full drop-in replacement for Javac. Regards -- Alexander Kriegisch https://scrum-master.de Mikael Petterson schrieb am 18.03.2020 21:29 (GMT +07:00): > > Hi, > > > I wish it was that easy. We have 24 modules in a maven multi-module > project. > > > One module has java template classes and then in another module, > module-actions, we generate java code from these templates: > > > [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ module-actions > ---^M > > [INFO] Deleting C:\Users\me\git\prod\module-actions\target^M > > [INFO] ^M > > [INFO] --- build-helper-maven-plugin:3.0.0:add-source (add-source) @ > module-actions ---^M > > [INFO] Source directory: > C:\Users\me\git\prod\module-actions\target\generated-sources\annotations > added.^M > > [INFO] ^M > > [INFO] --- aspectj-maven-plugin:1.11.1-FORK:compile (compile_with_aspectj) > @ module-actions ---^M > > > The version of aspectj-maven-plugin is for jdk 11 support. It was urgent > at the time. > > > I guess I need to make sure the generated sources are compiled before ajc. > > > br, > > > //mike > > > ---- > > Från: aspectj-users-boun...@eclipse.org > för Alexander Kriegisch > > Skickat: den 18 mars 2020 12:36 > Till: aspectj-users@eclipse.org > Ämne: Re: [aspectj-users] Trying to weave but get error > > > Hi Mikael. > > How about a reproducible POM + Java + AspectJ project, maybe on GitHub? > > I also don't know what kind of fork you are using: > > > aspectj-maven-plugin:1.11.1-FORK > > Thanks for an update with more info. :-) > -- > Alexander Kriegisch > https://scrum-master.de > > > Mikael Petterson sch
Re: [aspectj-users] Trying to weave but get error
> I wish it was that easy. We have 24 modules in a maven multi-module > project. I was not implying for you to expose your full project but to condense it into an MCVE [1] reproducing the problem because there are many things I don't know such as: -- Java version -- AspectJ version -- AspectJ Maven version and what exactly was changed in your (or someone else's) fork. There is one semi official fork I also use for Java 9+ AspectJ projects, but I have no idea if you are using that one or not. -- Is the error an AspectJ problem as it seems from the stack trace or maybe related to the Maven plugin? -- Which source file(s) does it fail to compile or weave? -- Do you use compile-time or binary weaving? And several others. So please provide an MCVE. It could be as simple as a source file reproducing the error when compiled manually by ajc (AspectJ compiler) or a small Maven project. Whether the project also contains the source code generation step or you just copy some generated files into the project is not so important as long as the problem is **reproducible**. [1] https://stackoverflow.com/help/mcve > I guess I need to make sure the generated sources are compiled before > ajc. Actually no, that should not be necessary. Ajc is a full drop-in replacement for Javac. Regards -- Alexander Kriegisch https://scrum-master.de Mikael Petterson schrieb am 18.03.2020 21:29 (GMT +07:00): > > Hi, > > > I wish it was that easy. We have 24 modules in a maven multi-module > project. > > > One module has java template classes and then in another module, > module-actions, we generate java code from these templates: > > > [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ module-actions > ---^M > > [INFO] Deleting C:\Users\me\git\prod\module-actions\target^M > > [INFO] ^M > > [INFO] --- build-helper-maven-plugin:3.0.0:add-source (add-source) @ > module-actions ---^M > > [INFO] Source directory: > C:\Users\me\git\prod\module-actions\target\generated-sources\annotations > added.^M > > [INFO] ^M > > [INFO] --- aspectj-maven-plugin:1.11.1-FORK:compile (compile_with_aspectj) > @ module-actions ---^M > > > The version of aspectj-maven-plugin is for jdk 11 support. It was urgent > at the time. > > > I guess I need to make sure the generated sources are compiled before ajc. > > > br, > > > //mike > > > ---- > > Från: aspectj-users-boun...@eclipse.org > för Alexander Kriegisch > > Skickat: den 18 mars 2020 12:36 > Till: aspectj-users@eclipse.org > Ämne: Re: [aspectj-users] Trying to weave but get error > > > Hi Mikael. > > How about a reproducible POM + Java + AspectJ project, maybe on GitHub? > > I also don't know what kind of fork you are using: > > > aspectj-maven-plugin:1.11.1-FORK > > Thanks for an update with more info. :-) > -- > Alexander Kriegisch > https://scrum-master.de > > > Mikael Petterson schrieb am 18.03.2020 19:27 (GMT +07:00): > > > > Hi, > > > > > > We are trying to compile to compile a project ajc and get: > > > > > > Failed to execute goal > > org.codehaus.mojo:aspectj-maven-plugin:1.11.1-FORK:compile > > (compile_with_aspectj) on project msran-jcat-extension-actions: AJC > > compiler errors: > > > > [ERROR] error Unexpected error during ACG processing: > > java.lang.NullPointerException > > > > > > I know you are not maintainer of aspectj-maven-plugin but since you are > > more familiar with the core I wonder if you have any ideas? > > > > > > br, > > > > > > //mike > > > > > > Here is the more details of stacktrace: > > > > > > java.lang.NullPointerException > > > > > > at > > > org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.sourceStart(SourceTypeBinding.java:2472) > > > > > > at > > > org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding.sourceStart(MethodBinding.java:1331) > > > > > > at > > > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.determineSourceStart(TypeElementImpl.java:98) > > > > > > at > > > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.getSourceStart(TypeElementImpl.java:71) > > > > > > at > > > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.compare(TypeElementImpl.java:64) > > > > > > at > > > org.aspectj.
Re: [aspectj-users] Trying to weave but get error
Hi, I wish it was that easy. We have 24 modules in a maven multi-module project. One module has java template classes and then in another module, module-actions, we generate java code from these templates: [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ module-actions ---^M [INFO] Deleting C:\Users\me\git\prod\module-actions\target^M [INFO] ^M [INFO] --- build-helper-maven-plugin:3.0.0:add-source (add-source) @ module-actions ---^M [INFO] Source directory: C:\Users\me\git\prod\module-actions\target\generated-sources\annotations added.^M [INFO] ^M [INFO] --- aspectj-maven-plugin:1.11.1-FORK:compile (compile_with_aspectj) @ module-actions ---^M The version of aspectj-maven-plugin is for jdk 11 support. It was urgent at the time. I guess I need to make sure the generated sources are compiled before ajc. br, //mike Från: aspectj-users-boun...@eclipse.org för Alexander Kriegisch Skickat: den 18 mars 2020 12:36 Till: aspectj-users@eclipse.org Ämne: Re: [aspectj-users] Trying to weave but get error Hi Mikael. How about a reproducible POM + Java + AspectJ project, maybe on GitHub? I also don't know what kind of fork you are using: > aspectj-maven-plugin:1.11.1-FORK Thanks for an update with more info. :-) -- Alexander Kriegisch https://scrum-master.de Mikael Petterson schrieb am 18.03.2020 19:27 (GMT +07:00): > > Hi, > > > We are trying to compile to compile a project ajc and get: > > > Failed to execute goal > org.codehaus.mojo:aspectj-maven-plugin:1.11.1-FORK:compile > (compile_with_aspectj) on project msran-jcat-extension-actions: AJC > compiler errors: > > [ERROR] error Unexpected error during ACG processing: > java.lang.NullPointerException > > > I know you are not maintainer of aspectj-maven-plugin but since you are > more familiar with the core I wonder if you have any ideas? > > > br, > > > //mike > > > Here is the more details of stacktrace: > > > java.lang.NullPointerException > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.sourceStart(SourceTypeBinding.java:2472) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding.sourceStart(MethodBinding.java:1331) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.determineSourceStart(TypeElementImpl.java:98) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.getSourceStart(TypeElementImpl.java:71) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.compare(TypeElementImpl.java:64) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.compare(TypeElementImpl.java:1) > > > at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) > > > at java.util.TimSort.sort(TimSort.java:220) > > > at java.util.Arrays.sort(Arrays.java:1512) > > > at java.util.ArrayList.sort(ArrayList.java:1462) > > > at java.util.Collections.sort(Collections.java:175) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl.getEnclosedElements(TypeElementImpl.java:165) > > > at > com.ericsson.msran.generator.util.ElementUtil.getEnumValues(ElementUtil.java:566) > > > at > com.ericsson.msran.generator.check.ActionAttributeCodingRules$3.check(ActionAttributeCodingRules.java:89) > > > at > com.ericsson.msran.generator.check.ActionAttributeCodingRules$3.check(ActionAttributeCodingRules.java:1) > > > at > com.ericsson.msran.generator.check.CodingRule.doCheck(CodingRule.java:70) > > > at > com.ericsson.msran.generator.check.CodingRuleExecutor$1.check(CodingRuleExecutor.java:39) > > > at > com.ericsson.msran.generator.check.CodingRuleScanner.visitVariable(CodingRuleScanner.java:35) > > > at > com.ericsson.msran.generator.check.CodingRuleScanner.visitVariable(CodingRuleScanner.java:1) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.VariableElementImpl.accept(VariableElementImpl.java:57) > > > at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:146) > > > at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:133) > > > at > javax.lang.model.util.ElementScanner6.visitType(ElementScanner6.java:178) > > > at > com.ericsson.msran.generator.check.CodingRuleScanner.visitType(CodingRuleScanner.java:29) > > > at > com.ericsson.msran.generator.check.CodingRuleScanner.visitType(CodingRuleScanner.java:1) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl.accept(TypeElemen
Re: [aspectj-users] Trying to weave but get error
Hi Mikael. How about a reproducible POM + Java + AspectJ project, maybe on GitHub? I also don't know what kind of fork you are using: > aspectj-maven-plugin:1.11.1-FORK Thanks for an update with more info. :-) -- Alexander Kriegisch https://scrum-master.de Mikael Petterson schrieb am 18.03.2020 19:27 (GMT +07:00): > > Hi, > > > We are trying to compile to compile a project ajc and get: > > > Failed to execute goal > org.codehaus.mojo:aspectj-maven-plugin:1.11.1-FORK:compile > (compile_with_aspectj) on project msran-jcat-extension-actions: AJC > compiler errors: > > [ERROR] error Unexpected error during ACG processing: > java.lang.NullPointerException > > > I know you are not maintainer of aspectj-maven-plugin but since you are > more familiar with the core I wonder if you have any ideas? > > > br, > > > //mike > > > Here is the more details of stacktrace: > > > java.lang.NullPointerException > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.sourceStart(SourceTypeBinding.java:2472) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding.sourceStart(MethodBinding.java:1331) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.determineSourceStart(TypeElementImpl.java:98) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.getSourceStart(TypeElementImpl.java:71) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.compare(TypeElementImpl.java:64) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.compare(TypeElementImpl.java:1) > > > at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) > > > at java.util.TimSort.sort(TimSort.java:220) > > > at java.util.Arrays.sort(Arrays.java:1512) > > > at java.util.ArrayList.sort(ArrayList.java:1462) > > > at java.util.Collections.sort(Collections.java:175) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl.getEnclosedElements(TypeElementImpl.java:165) > > > at > com.ericsson.msran.generator.util.ElementUtil.getEnumValues(ElementUtil.java:566) > > > at > com.ericsson.msran.generator.check.ActionAttributeCodingRules$3.check(ActionAttributeCodingRules.java:89) > > > at > com.ericsson.msran.generator.check.ActionAttributeCodingRules$3.check(ActionAttributeCodingRules.java:1) > > > at > com.ericsson.msran.generator.check.CodingRule.doCheck(CodingRule.java:70) > > > at > com.ericsson.msran.generator.check.CodingRuleExecutor$1.check(CodingRuleExecutor.java:39) > > > at > com.ericsson.msran.generator.check.CodingRuleScanner.visitVariable(CodingRuleScanner.java:35) > > > at > com.ericsson.msran.generator.check.CodingRuleScanner.visitVariable(CodingRuleScanner.java:1) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.VariableElementImpl.accept(VariableElementImpl.java:57) > > > at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:146) > > > at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:133) > > > at > javax.lang.model.util.ElementScanner6.visitType(ElementScanner6.java:178) > > > at > com.ericsson.msran.generator.check.CodingRuleScanner.visitType(CodingRuleScanner.java:29) > > > at > com.ericsson.msran.generator.check.CodingRuleScanner.visitType(CodingRuleScanner.java:1) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl.accept(TypeElementImpl.java:136) > > > at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:146) > > > at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:133) > > > at > javax.lang.model.util.ElementScanner6.visitPackage(ElementScanner6.java:167) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.PackageElementImpl.accept(PackageElementImpl.java:51) > > > at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:146) > > > at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:133) > > > at > com.ericsson.msran.generator.check.CodingRuleExecutor.checkAll(CodingRuleExecutor.java:46) > > > at > com.ericsson.msran.generator.ActionAnnotationProcessor.checkCodingRules(ActionAnnotationProcessor.java:228) > > > at > com.ericsson.msran.generator.ActionAnnotationProcessor.process(ActionAnnotationProcessor.java:149) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:121) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159) > > > at > org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:9
[aspectj-users] Trying to weave but get error
Hi, We are trying to compile to compile a project ajc and get: Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.11.1-FORK:compile (compile_with_aspectj) on project msran-jcat-extension-actions: AJC compiler errors: [ERROR] error Unexpected error during ACG processing: java.lang.NullPointerException I know you are not maintainer of aspectj-maven-plugin but since you are more familiar with the core I wonder if you have any ideas? br, //mike Here is the more details of stacktrace: java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.sourceStart(SourceTypeBinding.java:2472) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding.sourceStart(MethodBinding.java:1331) at org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.determineSourceStart(TypeElementImpl.java:98) at org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.getSourceStart(TypeElementImpl.java:71) at org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.compare(TypeElementImpl.java:64) at org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl$SourceLocationComparator.compare(TypeElementImpl.java:1) at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) at java.util.TimSort.sort(TimSort.java:220) at java.util.Arrays.sort(Arrays.java:1512) at java.util.ArrayList.sort(ArrayList.java:1462) at java.util.Collections.sort(Collections.java:175) at org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl.getEnclosedElements(TypeElementImpl.java:165) at com.ericsson.msran.generator.util.ElementUtil.getEnumValues(ElementUtil.java:566) at com.ericsson.msran.generator.check.ActionAttributeCodingRules$3.check(ActionAttributeCodingRules.java:89) at com.ericsson.msran.generator.check.ActionAttributeCodingRules$3.check(ActionAttributeCodingRules.java:1) at com.ericsson.msran.generator.check.CodingRule.doCheck(CodingRule.java:70) at com.ericsson.msran.generator.check.CodingRuleExecutor$1.check(CodingRuleExecutor.java:39) at com.ericsson.msran.generator.check.CodingRuleScanner.visitVariable(CodingRuleScanner.java:35) at com.ericsson.msran.generator.check.CodingRuleScanner.visitVariable(CodingRuleScanner.java:1) at org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.VariableElementImpl.accept(VariableElementImpl.java:57) at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:146) at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:133) at javax.lang.model.util.ElementScanner6.visitType(ElementScanner6.java:178) at com.ericsson.msran.generator.check.CodingRuleScanner.visitType(CodingRuleScanner.java:29) at com.ericsson.msran.generator.check.CodingRuleScanner.visitType(CodingRuleScanner.java:1) at org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.TypeElementImpl.accept(TypeElementImpl.java:136) at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:146) at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:133) at javax.lang.model.util.ElementScanner6.visitPackage(ElementScanner6.java:167) at org.aspectj.org.eclipse.jdt.internal.compiler.apt.model.PackageElementImpl.accept(PackageElementImpl.java:51) at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:146) at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:133) at com.ericsson.msran.generator.check.CodingRuleExecutor.checkAll(CodingRuleExecutor.java:46) at com.ericsson.msran.generator.ActionAnnotationProcessor.checkCodingRules(ActionAnnotationProcessor.java:228) at com.ericsson.msran.generator.ActionAnnotationProcessor.process(ActionAnnotationProcessor.java:149) at org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139) at org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:121) at org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:952) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:448) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:424) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1107) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:276)