Problems when performing a glue client webservice call from Tomcat

Hi guys,

I have been trying to execute a Glue Client web service call from within a servlet in Tomcat, however it appears that the Glue.jar file is not being properly loaded. It seems that one of the .jar files within the Glue file are conflicting with Tomcat.

If anyone can think of anything that could be causing these troubles, or the absolute required jar files needed to make a Glue Client webservice call within Tomcat would help me out greatly.

Below is the stack trace I have been receiving, thanks!

connecting to url: [URL="http://localhost:8004/dental/services/dental.wsdl"]http://localhost:8004/dental/services/dental.wsdl[/URL]
[STARTUP] exception while starting up platform
java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredDocumentImpl.getXmlEncoding()Ljava/lang/String;
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at electric.xml.dom.DomParserWrapper.getXmlEncoding(DomParserWrapper.java:462)
    at electric.xml.dom.DomParserWrapper.getDocXmlEncoding(DomParserWrapper.java:400)
    at electric.xml.dom.DomParserWrapper.parse(DomParserWrapper.java:219)
    at electric.xml.dom.DomUtils.parse(DomUtils.java:2486)
    at electric.xml.dom.DomUtils.parse(DomUtils.java:2504)
    at electric.util.license.License.initLicense(License.java:77)
    at electric.util.license.License.getProductConfig(License.java:42)
    at electric.util.product.Product.startup(Product.java:168)
    at electric.util.product.Product.startup(Product.java:144)
    at electric.util.product.Product.startup(Product.java:135)
    at electric.util.product.Product.startup(Product.java:127)
    at electric.registry.Registry.initialize(Registry.java:56)
    at electric.registry.Registry.bind(Registry.java:169)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at ware.util.ws.client.GlueClient.bind(GlueClient.java:50)
    at ware.util.ws.client.GlueClient.bind(GlueClient.java:33)
    at com.emergis.caps.cm.dental.nrp.TransactionNRP.preProcessSave(TransactionNRP.java:195)
    at ware.tranzform.xml_db.transaction.xmlRootNode.preProcess(xmlRootNode.java:553)
    at ware.tranzform.xml_db.transaction.xmlRootNode.processTrxn(xmlRootNode.java:607)
    at ware.tranzform.xml_db.transaction.XmlBaseTrxn.processTrxn(XmlBaseTrxn.java:203)
    at ware.tranzform.xml_db.transaction.XmlTrxnParser.parse(XmlTrxnParser.java:326)
    at ware.tranzform.xml_db.transaction.XmlTrxnParser.parse(XmlTrxnParser.java:295)
    at ware.tranzform.servlet.TzTranzformXML.doWork(TzTranzformXML.java:70)
    at ware.tranzform.servlet.TzTranzformXML.doPost(TzTranzformXML.java:101)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Unknown Source)

java.lang.NullPointerException
    at com.emergis.caps.cm.dental.nrp.TransactionNRP.preProcessSave(TransactionNRP.java:197)
    at ware.tranzform.xml_db.transaction.xmlRootNode.preProcess(xmlRootNode.java:553)
    at ware.tranzform.xml_db.transaction.xmlRootNode.processTrxn(xmlRootNode.java:607)
    at ware.tranzform.xml_db.transaction.XmlBaseTrxn.processTrxn(XmlBaseTrxn.java:203)
    at ware.tranzform.xml_db.transaction.XmlTrxnParser.parse(XmlTrxnParser.java:326)
    at ware.tranzform.xml_db.transaction.XmlTrxnParser.parse(XmlTrxnParser.java:295)
    at ware.tranzform.servlet.TzTranzformXML.doWork(TzTranzformXML.java:70)
    at ware.tranzform.servlet.TzTranzformXML.doPost(TzTranzformXML.java:101)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Unknown Source)

What version of IS are you running? I seem to recall that a service pack was needed so that Tomcat with embedded Glue would work correctliy with either IS 6.1 or IS 6.5 (not sure which).

Mark

Hi Mark,

Thanks for the quick reply, I am not sure what you mean by what version of IS I am running. The IDE I am using is Eclipse 3.1, and I am running TomCat 5.5.15. The GlueJar I am using is Gluev6.5.

Brodie

Ahhh. My mistake. You can install Glue inside the Tomcat instance that is embedded into webMethods Integration Server 6.x. You need a service pack for that to work well.

What versions of Glue and Tomcat are you using? Do the simple examples that ship with Glue work in your Tomcat container?

Mark

I am using Glue 6.5 and Tomcat 5.5.15.

The Glue webservice that I am trying to call is located on another machine within the office with the same setup as myself. I wrote a test program that just has a Main() which calls the webservice and gets back a boolean if successful. That test problem works no problem when I execute it from a DOS window. Now when I move that exact same client code into a method in a different class, and try to call that method, it throws an exception.

Below is my client code

String url = “http://localhost:8004/dental/services/dental.wsdl”;
System.out.println(“starting test client”);
GlueClient glue = new GlueClient();
if (!glue.isAvailable())
throw new Exception(“WS client (glue) is not available, exiting now …”);
System.out.println("connecting to url: "+url);

        IDentalWS engine = (IDentalWS) glue.bind(url, IDentalWS.class);
       //args(Trxn_id, Action, User, msg_prefix, msg_id, msg_type)
        boolean success = engine.cmAction(22, "ClaimRefuse", "brodie", "prefix", "123", "type");
        JLog.Trace("Success="+success);

Is the URL correct in the WSDL to point to the other “machine within the office”? If the WSDL contained “localhost” as the host name or the wrong port it would not work and might return the stack trace you are seeing since your Glue instance is not hosting the web service operation.

Mark

Hi

Can you change the JRE & JDK version and start trying again.

Let’s try JDK1.4 rather than jdk1.5

It migth resolve the problem.

Ramanujam,

Why do you think this is an issue? Give some reasoning for your recommendation, please.

Mark