This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 296733 - JPA: WebLogic: OSGI: Adding javax.persistence 2.0 jar to end of server classpath in domain lib fails to find OSGI lib
Summary: JPA: WebLogic: OSGI: Adding javax.persistence 2.0 jar to end of server classp...
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL: http://wiki.eclipse.org/EclipseLink/D...
Whiteboard:
Keywords:
Depends on: 296271 334468
Blocks:
  Show dependency tree
 
Reported: 2009-12-02 13:27 EST by Michael OBrien CLA
Modified: 2022-06-09 10:30 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael OBrien CLA 2009-12-02 13:27:40 EST
>When WebLogic 10.3.2.0 attempts to load the JPA 2.0 spec jar lower in the server classpath below the modules directory - it is attempting to resolve an OSGI class.
This option is not a recommended configuration but should be investigated.

>Reproduction: add the following (will not override modules eclipselink 1.2 and javax.persistence 1.0 jars

C:\opt\wls10320\user_projects\domains\base_domain\lib\eclipselink.jar (2.0 20091130 trunk version)
C:\opt\wls10320\user_projects\domains\base_domain\lib\javax.persistence_2.0.0.v200911041116.jar (2.0 20091130 trunk version off of jpa/plugins/)




>Startup logs

.
.
JAVA Memory arguments: -Xms512m -Xmx512m
.
WLS Start Mode=Development
.
CLASSPATH=c:\opt\wls10320\patch_wls1032\profiles\default\sys_manifest_classpath\weblogic_patch.jar;c:\opt\wls10320\JROCKI~1.5-3\lib\tools.jar;c:\opt\wls10320\utils\config\10.3\config-launch.jar;C:\opt\wls10320\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\opt\wls10320\WLSERV~1.3\server\lib\weblogic.jar;c:\opt\wls10320\modules\features\weblogic.server.modules_10.3.2.0.jar;C:\opt\wls10320\WLSERV~1.3\server\lib\webservices.jar;c:\opt\wls10320\modules\ORGAPA~1.0/lib/ant-all.jar;c:\opt\wls10320\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\opt\wls10320\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;C:\opt\wls10320\WLSERV~1.3\server\lib\xqrl.jar
.
PATH=c:\opt\wls10320\patch_wls1032\profiles\default\native;C:\opt\wls10320\WLSERV~1.3\server\native\win\32;C:\opt\wls10320\WLSERV~1.3\server\bin;c:\opt\wls10320\modules\ORGAPA~1.0\bin;c:\opt\wls10320\JROCKI~1.5-3\jre\bin;c:\opt\wls10320\JROCKI~1.5-3\bin;C:\opt\wls10320\jrockit_160_14_R27.6.5-32\bin;c:\jdk1.6.0_32bit\bin;c:\oracle11g64\product\11.1.0\db_1\bin;c:\jdk1.6.0\bin;c:\opt\ant\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\opt\wls10320\WLSERV~1.3\server\native\win\32\oci920_8
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http:\\hostname:port\console        *
***************************************************
starting weblogic with Java version:
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
BEA JRockit(R) (build R27.6.5-32_o-121899-1.6.0_14-20091001-2107-windows-ia32, compiled mode)
Starting WLS with line:
c:\opt\wls10320\JROCKI~1.5-3\bin\java -jrockit   -Xms512m -Xmx512m -Dweblogic.Name=AdminServer -Djava.security.policy=C:\opt\wls10320\WLSERV~1.3\server\lib\weblogic.policy  -Xverify:none  -da -Dplatform.home=C:\opt\wls10320\WLSERV~1.3 -Dwls.home=C:\opt\wls10320\WLSERV~1.3\server -Dweblogic.home=C:\opt\wls10320\WLSERV~1.3\server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=c:\opt\wls10320\patch_wls1032\profiles\default\sysext_manifest_classpath -Dweblogic.ext.dirs=F:/view_w35d/jpa/plugins/javax.persistence_2.0.0.v200911041116.jar  weblogic.Server
<2-Dec-2009 1:21:22 o'clock PM EST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
C:\opt\wls10320\user_projects\domains\base_domain\lib\eclipselink.jar;C:\opt\wls10320\user_projects\domains\base_domain\lib\javax.persistence_2.0.0.v200911041116.jar;F:\view_w35d\jpa\plugins\javax.persistence_2.0.0.v200911041116.jar> 
<2-Dec-2009 1:21:22 o'clock PM EST> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: java.lang.NoClassDefFoundError: org/osgi/framework/BundleActivator
java.lang.NoClassDefFoundError: org/osgi/framework/BundleActivator
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:247)
	at weblogic.t3.srvr.servicegroups.ServicePluginGroup.processPossibleServicePlugin(ServicePluginGroup.java:157)
	at weblogic.t3.srvr.servicegroups.ServicePluginGroup.<init>(ServicePluginGroup.java:90)
	at weblogic.t3.srvr.servicegroups.ServerServiceDependencies.<init>(ServerServiceDependencies.java:58)
	at weblogic.t3.srvr.servicegroups.ServerServiceDependencies.<clinit>(ServerServiceDependencies.java:48)
	at weblogic.t3.srvr.ServerServices.<clinit>(ServerServices.java:94)
	at weblogic.t3.srvr.ServerServicesManager.getServicesBeforeStandbyState(ServerServicesManager.java:370)
	at weblogic.t3.srvr.ServerServicesManager.startInStandbyState(ServerServicesManager.java:149)
	at weblogic.t3.srvr.T3Srvr.initializeStandby(T3Srvr.java:750)
	at weblogic.t3.srvr.T3Srvr.startup(T3Srvr.java:492)
	at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:446)
	at weblogic.Server.main(Server.java:67)
> 
<2-Dec-2009 1:21:22 o'clock PM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED> 
<2-Dec-2009 1:21:22 o'clock PM EST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down> 
<2-Dec-2009 1:21:22 o'clock PM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
Comment 1 Michael OBrien CLA 2009-12-02 13:43:57 EST
>Asked Tom about this - the workaround below fixes the OSGI classloading issue

Removed the activator from the manifest in
javax.persistence_2.0.0.v200911041116.jar/META-INF/MANIFEST.MF

Bundle-Activator: org.eclipse.persistence.javax.persistence.osgi.Activ
 ator

>working with this hacked 2.0 jar
<2-Dec-2009 1:42:43 o'clock PM EST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
C:\opt\wls10320\user_projects\domains\base_domain\lib\eclipselink.jar;C:\opt\wls10320\user_projects\domains\base_domain\lib\javax.persistence_2.0.0.v200911041116.jar;F:\view_w35d\jpa\plugins\javax.persistence_2.0.0.v200911041116.jar> 
<2-Dec-2009 1:42:44 o'clock PM EST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with BEA JRockit(R) Version R27.6.5-32_o-121899-1.6.0_14-20091001-2107-windows-ia32 from BEA Systems, Inc.> 
<2-Dec-2009 1:42:44 o'clock PM EST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.2.0  Tue Oct 20 12:16:15 PDT 2009 1267925 > 
<2-Dec-2009 1:42:45 o'clock PM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING> 
[EL Finest]: 2009-12-02 13:42:52.186--ServerSession(36192511)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Begin predeploying Persistence Unit example; state Initial; factoryCount 0
...
<2-Dec-2009 1:42:53 o'clock PM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING> 
<2-Dec-2009 1:42:53 o'clock PM EST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
Comment 2 Michael OBrien CLA 2009-12-03 07:30:00 EST
>of interest is the fact that the JPA 2.0 spec jar in trunk contains 2 EclipseLink OSGI classes.

javax.persistence_2.0.0.v200911041116\org\eclipse\persistence\javax\persistence\osgi
Activator.class
ProviderTrackerCustomizer.class
Comment 3 Tom Ware CLA 2009-12-04 10:22:03 EST
Won't fix...

There are two options

1. It's a WLS issue with the availability of the OSGi classes when it finds the activator
2. It's a config issue with how we are deploying
Comment 4 LeoLux Mising name CLA 2010-06-24 09:01:47 EDT
The following installation works for me:

Add the EclipseLink_2.1.0 jars into  ../user_projects/domains/yourdomain/lib/EclipseLink_2.1.0/.

Notice, that I added a subfolder under lib instead of adding the libraries directly to lib. Otherwise I get the following error: "weblogic java.lang.NoClassDefFoundError: org/osgi/framework/BundleActivator"

I don't see why a subfolder can make a difference but in this case it does and it works :-)
Comment 5 Michael OBrien CLA 2010-06-24 10:00:50 EDT
>likely the bundle format is in play here which you have replicated as a subdirectory
[library_name]_release#.major#.minor#_optional-date-qualifier_20100624185959 for example
- need to verify this but it follows the same osgi format eclipse uses.
Comment 6 Michael OBrien CLA 2011-01-19 18:01:57 EST
>This issue is deprecated and fixed by the details in bug # 334468
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:30:44 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink