cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: [C2] [TC 4.0m4+] ClassCastException
Date Sun, 03 Dec 2000 15:47:33 GMT
Stuart,

Here's what i did with the latest Dev Snapshot of Tomcat4.0 @
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/nightly/. I did not have to recompile
tomcat4.0 sources. All i had to do was.

1. Remove jaxp.jar and crimson.jar from jakarta-tomcat-4.0\lib and jakarta-tomcat-4.0\server
2. Add Xerces.jar in both jakarta-tomcat-4.0\lib and jakarta-tomcat-4.0\server directories.

Thanks,
dims

--- Stuart Roebuck <stuart.roebuck@adolos.co.uk> wrote:
> I took a look and eventually found that tomcat was building without jaxp.jar and not
giving any
> errors in the build.
> 
> I put it in beside xerces.jar - as I'm building with xerces and not crimson.
> 
> Now I'm got the following stacktrace on my browser when I try to login into 
> localhost:8080/cocoon/
> 
> org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is not available.
> 	at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:88)
> 	at org.apache.cocoon.Cocoon.process(Cocoon.java:239)
> 	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:236)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:251)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:196)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
> 	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2014)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
> 	at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
> 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:414)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
> 	at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:811)
> 	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:890)
> 	at java.lang.Thread.run(Thread.java:479)
> 
> The cocoon log talks about a sealing violation, here's the whole log.  Sorry for the
long post,
> but I'm getting a bit hacked off with trying to get this running.  Cocoon seems relatively
> straightforward.  Compiling Tomcat requires so many additional libraries and environmental
> variable settings, it really isn't conducive for encouraging participation!
> 
> INFO    7       [cocoon  ] (HttpProcessor[8080][3]): Using configuration file: /cocoon.xconf
> INFO    11      [cocoon  ] (HttpProcessor[8080][3]): Reloading from:
> /Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/cocoon.xconf
> DEBUG   60      [cocoon  ] (HttpProcessor[8080][3]): New Cocoon object.
> DEBUG   62      [cocoon  ] (HttpProcessor[8080][3]): Using parser:
> org.apache.cocoon.components.parser.XercesParser
> DEBUG   233     [cocoon  ] (HttpProcessor[8080][3]): Classpath =
>
/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/avalonapi.jar:/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/bsf.jar:/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/cocoon-2.0a3.jar:/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/fop_0_14_1-dev.jar:/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/jakarta-regexp-1.1.jar:/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/jstyle.jar:/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/rhino.jar:/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/servlet_2_2.jar:/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/ss_css2.jar:/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/svg-20001010.jar:/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/xalan_2_0_D01.jar:/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/xerces_1_2_1.jar:/Users/stuart/OpenSource/build/tomcat-4.0/webapps/cocoon/WEB-INF/lib/xt.jar:/Users/stuart/OpenSource/build/tomcat-4.0/lib/jasper.jar:/Users/stuart/OpenSource/build/tomcat-4.0/lib/jaxp.jar:/Users/stuart/OpenSource/build/tomcat-4.0/lib/namingfactory.jar:/Users/stuart/OpenSource/build/tomcat-4.0/lib/xerces_1_2_1.jar:/Users/stuart/OpenSource/build/tomcat-4.0/bin/naming.jar:/Users/stuart/OpenSource/build/tomcat-4.0/bin/servlet.jar
> DEBUG   235     [cocoon  ] (HttpProcessor[8080][3]): Work directory =
> /Users/stuart/OpenSource/build/tomcat-4.0/work/localhost/cocoon
> DEBUG   247     [cocoon  ] (HttpProcessor[8080][3]): DefaultComponentManager using poolable
> instance of org.apache.cocoon.components.parser.XercesParser for role
> org.apache.cocoon.components.parser.Parser.
> DEBUG   248     [cocoon  ] (HttpProcessor[8080][3]): Creating new component pool for
> org.apache.cocoon.components.parser.XercesParser.
> DEBUG   1432    [cocoon  ] (HttpProcessor[8080][3]): ComponentFactory creating new instance
of
> org.apache.cocoon.components.parser.XercesParser.
> DEBUG   1490    [cocoon  ] (HttpProcessor[8080][3]): ComponentFactory creating new instance
of
> org.apache.cocoon.components.parser.XercesParser.
> DEBUG   1600    [cocoon  ] (HttpProcessor[8080][3]): ComponentFactory creating new instance
of
> org.apache.cocoon.components.parser.XercesParser.
> DEBUG   1649    [cocoon  ] (HttpProcessor[8080][3]): ComponentFactory creating new instance
of
> org.apache.cocoon.components.parser.XercesParser.
> DEBUG   1706    [cocoon  ] (HttpProcessor[8080][3]): ComponentFactory creating new instance
of
> org.apache.cocoon.components.parser.XercesParser.
> DEBUG   1754    [cocoon  ] (HttpProcessor[8080][3]): ComponentFactory creating new instance
of
> org.apache.cocoon.components.parser.XercesParser.
> DEBUG   1829    [cocoon  ] (HttpProcessor[8080][3]): ComponentFactory creating new instance
of
> org.apache.cocoon.components.parser.XercesParser.
> DEBUG   1877    [cocoon  ] (HttpProcessor[8080][3]): ComponentFactory creating new instance
of
> org.apache.cocoon.components.parser.XercesParser.
> DEBUG   2443    [cocoon  ] (HttpProcessor[8080][3]): Root configuration: cocoon
> DEBUG   2444    [cocoon  ] (HttpProcessor[8080][3]): Configuration version: 2.0
> DEBUG   2444    [cocoon  ] (HttpProcessor[8080][3]): Setting up components...
> DEBUG   2445    [cocoon  ] (HttpProcessor[8080][3]): Adding component
> (org.apache.cocoon.components.parser.Parser = org.apache.cocoon.components.parser.XercesParser)
> DEBUG   2448    [cocoon  ] (HttpProcessor[8080][3]): Adding component
> (org.apache.cocoon.components.store.Store = org.apache.cocoon.components.store.MemoryStore)
> DEBUG   2452    [cocoon  ] (HttpProcessor[8080][3]): Adding component
> (org.apache.cocoon.components.language.programming.ProgrammingLanguageSelector =
> org.apache.cocoon.CocoonComponentSelector)
> DEBUG   2480    [cocoon  ] (HttpProcessor[8080][3]): Adding component
> (org.apache.cocoon.components.classloader.ClassLoaderManager =
> org.apache.cocoon.components.classloader.ClassLoaderManagerImpl)
> DEBUG   2489    [cocoon  ] (HttpProcessor[8080][3]): Adding component
> (org.apache.cocoon.components.language.markup.MarkupLanguageSelector =
> org.apache.cocoon.CocoonComponentSelector)
> DEBUG   2533    [cocoon  ] (HttpProcessor[8080][3]): Adding component
> (org.apache.cocoon.components.language.generator.ProgramGenerator =
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl)
> DEBUG   2547    [cocoon  ] (HttpProcessor[8080][3]): Adding component
> (org.apache.cocoon.components.image.ImageEncoderSelector =
> org.apache.cocoon.CocoonComponentSelector)
> DEBUG   2569    [cocoon  ] (HttpProcessor[8080][3]): Adding component
> (org.apache.avalon.util.pool.PoolController = org.apache.cocoon.util.ComponentPoolController)
> DEBUG   2575    [cocoon  ] (HttpProcessor[8080][3]): Sitemap location = sitemap.xmap
> DEBUG   2626    [cocoon  ] (Thread-1): DefaultComponentManager using threadsafe instance
of
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl for role
> org.apache.cocoon.components.language.generator.ProgramGenerator.
> DEBUG   2649    [cocoon  ] (Thread-1): Lookup
> org.apache.cocoon.components.language.markup.MarkupLanguageSelector
> DEBUG   2650    [cocoon  ] (Thread-1): DefaultComponentManager returned instance for
role
> org.apache.cocoon.components.language.markup.MarkupLanguageSelector.
> DEBUG   2650    [cocoon  ] (Thread-1): Lookup
> org.apache.cocoon.components.language.programming.ProgrammingLanguageSelector
> DEBUG   2651    [cocoon  ] (Thread-1): DefaultComponentManager returned instance for
role
> org.apache.cocoon.components.language.programming.ProgrammingLanguageSelector.
> DEBUG   2651    [cocoon  ] (Thread-1): Lookup org.apache.cocoon.Cocoon
> DEBUG   2651    [cocoon  ] (Thread-1): DefaultComponentManager returned instance for
role
> org.apache.cocoon.Cocoon.
> ERROR   2710    [cocoon  ] (Thread-1): Configuration Error: sealing violation
> java.lang.SecurityException: sealing violation
> 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:236)
> 	at java.net.URLClassLoader.access$1(URLClassLoader.java:216)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
> 	at org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:648)
> 	at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:987)
> 	at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:906)
> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(Class.java:124)
> 	at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:128)
> 	at org.apache.cocoon.components.language.markup.Logicsheet.setInputSource(Logicsheet.java:82)
> 	at
>
org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.configure(AbstractMarkupLanguage.java:143)
> 	at org.apache.cocoon.CocoonComponentSelector.setupComponent(CocoonComponentSelector.java:240)
> 	at org.apache.cocoon.CocoonComponentSelector.select(CocoonComponentSelector.java:158)
> 	at
>
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:135)
> 	at org.apache.cocoon.sitemap.Handler.run(Handler.java:158)
> 	at java.lang.Thread.run(Thread.java:479)
> ERROR   2717    [cocoon  ] (Thread-1): Could not configure component
> org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage
> org.apache.avalon.ConfigurationException: AbstractMarkupLanguage: sealing violation
> 	at
>
org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.configure(AbstractMarkupLanguage.java:178)
> 	at org.apache.cocoon.CocoonComponentSelector.setupComponent(CocoonComponentSelector.java:240)
> 	at org.apache.cocoon.CocoonComponentSelector.select(CocoonComponentSelector.java:158)
> 	at
>
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:135)
> 	at org.apache.cocoon.sitemap.Handler.run(Handler.java:158)
> 	at java.lang.Thread.run(Thread.java:479)
> DEBUG   2792    [cocoon  ] (HttpProcessor[8080][3]): '' Processed by Apache Cocoon 2.0a3
in 214
> milliseconds.
> 
> 
> 
> 
> On Friday, December 1, 2000, at 06:39 PM, Stuart Roebuck wrote:
> 
> > Paul, 
> >  
> > Thanks for spending time on this. 
> >  
> > Very puzzling - I'll take another look at my libraries, see if there's any reason
why I 
> > might have more than one servlet api involved. 
> >  
> > Stuart. 
> >  
> > On Friday, December 1, 2000, at 06:17 PM, Paul Russell wrote: 
> >  
> > > On Thu, Nov 30, 2000 at 09:56:12PM +0000, Stuart Roebuck wrote:  
> > > > I posted a note on this a while back, but didn't get a response.  Now,
I thought I try
> again  
> > > with the lastest CVS versions of Cocoon and Tomcat and see if things had magically

> > started  
> > > working again.  
> > >   
> > > Hi Stuart.  
> > >   
> > > Sorry about the delay. There definately *shouldn't* be a class cast  
> > > exception in the location that stack trace points to. It's trying to  
> > > cast an org.apache.cocoon.environment.http.HttpRequest to a  
> > > javax.servlet.http.HttpServletRequest, which given the former implements  
> > > the latter, should be fine.  
> > >   
> > > The only thing I can think is that you're compiling against a  
> > > different version of the servlet api to the one you are running  
> > > against, although even this *shouldn't* cause this exception.  
> > >   
> > > Very odd indeed. The chunk of sitemap involved is:  
> > >   
> > >   private List wildcardMatch (int [] pattern, Map objectModel) {  
> > >     ArrayList list = new ArrayList();  
> > >     String uri = ((HttpServletRequest) objectModel.get(         <<  
> > >                     Cocoon.REQUEST_OBJECT)).getRequestURI();    <<  
> > >     if (uri.startsWith("/"))  
> > >       uri = uri.substring(1);  
> > >     if (org.apache.cocoon.matching.helpers.WildcardURIMatcher.match (  
> > >           list, uri, pattern)) {  
> > >       return list;  
> > >     } else {  
> > >       return null;  
> > >     }  
> > >   }  
> > >   
> > > and the problem is happening on the highlighted lines.  
> > > Anyone got any ideas what's causing it? Once again, that exception:  
> > >   
> > > > java.lang.ClassCastException:  
> > > org.apache.cocoon.environment.http.HttpRequest  
> > > > 	at  
> > > 
> >
>
_Users._stuart._OpenSource._build._tomcat_4_0._webapps._cocoon._sitemap_xmap.wildcardMatch(_sitemap_xmap.java:65)
> 
> 
=== message truncated ===


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Mime
View raw message