Re: java.lang.ClassCastException: cannot be cast to com.ocpsoft.pretty.faces.rewrite

Splash Forums PrettyFaces Users java.lang.ClassCastException: cannot be cast to com.ocpsoft.pretty.faces.rewrite Re: java.lang.ClassCastException: cannot be cast to com.ocpsoft.pretty.faces.rewrite

#20013

tdruttenberg
Participant

OK. I was confused. The class not found problem occurs when I *run the app* not when I try and build the project.

I can compile and deploy the project just fine, but when I run it I get this:

java.lang.ClassNotFoundException: com.ocpsoft.pretty.faces.rewrite.Processor

at java.net.URLClassLoader$1.run(Unknown Source)

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

at java.net.URLClassLoader.findClass(Unknown Source)

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

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

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

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

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

at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:292)

at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)

at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)

at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)

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

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClassCond(Unknown Source)

at java.lang.ClassLoader.defineClass(Unknown Source)

at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:63)

at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:572)

at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:532)

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

at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:530)

at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:507)

at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:134)

at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)

at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:452)

at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:267)

at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:166)

at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:265)

at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)

at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)

at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)

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

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

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

at org.jboss.classloader.plugins.loader.ClassLoaderToLoaderAdapter.loadClass(ClassLoaderToLoaderAdapter.java:172)

at org.jboss.classloader.spi.ClassLoaderDomain.loadClassFromParent(ClassLoaderDomain.java:352)

at org.jboss.classloader.spi.ClassLoaderDomain.loadClassAfter(ClassLoaderDomain.java:323)

at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:275)

at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)

at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)

at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)

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

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

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

at com.ocpsoft.pretty.faces.rewrite.processor.CustomClassProcessor.process(CustomClassProcessor.java:34)

at com.ocpsoft.pretty.faces.rewrite.RewriteEngine.processInbound(RewriteEngine.java:63)

at com.ocpsoft.pretty.PrettyFilter.rewrite(PrettyFilter.java:148)

at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:69)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)

at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

at java.lang.Thread.run(Unknown Source)