roc230 / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

Caught CNFE decoding 302 bytes of data, java.lang.ClassNotFoundException: No ClassLoaders found #139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the product are you using? On what operating system?
version- memcached-2.5 operating system - windows7 64 bit.

Tell me more...
this is te actuall error I am getting.- i am trying to acess web page.
but before this I've created a standalone java app that accesses the same 
cached object and it works fine. 
Any help? 

INFO
16:26:03,599 ERROR [STDERR]  
16:26:03,599 ERROR [STDERR] net.spy.memcached.MemcachedConnection
16:26:03,599 ERROR [STDERR] :  
16:26:03,599 ERROR [STDERR] Added {QA sa=/172.22.1.174:11211, #Rops=0, #Wops=0, 
#iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
16:26:03,600 INFO  [MediaUtil] after getting c
16:26:03,600 INFO  [MediaUtil] after setting to c
16:26:03,600 ERROR [STDERR] 2010-06-09 16:26:03.600
16:26:03,600 ERROR [STDERR]  
16:26:03,600 ERROR [STDERR] INFO
16:26:03,600 ERROR [STDERR]  
16:26:03,600 ERROR [STDERR] net.spy.memcached.MemcachedConnection
16:26:03,600 ERROR [STDERR] :  
16:26:03,600 ERROR [STDERR] Connection state changed for 
sun.nio.ch.SelectionKeyImpl@1c3d029
16:26:03,601 ERROR [STDERR] 2010-06-09 16:26:03.601
16:26:03,601 ERROR [STDERR]  
16:26:03,601 ERROR [STDERR] WARN
16:26:03,601 ERROR [STDERR]  
16:26:03,601 ERROR [STDERR] net.spy.memcached.transcoders.SerializingTranscoder
16:26:03,602 ERROR [STDERR] :  
16:26:03,602 ERROR [STDERR] Caught CNFE decoding 302 bytes of data
16:26:03,602 ERROR [STDERR] java.lang.ClassNotFoundException: No ClassLoaders 
found for: drw.util.SiteMedia
16:26:03,602 ERROR [STDERR]     at 
org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
16:26:03,602 ERROR [STDERR]     at 
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.j
ava:521)
16:26:03,602 ERROR [STDERR]     at 
org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:
415)
16:26:03,602 ERROR [STDERR]     at 
java.lang.ClassLoader.loadClass(ClassLoader.java:252)
16:26:03,602 ERROR [STDERR]     at 
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
16:26:03,602 ERROR [STDERR]     at java.lang.Class.forName0(Native Method)
16:26:03,602 ERROR [STDERR]     at java.lang.Class.forName(Class.java:247)
16:26:03,602 ERROR [STDERR]     at 
java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)
16:26:03,602 ERROR [STDERR]     at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
16:26:03,602 ERROR [STDERR]     at 
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
16:26:03,602 ERROR [STDERR]     at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
16:26:03,602 ERROR [STDERR]     at 
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
16:26:03,602 ERROR [STDERR]     at 
java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
16:26:03,602 ERROR [STDERR]     at 
net.spy.memcached.transcoders.BaseSerializingTranscoder.deserialize(BaseSerializ
ingTranscoder.java:100)
16:26:03,602 ERROR [STDERR]     at 
net.spy.memcached.transcoders.SerializingTranscoder.decode(SerializingTranscoder
.java:66)
16:26:03,602 ERROR [STDERR]     at 
net.spy.memcached.transcoders.TranscodeService$1.call(TranscodeService.java:36)
16:26:03,602 ERROR [STDERR]     at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
16:26:03,602 ERROR [STDERR]     at 
java.util.concurrent.FutureTask.run(FutureTask.java:138)
16:26:03,602 ERROR [STDERR]     at 
net.spy.memcached.transcoders.TranscodeService$Task.run(TranscodeService.java:83
)
16:26:03,602 ERROR [STDERR]     at 
net.spy.memcached.transcoders.TranscodeService$Task.get(TranscodeService.java:69
)
16:26:03,602 ERROR [STDERR]     at 
net.spy.memcached.internal.GetFuture.get(GetFuture.java:38)
16:26:03,602 ERROR [STDERR]     at 
net.spy.memcached.MemcachedClient.get(MemcachedClient.java:917)
16:26:03,602 ERROR [STDERR]     at 
net.spy.memcached.MemcachedClient.get(MemcachedClient.java:939)
16:26:03,602 ERROR [STDERR]     at drw.util.MediaUtil.getcache(MediaUtil.java:308)
16:26:03,602 ERROR [STDERR]     at 
drw.util.MediaUtil.getSiteMediaData(MediaUtil.java:213)
16:26:03,603 ERROR [STDERR]     at 
org.apache.jsp.includes.header_005fsfm_jsp._jspService(header_005fsfm_jsp.java:2
20)
16:26:03,603 ERROR [STDERR]     at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
16:26:03,603 ERROR [STDERR]     at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
16:26:03,603 ERROR [STDERR]     at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
16:26:03,603 ERROR [STDERR]     at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
16:26:03,603 ERROR [STDERR]     at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
16:26:03,603 ERROR [STDERR]     at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java
:654)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.j
ava:557)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.jav
a:481)
16:26:03,603 ERROR [STDERR]     at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
16:26:03,603 ERROR [STDERR]     at 
org.apache.jsp.error_jsp._jspService(error_jsp.java:186)
16:26:03,603 ERROR [STDERR]     at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
16:26:03,603 ERROR [STDERR]     at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
16:26:03,603 ERROR [STDERR]     at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
16:26:03,603 ERROR [STDERR]     at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
16:26:03,603 ERROR [STDERR]     at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
16:26:03,603 ERROR [STDERR]     at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java
:654)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatc
her.java:447)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.j
ava:379)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.jav
a:292)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:423)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:342)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
16:26:03,603 ERROR [STDERR]     at 
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionVa
lve.java:157)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
)
16:26:03,603 ERROR [STDERR]     at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
16:26:03,603 ERROR [STDERR]     at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
16:26:03,603 ERROR [STDERR]     at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Pr
otocol.java:583)
16:26:03,603 ERROR [STDERR]     at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
16:26:03,603 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:619)
16:26:03,603 INFO  [MediaUtil] getting c from to cnull
16:26:03,603 ERROR [MediaUtil]  error performing media data.getSiteMediaData() 
funtion..
16:26:03,604 ERROR [STDERR] java.lang.NullPointerException
16:26:03,604 ERROR [STDERR]     at drw.util.MediaUtil.getcache(MediaUtil.java:310)
16:26:03,604 ERROR [STDERR]     at 
drw.util.MediaUtil.getSiteMediaData(MediaUtil.java:213)
16:26:03,604 ERROR [STDERR]     at 
org.apache.jsp.includes.header_005fsfm_jsp._jspService(header_005fsfm_jsp.java:2
20)
16:26:03,604 ERROR [STDERR]     at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
16:26:03,604 ERROR [STDERR]     at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
16:26:03,604 ERROR [STDERR]     at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
16:26:03,604 ERROR [STDERR]     at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
16:26:03,604 ERROR [STDERR]     at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
16:26:03,604 ERROR [STDERR]     at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java
:654)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.j
ava:557)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.jav
a:481)
16:26:03,604 ERROR [STDERR]     at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
16:26:03,604 ERROR [STDERR]     at 
org.apache.jsp.error_jsp._jspService(error_jsp.java:186)
16:26:03,604 ERROR [STDERR]     at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
16:26:03,604 ERROR [STDERR]     at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
16:26:03,604 ERROR [STDERR]     at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
16:26:03,604 ERROR [STDERR]     at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
16:26:03,604 ERROR [STDERR]     at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
16:26:03,604 ERROR [STDERR]     at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java
:654)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatc
her.java:447)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.j
ava:379)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.jav
a:292)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:423)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:342)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
16:26:03,604 ERROR [STDERR]     at 
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionVa
lve.java:157)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
)
16:26:03,604 ERROR [STDERR]     at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
16:26:03,604 ERROR [STDERR]     at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
16:26:03,604 ERROR [STDERR]     at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Pr
otocol.java:583)
16:26:03,605 ERROR [STDERR]     at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
16:26:03,605 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:619)

Original issue reported on code.google.com by smrit...@gmail.com on 9 Jun 2010 at 8:38

GoogleCodeExporter commented 9 years ago
it worked, i resovled the deployment of memcached 2.5 jar file

Original comment by smrit...@gmail.com on 10 Jun 2010 at 3:09

GoogleCodeExporter commented 9 years ago
It appears that this was a dependency issue that was resolved by the user. If I 
am incorrect please reply that this issue is still open and I'll reopen the 
issue.

Original comment by mikewie...@gmail.com on 11 Jul 2011 at 9:16

GoogleCodeExporter commented 9 years ago
Having the same issue even after i have attached a custom Tanscoder which i 
have got from 
http://thysmichels.com/2014/03/01/memcached-customserializingtranscoder-serializ
ed-object/

i am using Apache Karaf as OSGi bundle container execution environment. 

Original comment by ch.sha...@gmail.com on 29 Dec 2014 at 11:34

GoogleCodeExporter commented 9 years ago
Need Help !! 

I am having similar issue in karaf.  Trying to save a Object into memcached 
inside a OSGI bundle. Getting below error, 

karaf@root> 2015-03-17 17:48:03.121 WARN 
net.spy.memcached.transcoders.SerializingTranscoder:  Caught CNFE decoding 582 
bytes of data

java.lang.ClassNotFoundException: com.zyme.inventory.model.cached.InvPosition
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at org.apache.felix.framework.BundleWiringImpl.doImplicitBootDelegation(BundleWiringImpl.java:1666)
        at org.apache.felix.framework.BundleWiringImpl.searchDynamicImports(BundleWiringImpl.java:1603)
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1439)
        at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:625)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
        at net.spy.memcached.transcoders.BaseSerializingTranscoder.deserialize(BaseSerializingTranscoder.java:129)
        at net.spy.memcached.transcoders.SerializingTranscoder.decode(SerializingTranscoder.java:88)
        at net.spy.memcached.transcoders.TranscodeService$1.call(TranscodeService.java:63)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at net.spy.memcached.transcoders.TranscodeService$Task.run(TranscodeService.java:110)
        at net.spy.memcached.transcoders.TranscodeService$Task.get(TranscodeService.java:96)
        at net.spy.memcached.internal.GetFuture.get(GetFuture.java:63)
        at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1003)
        at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1024)

I have installed memcached 2.8.4 

[ 381] [Active     ] [            ] [       ] [   80] 
wrap_mvn_com.google.code.simple-spring-memcached_spymemcached_2.8.4 (0)

thanks,

Original comment by mohammed...@gmail.com on 17 Mar 2015 at 12:31

GoogleCodeExporter commented 9 years ago
Please attached Transcoder file. Use it with memcached library and reference it 
while making a memcached object. For reference please check below mentioned 
code. 

I was having the same issue and i resolved it using transcoder. Basically in 
OSGI bundles every bundle has its own scope/boundry. So while fetching the 
saved object in memcached it gives us an exception. 

MemcacheImpl.memcachedClient = new MemcachedClient( new 
ConnectionFactoryBuilder().setTranscoder( new CustomSerializingTranscoder() )
                    .setProtocol( ConnectionFactoryBuilder.Protocol.BINARY ).build(), nodeList );

Original comment by ch.sha...@gmail.com on 17 Mar 2015 at 12:55

Attachments:

GoogleCodeExporter commented 9 years ago
Hey, what is the memcached version your are using? and what is nodeList? 

thanks,

Original comment by mohammed...@gmail.com on 17 Mar 2015 at 1:14

GoogleCodeExporter commented 9 years ago
Hey thank you very much! Got it working with your suggestion #5.

ConnectionFactoryBuilder builder=new ConnectionFactoryBuilder();
ConnectionFactoryBuilder.Protocol protocol= 
ConnectionFactoryBuilder.Protocol.BINARY;
builder.setTranscoder(new CustomeSerializingTranscoder<JavaBeanToSerialize>());
MemcachedClient  client=new 
MemcachedClient(builder.build(),AddrUtil.getAddresses("localhost:11211"));

thanks,

Original comment by mohammed...@gmail.com on 17 Mar 2015 at 2:01

GoogleCodeExporter commented 9 years ago

-- Missing CAS API (With exp. time and without Transcoder)
<T> CASResponse cas(java.lang.String key, long casId, int exp, T value)

-- Currently Available CAS APIs 
-- With MemcachedClientIF
<T> CASResponse cas(java.lang.String key, long casId, int exp, T value, 
Transcoder<T> tc) 
CASResponse cas(java.lang.String key, long casId, java.lang.Object value) 

-- With MemcachedClient
<T> CASResponse cas(java.lang.String key, long casId, int exp, T value, 
Transcoder<T> tc)
CASResponse cas(java.lang.String key, long casId, java.lang.Object value)
<T> CASResponse cas(java.lang.String key, long casId, T value, Transcoder<T> tc)

any thoughts on this??

thanks,

Original comment by mohammed...@gmail.com on 18 Mar 2015 at 2:13