Error installing Axis2.war in Jboss

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error installing Axis2.war in Jboss

rkapur
Hi All,

I am having trouble installing Axis2 1.4.1 or 1.5 they both are giving same error as below. All I did was to put axis2.war in jboss-5.1.0.GA\server\default.
This is in both Jboss 5.1and 5.01

Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
    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)
    ... 75 more
2009-06-16 15:17:28,039 ERROR [org.jboss.web.tomcat.service.deployers.JBossContextConfig] (main) XML error parsing: jboss.web/localhost/context.xml.default
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.web.tomcat.service.deployers.JBossContextConfig.processContextConfig(JBossContextConfig.java:549)
    at org.jboss.web.tomcat.service.deployers.JBossContextConfig.init(JBossContextConfig.java:537)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:

Please let me know if you have it working in Jboss. Thanks a lot
-rishi
Reply | Threaded
Open this post in threaded view
|

RE: Error installing Axis2.war in Jboss

David Meiklejohn-2
Hi rishi,

I had a bit of fun with this myself. In the end we have steered away from JBoss so I don't have much help other than this advice.

From what I found there is two ways around it. The first is quick (and dirty?). Just delete xml-apis-1.3.04.jar and xercesImpl-2.8.1.jar (or their applicable versions) from the Axis2 war and deploy that. It should work then.

The other way is to mess around with Class Loading Configuration. I didn't have much joy with this but I didn't play with it for long enough to really know: http://www.jboss.org/community/wiki/ClassLoadingConfiguration

Good luck!

David

From: rishi [mailto:[hidden email]]
Sent: Wednesday 17 June 2009 5:29 AM
To: [hidden email]
Subject: Error installing Axis2.war in Jboss

Hi All,

I am having trouble installing Axis2 1.4.1 or 1.5 they both are giving same error as below. All I did was to put axis2.war in jboss-5.1.0.GA\server\default.
This is in both Jboss 5.1and 5.01

Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
    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)
    ... 75 more
2009-06-16 15:17:28,039 ERROR [org.jboss.web.tomcat.service.deployers.JBossContextConfig] (main) XML error parsing: jboss.web/localhost/context.xml.default
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.web.tomcat.service.deployers.JBossContextConfig.processContextConfig(JBossContextConfig.java:549)
    at org.jboss.web.tomcat.service.deployers.JBossContextConfig.init(JBossContextConfig.java:537)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:

Please let me know if you have it working in Jboss. Thanks a lot
-rishi
Reply | Threaded
Open this post in threaded view
|

Re: Error installing Axis2.war in Jboss

Dennis Korbar
In reply to this post by rkapur
Hello rishi,

I installed Axis 2 on JBoss a couple of month ago, but I'm not sure if it was JBoss 5.x, might have been 4.x. I ran into a couple of problems too, I don't know if I had the same exception you got though.
However, we fixed our problems by deleting JBoss' own webservice implementation which is an exploded war in the deploy folder (name depends on jboss version, might have been something like jboss-ws or so).

Cheers,
Dennis


2009/6/16 rishi <[hidden email]>
Hi All,

I am having trouble installing Axis2 1.4.1 or 1.5 they both are giving same error as below. All I did was to put axis2.war in jboss-5.1.0.GA\server\default.
This is in both Jboss 5.1and 5.01

Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
    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)
    ... 75 more
2009-06-16 15:17:28,039 ERROR [org.jboss.web.tomcat.service.deployers.JBossContextConfig] (main) XML error parsing: jboss.web/localhost/context.xml.default
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.web.tomcat.service.deployers.JBossContextConfig.processContextConfig(JBossContextConfig.java:549)
    at org.jboss.web.tomcat.service.deployers.JBossContextConfig.init(JBossContextConfig.java:537)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:

Please let me know if you have it working in Jboss. Thanks a lot
-rishi

Reply | Threaded
Open this post in threaded view
|

Axis response ends in 0???

Chris Hyzer
I"m using Axis 2 1.6.1, we made beans, did java2wsdl, and axis handles everything for us. 

We had an error report that occasionally clients are failing because an extra 0 is sent after the response.

I looked in our samples, and they show some extra hex codes before and after the XML (though Im not sure if this is due to the capture not being prescise?)

Here are my captured requests and responses from the generated Axis client and server.  Notice the numbers at the beginning and end.  Has anyone ever heard of this and know how to get rid of it?  Some clients complain about it sometimes.


Content-Type: application/soap+xml; charset=UTF-8; action="urn:stemSave"
User-Agent: Axis2
Authorization: Basic xxxxxxxxxxxxxxxxx==
Host: localhost:8092
Transfer-Encoding: chunked

2f2
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Body>
    <ns1:stemSave xmlns:ns1="http://soap_v2_1.ws.grouper.middleware.internet2.edu/xsd">
      <ns1:clientVersion>v2_1_001</ns1:clientVersion>
      <ns1:wsStemToSaves>
        <ns1:saveMode></ns1:saveMode>
        <ns1:wsStem>
          <ns1:description>the test stem</ns1:description>
          <ns1:displayExtension>test stem</ns1:displayExtension>
          <ns1:name>aStem:testStem</ns1:name>
          <ns1:uuid></ns1:uuid>
        </ns1:wsStem>
        <ns1:wsStemLookup>
          <ns1:stemName>aStem:testStem</ns1:stemName>
        </ns1:wsStemLookup>
      </ns1:wsStemToSaves>
      <ns1:actAsSubjectLookup>
        <ns1:subjectId>GrouperSystem</ns1:subjectId>
      </ns1:actAsSubjectLookup>
      <ns1:txType></ns1:txType>
    </ns1:stemSave>
  </soapenv:Body>
</soapenv:Envelope>
0


RESPONSE

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=xxxxxxxxxxxxxxxxxxxxxxxx; Path=/grouper-ws
X-Grouper-resultCode: SUCCESS
X-Grouper-success: T
X-Grouper-resultCode2: NONE
Content-Type: application/soap+xml; action="urn:stemSaveResponse";charset=UTF-8
Transfer-Encoding: chunked
Date: Sun, 01 Jul 2012 14:23:35 GMT

6cd
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Body>
    <ns:stemSaveResponse xmlns:ns="http://soap_v2_1.ws.grouper.middleware.internet2.edu/xsd">
      <ns:return xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns:WsStemSaveResults">
        <ns:responseMetadata xsi:type="ns:WsResponseMeta">
          <ns:millis xsi:nil="true" />
          <ns:resultWarnings xsi:nil="true" />
          <ns:serverVersion>2.1.1</ns:serverVersion>
        </ns:responseMetadata>
        <ns:resultMetadata xsi:type="ns:WsResultMeta">
          <ns:params xsi:nil="true" />
          <ns:resultCode>SUCCESS</ns:resultCode>
          <ns:resultCode2 xsi:nil="true" />
          <ns:resultMessage>Success for: clientVersion: 2.1.1, wsStemToSaves: Array size: 1: [0]: WsStemToSave[
wsStemLookup=WsStemLookup[stemName=aStem:testStem],
wsStem=WsStem[displayExtension=test stem,description=the test stem,name=aStem:testStem,uuid=],saveMode=]

, actAsSubject: WsSubjectLookup[subjectId=GrouperSystem], txType: NONE, paramNames:
, params: Empty array</ns:resultMessage>
          <ns:success>T</ns:success>
        </ns:resultMetadata>
        <ns:results xsi:type="ns:WsStemSaveResult">
          <ns:resultMetadata xsi:type="ns:WsResultMeta">
            <ns:params xsi:nil="true" />
            <ns:resultCode>SUCCESS_INSERTED</ns:resultCode>
            <ns:resultCode2 xsi:nil="true" />
            <ns:resultMessage xsi:nil="true" />
            <ns:success>T</ns:success>
          </ns:resultMetadata>
          <ns:wsStem xsi:type="ns:WsStem">
            <ns:description>the test stem</ns:description>
            <ns:displayExtension>test stem</ns:displayExtension>
            <ns:displayName>a stem:test stem</ns:displayName>
            <ns:extension>testStem</ns:extension>
            <ns:name>aStem:testStem</ns:name>
            <ns:uuid>2812f05667644368843654e61f9edc9b</ns:uuid>
          </ns:wsStem>
        </ns:results>
      </ns:return>
    </ns:stemSaveResponse>
  </soapenv:Body>
</soapenv:Envelope>
0

Reply | Threaded
Open this post in threaded view
|

Re: Axis response ends in 0???

robertlazarski .
On Wed, Apr 2, 2014 at 10:08 PM, Chris Hyzer <[hidden email]> wrote:
> I"m using Axis 2 1.6.1, we made beans, did java2wsdl, and axis handles
> everything for us.
>
> We had an error report that occasionally clients are failing because an
> extra 0 is sent after the response.
>
<snip>
> </soapenv:Envelope>
> 0

On the client side you can disable chunking, ie the 0 indicates the
size of the next chunk
(0) meaning the message is finished. You would then be using
content-length instead, IIRC.

         Options option = client.getOptions();
         option.setProperty(HTTPConstants.CHUNKED,false);

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]