Jeff, Did you get anywhere with this problem ?
Werner > -----Original Message----- > From: Jeff Hegedus [mailto:[EMAIL PROTECTED] > Sent: Sonntag, 30. Oktober 2005 05:47 > To: [email protected] > Subject: RE: [castor-user] Problems getting castor to work with j2ee > > I've run another test. I ran the following code from a > servlet. And it didn't fail until after printing the number > 13. So it is failing when it tries to use the schema writer. > The error is the same as before... > > java.lang.NoClassDefFoundError: > org/apache/xml/serialize/XMLSerializer > > But as you can see, it is able to successfully create an > instance of XMLSerializer after step 3. See the output below > the code. I'm completely stumped. Does anyone have any idea > what is happening here? > > System.out.println("castorStuff: 1"); > System.out.println("CLASSPATH=" + > System.getProperty("java.class.path")); > > System.out.println("castorStuff: 2"); > > System.out.println("castorStuff: 3"); > org.apache.xml.serialize.XMLSerializer xmlSerializer = > new org.apache.xml.serialize.XMLSerializer(); > System.out.println("castorStuff: 4"); > > Schema schema = null; > System.out.println("castorStuff: 5"); > schema = new Schema("centrifuge", "http://www.centrifugeit.com"); > System.out.println("castorStuff: 6"); > ComplexType complexType = new ComplexType(schema); > System.out.println("castorStuff: 7"); > complexType.setName("myType"); > System.out.println("castorStuff: 8"); > > AttributeDecl testAttributeDecl = new > AttributeDecl(schema, "test"); > System.out.println("castorStuff: 9"); > testAttributeDecl.setSimpleTypeReference("string"); > System.out.println("castorStuff: 10"); > complexType.addAttributeDecl(testAttributeDecl); > System.out.println("castorStuff: 11"); > schema.addComplexType(complexType); > System.out.println("castorStuff: 12"); > > StringWriter stringWriter = new StringWriter(); > System.out.println("castorStuff: 13"); > SchemaWriter schemaWriter = new SchemaWriter(stringWriter); > System.out.println("castorStuff: 14"); > > System.out.println("Schema = " + stringWriter.toString()); > System.out.println("castorStuff: 15"); > System.out.println("Schema = " + schemaWriter.toString()); > System.out.println("castorStuff: 16"); > > Output... > > > [#|2005-10-30T00:48:29.611-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 1|#] > > [#|2005-10-30T00:48:29.613-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > CLASSPATH=/opt/SUNWappserver/lib/xercesImpl.jar:/usr/jdk/jdk1. > 5.0/lib/tools. > jar:/opt/SUNWappserver/lib/appserv-rt.jar:/opt/SUNW > server/lib/aspectjrt.jar:/opt/SUNWappserver/lib/appserv-ext.ja > r:/opt/SUNWapp > server/lib/j2ee.jar:/opt/SUNWappserver/lib/saaj-api > r:/opt/SUNWappserver/lib/saaj-impl.jar:/opt/SUNWappserver/lib/ > appserv-admin. > jar:/opt/SUNWappserver/lib/admin-cli.jar:/opt/SUNWa > erver/lib/jaxr-api.jar:/opt/SUNWappserver/lib/jaxr-impl.jar:/o > pt/SUNWappserv > er/lib/relaxngDatatype.jar:/opt/SUNWappserver/lib/x > ib.jar:/opt/SUNWappserver/lib/jax-qname.jar:/opt/SUNWappserver > /lib/jaxrpc-ap > i.jar:/opt/SUNWappserver/lib/jaxrpc-impl.jar:/opt/S > appserver/lib/mail.jar:/opt/SUNWappserver/lib/activation.jar:/ > opt/SUNWappser > ver/lib/j2ee-svc.jar:/opt/SUNWappserver/lib/appserv > p.jar:/opt/SUNWappserver/lib/xercesImpl.jar:/opt/SUNWappserver > /lib/dom.jar:/ > opt/SUNWappserver/lib/xalan.jar:/opt/SUNWappserver/ > /commons-launcher.jar:/opt/SUNWappserver/lib/jsf-api.jar:/opt/ > SUNWappserver/ > lib/appserv-jstl.jar:/opt/SUNWappserver/lib/rmissl. > :/opt/SUNWappserver/lib/jmxremote.jar:/opt/SUNWappserver/lib/c > ommons-logging > .jar:/opt/SUNWappserver/lib/jmxremote_optional.jar: > t/SUNWappserver/lib/aspectjtools.jar:/opt/SUNWappserver/lib/jd > bc2_0-stdext.j > ar:/opt/SUNWappserver/lib/jta-spec1_0_1.jar:/opt/SU > ppserver/lib/resolver.jar:/opt/SUNWappserver/lib/jsf-impl.jar: > /opt/SUNWappse > rver/lib/castor-0.9.9.jar:/opt/SUNWappserver/lib/xm > pis.jar:/opt/SUNWappserver/lib/appserv-upgrade.jar:/opt/SUNWap > pserver/lib/xm > lParserAPIs.jar:/opt/SUNWappserver/lib/commons-logg > -api.jar:/opt/SUNWappserver/lib/serializer.jar:/opt/SUNWappser > ver/lib/xsltc. > jar:/usr/jdk/jdk1.5.0/lib/tools.jar:/opt/SUNWappser > /lib/install/applications/jmsra/imqjmsra.jar:/opt/SUNWappserve > r/imq/lib/jaxm > -api.jar:/opt/SUNWappserver/imq/lib/fscontext.jar:/ > /SUNWappserver/lib/ant/lib/ant.jar:/usr/lib/audit/Audit.jar:/o > pt/SUNWappserv > er/pointbase/lib/pbclient.jar:/opt/SUNWappserver/po > base/lib/pbembedded.jar|#] > > [#|2005-10-30T00:48:29.614-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 2|#] > > [#|2005-10-30T00:48:29.614-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 3|#] > > [#|2005-10-30T00:48:29.615-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 4|#] > > [#|2005-10-30T00:48:29.615-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 5|#] > > [#|2005-10-30T00:48:29.620-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 6|#] > > [#|2005-10-30T00:48:29.620-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 7|#] > > [#|2005-10-30T00:48:29.621-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 8|#] > > [#|2005-10-30T00:48:29.621-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 9|#] > > [#|2005-10-30T00:48:29.622-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 10|#] > > [#|2005-10-30T00:48:29.622-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 11|#] > > [#|2005-10-30T00:48:29.622-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 12|#] > > [#|2005-10-30T00:48:29.623-0400|INFO|sun-appserver-pe8.1|javax > .enterprise.sy > stem.stream.out|_ThreadID=11;| > castorStuff: 13|#] > > [#|2005-10-30T00:48:29.628-0400|SEVERE|sun-appserver-pe8.1|jav > ax.enterprise. > system.container.web|_ThreadID=11;|StandardWrapperV > e[CentrifugeServlet]: Servlet.service() for servlet > CentrifugeServlet threw exception > java.lang.NoClassDefFoundError: org/apache/xml/serialize/XMLSerializer > at > org.exolab.castor.xml.schema.writer.SchemaWriter.<init>(Schema > Writer.java:17 > 8) > at > com.centrifugeit.CentrifugeResponse.castorStuff(Unknown Source) > at > com.centrifugeit.CentrifugeResponse.respondToXMLRequest(Unknown > Source) > at com.centrifugeit.CentrifugeResponse.respond(Unknown Source) > at com.centrifugeit.CentrifugeServer.respond(Unknown Source) > at > com.centrifugeit.CentrifugeServlet.processRequest(Unknown Source) > at com.centrifugeit.CentrifugeServlet.doPost(Unknown Source) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:767) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:860) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess > orImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth > odAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) > at java.security.AccessController.doPrivileged(Native Method) > at > javax.security.auth.Subject.doAsPrivileged(Subject.java:517) > at > org.apache.catalina.security.SecurityUtil.execute(SecurityUtil > .java:282) > at > org.apache.catalina.security.SecurityUtil.doAsPrivilege(Securi > tyUtil.java:16 > 5) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilt > er(Application > FilterChain.java:257) > at > org.apache.catalina.core.ApplicationFilterChain.access$000(App > licationFilter > Chain.java:55) > at > org.apache.catalina.core.ApplicationFilterChain$1.run(Applicat > ionFilterChain > .java:161) > at java.security.AccessController.doPrivileged(Native Method) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli > cationFilterCh > ain.java:157) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardW > rapperValve.ja > va:263) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel > ine.java:551) > at > org.apache.catalina.core.StandardContextValve.invokeInternal(S > tandardContext > Valve.java:225) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardC > ontextValve.ja > va:173) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel > ine.java:551) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHost > Valve.java:161 > ) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel > ine.java:551) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEn > gineValve.java > :132) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel > ine.java:551) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933) > at > org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter. > java:184) > at > com.sun.enterprise.web.connector.grizzly.ProcessorTask.process > (ProcessorTask > .java:653) > at > com.sun.enterprise.web.connector.grizzly.ProcessorTask.process > (ProcessorTask > .java:534) > at > com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask( > ProcessorTask. > java:403) > at > com.sun.enterprise.web.connector.grizzly.WorkerThread.run(Work > erThread.java: > 55) > |#] > > Thanks in advance for any help you can offer, > > > > Jeff > > > -----Original Message----- > From: Jeff Hegedus [mailto:[EMAIL PROTECTED] > Sent: Saturday, October 29, 2005 8:58 PM > To: [email protected] > Subject: RE: [castor-user] Problems getting castor to work with j2ee > > Bruce, > > Thanks for the response. Neat trick that with the javap. > I'm not a deep java guru. I'm learning as I go. I ran your > test and here are the results. > They seem to indicate that there is no problem finding the > class. Do you have any ideas why I would be getting the > error message I indicated. > > [EMAIL PROTECTED] centrifugeit.com]# javap -classpath > /opt/SUNWappserver/lib/castor-0.9.9.jar:/opt/SUNWappserver/lib > /xercesImpl.j > ar:/opt/SUNWappserver/lib/serializer.jar:/usr/jdk/jdk1.5.0/lib > /tools.jar:/op > t/SUNWappserver/lib/appserv-rt.jar:/opt/SUNWappserver > /lib/aspectjrt.jar:/opt/SUNWappserver/lib/appserv-ext.jar:/opt > /SUNWappserver > /lib/j2ee.jar:/opt/SUNWappserver/lib/saaj-api.jar:/op > t/SUNWappserver/lib/saaj-impl.jar:/opt/SUNWappserver/lib/appse > rv-admin.jar:/ > opt/SUNWappserver/lib/admin-cli.jar:/opt/SUNWappserve > r/lib/jaxr-api.jar:/opt/SUNWappserver/lib/jaxr-impl.jar:/opt/S > UNWappserver/l > ib/relaxngDatatype.jar:/opt/SUNWappserver/lib/xsdlib. > jar:/opt/SUNWappserver/lib/jax-qname.jar:/opt/SUNWappserver/li > b/jaxrpc-api.j > ar:/opt/SUNWappserver/lib/jaxrpc-impl.jar:/opt/SUNWap > pserver/lib/mail.jar:/opt/SUNWappserver/lib/activation.jar:/op > t/SUNWappserve > r/lib/j2ee-svc.jar:/opt/SUNWappserver/lib/appserv-cmp > .jar:/opt/SUNWappserver/lib/xercesImpl.jar:/opt/SUNWappserver/ > lib/dom.jar:/o > pt/SUNWappserver/lib/xalan.jar:/opt/SUNWappserver/lib > /commons-launcher.jar:/opt/SUNWappserver/lib/jsf-api.jar:/opt/ > SUNWappserver/ > lib/appserv-jstl.jar:/opt/SUNWappserver/lib/rmissl.ja > r:/opt/SUNWappserver/lib/jmxremote.jar:/opt/SUNWappserver/lib/ > commons-loggin > g.jar:/opt/SUNWappserver/lib/jmxremote_optional.jar:/ > opt/SUNWappserver/lib/aspectjtools.jar:/opt/SUNWappserver/lib/ > jdbc2_0-stdext > .jar:/opt/SUNWappserver/lib/jta-spec1_0_1.jar:/opt/SU > NWappserver/lib/resolver.jar:/opt/SUNWappserver/lib/jsf-impl.j > ar:/opt/SUNWap > pserver/lib/castor-0.9.9.jar:/opt/SUNWappserver/lib/x > ml-apis.jar:/opt/SUNWappserver/lib/appserv-upgrade.jar:/opt/SU > NWappserver/li > b/xmlParserAPIs.jar:/opt/SUNWappserver/lib/commons-lo > > server/lib/install/applications/jmsra/imqjmsra.jar:/opt/SUNWap > pserver/imq/li > b/jaxm-api.jar:/opt/SUNWappserver/imq/lib/fscontext.j > ar:/opt/SUNWappserver/lib/ant/lib/ant.jar:/usr/lib/audit/Audit > .jar:/opt/SUNW > appserver/pointbase/lib/pbclient.jar:/opt/SUNWappserv > er/pointbase/lib/pbembedded.jar org.apache.xml.serialize.XMLSerializer > public class org.apache.xml.serialize.XMLSerializer extends > org.apache.xml.serialize.BaseMarkupSerializer{ > protected static final boolean DEBUG; > protected org.apache.xerces.util.NamespaceSupport fNSBinder; > protected org.apache.xerces.util.NamespaceSupport fLocalNSBinder; > protected org.apache.xerces.util.SymbolTable fSymbolTable; > protected static final java.lang.String PREFIX; > protected boolean fNamespaces; > protected boolean fNamespacePrefixes; > public org.apache.xml.serialize.XMLSerializer(); > public > org.apache.xml.serialize.XMLSerializer(org.apache.xml.serializ > e.OutputFormat > ); > public org.apache.xml.serialize.XMLSerializer(java.io.Writer, > org.apache.xml.serialize.OutputFormat); > public > org.apache.xml.serialize.XMLSerializer(java.io.OutputStream, > org.apache.xml.serialize.OutputFormat); > public void > setOutputFormat(org.apache.xml.serialize.OutputFormat); > public void setNamespaces(boolean); > public void startElement(java.lang.String, java.lang.String, > java.lang.String, org.xml.sax.Attributes) throws org.xml.sa > x.SAXException; > public void endElement(java.lang.String, java.lang.String, > java.lang.String) throws org.xml.sax.SAXException; > public void endElementIO(java.lang.String, java.lang.String, > java.lang.String) throws java.io.IOException; > public void startElement(java.lang.String, > org.xml.sax.AttributeList) throws org.xml.sax.SAXException; > public void endElement(java.lang.String) throws > org.xml.sax.SAXException; > protected void startDocument(java.lang.String) throws > java.io.IOException; > protected void serializeElement(org.w3c.dom.Element) throws > java.io.IOException; > protected java.lang.String getEntityRef(int); > protected void printEscaped(java.lang.String) throws > java.io.IOException; > protected void printXMLChar(int) throws java.io.IOException; > protected void printText(java.lang.String, boolean, > boolean) throws java.io.IOException; > protected void printText(char[], int, int, boolean, > boolean) throws java.io.IOException; > protected void checkUnboundNamespacePrefixedNode(org.w3c.dom.Node) > throws java.io.IOException; > public boolean reset(); > } > > Thanks again, > > > > Jeff > > -----Original Message----- > From: Bruce Snyder [mailto:[EMAIL PROTECTED] > Sent: Saturday, October 29, 2005 9:25 AM > To: [email protected]; [EMAIL PROTECTED] > Subject: Re: [castor-user] Problems getting castor to work with j2ee > > On 10/29/05, Jeff Hegedus <[EMAIL PROTECTED]> wrote: > > [#|2005-10-29T02:53:30.630-0400|SEVERE|sun-appserver-pe8.1|jav > ax.enterprise. > system.container.web|_ThreadID=11;|StandardWrapperValve[Centri > fugeServlet]: > > Servlet.service() for servlet CentrifugeServlet threw exception > > > > java.lang.NoClassDefFoundError: > > org/apache/xml/serialize/XMLSerializer > > Jeff, > > If the CLASSPATH above is correct and the two xercesImpl.jar > files in it are, in fact, version 2.7.1, the > org.apache.xml.serialize.XMLSerializer class should exist. It > would seem that you're experiencing a standard CLASSPATHing > issue. Using above CLASSPATH, try to execute this command > from the command line: > > javap -classpath <insert classpath here> > org.apache.xml.serialize.XMLSerializer > > If this executes successfully, the entire class signature > should be output. > > Bruce > -- > perl -e 'print > unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" > );' > > The Castor Project > http://www.castor.org/ > > Apache Geronimo > http://geronimo.apache.org/ > > ------------------------------------------------- > If you wish to unsubscribe from this list, please send an > empty message to the following address: > > [EMAIL PROTECTED] > ------------------------------------------------- > > > > ------------------------------------------------- > If you wish to unsubscribe from this list, please send an > empty message to the following address: > > [EMAIL PROTECTED] > ------------------------------------------------- > > > > ------------------------------------------------- > If you wish to unsubscribe from this list, please send an > empty message to the following address: > > [EMAIL PROTECTED] > ------------------------------------------------- > > > ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

