[jboss-user] [JBossWS] - Failed to create a new SAX parser

Ufic do-not-reply at jboss.com
Sat Aug 4 05:23:00 EDT 2007


Hi.
I created a simple webservice with a string param and a string return value.
I'm able to deploy it and to use it through a standalone application (a simple main function).

But, if I use THE SAME code in a servlet, I receive this error:

[ServiceFactoryImpl] Use jaxrpc-mapping from: jar:file:/opt/jboss-4.2.0.CR1/server/default/tmp/deploy/tmp28550DipScienzeInformazioneApp.ear-contents/DipartimentoEJB.jar!/META-INF/jaxrpc-mapping.xml
  | 10:41:15,481 INFO  [STDOUT] 10:41:15,478 ERROR [[Search]] Servlet.service() for servlet Search threw exception
  | org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
  | 	at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100)
  | 	at org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory.parse(JavaWsdlMappingFactory.java:79)
  | 	at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:77)
  | 	at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:111)
  | 	at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
  | 	at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
  | 	at it.agaticarnazzo.ateneo.lib.WsLib.retrieveWebService(WsLib.java:118)
  | 	at it.agaticarnazzo.ateneo.lib.WsLib.findDocumenti(WsLib.java:99)
  | 	at it.agaticarnazzo.ateneo.lib.WsLib.findDocumenti(WsLib.java:81)
  | 	at it.agaticarnazzo.ateneo.lib.WsLib.findDocumenti(WsLib.java:56)
  | 	at it.agaticarnazzo.ateneo.web.SearchServlet.doPost(SearchServlet.java:34)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | 	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:228)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  | 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  | 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
  | 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
  | 	at java.lang.Thread.run(Thread.java:595)
  | Caused by: org.jboss.xb.binding.JBossXBException: Failed to create a new SAX parser
  | 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:96)
  | 	at org.jboss.xb.binding.UnmarshallerImpl.<init>(UnmarshallerImpl.java:55)
  | 	at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:96)
  | 	... 30 more
  | Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration
  | 	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
  | 	at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
  | 	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
  | 	at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
  | 	at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
  | 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:92)
  | 	... 32 more


This is my code:
		QName qname = new QName("http://dipartimento.ws.agaticarnazzo.it/",
  | 			"CatalogoService");
  | 
  | 		ServiceFactory factory = ServiceFactory.newInstance();
  | 		Service service = factory.createService(endpoint, qname); // This line throws the exception
  | 
  | 		CatalogoService ret = (CatalogoService) 
  | 			service.getPort(CatalogoService.class);
  | 		return ret;
  | 

I'm using JBoss 4.2.0CR1, JDK 1.5 and xerces lib from jboss lib/endorsed folder.

Can someone help me?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070849#4070849

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070849



More information about the jboss-user mailing list