jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emilia Ipate" <eip...@nl.swets.com>
Subject jcs 1.2.7.9.2 remote cache server UnmarshalException
Date Tue, 19 Jun 2007 15:54:16 GMT
Hi, all!

 

 

I am currently using jcs 1.2.7.9.2 and I have 2 remote Cache Servers (a
Primary one, and a Failover one).

 

The JCS 1.2.7.9.2 says that the Remote Cache Server now holds byte
arrays, this normally means that the Remote Cache Server does not need
in its classpath the classes of the objects he holds.

 

But, everytime, I am trying to get a value (from the Remote Cache
Server) for a key that does not exist in Remote Cache Server, I get the
Exception below. So:

 

1. I get the exception everytime I am asking for a new key from the
Remote Cache Server (new key = the key is not on the Remote Server)

2. my application sees the Primary Remote Cache Server as being down, at
connects to the Failover Cache Server.

3. after a few seconds (2-4 seconds), the application connects back to
the Primary Remote Cache Server.

4. nl.swets.wise.framework.account.cache.AccountCacheKey is Serialized
and it is in the classpath of
nl.swets.wise.framework.account.ejb.AccountSettingsBeanImpl

 

Here is the entire exception:

 

[6/19/07 17:22:49:109 CEST] 4edd4edd SystemOut     O 2007-06-19
17:22:49,109 [Servlet.Engine.Transports : 0] ERROR
org.apache.jcs.auxiliary.remote.RemoteCache  - Disabling remote cache
due to error: Failed to get [07391633  null null] from
[accountSettingsCache] 

java.rmi.ServerException: RemoteException occurred in server thread;
nested exception is: 

      java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is: 

      java.lang.ClassNotFoundException:
nl.swets.wise.framework.account.cache.AccountCacheKey

      at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:310)

      at sun.rmi.transport.Transport$1.run(Transport.java:164)

      at java.security.AccessController.doPrivileged1(Native Method)

      at
java.security.AccessController.doPrivileged(AccessController.java:389)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:160)

      at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:505)

      at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.handleRequest(TCPTr
ansport.java:837)

      at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.ja
va:911)

      at java.lang.Thread.run(Thread.java:568)

      at java.lang.Throwable.<init>(Throwable.java)

      at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRem
oteCall.java:264)

      at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:240
)

      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:149)

      at
org.apache.jcs.auxiliary.remote.server.RemoteCacheServer_Stub.get(Unknow
n Source)

      at
org.apache.jcs.auxiliary.remote.RemoteCache.get(RemoteCache.java:249)

      at
org.apache.jcs.auxiliary.remote.RemoteCacheNoWait.get(RemoteCacheNoWait.
java:126)

      at
org.apache.jcs.auxiliary.remote.RemoteCacheNoWaitFacade.get(RemoteCacheN
oWaitFacade.java:151)

      at
org.apache.jcs.engine.control.CompositeCache.get(CompositeCache.java:506
)

      at
org.apache.jcs.engine.control.CompositeCache.get(CompositeCache.java:413
)

      at org.apache.jcs.access.CacheAccess.get(CacheAccess.java:195)

      at
nl.swets.wise.framework.core.cache.JCS.JCSCache.get(JCSCache.java)

      at
nl.swets.wise.framework.core.cache.JCS.JCSCacheManager.getCacheObject(JC
SCacheManager.java)

      at
nl.swets.wise.framework.account.ejb.AccountSettingsBeanImpl.getByAccount
ID(AccountSettingsBeanImpl.java)

      at
nl.swets.wise.framework.account.ejb.AccountMgmtBeanImpl.getAccountSettin
gs(AccountMgmtBeanImpl.java:211)

      at
nl.swets.wise.framework.user.ejb.UserManagementBeanImpl.login(UserManage
mentBeanImpl.java:1257)

      at
nl.swets.wise.framework.user.ejb.UserManagementBean.login(UserManagement
Bean.java:153)

      at
nl.swets.wise.framework.user.ejb.EJSRemoteStatelessUserManagement_3ad69d
3a.login(EJSRemoteStatelessUserManagement_3ad69d3a.java:200)

      at
nl.swets.wise.framework.user.ejb._UserManagement_Stub.login(_UserManagem
ent_Stub.java:482)

      at
nl.swets.wise.framework.user.ejb.UserManagementAccessBean.login(UserMana
gementAccessBean.java:87)

      at
nl.swets.wise.common.user.ui.LoginAction.execute(LoginAction.java:266)

      at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:484)

      at
nl.swets.wise.struts.SwetsRequestProcessor.processActionPerform(SwetsReq
uestProcessor.java:65)

      at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
274)

      at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

      at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

      at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
rvletInstance.java:110)

      at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
fecycleServlet.java:174)

      at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
Servlet.java:313)

      at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
ecycleServlet.java:116)

      at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.
java:283)

      at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali
dServletReferenceState.java:42)

      at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle
tInstanceReference.java:40)

      at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tch(WebAppRequestDispatcher.java:1019)

      at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
questDispatcher.java:592)

      at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:204)

      at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:1
25)

      at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
oker.java:286)

      at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on(CachedInvocation.java:71)

      at
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invo
ke(CacheableInvocationContext.java:116)

      at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tRequestProcessor.java:186)

      at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
tener.java:334)

      at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.java:56)

      at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
615)

      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)

      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java)

Caused by: 

java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is: 

      java.lang.ClassNotFoundException:
nl.swets.wise.framework.account.cache.AccountCacheKey

      at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:270)

      at sun.rmi.transport.Transport$1.run(Transport.java:164)

      at java.security.AccessController.doPrivileged1(Native Method)

      at
java.security.AccessController.doPrivileged(AccessController.java:389)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:160)

      at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:505)

      at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.handleRequest(TCPTr
ansport.java:837)

      at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.ja
va:911)

      at java.lang.Thread.run(Thread.java:568)

Caused by: 

java.lang.ClassNotFoundException:
nl.swets.wise.framework.account.cache.AccountCacheKey

      at java.net.URLClassLoader.findClass(URLClassLoader.java:376)

      at java.lang.ClassLoader.loadClass(ClassLoader.java)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

      at java.lang.Class.forName0(Native Method)

      at java.lang.Class.forName(Class.java)

      at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java)

      at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java)

      at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java)

      at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java)

      at
sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java)

      at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java)

      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java)

      at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java)

      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java)

      at java.io.ObjectInputStream.readObject(ObjectInputStream.java)

      at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:313)

      at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:264)

      at sun.rmi.transport.Transport$1.run(Transport.java:164)

      at java.security.AccessController.doPrivileged1(Native Method)

      at
java.security.AccessController.doPrivileged(AccessController.java:389)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:160)

      at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:505)

      at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.handleRequest(TCPTr
ansport.java:837)

      at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.ja
va:911)

      at java.lang.Thread.run(Thread.java:568)

 

And here it connects to the Failover Remote Cache Server:

 

class load: org/apache/jcs/engine/ZombieCacheService

class load: org/apache/jcs/auxiliary/remote/ZombieRemoteCacheService

class load: org/apache/jcs/utils/struct/BoundedQueue

[6/19/07 17:22:49:124 CEST] 4edd4edd SystemOut     O 2007-06-19
17:22:49,124 [Servlet.Engine.Transports : 0] DEBUG
org.apache.jcs.auxiliary.remote.RemoteCacheMonitor  - Notified of an
error. 

[6/19/07 17:22:49:124 CEST] 4edd4edd SystemOut     O 2007-06-19
17:22:49,124 [Servlet.Engine.Transports : 0] DEBUG
org.apache.jcs.auxiliary.remote.RemoteCache  - Initiating failover, rcnf
= RemoteCacheNoWaitFacade: accountSettingsCache, rca = 

 RemoteCacheAttributes 

 remoteHost = [localhost]

 remotePort = [1102]

 cacheName = [accountSettingsCache]

 removeUponRemotePut = [true]

 getOnly = [false]

 receive = [true]

 getTimeoutMillis = [-1]

 threadPoolName = [remote_cache_client]

 remoteType = [0]

 localClusterConsistency = [false]

 zombieQueueMaxSize = [1000] 

[6/19/07 17:22:49:140 CEST] 4edd4edd SystemOut     O 2007-06-19
17:22:49,140 [Servlet.Engine.Transports : 0] DEBUG
org.apache.jcs.auxiliary.remote.RemoteCache  - Found facade, calling
failover 

[6/19/07 17:22:49:140 CEST] 4edd4edd SystemOut     O 2007-06-19
17:22:49,140 [Servlet.Engine.Transports : 0] INFO
org.apache.jcs.auxiliary.remote.RemoteCacheNoWaitFacade  - in failover
for 0 

class load: org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner

[6/19/07 17:22:49:156 CEST] 4edd4edd SystemOut     O 2007-06-19
17:22:49,156 [Servlet.Engine.Transports : 0] DEBUG
org.apache.jcs.auxiliary.remote.RemoteCacheNoWaitFacade  - Failed to
get. 

[6/19/07 17:22:49:156 CEST] 3e9e3e9e SystemOut     O 2007-06-19
17:22:49,156 [Thread-28] INFO
org.apache.jcs.auxiliary.remote.RemoteCacheFailoverRunner  - Remote
cache FAILOVER RUNNING. 

[6/19/07 17:22:49:156 CEST] 3e9e3e9e SystemOut     O 2007-06-19
17:22:49,156 [Thread-28] DEBUG
org.apache.jcs.auxiliary.remote.RemoteCacheFailoverRunner  - fidx = 0
failovers.length = 2 

[6/19/07 17:22:49:156 CEST] 3e9e3e9e SystemOut     O 2007-06-19
17:22:49,156 [Thread-28] DEBUG
org.apache.jcs.auxiliary.remote.RemoteCacheFailoverRunner  - stating at
failover i = 0 

[6/19/07 17:22:49:171 CEST] 3e9e3e9e SystemOut     O 2007-06-19
17:22:49,156 [Thread-28] DEBUG
org.apache.jcs.auxiliary.remote.RemoteCacheFailoverRunner  - Trying
server [localhost:1101] at failover index i = 0 

[6/19/07 17:22:49:171 CEST] 3e9e3e9e SystemOut     O 2007-06-19
17:22:49,171 [Thread-28] DEBUG
org.apache.jcs.auxiliary.remote.RemoteCacheFailoverRunner  -
RemoteCacheAttributes for failover = 

 RemoteCacheAttributes 

 remoteHost = [localhost]

 remotePort = [1101]

 cacheName = [accountSettingsCache]

 removeUponRemotePut = [true]

 getOnly = [false]

 receive = [true]

 getTimeoutMillis = [-1]

 threadPoolName = [remote_cache_client]

 remoteType = [0]

 localClusterConsistency = [false]

 zombieQueueMaxSize = [1000] 

[6/19/07 17:22:49:171 CEST] 3e9e3e9e SystemOut     O 2007-06-19
17:22:49,171 [Thread-28] DEBUG
org.apache.jcs.auxiliary.remote.RemoteCacheFailoverRunner  - Trying
server [localhost:1102] at failover index i = 1 

 

 

Might there be a bug in JCS 1.2.7.9.2 that generates the exception
above, something like:

-         the first time you request for a key, instead of returning
null, it tries to convert the empty by array to AccountCacheKey?

-         Does the JCS 1.2.7.9.2 still need the AccountCacheKey in it's
classpath even though it says that
(http://jakarta.apache.org/jcs/changes-report.html )"The remote cache
now sends a byte array to the server instead of the class. This allows
you to run the remote server without copies of your objects in its
classpath. This makes the remote server far easier to use." ???

 

Please give me an advise,

Emilia


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message