Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » ClassLoader Problem after switching to Java 8
ClassLoader Problem after switching to Java 8 [message #1713524] Wed, 04 November 2015 19:07 Go to next message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 307
Registered: February 2012
Location: Düsseldorf
Senior Member
Hi,
I have already posted in the RCP forum without success. Maybe may problem is related Gemini and I have more luck here. We have migrated an RCP application to Java 8 which is deployed by Java WebStart. Following the hints described here

https://www.eclipse.org/forums/index.php/t/831402/

we were able to get the application running but in the course of testing we encountered a classloader issue.

Our application is a client\server application that uses Spring HttpInvokerProxyFactoryBean to invoke remote methods. Now when we transfer a calendar object we have a classloader issue:

org.springframework.remoting.RemoteAccessException: Could not deserialize result from HTTP invoker remote service [http://localhost:8080//SPKT/remoting/zspktConnectService]; nested exception is java.lang.ClassNotFoundException: sun.util.calendar.ZoneInfo not found from bundle [com.portigon.zspkt.query]
	at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:208)
	at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:145)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at com.sun.proxy.$Proxy2.executeAction(Unknown Source)
	at com.portigon.zspkt.query.DatabaseAccessServiceImpl$Executer.execute(DatabaseAccessServiceImpl.java:49)
	at com.portigon.zspkt.query.DatabaseAccessServiceImpl$Executer.run(DatabaseAccessServiceImpl.java:41)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassNotFoundException: sun.util.calendar.ZoneInfo not found from bundle [com.portigon.zspkt.query]
	at org.eclipse.gemini.bundle.findClass(BundleDelegatingClassLoader.java:101)
	at org.eclipse.gemini.blueprint.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:155)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.springframework.util.ClassUtils.forName(ClassUtils.java:258)
	at org.springframework.core.ConfigurableObjectInputStream.resolveClass(ConfigurableObjectInputStream.java:75)


Does anybody have encountered similar issues or has a hint for us where to look? The application uses Spring Framework 3.1.2. The JRE which is currently in use is 1.8.0_45. When we run the application from within eclipse (client\server but not as web start) everything is just fine.

Thanks in advance
Thorsten
Re: ClassLoader Problem after switching to Java 8 [message #1719222 is a reply to message #1713524] Wed, 06 January 2016 10:50 Go to previous message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 307
Registered: February 2012
Location: Düsseldorf
Senior Member
Hi,
i got back to this Problem and checked the log file. The stack trace is as follows and it becomes obvious, that this is a SecurityManager issue.

Since I have all permissions in my application I can set the SecurityManager to null which solves the Problem. Does anyone have an idea what could cause this Security issue? I am still using org.eclipse.osgi in V 3.7.2.

Thanks in advance
Thorsten

org.springframework.remoting.RemoteAccessException: Could not deserialize result from HTTP invoker remote service [http://localhost:8080//SPKT/remoting/zspktConnectService]; nested exception is java.lang.ClassNotFoundException: sun.util.calendar.ZoneInfo not found from bundle [com.portigon.zspkt.query]
	at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:208)
	at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:145)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at com.sun.proxy.$Proxy2.executeAction(Unknown Source)
	at com.portigon.zspkt.query.DatabaseAccessServiceImpl$Executer.execute(DatabaseAccessServiceImpl.java:54)
	at com.portigon.zspkt.query.DatabaseAccessServiceImpl$Executer.run(DatabaseAccessServiceImpl.java:46)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassNotFoundException: sun.util.calendar.ZoneInfo not found from bundle [com.portigon.zspkt.query]
	at org.eclipse.gemini.blueprint.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:101)
	at org.eclipse.gemini.blueprint.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:155)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.springframework.util.ClassUtils.forName(ClassUtils.java:258)
	at org.springframework.core.ConfigurableObjectInputStream.resolveClass(ConfigurableObjectInputStream.java:75)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at java.util.Calendar$1.run(Unknown Source)
	at java.util.Calendar$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.util.Calendar.readObject(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at java.util.ArrayList.readObject(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at java.util.HashMap.readObject(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.doReadRemoteInvocationResult(AbstractHttpInvokerRequestExecutor.java:290)
	at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.readRemoteInvocationResult(AbstractHttpInvokerRequestExecutor.java:241)
	at org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor.doExecuteRequest(SimpleHttpInvokerRequestExecutor.java:95)
	at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:136)
	at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:192)
	at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:174)
	at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:142)
	... 6 more
Caused by: java.lang.ClassNotFoundException: sun.util.calendar.ZoneInfo
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:222)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
	at org.eclipse.gemini.blueprint.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:97)
	... 70 more
Caused by: java.security.AccessControlException: access denied ("org.osgi.framework.AdminPermission" "(id=1588)" "class,resolve")
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.Framework.checkAdminPermission(Framework.java:1241)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:220)
	... 72 more
Previous Topic:Gemini JPA 1.2 release and project activity
Next Topic:Gemini JPA 1.2.0 M1 milestone available
Goto Forum:
  


Current Time: Fri Sep 21 23:16:26 GMT 2018

Powered by FUDForum. Page generated in 0.01846 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top