You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/10/25 05:52:09 UTC
[GitHub] [netbeans] stoxford opened a new issue, #4852: JAXBException / AnnotationProcessingError reported during background scan of project
stoxford opened a new issue, #4852:
URL: https://github.com/apache/netbeans/issues/4852
### Apache NetBeans version
Apache NetBeans 15
### What happened
After upgrading from NetBeans 13 to NetBeans 15, an unexpected exception occurred during the first background scanning of my project. Here is the debug output:
```
java.lang.ClassNotFoundException
at java.base/java.lang.ClassLoader.findClass(ClassLoader.java:636)
at org.netbeans.modules.java.source.parsing.CachingArchiveClassLoader.findClass(CachingArchiveClassLoader.java:137)
at java.base/java.lang.ClassLoader.loadClassHelper(ClassLoader.java:1196)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1111)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1094)
Caused: java.lang.NoClassDefFoundError: javax.xml.bind.JAXBException
at org.hibernate.jpamodelgen.xml.JpaDescriptorParser.<init>(JpaDescriptorParser.java:77)
at org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor.init(JPAMetaModelEntityProcessor.java:116)
at org.netbeans.modules.java.source.indexing.APTUtils$ErrorToleratingProcessor.init(APTUtils.java:973)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:690)
Caused: com.sun.tools.javac.processing.AnnotationProcessingError
at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:739)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:819)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:913)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2300(JavacProcessingEnvironment.java:114)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1256)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1371)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1234)
at org.netbeans.lib.nbjavac.services.NBJavaCompiler.processAnnotations(NBJavaCompiler.java:62)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1133)
at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:348)
[catch] at org.netbeans.modules.java.source.indexing.VanillaCompileWorker.compile(VanillaCompileWorker.java:251)
at org.netbeans.modules.java.source.indexing.JavaCustomIndexer.index(JavaCustomIndexer.java:360)
at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor$2.run(Indexable.java:138)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runIndexer(RepositoryUpdater.java:274)
at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:136)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doIndex(RepositoryUpdater.java:2749)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.lambda$index$0(RepositoryUpdater.java:2626)
at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.refreshTransaction(TaskCache.java:540)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:2625)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork.lambda$scanSource$3(RepositoryUpdater.java:5735)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.lambda$runInContext$4(RepositoryUpdater.java:2119)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2117)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2098)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.access$1400(RepositoryUpdater.java:135)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork.scanSource(RepositoryUpdater.java:5770)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork.scanSources(RepositoryUpdater.java:5443)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$RootsWork.getDone(RepositoryUpdater.java:5075)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3452)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6197)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$3400(RepositoryUpdater.java:5855)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.lambda$call$0(RepositoryUpdater.java:6116)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
at org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6116)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6112)
at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:6112)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
```
I was getting a combination AnnotationProcessingError / JAXBException unexpected exception in NetBeans 13 previously, which is what motivated me to upgrade to NetBeans 15.
### How to reproduce
I got the error during background scanning of my project. Unfortunately, I can't share my entire project.
Previously, in NetBeans 13, I was getting a possibly related AnnotationProcessingError / JAXBException unexpected exception during compilation of my project.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
macOS Catalina
### JDK
NetBeans running on JDK 17.0.4.1. Compiling with JDK 8.
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
### Code of Conduct
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] stoxford commented on issue #4852: JAXBException / AnnotationProcessingError reported during background scan of project
Posted by GitBox <gi...@apache.org>.
stoxford commented on issue #4852:
URL: https://github.com/apache/netbeans/issues/4852#issuecomment-1290118067
Update: This is not a one-time issue. It is happening repeatedly, but not consistently. It happens during "Background scanning of projects…"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] mbien commented on issue #4852: Unexpected Exception reported during background scan of project
Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4852:
URL: https://github.com/apache/netbeans/issues/4852#issuecomment-1297461356
> > Maybe it has the runtime JDK in the path instead of the project JDK?
>
> Isn't that expected during scanning?
i don't know. But that was my thought since that would mean in this case that there would be no way to find jaxb for NB. Since it is not in the runtime JDK and not in the project classpath - its only in the project's target JDK.
Starting NB on 8 and it working would indicate that this is indeed the case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] mbien commented on issue #4852: Unexpected Exception reported during background scan of project
Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4852:
URL: https://github.com/apache/netbeans/issues/4852#issuecomment-1291016025
Interesting. I am wondering why the annotation scanner can't find the `JAXBException`. Maybe it has the runtime JDK in the path instead of the project JDK?
Even though this is not a supported configuration. I would be curious if the same exception would also occur if you start NB on JDK 8 (which has jaxb).
What annotation do you think is causing this? A minimal reproducer would be great i think.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] neilcsmith-net commented on issue #4852: Unexpected Exception reported during background scan of project
Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on issue #4852:
URL: https://github.com/apache/netbeans/issues/4852#issuecomment-1297472694
Theoretically there are settings to switch off annotation processing in the editor and when scanning, but I can only find in the UI for Ant projects with initial look.
Workaround may be to add into the project as a (provided) dependency?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] mbien commented on issue #4852: Unexpected Exception reported during background scan of project
Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4852:
URL: https://github.com/apache/netbeans/issues/4852#issuecomment-1297483866
> Workaround may be to add into the project as a (provided) dependency?
excellent idea to try out
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] mbien commented on issue #4852: Unexpected Exception reported during background scan of project
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #4852:
URL: https://github.com/apache/netbeans/issues/4852#issuecomment-1732459293
this is likely fixed by the linked PR above and can be tested in current dev builds. Closing, feel free to reopen if it still causes issues.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] neilcsmith-net commented on issue #4852: Unexpected Exception reported during background scan of project
Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on issue #4852:
URL: https://github.com/apache/netbeans/issues/4852#issuecomment-1297437715
> Maybe it has the runtime JDK in the path instead of the project JDK?
Isn't that expected during scanning?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] mbien closed issue #4852: Unexpected Exception reported during background scan of project
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien closed issue #4852: Unexpected Exception reported during background scan of project
URL: https://github.com/apache/netbeans/issues/4852
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] hrotkogabor commented on issue #4852: Unexpected Exception reported during background scan of project
Posted by "hrotkogabor (via GitHub)" <gi...@apache.org>.
hrotkogabor commented on issue #4852:
URL: https://github.com/apache/netbeans/issues/4852#issuecomment-1665346739
By this post:
https://stackoverflow.com/questions/52502189/java-11-package-javax-xml-bind-does-not-exist
adding these dependencies to the project solves the problem:
```
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.0</version>
</dependency>
```
Maybe the ide should warn the user or solve the problem by this fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists