Issue Details (XML | Word | Printable)

Key: NUCMAVEN-49
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Major Major
Assignee: Unassigned
Reporter: Gilberto Caetano de Andrade
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Tools : Maven plugin

Unsupported major.minor version 51.0

Created: 13/Aug/14 09:42 PM   Updated: 14/Aug/14 02:26 PM   Resolved: 14/Aug/14 06:07 AM
Component/s: Enhancer
Affects Version/s: 4.0.0.release
Fix Version/s: None

Environment: OpenSUSE 12.3 jdk 1.6

Datastore: H2


 Description  « Hide
Getting java.lang.UnsupportedClassVersionError trying to compile the project with jdk 1.6:

{code}
cd /home/gilberto.andrade/dev/netbeans-config/JPA/SAPEO_JPA_PURO; JAVA_HOME=/usr/java/jdk1.6.0_45 M2_HOME=/home/gilberto.andrade/bin/maven /home/gilberto.andrade/bin/maven/bin/mvn -Ppostrgresql test
Scanning for projects...
                                                                        
------------------------------------------------------------------------
Building SAPEO_JPA_PURO 1.0-SNAPSHOT
------------------------------------------------------------------------

--- maven-resources-plugin:2.6:resources (default-resources) @ SAPEO_JPA_PURO ---
File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
Copying 2 resources
Copying 0 resource

--- maven-compiler-plugin:2.5.1:compile (default-compile) @ SAPEO_JPA_PURO ---
File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
Compiling 17 source files to /home/gilberto.andrade/dev/netbeans-config/JPA/SAPEO_JPA_PURO/target/classes

--- datanucleus-maven-plugin:4.0.0-release:enhance (default) @ SAPEO_JPA_PURO ---
Error injecting: org.datanucleus.maven.EnhancerMojo
java.lang.TypeNotPresentException: Type org.datanucleus.maven.EnhancerMojo not present
at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:115)
at org.eclipse.sisu.space.NamedClass.load(NamedClass.java:46)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:252)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:459)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:97)
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: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:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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: java.lang.UnsupportedClassVersionError: org/datanucleus/maven/EnhancerMojo : Unsupported major.minor version 51.0
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:389)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:242)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:107)
... 41 more
{code}

Andy Jefferson added a comment - 14/Aug/14 06:07 AM
As per all docs for DN 4.0 (written for a reason), it requires minimum JDK 1.7

Andy Jefferson made changes - 14/Aug/14 06:07 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Won't Fix [ 2 ]
Gilberto Caetano de Andrade added a comment - 14/Aug/14 02:13 PM
I confess DN docs are sometimes dense and complicated because you don't know, apparently, in which version of it you actually are. My first stop looking for Enhancer process was here[1] and hence the confusion. Sorry for take you time.

[1] http://www.datanucleus.org/products/accessplatform_2_2/enhancer.html

Andy Jefferson added a comment - 14/Aug/14 02:26 PM
you mean the page that says explicitly "DataNucleus AccessPlatform 2.2 Documentation" at the top? OK.