Error 500: class loading constraint violated

I have successfully deployed a RAP application with the Derby Data Base on JBOSS Now I'm trying to deploy the same application using Websphere 6.1. I have set a Datasource and the connection test was successful.

I have reach a OSGi console in telnet and all my bundles are active. When I try to load my application in browser, I receive the following Error:

[7/16/09 14:50:49:265 CEST] 0000034e WebApp A SRVE0181I: [finca_osgi_1200_war#finca_osgi_1200.war] [/finca_osgi_1200] [Servlet.LOG]: Could not execute org.eclipse.ui.internal.Workbench$ShutdownHandler.beforeDestroy(SessionStoreEvent).: java.lang.RuntimeException: Could not create the session singleton instance of 'org.eclipse.jface.resource.JFaceResources$ImageRegistryStore' because an Exception was thrown by the constructor:
null.
at org.eclipse.rwt.SessionSingletonBase.getInstanceInternal(SessionSingletonBase.java:189)
at org.eclipse.rwt.SessionSingletonBase.getInstance(SessionSingletonBase.java:91)
at org.eclipse.jface.resource.JFaceResources$ImageRegistryStore.getInstance(JFaceResources.java:180)
at org.eclipse.jface.resource.JFaceResources.getImageRegistry(JFaceResources.java:582)
at org.eclipse.ui.internal.progress.ProgressInfoItem.init(ProgressInfoItem.java:126)
at org.eclipse.ui.internal.progress.ProgressManager$ProgressManagerProvider.getInstance(ProgressManager.java:73)
at org.eclipse.ui.internal.progress.ProgressManager.getInstance(ProgressManager.java:151)
at org.eclipse.ui.internal.progress.ProgressManager.shutdownProgressManager(ProgressManager.java:163)
at org.eclipse.ui.internal.WorkbenchPlugin.reset(WorkbenchPlugin.java:342)
at org.eclipse.ui.internal.Workbench.shutdown(Workbench.java:2851)
at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:959)
at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:870)
at org.eclipse.ui.internal.Workbench$21.run(Workbench.java:1136)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:66)
at org.eclipse.ui.internal.Workbench.close(Workbench.java:1134)
at org.eclipse.ui.internal.Workbench.close(Workbench.java:1096)
at org.eclipse.ui.internal.Workbench$ShutdownHandler.beforeDestroy(Workbench.java:219)
at org.eclipse.rwt.internal.service.SessionStoreImpl.doValueUnbound(SessionStoreImpl.java:174)
at org.eclipse.rwt.internal.service.SessionStoreImpl.valueUnbound(SessionStoreImpl.java:152)
at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.clearSession(LifeCycleServiceHandler.java:251)
at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.checkRequest(LifeCycleServiceHandler.java:230)
at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.internalService(LifeCycleServiceHandler.java:188)
at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.access$1(LifeCycleServiceHandler.java:185)
at org.eclipse.rwt.internal.service.LifeCycleServiceHandler$LifeCycleServiceHandlerSync.doService(LifeCycleServiceHandler.java:150)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandlerSync.serviceInternal(RWTLifeCycleServiceHandlerSync.java:48)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandlerSync.service(RWTLifeCycleServiceHandlerSync.java:36)
at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:157)
at org.eclipse.rwt.internal.service.ServiceManager$HandlerDispatcher.service(ServiceManager.java:101)
at org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelegate.java:63)
at org.eclipse.rap.ui.internal.servlet.RequestHandler.service(RequestHandler.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:120)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:521)
at org.eclipse.rwt.SessionSingletonBase.getInstanceInternal(SessionSingletonBase.java:154)
... 56 more
Caused by: java.lang.ExceptionInInitializerError at java.lang.J9VMInternals.initialize(J9VMInternals.java:195)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:131)
at org.eclipse.jface.resource.JFaceResources$ImageRegistryStore.initializeDefaultImages(JFaceResources.java:220)
at org.eclipse.jface.resource.JFaceResources$ImageRegistryStore.<init>(JFaceResources.java:176)
... 61 more
Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:285)
at org.eclipse.jface.resource.FontRegistry.<init>(FontRegi

These are really just ideas and hunches. Post back with any ideas or more information you might have and we'll try and put more hands on the problem.

-Cameron McKenzie

Serghei Mazurean
Greenhorn

Joined: Jul 14, 2009
Posts: 10

posted Jul 21, 2009 01:31:12

0

Hello Cameron,

Thank you very much! It has helped! They were "jdbc Drivers" in my .war
But now I have the follow-Error of taking off the jdbc Drivers. My Application uses that drivers to connect with my Derby DB

I have set in web.xml the "org.apache.derby.jdbc" as a parameter:

But it doesn't helped me So, I have the problem, that if I take "jdbc driver" off from .war, then I have the Exception, that my application can not connect to the Derby DB:
java.lang.Exception Description And if i live the jdbc-drivers in my .war, then I haven't this error, but then I have the "Error 500: class loading constraint violated" ((

(1) Put the JDBC driver jar somewhere which ISN'T in your application. Create a new directory for it.

(2) Specify that location (directory plus jar file name) in the admin application, in the field which asks for classpath in the data source configuration.

I'm not looking at the admin application as I type this and I don't remember the exact field name.

Serghei Mazurean
Greenhorn

Joined: Jul 14, 2009
Posts: 10

posted Jul 22, 2009 06:01:48

0

Hello Paul,

Thank you very much, for your answer. I have tried what you wrote:

1. I create one Folder(f:/ibm//shlib) and have copied the drivers there.
2. Then I have indicate this directory as shared in Websphere.
3. I have referenced it to Application Server: Servers-> Application Servers -> "applicationserver1" -> Java and Process Managment -> Class loader -> New -> OK -> select the new classloader ->Shared library
references. But id doesn't help. I still have this Exception: Unable to acquire a connection from driver [null], user [null] and URL [null]. Verify that you have set the expected driver class and URL. Check your login,
persistence.xml or sessions.xml resource. The jdbc.driver property should be set to a class that is compatible with your database platform

Maybe, my shared libraries classpath is wrong?! but it seems to be alright.
Here is my classpath(in Shared libraries)

Please HELP ME!!! I shoul work, it is a small thing, that is wrong, but I can not solve it

When you create a JDBC provider in Websphere (in 6.1, at least) it explicitly prompts you to specify either the directory where the jar files are located or the path to the jar file itself. As far as I know that's all you need to do. I haven't ever done what you just tried.

Serghei Mazurean
Greenhorn

Joined: Jul 14, 2009
Posts: 10

posted Jul 23, 2009 09:15:05

0

Hello Paul,

Thanks a lot that you try to help me!!! I appreciate it much.

The solution with shared library I found in another Forum. As I wrote it hasn't helped me.
This time I have tried in the way you write:
I have set the JDBC Provider and have specified the Class path "F:/IBM2/shlib", where I have copied my derby.jar and derbyclient.jar But I receive now an Exception(that ClientDriver was not found ):
[7/23/09 15:51:43:250 CEST] 00000953 SystemOut O Exception caught: Exception [EclipseLink-4003] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.DatabaseException
Exception Description: Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found.

May be I have set wrong class path(F:/IBM2/shlib)? I have tried also with Websphere Variable(DERBY_JDBC_DRIVER_PATH= ${WAS_INSTALL_ROOT}/shlib ), where ${WAS_INSTALL_ROOT}= "F:/IBM2" but also without success (

Usually when you specify a classpath, you provide a list of directories where classes can be found and a list of jar files where classes can be found. You don't seem to have included any jar files in your classpath.

Serghei Mazurean
Greenhorn

Joined: Jul 14, 2009
Posts: 10

posted Jul 27, 2009 03:15:55

0

Paul Clapham wrote:You don't seem to have included any jar files in your classpath.

Hello Paul,

Thanks a lot for your Help!

I have tried also with list of "jars" on Thursday, but it seems to be something wrong in my classpath. I have entered