• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1027
  • Last Modified:

ClassNotFoundException: org.ajax4jsf.application.AjaxStateHolder

Hey Guys,

I am getting the error below.

I have this in my context.xml.

            <Manager className="org.apache.catalina.session.PersistentManager"
                  debug="10"
                  checkInterval="1"
                  saveOnRestart="true"
                  maxActiveSessions="-1"
                  minIdleSwap="-1"
                  maxIdleSwap="0"
                  maxIdleBackup="0">

               <Store className="org.apache.catalina.session.FileStore"
                      directory="/opt/tomcat-sessions"/>
                            
            </Manager>                          
                 
</Context>
Feb 21, 2009 7:26:57 PM org.apache.catalina.session.StoreBase processExpires
SEVERE: Session: B57C940A52FAE3C706438613AE5E8096.tomcat2;
java.lang.ClassNotFoundException: org.ajax4jsf.application.AjaxStateHolder
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        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.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)
        at org.apache.catalina.util.CustomObjectInputStream.resolveClass(CustomObjectInputStream.jav
a:78)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1441)
        at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:942)
        at org.apache.catalina.session.FileStore.load(FileStore.java:296)
        at org.apache.catalina.session.StoreBase.processExpires(StoreBase.java:195)
        at org.apache.catalina.session.PersistentManagerBase.processExpires(PersistentManagerBase.ja
va:553)
        at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:667)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(Conta
inerBase.java:1601)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(Conta
inerBase.java:1610)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(Conta
inerBase.java:1610)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.jav
a:1590)
        at java.lang.Thread.run(Thread.java:619)

Open in new window

0
nohacks
Asked:
nohacks
  • 4
1 Solution
 
bluebelldiscoveryCommented:
A jar file is missing.

If you know where org.ajax4jsf.application.AjaxStateHolder packed jar file
then ensure that it is present in
C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib
(if you are using tomcat 6)

You can download org.ajax4jsf.application.AjaxStateHolder source file from
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/richfaces/trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateHolder.java?view=co
0
 
nohacksAuthor Commented:
Thanks for your quick response...

I found it in richfaces-impl-3.3.0.GA.jar...

I put it in

tomcat2:/opt/apache-tomcat-6.0.18/lib# ls
annotations-api.jar  catalina-tribes.jar  jasper-jdt.jar               servlet-api.jar     tomcat-i18n-fr.jar
catalina-ant.jar     el-api.jar           jsp-api.jar                  tomcat-coyote.jar   tomcat-i18n-ja.jar
catalina-ha.jar      jasper-el.jar        ojdbc14.jar                  tomcat-dbcp.jar
catalina.jar         jasper.jar           richfaces-impl-3.3.0.GA.jar  tomcat-i18n-es.jar


When I try to do a tomcat save state...it tosses an exception..

Feb 21, 2009 11:01:42 PM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren
SEVERE: Exception invoking periodic operation:
java.lang.NoClassDefFoundError: org/ajax4jsf/application/StateHolder
        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.security.AccessController.doPrivileged(Native Method)
0
 
nohacksAuthor Commented:
I think I found that errror...

SEVERE: Exception invoking periodic operation:
java.lang.NoClassDefFoundError: org/ajax4jsf/application/StateHolder

it is in another jar...richfaces-api-3.3.0.GA.jar

I will put that in the tc/lib now and test..

Phil
0
 
nohacksAuthor Commented:
I copied all the jars from my application lib folder into tomcat/lib dir

now I get this error..


INFO: Server startup in 6339 ms
Feb 21, 2009 11:35:51 PM org.apache.catalina.session.StoreBase processExpires
SEVERE: Session: A8563A89E888F973762F14E927EC7ED9.tomcat2;
java.io.InvalidClassException: org.ajax4jsf.application.TreeStructureNode; local class incompatible: stream classdesc seri                                      alVersionUID = -9038742487716977911, local class serialVersionUID = -9038742487716977912
        at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at java.util.HashMap.readObject(HashMap.java:1030)
        at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at java.util.HashMap.readObject(HashMap.java:1030)
        at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
        at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
        at org.ajax4jsf.application.AjaxStateHolder.readObject(AjaxStateHolder.java:184)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1441)
        at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:942)
        at org.apache.catalina.session.FileStore.load(FileStore.java:296)
        at org.apache.catalina.session.StoreBase.processExpires(StoreBase.java:195)
        at org.apache.catalina.session.PersistentManagerBase.processExpires(PersistentManagerBase.java:553)
        at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:667)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
        at java.lang.Thread.run(Thread.java:619)
Feb 21, 2009 11:35:52 PM org.apache.catalina.session.StoreBase processExpires
SEVERE: Session: A8563A89E888F973762F14E927EC7ED9.tomcat2;
java.io.InvalidClassException: org.ajax4jsf.application.TreeStructureNode; local class incompatible: stream classdesc seri                                      alVersionUID = -9038742487716977911, local class serialVersionUID = -9038742487716977912
        at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at java.util.HashMap.readObject(HashMap.java:1030)
        at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at java.util.HashMap.readObject(HashMap.java:1030)

Open in new window

0
 
nohacksAuthor Commented:
I found the issues...I had different version of richfaces jar up there....I grabbed the new one and mixed the one I have in my war...

Works now...

Thanks..

Phil



tomcat2:/opt# cd tomcatsessions/
tomcat2:/opt/tomcatsessions# ls
4DBA3512951990BB1ACC31FC7048002E.tomcat2.session  AE8B2E4BD8026CF1465D3FD1B50B26FF.tomcat2.session
tomcat2:/opt/tomcatsessions#

Open in new window

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now