Error while building sm-core in eclipse. JVM is not suitable for processing annotation! ToolProvider.getSystemJavaCompiler() is null

1,822 views
Skip to first unread message

kaivalya apte

unread,
Sep 3, 2014, 9:21:21 AM9/3/14
to shop...@googlegroups.com
Hi All,

I am facing an error while trying maven build the sm-core project. I have followed the steps in the documentation but it fails in mvn clean install or generate-sources with the following error. Please help me figure out the reason.

[DEBUG] javac option: -s
[DEBUG] javac option: C:\Users\kapte\Documents\shopizer-master\shopizer-master\sm-core\target\generated-sources\apt
[ERROR] JVM is not suitable for processing annotation! ToolProvider.getSystemJavaCompiler() is null.
[INFO] 
[INFO] --- maven-processor-plugin:2.2.4:process (default) @ sm-core ---
[DEBUG] Configuring mojo org.bsc.maven:maven-processor-plugin:2.2.4:process from plugin realm ClassRealm[plugin>org.bsc.maven:maven-processor-plugin:2.2.4, parent: sun.misc.Launcher$AppClassLoader@1b1f1f12]
[DEBUG] Configuring mojo 'org.bsc.maven:maven-processor-plugin:2.2.4:process' with basic configurator -->


[ERROR] execute error
java.lang.NullPointerException
at com.mysema.maven.apt.AbstractProcessorMojo.execute(AbstractProcessorMojo.java:151)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.532s
[INFO] Finished at: Wed Sep 03 18:42:55 IST 2014
[INFO] Final Memory: 11M/171M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.mysema.maven:maven-apt-plugin:1.0.2:process (default) on project sm-core: null: MojoExecutionException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.mysema.maven:maven-apt-plugin:1.0.2:process (default) on project sm-core: null
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException
at com.mysema.maven.apt.AbstractProcessorMojo.execute(AbstractProcessorMojo.java:226)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:



Any help/suggestions are highly appreciated. Thanks

Umesh Awasthi

unread,
Sep 3, 2014, 10:48:31 AM9/3/14
to shop...@googlegroups.com
Which JDK version you are using to build ?


--
You received this message because you are subscribed to the Google Groups "Shopizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shopizer+u...@googlegroups.com.
To post to this group, send email to shop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shopizer/4386f1c6-5d5f-4546-858a-4f22d4a34adc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
With Regards
Umesh Awasthi
http://www.travellingrants.com/

   

kaivalya apte

unread,
Sep 3, 2014, 1:42:06 PM9/3/14
to shop...@googlegroups.com
JDK 1.7.

Umesh Awasthi

unread,
Sep 3, 2014, 10:01:16 PM9/3/14
to shop...@googlegroups.com
I suspect you are trying to run the code with a JRE instead of a JDK.
I suggest to please check Java home path and see if everything is configured correctly or not?





For more options, visit https://groups.google.com/d/optout.
Message has been deleted

MIHIR

unread,
Sep 4, 2014, 7:26:51 AM9/4/14
to shop...@googlegroups.com
I am also facing the same issue. This is coming when I do below step -

Right-click sm-core > Run As > Maven gerate-sources

My JAVA_HOME is set to JDK path only. Please help.

Umesh Awasthi

unread,
Sep 4, 2014, 7:29:28 AM9/4/14
to shop...@googlegroups.com
I never tried with Eclipse, will give it a try in evening.
I always used maven command line tool and never faced such issues..


--
You received this message because you are subscribed to the Google Groups "Shopizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shopizer+u...@googlegroups.com.
To post to this group, send email to shop...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

nares...@gmail.com

unread,
Aug 8, 2015, 3:26:03 AM8/8/15
to Shopizer
Hi All,

when i build shopizer project, i am getting below error. any one can u share ur views..

[ERROR] execute error
java.lang.RuntimeException: javax.lang.model.type.UnknownTypeException: Unknown type: java.lang.Object&java.io.Serializable&java.lang.Comparable<K>
at com.sun.tools.javac.main.Main.compile(Main.java:553)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
at com.mysema.maven.apt.AbstractProcessorMojo.execute(AbstractProcessorMojo.java:210)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)


at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: javax.lang.model.type.UnknownTypeException: Unknown type: java.lang.Object&java.io.Serializable&java.lang.Comparable<K>
at javax.lang.model.util.AbstractTypeVisitor6.visitUnknown(AbstractTypeVisitor6.java:150)
at javax.lang.model.util.AbstractTypeVisitor6.visitIntersection(AbstractTypeVisitor6.java:133)
at com.sun.tools.javac.code.Type$IntersectionClassType.accept(Type.java:1004)
at javax.lang.model.util.AbstractTypeVisitor6.visit(AbstractTypeVisitor6.java:92)
at com.mysema.query.apt.ExtendedTypeFactory$2.visitTypeVariable(ExtendedTypeFactory.java:250)
at com.mysema.query.apt.ExtendedTypeFactory$2.visitTypeVariable(ExtendedTypeFactory.java:199)
at com.sun.tools.javac.code.Type$TypeVar.accept(Type.java:1304)
at javax.lang.model.util.AbstractTypeVisitor6.visit(AbstractTypeVisitor6.java:92)
at com.mysema.query.apt.ExtendedTypeFactory$2.visitDeclared(ExtendedTypeFactory.java:233)
at com.mysema.query.apt.ExtendedTypeFactory$2.visitDeclared(ExtendedTypeFactory.java:199)
at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:921)
at javax.lang.model.util.AbstractTypeVisitor6.visit(AbstractTypeVisitor6.java:92)
at com.mysema.query.apt.ExtendedTypeFactory.getEntityType(ExtendedTypeFactory.java:461)
at com.mysema.query.apt.AbstractQuerydslProcessor.processAnnotations(AbstractQuerydslProcessor.java:114)
at com.mysema.query.apt.AbstractQuerydslProcessor.process(AbstractQuerydslProcessor.java:97)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1173)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:859)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
... 25 more
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] sm-core-model ...................................... FAILURE [11:17 min]
[INFO] sm-core-modules .................................... SKIPPED
[INFO] sm-core ............................................ SKIPPED
[INFO] sm-shop ............................................ SKIPPED
[INFO] shopizer ........................................... SKIPPED


[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

[INFO] Total time: 11:17 min
[INFO] Finished at: 2015-08-08T12:24:18+05:30
[INFO] Final Memory: 23M/125M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.mysema.maven:maven-apt-plugin:1.0.2:process (default) on project sm-core-model: javax.lang.model.type.UnknownTypeException: Unknown type: java.lang.Object&java.io.Serializable&java.lang.Comparable<K> -> [Help 1]
[ERROR]

Message has been deleted

vietngu...@gmail.com

unread,
Apr 13, 2016, 10:45:24 AM4/13/16
to Shopizer, nares...@gmail.com
This work for me on JDK 8 "change the version of com.mysema.querydsl:querydsl-* to the newest 3.6.6":
https://groups.google.com/d/msg/shopizer/qPWTR99M4e4/SmLDsMt4EQAJ

roshe...@gmail.com

unread,
Feb 8, 2017, 10:48:05 PM2/8/17
to Shopizer
Is this issue fixed? Facing similar exception
Reply all
Reply to author
Forward
0 new messages