Serialization of DOM Tree+calling POST method in servlet

Hi all,
I am trying to serialize a DOM tree and send it from an applet to a servlet..I am having difficulty in calling the post method of the servlet..can anyone please tell me how the POST method in the servlet is called from the applet...I am using the code as seen on the forum for calling the POST method as below:
URL url = new URL("http://localhost:8080/3awebapp/updateservlet");
HttpURLConnection con = (HttpURLConnection)url.openConnection();
con.setUseCaches(false);
con.setRequestProperty("Content-Type","application/octet-stream");
System.out.println("Connected");
con.setDoOutput(true);
con.setRequestMethod("POST");
System.out.println("do output called");
con.setDoInput(true);
System.out.println("do Input called");
ObjectOutputStream objout = new ObjectOutputStream(con.getOutputStream());
yet the post method in the servlet does not seem to be called....
another problem I had was trying to serialize a DOM document and send it to the servlet. I am using the following code to write the DOM document on an output stream..would this work:
OutputFormat format = new OutputFormat(document);
XMLSerializer serializer = new XMLSerializer( objout, format );
System.out.println("XML Serializer Started");
DOMSerializer newSerializer=serializer.asDOMSerializer();
newSerializer.serialize( document );
objout.flush();
objout.close();
...since the doPost method of the servlet is not being called I do not whether the above code would be sent to the servlet..
Any advice on the above two matters would be highly appreciated..
Fenil

perhaps my piece of code may help You - relevant parts marked //<--,
but I have a problem when reading my object - which is a serialized DomTree :
Variant 1 : sending XML-data as string will arrive as should be, but parser says org.xml.sax.SAXParseException (missing root-element)
Variant 2 : readObject says java.io.OptionalDataException, but the DomTree will be parsed and displayed
-- snipp --
import java.io.InputStream;
import org.w3c.dom.Document;
import java.net.*;
import com.oreilly.servlet.HttpMessage; //<--
import java.util.*;
import java.io.ObjectInputStream;
myApplet :
try {
     URL url = new URL(getCodeBase(),"../../xml/FetchDocument");
     HttpMessage msg = new HttpMessage(url);
     Properties props = new Properties();
     props.put("InputFeldName","FeldWert");
     InputStream in = msg.sendGetMessage(props);
//<-- alt : sendPostMessage
     ObjectInputStream result = new ObjectInputStream(in);
     try {
     Object obj = result.readObject();
myServlet :
public void doGet(HttpServletRequest req,HttpServletResponse res)
     throws ServletException, IOException {
TreeCreator currentTree = new TreeCreator();
ObjectOutputStream out = new ObjectOutputStream(res.getOutputStream());
-- variant 1 :
out.writeObject(currentTree.skillOutputString());
out.flush();
out.close();
-- variant 2 :          
OutputFormat( TreeCreator.cdi ); //Serialize DOM
OutputFormat format = new OutputFormat( currentTree.getCDI() ); format.setEncoding("ISO-8859-1");
XMLSerializer serial = new XMLSerializer( out, format );
serial.asDOMSerializer(); // As a DOM Serializer
serial.serialize( currentTree.getCDI().getDocumentElement() );
serial.endDocument();
out.flush();
out.close();

Similar Messages

  • Calling a method of servlet

    How to call a method of servlets like we do in struts like "get.do?method=getData". I know servlets are called defacult method either dopost or doget are called but can i call any other in the servlet and if yes how can i do that?

    May be your servlet is not able to lookup the EJB. You can use some print statements and see whether lookup ok or not.
    Just a guess.
    Plese get back, if any queries.
    Thanks,
    Rakesh.

  • Who calls doget() method of servlet

    hello all,
    i have typical customized webserver.
    the problem i have with that is when i configure it with IP address and when i send a request through browser using HOST NAME ,its not recognizing.
    the same happens vice versa
    that is : set up host name in the http server, and when try a request through IP Address using a web browser.
    can any body clear me who calls the doGet() method of servlet. if it is USER AGENT of web browser, is there any operation executes between
    USER AGENT - DoGet() method of servlet?
    regards
    R
    Message was edited by:
    LoveOpensource

    The servlet is on the server, the browser is on the client, so, do it think it possible (unless the browser is written in Java and does it's browsing with RMI, which is patently absurd) that the browser call doGet()?
    It is rather obvious, that the browser sends an HTTP request to the Application Container (or a web server such as apache which then uses some module to communicate with the Application Container, but the end effect is the same), and that Application Container calls the doGet() method.
    Edit: And man am I slow and "wordy".

  • File Not found error when calling Form Post Method to a JSP from JSP Portlet

    I have built a set of JSP forms using post method to call other JSPs. Normally, the code looks like
    <form name="MyForm" action="MyJsp.jsp" method="post">
    I migrated the calling form containing this code to a portlet, but not the MyJsp.jsp. When I submit the form, I get a file not found in Jserv.log
    Exception:javax.servlet.ServletException: java.io.FileNotFoundException: D:\servlet\RegisterCompany.jsp (The system cannot find the file specified)
    [14/06/2001 13:59:59:679 PDT] JspServlet: unable to dispatch to requested page: Exception:javax.servlet.ServletException: java.io.FileNotFoundException: d:\oracle\isuites\apache\apache\MyJsp.jsp (The system cannot find the file specified)
    I notice that launching the calling jsp from a portlet, my opriginal context that uses ../Apache/Apache/htdocs is not being searched for the JSp. Why is this? Moreover, I try to set up an Alias in httpd.conf file to the this director and use it with the jsp in the action tag, but still get an error that my jsp servlets/Myjsp can't be found. Why is it insiting on looking at servlets context instead of htdocs.
    I have none of these issues outside of Portal30 using IAS.
    regard

    Initially, I couldn't do this unless I moved tghe jsp's up to the root directory of IAS, i.e ../Apache/Apache. Nomrally, htdocs is my doc directory for IAS. I could not do http:\\myUrl\htdocs\myJsp. If I tgried this, I got an error in Apache error logg that said can't find file ..\htdocs\htdocs\MyJsp.jsp.
    If I just tried the the URL http:\\myUrl\MyJsp.jsp with Jsp file in htdocs, I would get an error in the Jserve log that file d:\oracle\isuites\apache\apache\MyJsp.jsp could not be found. Once I moved the file MyJsp to Apache/Apache directory, it could be found using http:\\myUrl\MyJsp.jsp. Later, I delted these files and kept the ones in htdocs and they continued to work.
    I'm confused why launching pages through portal isn't consistant with Apache Standards. Where is the documentation that tells me how to configure context and aliases for pages launched from portal pages?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Sue Vickers ([email protected]):
    David,
    Passing information using Portal is different than just using Apache/Jserv. Does it work in portal if you use the absolute path?
    <form name="MyForm" action="http://host.domain/MyJSP.jsp" method="post">
    Portal will not be on the same relative path as your Apache, so you may need to adjust your action somehow.
    Thanks,
    Sue<HR></BLOCKQUOTE>
    null

  • Calling https web service POST method from ABAP

    Hi all,
    I'm having some problems trying to call a credit card https web service from ABAP on 2004s SP11. I'm not using a proxy server and a call from a test https page on my local machine works fine. The page does not require a certificate.
    Do I need to do anything in particular to make https work ? I've done calls to http services without any problems. The only difference from a programming perspective as far as I know is the scheme 2 instead of 1, and the server protocol changed to HTTPS.
    All is fine until  I call method http_client->receive, at that point I get a return code of 1, http_communication_failure. 
    Your suggestions & contributions will be greatly appreciated.
    Cheers,
    Wouter.
    report zcreditcardtest .
    data: wf_user type string .
    data: wf_password type string .
    data: rlength type i,
          txlen type string  .
    data: http_client type ref to if_http_client .
    data: wf_string type string .
    data: wf_string1 type string .
    data: wf_proxy type string ,
          wf_port type string .
    selection-screen: begin of block a with frame .
    parameters: crcard(16) type c lower case default '4242424242424242',
                cvn(4)     type c lower case default '564',
                year(2)    type c lower case default '07',
                month(2)   type c lower case default '11',
                amount(10) type c lower case default '100.00',
                cukey(4)   type c lower case default 'AUD',
                order(10)  type c lower case default 'AB1322-refund'.
    selection-screen skip 1.
    parameters: user(50) lower case,
                password(50) lower case ,
                p_proxy(100) lower case default '' ,
                p_port(4) default ''.
    selection-screen: end of block a .
    at selection-screen output.
      loop at screen.
        if screen-name = 'PASSWORD'.
          screen-invisible = '1'.
          modify screen.
        endif.
      endloop.
    start-of-selection .
      clear wf_string .
      concatenate
      'order.type=capture&customer.username=SOMEUSER'
      '&customer.password=SOMEPASSWORD'
      '&customer.merchant=SOMEMERCHANT'
      '&card.PAN=' crcard
      '&card.CVN=' cvn
      '&card.expiryYear=' year
      '&card.expiryMonth=' month
      '&order.amount=' amount
      '&customer.orderNumber=' order
      '&card.currency=' cukey
      '&order.ECI=IVR'
      '&customer.captureOrderNumber=' order
      '&order.priority=1'
      '&message.end=null'
      into wf_string .
      break-point.
      clear :rlength , txlen .
      rlength = strlen( wf_string ) .
      move: rlength to txlen .
      clear: wf_proxy, wf_port .
      move: p_proxy to wf_proxy ,
            p_port to wf_port .
      call method cl_http_client=>create
        exporting
          host          = 'api.somewhere.com'
          service       = '80'
          scheme        = '2'                        "https
          proxy_host    = wf_proxy
          proxy_service = wf_port
        importing
          client        = http_client.
      http_client->propertytype_logon_popup = http_client->co_disabled.
      wf_user = user .
      wf_password = password .
    * proxy server authentication
      call method http_client->authenticate
        exporting
          proxy_authentication = 'X'
          username             = wf_user
          password             = wf_password.
      call method http_client->request->set_header_field
        exporting
          name  = '~request_method'
          value = 'POST'.
      call method http_client->request->set_header_field
        exporting
          name  = '~server_protocol'
          value = 'HTTPS/1.0'.
      call method http_client->request->set_header_field
        exporting
          name  = '~request_uri'
          value = '/post/CreditCardAPIReceiver'.
      call method http_client->request->set_header_field
        exporting
          name  = 'Content-Type'
          value = 'application/x-www-form-urlencoded; charset=UTF-8'.
      call method http_client->request->set_header_field
        exporting
          name  = 'Content-Length'
          value = txlen.
      call method http_client->request->set_header_field
        exporting
          name  = 'HOST'
          value = 'api.somewhere.com:80'.
      call method http_client->request->set_cdata
        exporting
          data   = wf_string
          offset = 0
          length = rlength.
      call method http_client->send
        exceptions
          http_communication_failure = 1
          http_invalid_state         = 2.
      call method http_client->receive
        exceptions
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3.
      if sy-subrc <> 0.
        message e000(oo) with 'Processing failed !'.
      endif.
      clear wf_string1 .
      wf_string1 = http_client->response->get_cdata( ).
    * Further Processing of returned values would go here.

    Well, finally got this running !
    First of all I needed to download SAP Cryptographic Software and install it on the Web Application Server. Added some parameters to the profile, then set up some nodes in strust. Note 510007 describes the full process.
    I then installed the certifcate I needed by opening the website in internet explorer and exporting it to a CER file and then importing it into the SSL client (Anonymous). The blog from Thomas Yung, "BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP" describes the process of exporting and importing certificates.
    I then had to start the HTTPS service on my NW 2004s ABAP preview edition SP11. I set this up for port 443.
    /osmicm --> GOTO --> SERVICES --> SERVICE --> CREATE
    Then finally, the program needed a few changes :
      call method cl_http_client=>create
        exporting
          host          = 'api.somewhere.com'
          service       = '443'                       " <<-----  443 NOT 80
          scheme        = '2'                        "https
          ssl_id        = 'ANONYM'              " <<----- SSL_ID Added
          proxy_host    = wf_proxy
          proxy_service = wf_port
        importing
          client        = http_client.
    and further in the program (thanks Andrew !) :
      call method http_client->request->set_header_field
        exporting
    *   name  = '~server_protocol'             " <<<--- DELETE
          name  = '~request_protocol'         " <<<-- INSERT must be request
          value = 'HTTPS/1.0'.
    and presto, we can now consume a https webservice via a POST method from within an ABAP program ! Nice.... Can I give myself 10 points ?

  • How to call HTTP Post Method URL in SOA 10g

    Hi,
    I have a requirement where i need to call a HTTP Post Method, I have a URL, if i hit it in the browser, i am getting the response details. I know there is a HTTP Binding Adapter in 11g, but we are on 10g. Can anyone please let me know whether we can do it in 10g and how ?
    Thanks Always
    N

    You will need to write the WSDL by yourself. Just make sure you have the end point detail, operation name(if required) and the schema available to write the WSDL.

  • How to call HTTP POST method in SOA 10g

    Hi,
    I have a requirement where i need to call a HTTP Post Method, I have a URL, if i hit it in the browser, i am getting the response details. I know there is a HTTP Binding Adapter in 11g, but we are on 10g. Can anyone please let me know whether we can do it in 10g and how. ?
    Thanks Always
    N

    Look at 10g samples under tutorials/702.bindings.

  • Error calling a method of the tree control in BDC

    I'm connecting two systems Iplan(project management tool) with SAP PS using SAP XI.
    I've written an BDC(RFC) to assign people for the activity in an project(cj20n) it works fine in the foreground. But it doesn't work in the background.It doesn't give me error also.I've sap all authorization.
    When I connect with XI its throwing me an error "Error calling a method of the tree control" message type A (using the same user to connect r3). I believe something we should do prior handling the tree control in a BDC. IF any body come across this situation please let me know. your help is appreciated.
    Regards
    Anand

    BDCs over enjoy transactions do not get along together.  The containers and controls is more of a gui thing, and in background sometimes the BDC has a hard time with them.  I would suggest using the non-enjoy tcode instead, CJ20.
    Regards,
    Rich Heilman

  • Job is failing with the following error- Error calling a method of the tree

    dear SDNers,
    my question is where do i need to look for error.
    Will this be an ABAP issue?
    Please guide
    DETAILS
    In SM37 when we see the job XYZ, we get the following details.
       Job                              Ln    Job CreatedB    Status          Start date     Start time      Duration(sec.)     Delay (sec.)
      XYZ                                                                    Canceled        16.11.2009    10:11:30                  9                         27
    When the job log is checked this , we get the below details.
    The job XYZ is failing with the following error.
    Date      Time     Class  No.   Message
    +----
    +----
    2009/11/16 05:03:01 | 00     516 | Job started
    2009/11/16 05:03:01 | 00     550 | Step 001 started (program RBDMON00, variant
    SBCI287, user ID ABCDEF)
    2009/11/16 05:03:03 | TREE_C 000 | Error calling a method of the tree control
    2009/11/16 05:03:03 | 00     518 | Job cancelled
    Equest your assistance in knowing where to find the error for this.
    I have no clue as to where and how i need to debug or where i should i be looking for error.
    In BD87, the selection screen paramters that are given are changed on date (from and to) and IDOC status 51,66,69 and 64 and the message type is "Öutbound interface of picked shipments"
    Please guide.
    Regards,
    SuryaD.
    Edited by: SuryaD on Nov 23, 2009 5:36 PM
    Edited by: SuryaD on Nov 23, 2009 11:14 PM

    > 1. There is a job name ABCDEF
    > 2. When this job is run then the status shows cancelled and the job error log shows tHe details that "error calling a method of the tree control"
    > 3.ThIs error also points fingers to /link to BD87 as seen in the job log " (program RBDMON00, variant \SBCI287, user ID KRISF)"
    >
    BD87 is an IDOC processing.
    > My question to you Sampath.
    >
    > in order to answer your question on whether it is ALv or SALV.. please tell me as to how will i know which progrm is associated with the job ABCDEF?
    >
    Go to sm37 - double click on the job that was failed - Click on Step (on application tool bar) to get the program name - double click on the program name - new popup will be opened - then copy the program and variant
    Go to se38 - enter the program - execute (F8) - choose the variant that is there in the background job - run in forground first
    if the run is good - then check the program - SE38 - Display the program then see
    I just saw the above message BD87... .if that is true, you dont have to do all these
    I dont think it is possible to schedule a job with BD87. Is this the first time or is any job completed without errors for this?

  • Can i call a HTTP Post method in ABAP or XI?

    Hi All,
    Can you please let me know how to call a HTTP Post method in ABAP or XI?
    my HTTP Post is looks like (HTML form)
    <form action="http://111.111.111.1:8080/sample_url" method="POST">
    <table>
    <tr><th>applicationId</th><td><input type="text" name="applicationId" value="test"></td></tr>
    <tr><th>authCode</th><td><input type="text" name="authCode" value="test"></td></tr>
    <tr><th>message</th><td><input type="text" name="message" value="Hello"></td></tr>
    <!--<tr><th>version</th><td><input type="text" name="version" value="3.1"></td></tr> -->
    <tr><th>contractId</th><td><input type="text" name="contractId" value="test"></td></tr>
    <tr><th>receiverMobileNumber</th><td><input type="text" name="receiver" value="11111111111"></td></tr>
    <tr><td colspan="2"><input type="submit" name="send" value="send"></td></tr>
    </table>
    </form>
    I have a requirement to send a message to the above mention URL using the POST method.
    Please let me know the possibility of sending it from ABAP or XI adaptor.
    Thanks & Regards,
    Chaminda

    Hi Prateek,
    shoul we send the below code as the payload?
    <tr><th>applicationId</th><td><input type="text" name="applicationId" value="test"></td></tr>
    <tr><th>authCode</th><td><input type="text" name="authCode" value="test"></td></tr>
    <tr><th>message</th><td><input type="text" name="message" value="Hello"></td></tr>
    <!--<tr><th>version</th><td><input type="text" name="version" value="3.1"></td></tr> -->
    <tr><th>contractId</th><td><input type="text" name="contractId" value="test"></td></tr>
    <tr><th>receiverMobileNumber</th><td><input type="text" name="receiver" value="11111111111"></td></tr>
    Thanks.
    Chaminda

  • Adf mobile : calling rest post method

    Hi all,
    I am calling a rest post using rest adaptor but i am getting the following error:
    Unable to find operation : unknown
    Please tell me where should i specify the operation name while calling rest post method.
    Regards,
    Deepak

    I would suggest you use the HTTP Analyzer to see what is sent to your service specifically and identify the missing part.
    One common pattern that we see with complex web services, is to create a server side proxy that calls the complex service and exposes a simpler interface that is consumed by the mobile application.
    This will also reduce the network traffic to your mobile application (and will likely reduce the application's size)

  • Call Bpel process through HTTP get or post method

    I need to call BPEL process from Mobile.
    In mobile we are using HTTP get or post methods. so can anybody tell me how to invoke BPEL(how to pass input to BPEL) by using HTTP get or post method.
    Vivek garg
    Edited by: 809104 on Dec 24, 2010 2:36 AM

    I got the soluntion
    we just need to change the binding in WSDL file from Soap to HTTP.
    First of all add three namespaces in wsdl file
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    Then change the Request msg from element type to string type like below
    <message name="UserLoggOffRequestMessage">
    <part name="UserId" type="xsd:string"/> (add this one))
    <!--<part name="payload" element="client:UserLoggOffProcessRequest"/>-->(remove this one)
    </message>
    Then change the binding
    <binding name="UserLoggOffBinding" type="client:UserLoggOff">
    <http:binding verb="GET"/>
    <operation name="process">
    <http:operation location="/process"/>
    <http:urlEncoded/>
    <output>
    <mime:mimeString part="Body"/>
    </output>
    </operation>
    </binding>
    Then do some changes in service tag . we need to do the changes in location only.
    we need to remove orabpel from location and add httpbinding
    http://infva04718.vshodc.lntinfotech.com:8888/*orabpel*/MobileApplication/UserLoggOff/1.0
    http://infva04718.vshodc.lntinfotech.com:8888/*httpbinding*/MobileApplication/UserLoggOff/1.0
    do like following
    <service name="UserLoggOff">
    <port name="UserLoggOffPort" binding="client:UserLoggOffBinding">
    <http:address location="http://infva04718.vshodc.lntinfotech.com:8888/httpbinding/MobileApplication/UserLoggOff/1.0"/>
    </port>
    </service>
    Then deploy the process then u can invoke this
    http://infva04718.vshodc.lntinfotech.com:8888/httpbinding/MobileApplication/UserLoggOff/process?UserId=a1
    here process is name of process u want to invoke

  • How to call setdata method in POST method of BADI ME_PROCESS_PO_CUST ?

    Hi all,
    I am working on the enhancement to PO using BADI . My requirement is to update the net price of the item while saving the PO based on some conditions. i am calling setdata method to update the item netprice. But i am unable to update it? Can you please help me on how to change the item price while saving the PO?
    Thanks,
    Aravind.

    Hi all,
    Please help me. If my question was not clear, i will explain.
    Thanks,
    Aravind

  • XML : Transform DOM Tree to XML String in an applet since the JRE 1.4.2_05

    Hello,
    I build a DOM tree in my applet.
    Then I transform it to XML String.
    But since the JRE 1.4.2_05 it doesn't work.
    These lines failed because these variables became final:
    org.apache.xalan.serialize.CharInfo.XML_ENTITIES_RESOURCE = getClass().getResource("XMLEntities.res").toString();
    org.apache.xalan.processor.TransformerFactoryImpl.XSLT_PROPERTIES = getClass().getResource("XSLTInfo.properties").toString();The rest of the code :
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = domFactory.newDocumentBuilder();
    Document domXML = builder.newDocument();
    // I build my DOM Tree
    StringWriter xmlResult = new StringWriter();
    Source source = new DOMSource(domXML);
    Result result = new StreamResult(xmlResult);
    Transformer xformer = TransformerFactory.newInstance().newTransformer();
    xformer.setOutputProperty(javax.xml.transform.OutputKeys.INDENT,"yes");
    xformer.transform(source,result);Is there any other way to get an XML String from a DOM tree in an applet ?
    I'm so disappointed to note this big problem.

    Does anyone have an idea why I get this error message when try to use transform in an applet?
    Thanks...
    java.lang.ExceptionInInitializerError
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at org.apache.xalan.serialize.SerializerFactory.getSerializer(Unknown Source)
         at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(Unknown Source)
         at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Unknown Source)
         at matrix.CreateMtrx.SaveDoc(CreateMtrx.java:434)
         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 thinlet.Thinlet.invokeImpl(Unknown Source)
         at thinlet.Thinlet.invoke(Unknown Source)
         at thinlet.Thinlet.handleMouseEvent(Unknown Source)
         at thinlet.Thinlet.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.RuntimeException: The resource [ XMLEntities.res ] could not load: java.net.MalformedURLException: no protocol: XMLEntities.res
    XMLEntities.res      java.net.MalformedURLException: no protocol: XMLEntities.res
         at org.apache.xalan.serialize.CharInfo.<init>(Unknown Source)
         at org.apache.xalan.serialize.SerializerToXML.<clinit>(Unknown Source)
         ... 28 more

  • JCA - Failed calling get method getThreadSecurity on the ManagedConnectionF

    Hi All,
    This is my first post with the SDN, hope I could see and extend helping hands in form of technology and solutions
    My problem
    =============
    I am new to JCA.I am trying to deploy the helloworldra.ear provided by the IBM site.I deployed the resoource adapter and created a connectionFactory named "HelloWorld"(jndi).I get the below mentioned exception when I do
    ConnectionFactory cxFactory = (ConnectionFactory) context.lookup("java:comp/env/HelloWorld");
    Kindly chek into the exception and provide me with the solution.
    Thanks in Advance
    KABA
    Exceptions Snapshot
    ==================
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O Populating Context
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O #################### JNDI Context Contents ####################
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.hostname.normalizer ---:-- com.ibm.ws.naming.util.DefaultHostnameNormalizer
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O java.naming.factory.initial ---:-- com.ibm.websphere.naming.WsnInitialContextFactory
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.name.syntax ---:-- jndi
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.namespace.connection ---:-- lazy
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.ws.naming.ldap.ldapinitctxfactory ---:-- com.sun.jndi.ldap.LdapCtxFactory
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.jndicache.cacheobject ---:-- populated
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.namespaceroot ---:-- defaultroot
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.ws.naming.wsn.factory.initial ---:-- com.ibm.ws.naming.util.WsnInitCtxFactory
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.jndicache.maxcachelife ---:-- 0
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.jndicache.maxentrylife ---:-- 0
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.jndicache.cachename ---:-- providerURL
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O java.naming.provider.url ---:-- corbaloc:rir:/NameServiceServerRoot
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O java.naming.factory.url.pkgs ---:-- com.ibm.ws.runtime:com.ibm.ws.naming
    [7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O #################### JNDI Context Contents END ####################
    [7/7/06 14:38:28:718 EDT] 5a004128 ConnectionFac E J2CA0066E: Failed calling get method getThreadSecurity on the ManagedConnectionFactory class com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl used by resource jca/HelloWorld with the value <null>. Exception is java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
         at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getThreadSecurity(WSManagedConnectionFactoryImpl.java:612)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getThreadSecurity(ConnectionFactoryBuilderImpl.java:2520)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createMCFandPM(ConnectionFactoryBuilderImpl.java:1747)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1188)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1762)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1615)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
         at javax.naming.InitialContext.lookup(InitialContext.java:359)
         at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:293)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstance(IndirectJndiLookupObjectFactory.java:144)
         at com.ibm.ws.util.ResRefJndiLookupObjectFactory.getObjectInstance(ResRefJndiLookupObjectFactory.java:127)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:135)
         at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1227)
         at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1203)
         at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1257)
         at javax.naming.InitialContext.lookup(InitialContext.java:359)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldBean.execute(HelloWorldBean.java:81)
         at org.apache.jsp._HelloWorldResults._jspService(_HelloWorldResults.java:105)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:357)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:675)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:773)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldController.dispatch(HelloWorldController.java:101)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldController.performTask(HelloWorldController.java:66)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldController.doPost(HelloWorldController.java:88)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
    [7/7/06 14:38:28:812 EDT] 5a004128 ConnectionFac E J2CA0009E: An exception occurred while trying to instantiate the ManagedConnectionFactory class com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl used by resource jca/HelloWorld : java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
         at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getThreadSecurity(WSManagedConnectionFactoryImpl.java:612)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getThreadSecurity(ConnectionFactoryBuilderImpl.java:2520)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createMCFandPM(ConnectionFactoryBuilderImpl.java:1747)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1188)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1762)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1615)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
         at javax.naming.InitialContext.lookup(InitialContext.java:359)
         at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:293)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstance(IndirectJndiLookupObjectFactory.java:144)
         at com.ibm.ws.util.ResRefJndiLookupObjectFactory.getObjectInstance(ResRefJndiLookupObjectFactory.java:127)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:135)
         at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1227)
         at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1203)
         at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1257)
         at javax.naming.InitialContext.lookup(InitialContext.java:359)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldBean.execute(HelloWorldBean.java:81)
         at org.apache.jsp._HelloWorldResults._jspService(_HelloWorldResults.java:105)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:357)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:675)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:773)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldController.dispatch(HelloWorldController.java:101)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldController.performTask(HelloWorldController.java:66)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldController.doPost(HelloWorldController.java:88)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
    [7/7/06 14:38:28:859 EDT] 5a004128 Helpers W NMSV0605W: A Reference object looked up from the context "localhost/nodes/localhost/servers/server1" with the name "jca/HelloWorld" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
    Reference Factory Class Name: com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl
    Reference Factory Class Location URLs: <null>
    Reference Class Name: HelloWorld
    Type: connectorName
    Content: HelloWorld
    Type: classpath
    Content: C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1\runtimes\base_v5/lib/rsadapter.rar
    Type: FactoryJndiName
    Content: jca/HelloWorld
    Address Type: dd
    AddressContents: ffffffac ffffffed 0 5 73 72 0 25 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 52 65 73 6f 75 72 63 65 ...
    Address Type: poolProps
    AddressContents: ffffffac ffffffed 0 5 73 72 0 27 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 43 6f 6e 6e 65 63 74 6f ...
    Address Type: configProps
    AddressContents: ffffffac ffffffed 0 5 73 72 0 23 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 43 6f 6e 6e 65 63 74 6f ...
    Address Type: mmProps
    AddressContents: ffffffac ffffffed 0 5 73 72 0 14 6a 61 76 61 2e 75 74 69 6c 2e 50 72 6f 70 65 72 74 69 65 73 39 12 ffffffd0 7a ...
    Address Type: mbeanProps
    AddressContents: ffffffac ffffffed 0 5 73 72 0 1a 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 4d 42 65 61 6e 50 72 6f ...
    Exception data follows:
    java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
         at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getThreadSecurity(WSManagedConnectionFactoryImpl.java:612)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getThreadSecurity(ConnectionFactoryBuilderImpl.java:2520)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createMCFandPM(ConnectionFactoryBuilderImpl.java:1747)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1188)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1762)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1615)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
         at javax.naming.InitialContext.lookup(InitialContext.java:359)
         at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:293)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstance(IndirectJndiLookupObjectFactory.java:144)
         at com.ibm.ws.util.ResRefJndiLookupObjectFactory.getObjectInstance(ResRefJndiLookupObjectFactory.java:127)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:135)
         at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1227)
         at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1203)
         at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1257)
         at javax.naming.InitialContext.lookup(InitialContext.java:359)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldBean.execute(HelloWorldBean.java:81)
         at org.apache.jsp._HelloWorldResults._jspService(_HelloWorldResults.java:105)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:357)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:675)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:773)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldController.dispatch(HelloWorldController.java:101)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldController.performTask(HelloWorldController.java:66)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldController.doPost(HelloWorldController.java:88)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
    [7/7/06 14:38:28:953 EDT] 5a004128 Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
    Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
    Context method: lookup
    Context name: localhost/nodes/localhost/servers/server1
    Target name: jca/HelloWorld
    Other data:
    Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Root exception is java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
         at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getThreadSecurity(WSManagedConnectionFactoryImpl.java:612)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getThreadSecurity(ConnectionFactoryBuilderImpl.java:2520)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createMCFandPM(ConnectionFactoryBuilderImpl.java:1747)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1188)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1762)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1615)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
         at javax.naming.InitialContext.lookup(InitialContext.java:359)
         at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:293)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstance(IndirectJndiLookupObjectFactory.java:144)
         at com.ibm.ws.util.ResRefJndiLookupObjectFactory.getObjectInstance(ResRefJndiLookupObjectFactory.java:127)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:135)
         at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1227)
         at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1203)
         at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1257)
         at javax.naming.InitialContext.lookup(InitialContext.java:359)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldBean.execute(HelloWorldBean.java:81)
         at org.apache.jsp._HelloWorldResults._jspService(_HelloWorldResults.java:105)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:357)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:675)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:773)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldController.dispatch(HelloWorldController.java:101)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldController.performTask(HelloWorldController.java:66)
         at com.ibm.ssya.helloworldra.servlets.HelloWorldController.doPost(HelloWorldController.java:88)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
    [7/7/06 14:38:29:031 EDT] 5a004128 ConnectionFac E J2CA0066E: Failed calling get method getThreadSecurity on the ManagedConnectionFactory class com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl used by resource jca/HelloWorld with the value <null>. Exception is java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
         at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getThreadSecurity(WSManagedConnectionFactoryImpl.java:612)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getThreadSecurity(ConnectionFactoryBuilderImpl.java:2520)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createMCFandPM(ConnectionF

    PersianKamran wrote:
    folks.. i am sending my class object on Sockets from client to Server (i am implementing Seriablizable Interface).
    No your aren't.
    You are sending the data in the class.
    That is what serialization does. (And actually not all data can be sent either.)
    When i get the object on server, i am able to print all its fields and methods... But i have one problem. I want to invoke a simple static method that just prints "hello".. The method on client that i am trying to invoke is....You probably either need stop attempting that or re-architect the solution.
    It is possible to send a class (not data) to another computer and that computer runs it. That is how applets work.
    But for that to work you must send the class. And deal with how the VM loads and unloads classes (not data) as well.

Maybe you are looking for

  • Upgrade kernel26-firmware to linux-firmware report with some problem

    Just now I upgrade my system from kernel26-firmware to linux-firmware, in X (Awesome WM). After press Y and pacman start downloading, I'm afk for a while (take a bath), when I'm come back My system freeze and proses show that system still make mkinit

  • HELP!  Question on Apple ID and privacy

    Hello.  I have an apple ID but currentlyl, all my text messages are viewable on my ipad (which is a family one and uses my apple ID).  I want to use iMessage but not have them viewable on other devices.  I created a separate Apple ID but will that de

  • Item Groups G/L settings

    Our postings to G/L COGS are done by ITEM GROUPS therefore the ITEM GROUP Setup/Accounts screen governs most of the postings to the G/L. a.What I wonder if anyone knows of a chart that shows which function in SAP effects whch Nomial Setting in this s

  • Problem attaching Declarative component library.

    I created a declarative component, deployed the jar file and created the FileSystem connection. When I try to add it to my project I don't receive any message but I don't see any result and the component is not visible in the palette. Why ? I've a ja

  • Setting Default printing as Black only

    I know how to enable printing in black only using printer properties and colour ->greyscale-> in black ink only.But that setting lasts only for that session/ file being printed. If I load another file or another session the default goes back to colou