Collin, I've been using the ObjectModelHelper.getRequest method as part of an implementation of the RequestParamAction interface in a WAR only, so I'm probably not going to be of much help, but something just occurred to me: REQUEST_OBJECT is a hardcoded String in ObjectModelHelper, defined as "request". This String is used to "index" the object in the Map object.
In the JDK 1.3 documentation, it says that Map.get() will throw a ClassCastException if the key passed as parameter is of inappropriate type for the given Map object. Maybe you could try to use Map.entrySet() as a debug in the getRequest method in order to find out what the available keys and their associated objects are in the Map you are using. Hope that helps, Regards, Cedric -----Original Message----- From: Collin VanDyck [mailto:[EMAIL PROTECTED] Sent: 28 July 2003 19:55 To: [EMAIL PROTECTED] Subject: Issues with using embedded FOP libraries alongside Cocoon I've got an application with two .WAR webapps, and one EJB jar, all directly inside of my application.ear, all of which need to be able to use the FOP libraries. Specifically, I need to be able to have one of my session beans render a PDF to disk or remote location without invoking a Cocoon sitemap . I did this per the instructions on embedding FOP on the FOP website. In order to make the FOP library in my EJBs accessible, I place the following into my EJB.jar's META-INF/lib directory: avalon-framework-20020627.jar fop-0.20.5.jar logkit-20020529.jar However, this is causing my webapps to throw one exception over and over: The code that is throwing it is ObjectModelHelper.getRequest(): public static final Request getRequest(Map objectModel) { return (Request)objectModel.get(REQUEST_OBJECT); } I rebuilt the source code with code to tell me what class this object that was being returned was, and it was of this class: org.apache.cocoon.environment.http.HttpRequest Which seems to me to be OK because it implements Request. I'm baffled. Note though, that both serialization to PDF from the context of a Cocoon invocation as well as serialization inside of the EJB are performing perfectly. The bad thing is that I get about 10MB's of these errors each time I make such a request, which slows everything down greatly. I'm using Cocoon 2.0.4, and JBoss 3.2. Any help greatly appreciated. thanks! Collin The error: 13:54:37,031 ERROR [STDERR] Logging Error: Unknown error writing event. 13:54:37,031 ERROR [STDERR] java.lang.ClassCastException: org.apache.cocoon.environment.http.HttpRequest 13:54:37,031 ERROR [STDERR] at org.apache.cocoon.environment.ObjectModelHelper.getRequest(ObjectModelHe lper .java:91) 13:54:37,031 ERROR [STDERR] at org.apache.cocoon.util.log.CocoonLogFormatter.getURI(CocoonLogFormatter. java :205) 13:54:37,031 ERROR [STDERR] at org.apache.cocoon.util.log.CocoonLogFormatter.formatPatternRun(CocoonLog Form atter.java:153) 13:54:37,031 ERROR [STDERR] at org.apache.cocoon.util.log.ExtensiblePatternFormatter.format(ExtensibleP atte rnFormatter.java:37 6) 13:54:37,047 ERROR [STDERR] at org.apache.log.output.AbstractOutputTarget.format(AbstractOutputTarget.j ava: 132) 13:54:37,047 ERROR [STDERR] at org.apache.log.output.AbstractOutputTarget.doProcessEvent(AbstractOutput Targ et.java:91) 13:54:37,047 ERROR [STDERR] at org.apache.log.output.AbstractTarget.processEvent(AbstractTarget.java:87 ) 13:54:37,047 ERROR [STDERR] at org.apache.log.Logger.fireEvent(Logger.java:612) 13:54:37,047 ERROR [STDERR] at org.apache.log.Logger.output(Logger.java:587) 13:54:37,047 ERROR [STDERR] at org.apache.log.Logger.output(Logger.java:570) 13:54:37,047 ERROR [STDERR] at org.apache.log.Logger.info(Logger.java:146) 13:54:37,047 ERROR [STDERR] at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1142) 13:54:37,047 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tion FilterChain.java:24 7) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erCh ain.java:193) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.ja va:260) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipel ine.java:643) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.ja va:191) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipel ine.java:643) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja va:2 46) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipel ine.java:641) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241 5) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180 ) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipel ine.java:643) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve. java:170) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipel ine.java:641) 13:54:37,047 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :172 ) 13:54:37,062 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipel ine.java:641) 13:54:37,062 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509 ) 13:54:37,062 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipel ine.java:641) 13:54:37,062 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) 13:54:37,062 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 13:54:37,062 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java :174) 13:54:37,062 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvok eNext(StandardPipel ine.java:643) 13:54:37,062 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) 13:54:37,062 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 13:54:37,062 ERROR [STDERR] at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) 13:54:37,062 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:43 2) 13:54:37,062 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onne ction(Http11Protoco l.java:386) 13:54:37,062 ERROR [STDERR] at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:53 4) 13:54:37,062 ERROR [STDERR] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .jav a:530) 13:54:37,062 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This e-mail is confidential and is intended for the named recipient only. If you receive it in error please destroy the message and all copies. Kainos Software Ltd. does not accept liability for damage sustained as a result of malicious software (e.g. viruses). Kainos does not accept liability for, or permit, the creation of contracts on its behalf by e-mail, the publication of any defamatory statement by its employees by e-mail, or changes subsequently made to the original message. The Company's registered office is located at 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland, Tel +44 28 9057 1100. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
