Error while building Shopizer

444 views
Skip to first unread message

pran...@gmail.com

unread,
Jul 9, 2015, 8:42:38 AM7/9/15
to shop...@googlegroups.com
I cloned this from GIT hub and tried to run mvn clean install. Its giving error:--
[INFO] --- maven-apt-plugin:1.0.2:process (default) @ sm-core-model ---
[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(AbstractProcessorM
ojo.java:210)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.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.buildProje
ct(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.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(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: javax.lang.model.type.UnknownTypeException: Unknown type: java.lang.O
bject&java.io.Serializable&java.lang.Comparable<K>
at javax.lang.model.util.AbstractTypeVisitor6.visitUnknown(AbstractTypeV
isitor6.java:150)
at javax.lang.model.util.AbstractTypeVisitor6.visitIntersection(Abstract
TypeVisitor6.java:133)
at com.sun.tools.javac.code.Type$IntersectionClassType.accept(Type.java:
1019)
at javax.lang.model.util.AbstractTypeVisitor6.visit(AbstractTypeVisitor6
.java:92)
at com.mysema.query.apt.ExtendedTypeFactory$2.visitTypeVariable(Extended
TypeFactory.java:250)
at com.mysema.query.apt.ExtendedTypeFactory$2.visitTypeVariable(Extended
TypeFactory.java:199)
at com.sun.tools.javac.code.Type$TypeVar.accept(Type.java:1319)
at javax.lang.model.util.AbstractTypeVisitor6.visit(AbstractTypeVisitor6
.java:92)
at com.mysema.query.apt.ExtendedTypeFactory$2.visitDeclared(ExtendedType
Factory.java:233)
at com.mysema.query.apt.ExtendedTypeFactory$2.visitDeclared(ExtendedType
Factory.java:199)
at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:936)
at javax.lang.model.util.AbstractTypeVisitor6.visit(AbstractTypeVisitor6
.java:92)
at com.mysema.query.apt.ExtendedTypeFactory.getEntityType(ExtendedTypeFa
ctory.java:461)
at com.mysema.query.apt.AbstractQuerydslProcessor.processAnnotations(Abs
tractQuerydslProcessor.java:114)
at com.mysema.query.apt.AbstractQuerydslProcessor.process(AbstractQueryd
slProcessor.java:97)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcess
or(JavacProcessingEnvironment.java:794)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAnd
RunProcs(JavacProcessingEnvironment.java:705)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800
(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(J
avacProcessingEnvironment.java:1035)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessin
g(JavacProcessingEnvironment.java:1176)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler
.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
... 25 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.819 s
[INFO] Finished at: 2015-07-09T18:07:14+05:30
[INFO] Final Memory: 24M/226M
[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: U
nknown type: java.lang.Object&java.io.Serializable&java.lang.Comparable<K> -> [H
elp 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception


Can you please help.

Thanks,
Pranay

stefano padrin

unread,
Jul 9, 2015, 12:17:23 PM7/9/15
to shop...@googlegroups.com, pran...@gmail.com
hello Pranay

you must compile the project with Java SE 6 
(you're probably using JAVA 8)

stefano

pran...@gmail.com

unread,
Jul 9, 2015, 12:30:42 PM7/9/15
to shop...@googlegroups.com, pran...@gmail.com
Thanks Stefano. Yes I am using JAVA8. Will try compiling using java 6. Thanks for the quick response. Will update the thread after trying.

anon....@gmail.com

unread,
Aug 4, 2015, 1:48:21 PM8/4/15
to Shopizer, pran...@gmail.com
@Pran,

Were you able to compile and run Shopizer?

If I change the JVM from 1.8 to 1.6(x86) and tried to run maven

---------------------------------------------------------------------------

E:\MyProject\gitrepo\shopizer\shopizer>mvn clean install -X
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor v
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass(Launcher.java:144)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:266)
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)

---------------------------------------------------------------------

With Java 8, I am not able to run maven, I am getting the error as mentioned in the post. What changes should I make in pom file to get this working for 1.8?

Thanks,
Sachin

carlo

unread,
Aug 4, 2015, 2:40:27 PM8/4/15
to Shopizer, pran...@gmail.com
It was not yet tested with 1.8

Tested with 1.6 and 1.7

But it shoul work, the java version to be used is defined in all pom files

Sachin Athreya

unread,
Aug 5, 2015, 2:14:46 AM8/5/15
to shop...@googlegroups.com
Thanks Caro,

Let me check with 1.7.

Thanks,
Sachin

--
You received this message because you are subscribed to a topic in the Google Groups "Shopizer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/shopizer/qPWTR99M4e4/unsubscribe.
To unsubscribe from this group and all its topics, 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/2d2d7b42-3167-4092-87e7-21bfa7a367a3%40googlegroups.com.

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

Pranay Kumar

unread,
Aug 5, 2015, 3:12:36 AM8/5/15
to shop...@googlegroups.com
Sorry for not updating the thread. Yes i was able to compile it after i moved to JAVA 1.7, but still facing some issues related to Hibernate going in cyclic dependency. as of now I am looking in this. Will update the thread accordingly.

Thanks,
Pranay

liuka...@gmail.com

unread,
Aug 31, 2015, 6:10:26 AM8/31/15
to Shopizer, pran...@gmail.com
I changed the version of com.mysema.querydsl:querydsl-* to the newest 3.6.6 and compile works fine now. I'm using JDK8u45.
Reply all
Reply to author
Forward
0 new messages