JDev Bug: ClassNotFound: [WebLogic 10] specified in [eclipselink.target-server] property.

Issue:

After generated the persistence.xml file using JDevelper 11g, you may got following exception, while you invoke persist operation.

java.lang.reflect.InvocationTargetException
    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 sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
    at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Caused by: java.lang.reflect.InvocationTargetException
    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.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.initializeFromAgent(JavaSECMPInitializerAgent.java:45)
    at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.premain(JavaSECMPInitializerAgent.java:38)
    ... 6 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.2.0.v20091016-r5565): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EJBBookStore] failed.
Internal Exception: Exception [EclipseLink-28006] (Eclipse Persistence Services - 1.2.0.v20091016-r5565): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [WebLogic 10] specified in [eclipselink.target-server] property.
Internal Exception: java.lang.ClassNotFoundException: WebLogic 10
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:890)
    at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:110)
    at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initPersistenceUnits(JPAInitializer.java:159)
    at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initialize(JPAInitializer.java:144)
    at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initializeFromAgent(JavaSECMPInitializer.java:145)
    ... 12 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.2.0.v20091016-r5565): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [EJBBookStore] failed.
Internal Exception: Exception [EclipseLink-28006] (Eclipse Persistence Services - 1.2.0.v20091016-r5565): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [WebLogic 10] specified in [eclipselink.target-server] property.
Internal Exception: java.lang.ClassNotFoundException: WebLogic 10
    at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
    ... 17 more
Caused by: Exception [EclipseLink-28006] (Eclipse Persistence Services - 1.2.0.v20091016-r5565): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [WebLogic 10] specified in [eclipselink.target-server] property.
Internal Exception: java.lang.ClassNotFoundException: WebLogic 10
    at org.eclipse.persistence.exceptions.EntityManagerSetupException.classNotFoundForProperty(EntityManagerSetupException.java:130)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClassForProperty(EntityManagerSetupImpl.java:568)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateServerPlatform(EntityManagerSetupImpl.java:391)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:739)
    ... 16 more
Caused by: java.lang.ClassNotFoundException: WebLogic 10
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:88)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClass(EntityManagerSetupImpl.java:558)
FATAL ERROR in native method: processing of -javaagent failed
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClassForProperty(EntityManagerSetupImpl.java:564)
    ... 18 more
Exception in thread "main" Process exited with exit code 1.

Solution:

This is a bug of JDeveloper. There is a mistake in auto generation persistence.xml. Please go to persistence.xml and check property, "eclipselink.target-database"

The correct value should be

<property name="eclipselink.target-server" value="WebLogic_10"/>

but in fact is

<property name="eclipselink.target-server" value="WebLogic 10"/>

你可能感兴趣的:(JDev Bug: ClassNotFound: [WebLogic 10] specified in [eclipselink.target-server] property.)