ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calling web client servlet from WMB

Post new topic  Reply to topic
 Calling web client servlet from WMB « View previous topic :: View next topic » 
Author Message
Bravo
PostPosted: Wed Jul 13, 2011 5:27 pm    Post subject: Calling web client servlet from WMB Reply with quote

Centurion

Joined: 03 Oct 2005
Posts: 146

Hi All,

I am new to servlet programming.

Calling servlet that is deployed in remote Apache Tomcat XP server. Standalone java works fine.
I am trying to call using message Broker from DEV machine, it gives me an error

MQInput---> JCN --->Trace

WMB7 on windows box

Here is the Java snippet:

Code:

private void geocode() throws MapMarkerException, MapMarkerFatalException {
      /* Set server url*/
      String url =
      "http://devserver:8090/mapmarker40/servlet/mapmarker";

      /* Input address example */
      String addr = "6 GLOBAL VIEW";
      String postcode = "12180";
      String city = "GOO";
      String state = "OZ";
       USA_UserInputAddress inpAddr = new USA_UserInputAddress();

      /* Set the input Address */
      inpAddr.setStreet(addr); /* 'street' */
      inpAddr.setCity(city); /* 'city' */
      inpAddr.setState(state); /* 'state' */
      inpAddr.setZipcode(postcode); /* ‘zipcode’ */

      USA_GeocodeConstraints geoCon = new USA_GeocodeConstraints();
      /* Geocode Constraints:
      * Review Java docs for a complete constraint list and
      * default values
      */

      geoCon.setMustMatchAddressNumber(true);
      geoCon.setMaxCandidates(1);
      geoCon.setReturnCloseCandidatesOnly(true);
      geoCon.setFallbackToPostal(false);
      //USA_UserCandidateAddress canAddr = null;

      /*USA_UserInputAddress inpAddr = new USA_UserInputAddress();

      /* Geocode Address */
      ClientGeocodeResponse geoRes =
MMJClient.geocode
(MapMarkerJavaAPI.GEOCODE_TYPE_ADDRESS,inpAddr,geoCon,url);
      /*Get candidate count*/
      int candCount = geoRes.candidateCount();



here is the trace:

Code:

  (0x01000000:Name):RecoverableException = (
    (0x03000000:NameValue):File                 = 'F:\build\S700_P\src\DataFlowEngine\PluginInterface\ImbJniNode.cpp' (CHARACTER)
    (0x03000000:NameValue):Line                 = 1178 (INTEGER)
    (0x03000000:NameValue):Function             = 'ImbJniNode::evaluate' (CHARACTER)
    (0x03000000:NameValue):Type                 = 'ComIbmJavaComputeNode' (CHARACTER)
    (0x03000000:NameValue):Name                 = 'FLOW_MAP_MAKER_MF#FCMComposite_1_2' (CHARACTER)
    (0x03000000:NameValue):Label                = 'FLOW_MAP_MAKER_MF.Java Compute' (CHARACTER)
    (0x03000000:NameValue):Catalog              = 'BIPmsgs' (CHARACTER)
    (0x03000000:NameValue):Severity             = 3 (INTEGER)
    (0x03000000:NameValue):Number               = 2230 (INTEGER)
    (0x03000000:NameValue):Text                 = 'Caught exception and rethrowing' (CHARACTER)
    (0x01000000:Name     ):RecoverableException = (
      (0x03000000:NameValue):File                 = 'F:\build\S700_P\src\DataFlowEngine\PluginInterface\com_ibm_broker_plugin_CMbService.cpp' (CHARACTER)
      (0x03000000:NameValue):Line                 = 1845 (INTEGER)
      (0x03000000:NameValue):Function             = 'ImbJavaExceptionUtils::throwableToNativeException' (CHARACTER)
      (0x03000000:NameValue):Type                 = '' (CHARACTER)
      (0x03000000:NameValue):Name                 = '' (CHARACTER)
      (0x03000000:NameValue):Label                = '' (CHARACTER)
      (0x03000000:NameValue):Catalog              = 'BIPmsgs' (CHARACTER)
      (0x03000000:NameValue):Severity             = 3 (INTEGER)
      (0x03000000:NameValue):Number               = 4367 (INTEGER)
      (0x03000000:NameValue):Text                 = 'Unhandled exception in plugin method.' (CHARACTER)
      (0x01000000:Name     ):Insert               = (
        (0x03000000:NameValue):Type = 5 (INTEGER)
        (0x03000000:NameValue):Text = 'evaluate' (CHARACTER)
      )
      (0x01000000:Name     ):Insert               = (
        (0x03000000:NameValue):Type = 5 (INTEGER)
        (0x03000000:NameValue):Text = 'Java Compute' (CHARACTER)
      )
      (0x01000000:Name     ):Insert               = (
        (0x03000000:NameValue):Type = 5 (INTEGER)
        (0x03000000:NameValue):Text = 'java.lang.NoClassDefFoundError: com.mapinfo.xmlprot.XMLUtils (initialization failure)' (CHARACTER)
      )
      (0x01000000:Name     ):RecoverableException = (
        (0x03000000:NameValue):File     = 'F:\build\S700_P\src\DataFlowEngine\PluginInterface\com_ibm_broker_plugin_CMbService.cpp' (CHARACTER)
        (0x03000000:NameValue):Line     = 1863 (INTEGER)
        (0x03000000:NameValue):Function = 'ImbJavaExceptionUtils::throwableToNativeException' (CHARACTER)
        (0x03000000:NameValue):Type     = '' (CHARACTER)
        (0x03000000:NameValue):Name     = '' (CHARACTER)
        (0x03000000:NameValue):Label    = '' (CHARACTER)
        (0x03000000:NameValue):Catalog  = 'BIPmsgs' (CHARACTER)
        (0x03000000:NameValue):Severity = 3 (INTEGER)
        (0x03000000:NameValue):Number   = 4395 (INTEGER)
        (0x03000000:NameValue):Text     = 'Unhandled exception in plugin method' (CHARACTER)
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 5 (INTEGER)
          (0x03000000:NameValue):Text = 'java.lang.NoClassDefFoundError' (CHARACTER)
        )
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 5 (INTEGER)
          (0x03000000:NameValue):Text = 'java.lang.J9VMInternals' (CHARACTER)
        )
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 5 (INTEGER)
          (0x03000000:NameValue):Text = 'initialize' (CHARACTER)
        )
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 5 (INTEGER)
          (0x03000000:NameValue):Text = 'J9VMInternals.java' (CHARACTER)
        )
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 2 (INTEGER)
          (0x03000000:NameValue):Text = '140' (CHARACTER)
        )
      )
    )
  )
)


I have sourced all clinet jar files in the below windows directories

\Classes
\jre16\lib\ext

Based on the trace message, I did make sure that jdom.jar file is in the above directories. There is an encoding-map.xml file which I placed in below directory,

\Classes
\jre16\lib
\jre16\lib\ext
\exmltconfig\etc

I have included encoding-map.xml in bar and deployed it as well.

Here is the env,

Code:

Environment variable C:\Program Files\IBM\MQSI\7.0\messages;C:\Program Files\IBM
\MQSI\7.0\classes;C:\Program Files\IBM\WebSphere MQ\Java\lib\connector.jar;C:\Pr
ogram Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.pcf.jar;C:\Program Files\IBM\We
bSphere MQ\Java\lib\com.ibm.mq.jmqi.jar;C:\Program Files\IBM\WebSphere MQ\Java\l
ib\com.ibm.mq.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.headers.
jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.commonservices.jar;C:\
Program Files\IBM\MQSI\7.0\classes\ConfigManagerProxy.jar;C:\Program Files\IBM\M
QSI\7.0\classes\brokerutil.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ib
m.mqjms.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jar;C:\Program
 Files\Java\j2re1.4.2_08\lib\ext\QTJava.zip;C:\servlet\Projects\Mapmarker\lib\clie
nt\encoding-map.xml;



Any help!!!
_________________
Bravo
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Thu Jul 14, 2011 5:34 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 365
Location: Columbus, OH

You need to look up where on Windows the broker looks for 3rd party jar files to be placed so that JCN's can use them.

Or include the 3rd party jars in your bar file(s).
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jul 14, 2011 5:56 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Why oh why why why aren't you using an HTTPRequest node?
Back to top
View user's profile Send private message
Bravo
PostPosted: Thu Jul 21, 2011 11:45 am    Post subject: Reply with quote

Centurion

Joined: 03 Oct 2005
Posts: 146

It worked using HTTPRequest Node. But I am curious to know why it did not work in JCN.

Let me do more analysis.
_________________
Bravo
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu Jul 21, 2011 12:23 pm    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

3rd party Jar files used by broker can be put in $MQSI_WORKPATH/shared-classes. On Windows, this would be

Code:

C:\Documents and Settings\All Users\Application Data\IBM\MQSI\shared-classes

_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calling web client servlet from WMB
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.