cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: SAX parsing problem?
Date Tue, 18 Jun 2002 22:18:12 GMT
Hi,


Looks like class loading issue. My bet is that your library is not in
the cocoon/WEB-INF/lib. If I'm right, you avoid this issue by moving
your library there.

Vadim


> From: gorillacommunications [mailto:leona@gorillacommunications.com]
> 
> Hi All,
> 
> I am converting an application from C1 to C2.
> 
> I had a working XSP file with this code snippet:
> 
> <?xml version="1.0"?>
> <?cocoon-process type="xsp"?>
> <?cocoon-process type="xslt"?>
> <?xml-stylesheet href="gs.xsl" type="text/xsl"?>
> <xsp:page language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>  xmlns:util="http://www.apache.org/1999/XSP/Util"
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>  xmlns:xalan="http://xml.apache.org/xslt.extensions.Redirect"
>  extension-element-prefixes="xalan"
>  xmlns:lxslt="http://xml.apache.org/xslt"
>  version="1.0">
> 
>   <xsp:structure>
>     <xsp:include>java.lang.*</xsp:include>
>     <xsp:include>java.util.*</xsp:include>
>     <xsp:include>java.io.*</xsp:include>
>     <xsp:include>com.kg.replicate.*</xsp:include>
> 
>   </xsp:structure>
>   <page>
>    <xsp:logic>
>       String strUserID;
>       String strPwd;
>       String strPlayerID;
>       String strHttp;
> 
>       strUserID = request.getParameter("userID");
>       strPwd = request.getParameter("pwd");
>       strPlayerID = "";
>       String strKGUser;
>       String strKGPwd;
>       KGParse kgParse = new KGParse();
>      ,,,
> 
> In order to use actions in C2, I converted it to a Java class,
> containing the following code snippet.
> 
> package com.kg.gs;
> import java.lang.*;
> import java.util.*;
> import java.io.*;
> import org.w3c.dom.*;
> import com.kg.replicate.*;
> import org.apache.avalon.framework.parameters.Parameters;
> import org.apache.cocoon.acting.AbstractAction;
> import org.apache.cocoon.Constants;
> import java.util.Map;
> import java.util.HashMap;
> import org.apache.cocoon.environment.Redirector;
> import org.apache.cocoon.environment.Request;
> import org.apache.cocoon.environment.SourceResolver;
> import org.apache.cocoon.environment.ObjectModelHelper;
> 
> public class GSLoginAction extends AbstractAction
> {
>   public Map act (Redirector redirector,
>                   SourceResolver resolver,
>                   Map objectModel,
>                   String source,
>                   Parameters params)
>   {
> 
>     String strUserID;
>     String strPwd;
>     String strPlayerID;
>     String strHttp;
> 
>     strPlayerID = "";
>     String strKGUser;
>     String strKGPwd;
>     Request request = ObjectModelHelper.getRequest(objectModel);
>     strUserID = request.getParameter("userID");
>     strPwd = request.getParameter("pwd");
>     KGParse kgParse = new KGParse();
> ....
> 
> When I execute this version it bombs in the KGParse() constructor with
the
> following exception.
> 
> The stack trace:
> java.lang.VerifyError: (class: com/kg/replicate/KGParse, method:
> parseInputSource signature:
> (Lorg/xml/sax/InputSource;)Lorg/w3c/dom/Document;) Incompatible object
> argument for function call
> 	at com.kg.gs.GSLoginAction.act(GSLoginAction.java:46)
> 	at
>
org.apache.cocoon.www.file_.D_.tomcat.webapps.GorillaStation.sitemap_xma
p.ma
>
tchN109C3(D:\tomcat\work\localhost\GorillaStation\cocoon-files\org/apach
e/co
>
coon/www/file_/D_/tomcat/webapps/GorillaStation\sitemap_xmap.java:12150)
> 	at
>
org.apache.cocoon.www.file_.D_.tomcat.webapps.GorillaStation.sitemap_xma
p.pr
>
ocess(D:\tomcat\work\localhost\GorillaStation\cocoon-files\org/apache/co
coon
> /www/file_/D_/tomcat/webapps/GorillaStation\sitemap_xmap.java:3931)
> 	at
>
org.apache.cocoon.www.file_.D_.tomcat.webapps.GorillaStation.sitemap_xma
p.pr
>
ocess(D:\tomcat\work\localhost\GorillaStation\cocoon-files\org/apache/co
coon
> /www/file_/D_/tomcat/webapps/GorillaStation\sitemap_xmap.java:3113)
> 	at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
> 	at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
> 	at
>
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154
)
> 	at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
> 	at
>
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
> FilterChain.java:247)
> 	at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erCh
> ain.java:193)
> 	at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.ja
> va:243)
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:5
> 66)
> 	at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
> 	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> 	at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.ja
> va:190)
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:5
> 66)
> 	at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
> 	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> 	at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234
3)
> 	at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180
> )
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:5
> 66)
> 	at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.
> java:170)
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:5
> 64)
> 	at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:170
> )
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:5
> 64)
> 	at
>
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468
)
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:5
> 64)
> 	at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
> 	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> 	at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java
> :174)
> 	at
>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:5
> 66)
> 	at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
> 	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> 	at
>
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.j
ava:
> 1012)
> 	at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:
1107
> )
> 	at java.lang.Thread.run(Thread.java:484)
> 
> 
> 
> My package com.kg.replicate.* has not changed. Does anyone know what
the
> problem is?
> My environment is apache tomcat 4.0.3, WinNT 2K, jdk 1.3.1_01, cocoon
> 2.0.2-dev
> 
> Thanks very much,
> Leona
> 
>
------------------------------------------------------------------------
----
> ----
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message