NullPointerException in WebServiceProxy.getServiceAt

Hi,
I've created a .jsp file with the following code to access a
WSDL file:
WebServiceProxy ServiceProxy = WebServiceProxy.getServiceAt(new URL("http://myurl"));
When running it under BEA WebLogic 6.1 SP1, I get this exception:
java.lang.NullPointerException at weblogic.soap.wsdl.binding.Operation.getOutputName
(Operation.java:39) at
weblogic.soap.wsdl.binding.BindingOperation.populate(BindingOperation.java:50)
at weblogic.soap.wsdl.binding.Binding.populate(Binding.java:48)
at weblogic.soap.wsdl.binding.Definition.populate(Definition.java:116)
at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:176)
at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at jsp_servlet._soap.__createservice._jspService(__createservice.java:97)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
I tried a sample code found on the BEA web site, and I still got the same issue.
Can anyone help me?
Thanks,
Miguel

Miguel,
I don't know what "http://myurl" points to, but I'm assuming whatever it is, it
is running WebLogic Server 6.1. If this is true, your code should looks something
like:
<%
CodecFactory factory = CodecFactory.newInstance();
factory.register(new SoapEncodingCodec());
factory.register(new LiteralCodec());
WebServiceProxy webserviceproxy = WebServiceProxy.getServiceAt(wsdlURL, factory,
true);
// use webserviceproxy to "do yo' thang!"
%>
Notice that I didn't do the "JNDI lookup hat dance" here. Also, I used the getServiceAt(URL,
CodecFactory, boolean) call, not getServiceAt(URL), which blows up because it
calls getServiceAt(URL, CodecFactory, boolean) method with (URL,null,false).
If this is what you have, and it doesn't work, you probably have to do the "JNDI
lookup hat dance", from inside your JSP :-)
The code should look like:
<%
CodecFactory factory = CodecFactory.newInstance();
factory.register(new SoapEncodingCodec());
factory.register(new LiteralCodec());
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.soap.http.SoapInitialContextFactory");
h.put(Context.URL_PKG_PREFIXES, "");
h.put("weblogic.soap.encoding.factory", factory);
h.put("weblogic.soap.verbose", true);
Context context = new InitialContext(h);
WebServiceProxy webserviceproxy = (WebServiceProxy)context.lookup(wsdlURLString);
// use webserviceproxy to "do yo' thang!"
%>
HTH,
Mike Wooten
"Miguel Juston" <[email protected]> wrote:
>
Hi,
I've created a .jsp file with the following code to access a
WSDL file:
WebServiceProxy ServiceProxy = WebServiceProxy.getServiceAt(new URL("http://myurl"));
When running it under BEA WebLogic 6.1 SP1, I get this exception:
java.lang.NullPointerException at weblogic.soap.wsdl.binding.Operation.getOutputName
(Operation.java:39) at
weblogic.soap.wsdl.binding.BindingOperation.populate(BindingOperation.java:50)
at weblogic.soap.wsdl.binding.Binding.populate(Binding.java:48)
at weblogic.soap.wsdl.binding.Definition.populate(Definition.java:116)
at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:176)
at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at jsp_servlet._soap.__createservice._jspService(__createservice.java:97)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
I tried a sample code found on the BEA web site, and I still got the
same issue.
Can anyone help me?
Thanks,
Miguel

Similar Messages

  • SOAP thr HTTP

    hi ...
    did anyone use the example given by michael wooten and get the following exception?
    Exception in thread "main" javax.naming.NamingException: i/o failed java.io.IOEx
    ception: unsupported keyword EMAIL. Root exception is java.io.IOException: unsu
    pported keyword EMAIL
    at com.sun.net.ssl.internal.ssl.AVA.<init>([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.ssl.RDN.<init>([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.ssl.X500Name.a([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.ssl.X500Name.<init>([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V
    1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V
    1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V
    1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connec
    t([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getInp
    utStream([DashoPro-V1.2-120198])
    at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:553)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:174)
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at DClient.main(DClient.java:111)
    does anyone noe how to solve this problem?
    thx

    Hmmm, that's wierd because I got exactly the same stacktrace you posted the other
    day when I didn't have the "127.0.0.1 weblogic.bea.com" entry in the Hosts file
    ;-) Can you try it without being connected to a network using NIS or DNS? The
    easiest way to do this is to temporarily disconnect your network cable from your
    NIC.
    Oh, oh, wait!!! Did you put it above the "127.0.0.1 localhost"
    line, or below it? I have it below it.
    Regards,
    Mike Wooten
    "Willy" <[email protected]> wrote:
    >
    hi ...
    i try adding the following to the hosts file ...
    127.0.0.1 weblogic.bea.com
    but still encountered the same error
    did u manage to send SOAP thr HTTPS
    when u made the amendment ?
    tkx
    "Willy" <[email protected]> wrote:
    tkx ... will go try ...
    Willy
    "Michael Wooten" <[email protected]> wrote:
    Hi Willy,
    I wasn't able to get the NulledHostnameVerifier to work either.
    I recommend, for test purposes with the demo cert, that you just add
    the entry
    into the Host file.
    Regards,
    Mike Wooten
    "Willy" <[email protected]> wrote:
    hi ...
    i still encountered the same error ...
    there's what i did ...
    1. i copied the NulledHostnameVerifier.class to my working dir
    2. run the example "java -Dweblogic.security.SSL.hostnameVerifier=NulledHostnameVerifier
    DClient
    did i miss out something ?
    tkx
    "Michael Wooten" <[email protected]> wrote:
    Hi Willy,
    The information I was eluding to is in the sslclient example that
    ships
    with WLS
    6.1.
    See %WL_HOME%\samples\examples\security\sslclient example.
    Regards,
    Mike Wooten
    "Michael Wooten" <[email protected]> wrote:
    Hi Willy,
    You are encountering this exception because you need to add the
    following
    entry
    to the %WINNT%\system32\drivers\etc\hosts file on your client box:
    127.0.0.1     weblogic.bea.com
    This is because the demo cert that ships with WLS 6.1 has this host(weblogic.bea.com)
    in it. I vaguely remember reading something about how to avoid having
    to add this
    entry, but I forgot where it was ;-) If I find it, I'll send the
    information
    to
    you.
    Regards,
    Mike Wooten
    "Willy" <[email protected]> wrote:
    hi ...
    did anyone use the example given by michael wooten and get the
    following
    exception?
    Exception in thread "main" javax.naming.NamingException: i/o failedjava.io.IOEx
    ception: unsupported keyword EMAIL. Root exception is java.io.IOException:
    unsu
    pported keyword EMAIL
    at com.sun.net.ssl.internal.ssl.AVA.<init>([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.ssl.RDN.<init>([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.ssl.X500Name.a([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.ssl.X500Name.<init>([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V
    1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V
    1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V
    1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connec
    t([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getInp
    utStream([DashoPro-V1.2-120198])
    at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:553)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:174)
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at DClient.main(DClient.java:111)
    does anyone noe how to solve this problem?
    thx

  • MS-SOAP Server WLS-Client

    Hi!
    I have an MS-SOAP 2.0 Webservice and i want to call ist from a wls-client. I simply
    tried to change the target url (context.lookup("http://<host>/xyz.wsdl") and i
    got this
    Exception in thread "main" javax.naming.NamingException: i/o failed java.io.FileNotFoundException:
    http://<host>/xyz.wsdl.
    Root exception is java.io.FileNotFoundException: http://<host>/xyz.wsdl
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:545)
    at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:521)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:171)
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:64)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at DClient.main(DClient.java:26)
    I can call the WebService via Visual Basic and the WSDL-File is available via
    Browser as well.
    Thanks for Help
    Rene
    p.s. i used the DClient.java example (also tried XMethodClient, with the result,
    that the method was not found!)

    Hi,
    The problem seems that WLS6.1 client sent the Soap message which identified the
    input parameters/values as xsd types, where MS Soap 2.0 Gold clients simply passed
    on the parameters/values. I am not clear on what the Soap 1.1 standard says.
    Maybe BEA or MS engineers or more knowledgable people can give us a better explanation.
    If you need to find more debugging information from MS Soap 2.0 Gold server (IIS
    + Soap 2.0 Gold), you can use the MS Soap 2.0 debugging tool and capture the Soap
    messages passed and the server trace. The posting item number 99 had such traces.
    -Lu Huang
    "Rene Wilms" <[email protected]> wrote:
    >
    i!
    The XMethod-Client works! But only with an Method that returns a String
    and with
    no parameters like getHello(). When you try the XMethodClient on MS-SOAP-Services
    at www.xmethods.com it works, so i don't know what the problem with the
    parameters
    are....
    renne
    "Lu" <[email protected]> wrote:
    We also tried to call a Microsoft Webservice hosted with IIS + Soap2.0
    Gold,
    using a WLS 6.1b client (modified from DClient.java). We got similar
    resoults
    as Rene's. See the posts in this news group: item 99 and 113. Much
    details in
    the forementioned items. This seemed to be an interoperability problems
    between
    MS and BEA. I hope some BEA engineers take a look at the postings now
    from two
    different groups. Any help or clarification would be appreciated.
    -Lu
    "Rene Wils" <[email protected]> wrote:
    Hi!
    When i use a WLS-Service you are right, but i try to use a MS-SOAP
    WebService.
    The URL in the VisualBasic-Programm ist http://<host>/xyz.wsdl, so
    i
    tried the
    same. The target service is a simple DLL, so there is no packaging.
    I'am not sure, if i have to use the lookup-method of the context orthe
    createWebService
    method. Both fails with the FileNotFoundException. But the url in aWebBrowser
    shows the right wsdl-file.
    Did anybody call a MS-SOAP-Service from a Java-Client(WLS-SOAP)?
    thanks
    rene
    "Alan Humphris" <[email protected]> wrote:
    The format of your lookup url in the example you gave didn't look
    complete,
    but
    that might be just your example. It should be somthing like:
    http://host:7001/context/package.EntryPointBeanHome/package.EntryPointBeanHome.wsdl
    I've also seen that error in relation to any jndi lookups that yourentry
    point
    bean maybe making to other beans but where the jndi name you are looking
    up is
    incorrect.
    "Rene Wilms" <[email protected]> wrote:
    Hi!
    I have an MS-SOAP 2.0 Webservice and i want to call ist from a wls-client.
    I simply
    tried to change the target url (context.lookup("http://<host>/xyz.wsdl")
    and i
    got this
    Exception in thread "main" javax.naming.NamingException: i/o failedjava.io.FileNotFoundException:
    http://<host>/xyz.wsdl.
    Root exception is java.io.FileNotFoundException: http://<host>/xyz.wsdl
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:545)
    at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:521)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:171)
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:64)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at DClient.main(DClient.java:26)
    I can call the WebService via Visual Basic and the WSDL-File is available
    via
    Browser as well.
    Thanks for Help
    Rene
    p.s. i used the DClient.java example (also tried XMethodClient, with
    the result,
    that the method was not found!)

  • SOAP/WSDL and web-proxy

    Hi,
    I'd like to use WebServiceProxy.getServiceAt(URL) method with
    a web proxy. How can I give it the address of my proxy?
    Thanks,
    Miguel

    Hello,
    Could you tell me what tool it is you are using?
    Sounds interesting.
    //Daniel.

  • Brokerdemo

    While trying it on a perfectly good wdsl (at least MS toolkit likes it) it throws
    the following exception:
    Creating external service
    java.io.IOException: can not have more than one return type
    at weblogic.soap.wsdl.binding.Message.getReturnType(Message.java:64)
    at weblogic.soap.wsdl.binding.BindingOperation.populate(BindingOperation.java:52)
    at weblogic.soap.wsdl.binding.Binding.populate(Binding.java:48)
    at weblogic.soap.wsdl.binding.Definition.populate(Definition.java:116)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:173)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:137)
    at weblogicx.soap.tools.broker.ExternalService.getView(ExternalService.java:209)
    at weblogicx.soap.tools.broker.ExternalService.<init>(ExternalService.java:38)
    at weblogicx.soap.tools.broker.Registry$2.mouseReleased(Registry.java:192)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
    at java.awt.Component.processMouseEvent(Component.java:3715)
    at java.awt.Component.processEvent(Component.java:3544)
    at java.awt.Container.processEvent(Container.java:1164)
    at java.awt.Component.dispatchEventImpl(Component.java:2593)
    at java.awt.Container.dispatchEventImpl(Container.java:1213)
    at java.awt.Component.dispatchEvent(Component.java:2497)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
    at java.awt.Container.dispatchEventImpl(Container.java:1200)
    at java.awt.Window.dispatchEventImpl(Window.java:914)
    at java.awt.Component.dispatchEvent(Component.java:2497)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    Dimitri

    Duh! You are absolutely right - I was using Response object directly:
    <message name="clsFlightLookup.LoadResponse">
    <part name="Result" type="xsd:int" />
    <part name="vSessionID" type="xsd:anyType" />
    <part name="strReqFromCityCode" type="xsd:string" />
    <part name="strReqToCityCode" type="xsd:string" />
    <part name="strReqDepartDate" type="xsd:string" />
    <part name="strReqDepartTime" type="xsd:string" />
    <part name="strResultxml" type="xsd:anyType" />
    <part name="Flight_Type" type="xsd:short" />
    <part name="strReqFromAirportCode" type="xsd:string" />
    <part name="strReqToAirportCode" type="xsd:string" />
    <part name="strReqAirlineCode" type="xsd:string" />
    <part name="nRowCount" type="xsd:short" />
    </message>
    BTW, interoperability is definitely a major issue - I tried few examples
    from xmethods.net and almost all of them (except those you selected for
    the J1 demo) do not work for one reason or another.
    Manoj Cheenath <[email protected]> wrote:
    Hum! can you pls send me the .wsdl file. From the stack trace it
    seems, the wsdl defines two parts in the response message. As you
    know, java methods can only return one value. so WLS only
    support one part in the response message.
    regards,
    -manoj
    Dimitri Rakitine wrote:
    While trying it on a perfectly good wdsl (at least MS toolkit likes it) it throws
    the following exception:
    Creating external service
    java.io.IOException: can not have more than one return type
    at weblogic.soap.wsdl.binding.Message.getReturnType(Message.java:64)
    at weblogic.soap.wsdl.binding.BindingOperation.populate(BindingOperation.java:52)
    at weblogic.soap.wsdl.binding.Binding.populate(Binding.java:48)
    at weblogic.soap.wsdl.binding.Definition.populate(Definition.java:116)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:173)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:137)
    at weblogicx.soap.tools.broker.ExternalService.getView(ExternalService.java:209)
    at weblogicx.soap.tools.broker.ExternalService.<init>(ExternalService.java:38)
    at weblogicx.soap.tools.broker.Registry$2.mouseReleased(Registry.java:192)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
    at java.awt.Component.processMouseEvent(Component.java:3715)
    at java.awt.Component.processEvent(Component.java:3544)
    at java.awt.Container.processEvent(Container.java:1164)
    at java.awt.Component.dispatchEventImpl(Component.java:2593)
    at java.awt.Container.dispatchEventImpl(Container.java:1213)
    at java.awt.Component.dispatchEvent(Component.java:2497)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
    at java.awt.Container.dispatchEventImpl(Container.java:1200)
    at java.awt.Window.dispatchEventImpl(Window.java:914)
    at java.awt.Component.dispatchEvent(Component.java:2497)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    Dimitri--
    Dimitri

  • Interoperability WSL6.1 and WLS5.1

    Hi all,
    i want to access a Webservice(SWL6.1) as a jsp client(on WLS5.1). Are there any
    examples which could be of help to me?
    With this contex:
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.soap.http.SoapInitialContextFactory");
    h.put("weblogic.soap.wsdl.interface", RPC.class.getName() );
    Context context = new InitialContext(h);
    RPC service = (RPC)context.lookup("http://localhost:7001/rpc_ws/test.RPC/test.RPC.wsdl"
    The error a run time is:
    server HTTP://...... not found
    thanx in advance.
    regards

    filaiello,
    Try this code on the client side.
    Make sure that the web service is deployed and the client.jar is the first thing
    in the client side code.
    java.net.URL myURL = new java.net.URL("http://abc.com:5001/referenceData/com.abc.referenceData.ejb.ReferenceDataWrapperHome/wsdl.jsp");
    proxy = WebServiceProxy.getServiceAt(myURL);
    SoapMethod method = proxy.getMethod("getPrimaryUseLocations");
    result = (String)method.invoke(new Object[]{market, acctType1});
    "filaiello" <[email protected]> wrote:
    >
    Hi all,
    i want to access a Webservice(SWL6.1) as a jsp client(on WLS5.1). Are
    there any
    examples which could be of help to me?
    With this contex:
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.soap.http.SoapInitialContextFactory");
    h.put("weblogic.soap.wsdl.interface", RPC.class.getName() );
    Context context = new InitialContext(h);
    RPC service = (RPC)context.lookup("http://localhost:7001/rpc_ws/test.RPC/test.RPC.wsdl"
    The error a run time is:
    server HTTP://...... not found
    thanx in advance.
    regards

  • ConnectException while trying to lookup a web service

    Hi,
    I am new to web service and currently working on Weblogic 6.0. I have created a webservice client and deployed in my weblogic server. I am trying to access the Webservices published in the external server from my client. It�s giving the ConnectException (but the same WSDL url if cut and paste in browser address bar it is getting accessed)..
    Btw i had tried accessing a different webservice deployed in my server & it is working properly. So the code does not have any problem I guess.
    The code I am using to access web service is as follows:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import weblogic.soap.SoapMethod;
    import weblogic.soap.WebServiceProxy;
    public void clientCall(String strURL, String strMethod)
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.soap.http.SoapInitialContextFactory");
    h.put("weblogic.soap.verbose", "true" );
    Context context = new InitialContext(h);
    WebServiceProxy proxy = (WebServiceProxy)context.lookup(strURL);
    SoapMethod method = proxy.getMethod(strMethod);
    String strSuccess = (String)method.invoke(new Object[]{�ABC�});
    I will paste the exception below.. Please help me in resolving this issue.
    Thanks in advance..
    Arya
    javax.naming.NamingException: i/o failed java.net.ConnectException: Tried all: '1' addresses, but could not connect over HTTP to server: '168.109.162.127', port: '9080'. Root exception is java.net.ConnectException: Tried all: '1' addresses, but could not connect over HTTP to server: '168.109.162.127', port: '9080'
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:211)
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:263)
    at weblogic.net.http.HttpClient.<init>(HttpClient.java:121)
    at weblogic.net.http.HttpClient.New(HttpClient.java:156)
    at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:111)
    at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:283)
    at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:615)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:230)
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:87)
    at javax.naming.InitialContext.lookup(InitialContext.java:345)

    Hi mythri.
    Did you find a way out of this error? Could you share the solution with me? Because I am facing a problem that looks just like the one you had.
    Thanks in advance.
    Renan

  • Message webservice example

    Hi
    I 'm trying to test a message web service example on WLS6.1 SP1
    but, the following error in ProducerClient.
    somedoby knows that?
    Exception in thread "main" javax.naming.NamingException: i/o failed
    java.io.IOEx
    ception: http://xml.apache.org/xml-soap/literalxml
    http://schemas.xmlsoap.org/so
    ap/encoding/:http://www.w3.org/1999/XMLSchema:anyType:No codec for decoding
    http
    ://xml.apache.org/xml-soap/literalxml: [ CodecFactory:
    http://schemas.xmlsoap.or
    g/soap/encoding/=null, =null]. Root exception is java.io.IOException:
    http://xm
    l.apache.org/xml-soap/literalxml
    http://schemas.xmlsoap.org/soap/encoding/:http:
    //www.w3.org/1999/XMLSchema:anyType:No codec for decoding
    http://xml.apache.org/
    xml-soap/literalxml: [ CodecFactory:
    http://schemas.xmlsoap.org/soap/encoding/=n
    ull, =null]
    at weblogic.soap.wsdl.binding.Part.typeToClass(Part.java:74)
    at weblogic.soap.wsdl.binding.Part.toSoapType(Part.java:51)
    at
    weblogic.soap.wsdl.binding.Message.getParameters(Message.java:43)
    at
    weblogic.soap.wsdl.binding.BindingOperation.populate(BindingOperation.java:5
    5)
    at weblogic.soap.wsdl.binding.Binding.populate(Binding.java:48)
    at
    weblogic.soap.wsdl.binding.Definition.populate(Definition.java:116)
    at
    weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:176)
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at
    examples.webservices.message.ProducerClient.main(ProducerClient.java:48)
    -shunji

    You can try something like this:
    Variables:
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable" messageType="client:BPELProcess1RequestMessage"/>
    <!-- Reference to the message that will be sent back to the requester during callback -->
    <variable name="outputVariable" messageType="client:BPELProcess1ResponseMessage"/>
    </variables>
    Assign:
    <assign name="EmptyAssign">
    <copy>
    <from variable="inputVariable" part="payload" query="/ns1:Balance/ns1:Empty"/>
    <to variable="outputVariable" part="payload" query="/ns1:Balance/ns1:Empty"/>
    </copy>
    </assign>
    The xsd user:
    <?xml version="1.0" encoding="windows-1252"?>
    <schema xmlns:tns="http://xmlns.oracle.com/bpel/samples/Dummy"
    attributeFormDefault="unqualified" elementFormDefault="qualified"
    targetNamespace="http://xmlns.oracle.com/bpel/samples/Dummy"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <element name="Empty"/>
    <element name="Balance">
    <complexType>
    <sequence>
         <element name="Empty"/>
    <element name="Message" type="tns:messageType"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="messageType">
    <sequence>
    <element name="subject" type="xsd:string"/>
    <element name="content" type="xsd:string"/>
    <element name="address" type="xsd:string"/>
    </sequence>
    </complexType>
    </schema>
    ]

  • Literal encoding

    Codec problems
    I am having diffculy with the the following code Any suggestions would be appreciated
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.soap.http.SoapInitialContextFactory");
    h.put("weblogic.soap.verbose", "true" );
    CodecFactory factory = CodecFactory.newInstance();
    factory.register(new weblogic.soap.codec.LiteralCodec());
    Context context = new InitialContext(h);
    WebServiceProxy proxy = (WebServiceProxy)context.lookup(url +
         "/test/ejb20-statelessSession-TraderHome/ejb20-statelessSession-TraderHome.wsdl"
    SoapMethod method = proxy.getMethod("testxml");
    System.out.println(method.invoke(new Object[]{}));
    I get the following exception on the lookup :
    Exception in thread "main" javax.naming.NamingException: i/o failed java.io.IOEx
    ception: http://xml.apache.org/xml-soap/literalxml/:http://www.w3.org/1999/XMLSc
    hema:string:No codec for decoding http://xml.apache.org/xml-soap/literalxml/:
    CodecFactory: http://schemas.xmlsoap.org/soap/encoding/=null, =null]. Root exce
    ption is java.io.IOException: http://xml.apache.org/xml-soap/literalxml/:http://
    www.w3.org/1999/XMLSchema:string:No codec for decoding http://xml.apache.org/xml
    -soap/literalxml/: [ CodecFactory: http://schemas.xmlsoap.org/soap/encoding/=nul
    l, =null]
    at weblogic.soap.wsdl.binding.Part.typeToClass(Part.java:74)
    at weblogic.soap.wsdl.binding.Part.toSoapType(Part.java:51)
    at weblogic.soap.wsdl.binding.Message.getReturnType(Message.java:58)
    at weblogic.soap.wsdl.binding.BindingOperation.populate(BindingOperation
    .java:52)
    at weblogic.soap.wsdl.binding.Binding.populate(Binding.java:48)
    at weblogic.soap.wsdl.binding.Definition.populate(Definition.java:116)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:176)
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at examples.webservices.rpc.javaClient.Client.main(Client.java:47)

    Codec problems
    I am having diffculy with the the following code Any suggestions would be appreciated
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.soap.http.SoapInitialContextFactory");
    h.put("weblogic.soap.verbose", "true" );
    CodecFactory factory = CodecFactory.newInstance();
    factory.register(new weblogic.soap.codec.LiteralCodec());
    Context context = new InitialContext(h);
    WebServiceProxy proxy = (WebServiceProxy)context.lookup(url +
         "/test/ejb20-statelessSession-TraderHome/ejb20-statelessSession-TraderHome.wsdl"
    SoapMethod method = proxy.getMethod("testxml");
    System.out.println(method.invoke(new Object[]{}));
    I get the following exception on the lookup :
    Exception in thread "main" javax.naming.NamingException: i/o failed java.io.IOEx
    ception: http://xml.apache.org/xml-soap/literalxml/:http://www.w3.org/1999/XMLSc
    hema:string:No codec for decoding http://xml.apache.org/xml-soap/literalxml/:
    CodecFactory: http://schemas.xmlsoap.org/soap/encoding/=null, =null]. Root exce
    ption is java.io.IOException: http://xml.apache.org/xml-soap/literalxml/:http://
    www.w3.org/1999/XMLSchema:string:No codec for decoding http://xml.apache.org/xml
    -soap/literalxml/: [ CodecFactory: http://schemas.xmlsoap.org/soap/encoding/=nul
    l, =null]
    at weblogic.soap.wsdl.binding.Part.typeToClass(Part.java:74)
    at weblogic.soap.wsdl.binding.Part.toSoapType(Part.java:51)
    at weblogic.soap.wsdl.binding.Message.getReturnType(Message.java:58)
    at weblogic.soap.wsdl.binding.BindingOperation.populate(BindingOperation
    .java:52)
    at weblogic.soap.wsdl.binding.Binding.populate(Binding.java:48)
    at weblogic.soap.wsdl.binding.Definition.populate(Definition.java:116)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:176)
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at examples.webservices.rpc.javaClient.Client.main(Client.java:47)

  • Problems with document return type

    Hi, i've deployed a web service in weblogic 6.1 that returns a xml document. When
    i try to execute the client, i receive this error message:
    ------------- RECEIVING XML -------------
    <?xml version="1.0"?>
    <definitions
    targetNamespace="java:examples.webservices.rpcXML.pruebaXML"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="java:examples.webservices.rpcXML.pruebaXML"
    xmlns:dom="http://www.w3c.org/1999/DOM"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    >
    <types>
    <schema targetNamespace='java:examples.webservices.rpcXML.pruebaXML'
    xmlns='http://www.w3.org/1999/XMLSchema'>
    </schema>
    </types>
    <message name="getXMLRequest">
    </message>
    <message name="getXMLResponse">
    <part name="return" type="dom:org.w3c.dom.Document" />
    </message>
    <portType name="PruebaXMLPortType">
    <operation name="getXML">
    <input message="tns:getXMLRequest"/>
    <output message="tns:getXMLResponse"/>
    </operation>
    </portType>
    <binding name="PruebaXMLBinding" type="tns:PruebaXMLPortType"><soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http/"/>
    <operation name="getXML">
    <soap:operation soapAction="urn:getXML"/>
    <input><soap:body use="encoded" namespace='urn:PruebaXML' encodingStyle="http://xml.apache.org/xml-soap/literalxml
    http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace='urn:PruebaXML' encodingStyle="http://xml.apache.org/xml-soap/literalxml
    http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    </binding>
    <service name="PruebaXML"><documentation>todo</documentation><port name="PruebaXMLPort"
    binding="tns:PruebaXMLBinding"><soap:address location="http://localhost:7001/pruebaXML/pruebaXMLuri"/></port></service></definitions>
    ===================================================================================
    ERROR =================================================================
    javax.naming.NamingException: i/o failed java.io.IOException: http://xml.apache.org/xml-soap/literalxml
    http://schemas.xmlsoap.org/soap/encoding/:http://www.w3c.org/1999/DOM:org.w3c.dom.Document:No
    codec for decoding http://xml.apache.org/xml-soap/literalxml: [ CodecFactory:
    http://schemas.xmlsoap.org/soap/encoding/=null, =null]. Root exception is java.io.IOException:
    http://xml.apache.org/xml-soap/literalxml http://schemas.xmlsoap.org/soap/encoding/:http://www.w3c.org/1999/DOM:org.w3c.dom.Document:No
    codec for decoding http://xml.apache.org/xml-soap/literalxml: [ CodecFactory:
    http://schemas.xmlsoap.org/soap/encoding/=null, =null]
         at weblogic.soap.wsdl.binding.Part.typeToClass(Part.java:74)
         at weblogic.soap.wsdl.binding.Part.toSoapType(Part.java:51)
         at weblogic.soap.wsdl.binding.Message.getReturnType(Message.java:58)
         at weblogic.soap.wsdl.binding.BindingOperation.populate(BindingOperation.java:52)
         at weblogic.soap.wsdl.binding.Binding.populate(Binding.java:48)
         at weblogic.soap.wsdl.binding.Definition.populate(Definition.java:116)
         at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:176)
         at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
         at javax.naming.InitialContext.lookup(InitialContext.java:350)
         at examples.webservices.rpcXML.javaClient.Client.main(Client.java:40)
    Exception in thread "main"
    This is the wsdl file that weblogic generates:
    <?xml version="1.0" ?>
    - <definitions targetNamespace="java:examples.webservices.rpcXML.pruebaXML" xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="java:examples.webservices.rpcXML.pruebaXML" xmlns:dom="http://www.w3c.org/1999/DOM"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    - <types>
    <schema targetNamespace="java:examples.webservices.rpcXML.pruebaXML" xmlns="http://www.w3.org/1999/XMLSchema"
    />
    </types>
    <message name="getXMLRequest" />
    - <message name="getXMLResponse">
    <part name="return" type="dom:org.w3c.dom.Document" />
    </message>
    - <portType name="PruebaXMLPortType">
    - <operation name="getXML">
    <input message="tns:getXMLRequest" />
    <output message="tns:getXMLResponse" />
    </operation>
    </portType>
    - <binding name="PruebaXMLBinding" type="tns:PruebaXMLPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http/"
    />
    - <operation name="getXML">
    <soap:operation soapAction="urn:getXML" />
    - <input>
    <soap:body use="encoded" namespace="urn:PruebaXML" encodingStyle="http://xml.apache.org/xml-soap/literalxml
    http://schemas.xmlsoap.org/soap/encoding/" />
    </input>
    - <output>
    <soap:body use="encoded" namespace="urn:PruebaXML" encodingStyle="http://xml.apache.org/xml-soap/literalxml
    http://schemas.xmlsoap.org/soap/encoding/" />
    </output>
    </operation>
    </binding>
    - <service name="PruebaXML">
    <documentation>todo</documentation>
    - <port name="PruebaXMLPort" binding="tns:PruebaXMLBinding">
    <soap:address location="http://carlos-3-116:7001/pruebaXML/pruebaXMLuri" />
    </port>
    </service>
    </definitions>
    Could anyone help me, thanks

    Here is a the actual php class:
    class question{
    function getQuestionDetails()
    $r = array("r"=>"s","t"=>11230,"wr"=>500);
    return $r;
    This class has a defined return VO(questionDetails) in flex. It is recognized in the IDE, but when I run the app, I always get a "null object reference" error. I can't seem to convert the result to questionDetails, and I can't access the fields as properties or part of an array of the return object as an instance of "Object".
    Any ideas?
    Thanks!

  • Sender  Mail Adapter - java.lang.NullPointerException in CC monitoring

    hi,
    I configured my Sender Mail Adapter correctly.
    I have the correct POP URL, authentication. I'm not using PayloadSwapBean right now.
    I can't get rid of the exception inside my Channel monitoring.
    exception caught during processing mail message; java.lang.NullPointerException
    does anyone know why?
    I've been told the POP account has emails already.
    I will try to create an outlook account for this POP e-mail account in the mean time to see the e-mails.
    Thank you

    thanks aaron.
    I don't see the folder ./SYS/../j2ee/...
    will it be under another folder?  I don't see a trace log folder either.
    I think the problem might be in the Module tab.
    I tried.
    AF_Modules/PayloadSwapBean
    localejbs/AF_Modules/PayloadSwapBean
    /localejbs/AF_Modules/PayloadSwapBean
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
    localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
    /localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
    they all produce the same error. I wonder if these Beans actually exist.
    I think we might have to reinstall this Mail Adapter altogether.
    Or maybe it's really the connection to the Mail Server. But would it display this kind of message.
    This is what I'm looking at.
    Also, i had to use this URL
    pop://server:995/
    (995 is using SSL and it is the default port).  When I use this, I see the Java Null Pointer Exception a lot less frequently. Weird.

  • Data Federator Connection to R3 - java.lang.NullPointerException

    Hi.
    We are trying to add a SAP R3 DataSource in Data Federator XI 3.0 SP2.
    Test Connection gives us the following message: "The connection was established but there is no table for the given connection parameters", what it seems to be ok according to the SAP doc.
    However, when we try to get a list of the Functions or Infosets in the SAP system, an error comes because of a "java.lang.NullPointerException". Checking the application log we get the following:
    2010/03/30 12:21:27.059|<=|||0|26537104| |||||||||||||||"[LeSelect.Api.LSStatementImpl] - [Execution Thread 4]Executing query: CALL executeConnectorCommand '/TEST//TEST/user_bla/sources/draft/R3SYS', 'GET_FUNCTION_LIST * * 200'"
    2010/03/30 12:21:27.074|>=|E||0|26537104| |||||||||||||||"[LeSelect.Core.n] - [Execution Thread 4]Bad Wrapper Error:
    java.lang.NullPointerException
         at LeSelect.Wrappers.SAPR3.H.F(y:343)
         at LeSelect.Wrappers.SAPR3.H.executeCommand(y:285)
         at LeSelect.Core.B.D.R(y:151)
         at LeSelect.Core.QueryEngine.H.p.G(y:131)
         at LeSelect.Core.QueryEngine.H.p.A(y:105)
         at LeSelect.Core.QueryEngine.B.J.A(y:72)
         at LeSelect.Core.QueryEngine.Executor.y.A(y:227)
         at LeSelect.Core.QueryEngine.m.A(y:284)
         at LeSelect.Api.LSStatementImpl.lsExecuteQuery(y:314)
         at LeSelect.B.E.D.V(y:935)
         at LeSelect.B.E.K.B(y:105)
         at LeSelect.B.E.G$_A.run(y:691)"
    We registered the callback program and did all of the steps indicated for the installation, also checked the possible sources of the error according to OSS Note 1278491.
    Any idea how to solve this? Thanks.

    Hello, we have the similar problem: while connecting from Data Federator to SAP ERP we get the following error - "Wrapper /ZTEST/sources/ZTEST reported an exception which is not a WrapperException: java.lang.NullPointerException: null"
    It's necessary to install "SAP BusinessObjects Data Federator Infoset, SAP Query and ABAP Functions Connector Prototype"
    SAP BusinessObjects Web Intelligence Reporting for SAP ERP
    for connection to SAP ERP.
    Are there any ideas? Thanks

  • PI Java Mapping NullPointerException

    Hi Gurus,
    I'm having some troubles doing the mapping through java mapping in PI.
    I've done the java class in the SAP NWDS and imported it on PI through the ESR.
    Now i'm trying to test through the SOAP and i've found the following error in the "Communication Channel Monitor":
    500   Internal Server Error  SAP NetWeaver Application Server/Java AS 
    java.lang.NullPointerException: while trying to invoke the method com.sap.aii.af.sdk.xi.lang.Binary.getBytes() of a null object returned from com.sap.aii.af.sdk.xi.mo.xmb.XMBPayload.getContent()
    And the following error in the SXMB_MONI:
    <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">CLIENT_SEND_FAILED</SAP:Code>
      <SAP:P1>500</SAP:P1>
      <SAP:P2>Internal Server Error</SAP:P2>
      <SAP:P3>(See attachment HTMLError for details)</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>Error while sending by HTTP (error code: 500 , error text: Internal Server Error) (See attachment HTMLError for details)</SAP:Stack>
    I've developed the code below:
    public class PI_Mapping_IF extends AbstractTransformation {
      public void transform(TransformationInput in, TransformationOutput out)    throws StreamTransformationException  {  
      this.execute(in.getInputPayload().getInputStream(), out.getOutputPayload().getOutputStream()); 
      public void execute(InputStream in, OutputStream out)  throws StreamTransformationException { 
      try  
      // Inicio do java mapping
      getTrace().addInfo("JAVA Mapping Iniciado"); //Log para o PI/XI
      // Declarações referentes ao XML de entrada
      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
      DocumentBuilder db = dbf.newDocumentBuilder();
      Document xml_in = db.parse(in);
      // Declarações referentes ao XML de saída
      Document xml_out = db.newDocument();
      TransformerFactory transformerFactory = TransformerFactory.newInstance();
      Transformer transformer = transformerFactory.newTransformer();
      // Remove o standalone
      xml_in.setXmlStandalone(true);
      // Declara a estrutura que a RFC irá receber
      Element root = xml_out.createElement("ns1:ZFSD_VMOI_UPLOAD_CF_PG");
      root.setAttribute("xmlns:ns1","urn:sap-com:document:sap:rfc:functions");
      xml_out.appendChild(root);
      Element i_cenario = xml_out.createElement("I_CENARIO");
      root.appendChild(i_cenario);
      Element t_input = xml_out.createElement("T_INPUT");
      root.appendChild(t_input);
      Element item = xml_out.createElement("ITEM");
      t_input.appendChild(item);
      Element STRING = xml_out.createElement("STRING");
      item.appendChild(STRING);
      Element t_return = xml_out.createElement("T_RETURN");
      root.appendChild(t_return);
      Element item_r = xml_out.createElement("ITEM");
      t_return.appendChild(item_r);
      Element message = xml_out.createElement("MESSAGE");
      item_r.appendChild(message);
      // Verifica se existe algum filho no nó
      NodeList nodos = xml_in.getChildNodes(); 
      if (nodos.item(0) != null)
      getTrace().addInfo("O nó(XML) possui filhos"); //Log para o PI/XI
      // Declaração de variáveis
      String ident = ""; // <Ident>
      String buyer = ""; // <BuyerLineItemNum>
      String result = ""; // <Ident>;<BuyerLineItemNum>;<Date>;<QuantityValue>
      // Inicia a extração das informações do XML
      try{
      // Recupera o nó ShipToParty
      NodeList nodeShip = xml_in.getElementsByTagName("ns0:ShipToParty");
      Node node = nodeShip.item(0);
      Element elemXML = (Element) node;
      try{
      NodeList nodeIdent = elemXML.getElementsByTagName("ns0:Ident");
      Element nameElement = (Element) nodeIdent.item(0);
      nodeIdent = nameElement.getChildNodes();
      // Recupera o valor da chave <Ident>
      ident = PI_Mapping_IF.VerifyNull(((Node) nodeIdent.item(0)).getNodeValue());
      }catch(Exception e){
      result += "0.0;";
      // Recupera o nó ListOfMaterialGroupedPlanningDetail
      NodeList nodeBuyer  = xml_in.getElementsByTagName("ns0:MaterialGroupedPlanningDetail");
      for (int i = 0; i < nodeBuyer.getLength(); i++) {
      node = nodeBuyer.item(i);
      elemXML = (Element) node;
      try{
      // Preenche a chave BuyerLineItemNum
      NodeList nodeBuyerLine = elemXML.getElementsByTagName("ns0:BuyerLineItemNum");
      Element elemBuyerLine = (Element) nodeBuyerLine.item(0);
      nodeBuyerLine = elemBuyerLine.getChildNodes();
      buyer = PI_Mapping_IF.VerifyNull(((Node) nodeBuyerLine.item(0)).getNodeValue());
      }catch(Exception e){
      buyer += "0;";
      result = ident+";"+buyer+";";
      Node nodeDt_Qnt = nodeBuyer.item(i);
      Element elemDt_Qnt = (Element)nodeDt_Qnt;
      NodeList nodeValores = elemDt_Qnt.getElementsByTagName("ns0:ScheduleDetail");
      for (int j = 0; j < nodeValores.getLength(); j++) {
      node = nodeValores.item(j);
      elemXML = (Element) node;
      try{
      // Preenche a chave Date
      NodeList modelExtra = elemXML.getElementsByTagName("ns0:Date");
      Element extraElement = (Element) modelExtra.item(0);
      modelExtra = extraElement.getChildNodes();
      result += PI_Mapping_IF.VerifyNull(((Node) modelExtra.item(0)).getNodeValue())+";";
      }catch(Exception e){
      result += "//;";
      try {
      // Preenche a chave QuantityValue
      NodeList modelURL = elemXML.getElementsByTagName("ns0:QuantityValue");
      Element urlElement = (Element) modelURL.item(0);
      modelURL = urlElement.getChildNodes();
      result += PI_Mapping_IF.VerifyNull(((Node) modelURL.item(0)).getNodeValue())+";";
      } catch (Exception e) {
      result += "0.0;";
      // Marca o final do registro
      result += "||";
      // Preenche os nós itens
      Text srcxml = xml_out.createTextNode(result);
      STRING.appendChild(srcxml);
      result = "";
      buyer = "";
      }catch(Exception e){
      // Remove o standalone
      xml_out.setXmlStandalone(true);
      // Preenche o Cenario
      Text cenario = xml_out.createTextNode("P&G");
      i_cenario.appendChild(cenario);
      // Preenche mensagem de retorno
      Text msgxml = xml_out.createTextNode("XML lido com sucesso!");
      message.appendChild(msgxml);
      // Escreve a saida do XML            
      transformer.transform(new DOMSource(xml_out), new StreamResult(out));
      getTrace().addInfo("Fim da execução do Java Mapping");
      } catch (ParserConfigurationException e) {
      getTrace().addWarning(e.getMessage());
      throw new StreamTransformationException("Can not create DocumentBuilder.", e);
      } catch (SAXException e) {
      e.printStackTrace();
      } catch (IOException e) {
      e.printStackTrace();
      } catch (TransformerConfigurationException e) {
      e.printStackTrace();
      } catch (TransformerException e) {
      e.printStackTrace();
    Am i doing anything wrong in the code? Where can this nullpointerexception be triggered?
    Thanks.

    These three xml are the same:
    <?xml version="1.0"?><a:xml xmlns:a="urn:123">root</a:xml>
    <?xml version="1.0"?><xml xmlns="urn:123">root</xml>
    <?xml version="1.0"?><ns0:xml xmlns:ns0="urn:123">root</ns0:xml>
    But your code will work only with last one, because it doesn't bound namespace to prefix ns0.

  • Error in deployment:java.lang.NullPointerException:sdu name can not be null

    HI Everyone!
        I try to deploy my web dynpro project to SAP J2EE engine. Configuration about SAP J2EE Engine is OK, but there is an error during the deployment. Here is the deployment trace:
    2007-6-28 14:56:27 /userOut/daView_category (com.sap.ide.eclipse.deployer.DVBaseLog) [Thread[Deploy Thread,6,main]] INFO: deployment trace
    14:56:24.207 [info  #300]  [#4]: Trying to connect to 'secude-vmcn0001:50004' as 'administrator'
    14:56:24.207 [debug #100]  [#4]: Session::getContext.[ B E G I N ].timerId=16
    14:56:25.161 [debug #100]  [#4]: Session::getContext.[ E N D ].timerId=[id:#16, elapsed: 954 ms.]
    14:56:25.161 [info  #300]  [#4]: Connected to 'secude-vmcn0001:50004' as 'administrator'
    14:56:25.161 [debug #100]  [#4]: DeployProcessor::ctor:New deploy processor created.deployerId=4
    14:56:25.161 [info  #300]  [#4]: +++++ Starting  D E P L O Y action +++++
    14:56:25.161 [info  #300]  [#4]: Selected archives for deployment
    14:56:25.161 [info  #300]  [#4]: D:\NetWeaverWorkspace\Workspace\Dashboard\Dashboard.ear
    14:56:25.536 [debug #100]  [#4]: DeployProcessor::deploy:going to generate Session id, deployerId=4
    14:56:25.755 [debug #100]  [#4]: DeployProcessor::deploy:got Session id='14',time:[id:#17, elapsed: 594 ms.], deployerId=4
    14:56:25.974 [info  #300]  [#4]: Upload archives to the server.Remote upload path is 'C:\SAP\JP1\JC00\j2ee\cluster\server0\temp\tcbldeploy_controller\archives\14'
    14:56:25.974 [debug #300]  [#4]: DeployProcessor::uploadItemsToServer:Going to upload 'D:\NetWeaverWorkspace\Workspace\Dashboard\Dashboard.ear' on the server.deployerId=4
    14:56:26.427 [info  #300]  [#4]: File 'D:\NetWeaverWorkspace\Workspace\Dashboard\Dashboard.ear' uploaded successfully as 'C:/SAP/JP1/JC00/j2ee/cluster/server0/temp/tcbldeploy_controller/archives/14/Dashboard.ear'. Time:[id:#18, elapsed: 453 ms.]
    14:56:26.427 [info  #300]  [#4]: Archives uploaded.time:[#18: 0.453 sec]
    14:56:26.427 [debug #100]  [#4]: DeployProcessor::deployItems:enter.timerId=19, deployerId=4
    14:56:26.427 [debug #100]  [#4]: DeployProcessor::internalCreateAndInitDeployer:get deployer from server, deployerId=4
    14:56:26.427 [debug #100]  [#4]: DeployProcessor::internalCreateAndInitDeployer:deployer get successfully:[id:#20, elapsed: 0 ms.], deployerId=4
    14:56:26.630 [info  #300]  [#4]: component version handling rule is UpdateAllVersions
    14:56:26.849 [info  #300]  [#4]: Error strategies:
    14:56:26.849 [debug #100]  [#4]: DeployProcessor::internalCreateAndInitDeployer:deployer initialized sucessfully:[id:#20, elapsed: 422 ms.], deployerId=4
    14:56:26.849 [debug #100]  [#4]: DeployProcessor::internalCreateAndInitDeployer:total time:[#20: 0.422 sec], deployerId=4
    14:56:26.849 [info  #300]  [#4]: Starting deployment
    14:56:27.177 [debug #100]  [#4]: DeployProcessor::internalMapSdus:sduMapperVisitor.setCompositeDeploymentItem(null),remoteSdu=name: 'null', vendor: 'null', location: 'LOKAL', version: '0.2007.06.28.14.28.59', software type: 'J2EE', dependencies: '[]'
    14:56:27.177 [debug #300]  [#4]: DeployProcessor::deployItems:finally.Total Time:[#19: 0.75 sec], deployerId=4
    14:56:27.177 [info  #300]  [#4]: +++++ End  D E P L O Y action +++++
    And here is the exception detail:
    2007-6-28 14:56:27 /userOut/daView_category (com.sap.ide.eclipse.deployer.DVBaseLog) [Thread[Deploy Thread,6,main]] ERROR: java.lang.NullPointerException: sdu name can not be null.
         at com.sap.engine.services.dc.api.model.impl.SduImpl.<init>(SduImpl.java:39)
         at com.sap.engine.services.dc.api.model.impl.SdaImpl.<init>(SdaImpl.java:51)
         at com.sap.engine.services.dc.api.model.impl.ModelFactoryImpl.createSda(ModelFactoryImpl.java:43)
         at com.sap.engine.services.dc.api.model.SduMapperVisitor.createSda(SduMapperVisitor.java:52)
         at com.sap.engine.services.dc.api.model.SduMapperVisitor.visit(SduMapperVisitor.java:64)
         at com.sap.engine.services.dc.repo.impl.SdaImpl.accept(SdaImpl.java:136)
         at com.sap.engine.services.dc.api.deploy.impl.DeployProcessorImpl.internalMapSdus(DeployProcessorImpl.java:704)
         at com.sap.engine.services.dc.api.deploy.impl.DeployProcessorImpl.deployItems(DeployProcessorImpl.java:487)
         at com.sap.engine.services.dc.api.deploy.impl.DeployProcessorImpl.deploy(DeployProcessorImpl.java:155)
         at com.sap.ide.eclipse.deployer.dc.deploy.DeployProcessor70.deploy(DeployProcessor70.java:185)
         at com.sap.ide.eclipse.sdm.threading.DCDeployThread.run(DCDeployThread.java:115)
    It seems that there is something wrong about 'SDU', but i don't know what is it, and i can not find the answer both in sdn.sap.com and here.
    Anyone can help me on this?
    Thanks in Advance,
    MK

    Hi Sumit,
        Thank you for your concern.
    Below is a trace file on my server:
    C:\SAP\JP1\JC00\j2ee\cluster\server0\log\defaultTrace.0.trc
    #1.5 #000C296B3F6A000D0000000200000A3000EF90978C2E8C29#1183013784131#/System/Server/Deployment##com.sap.engine.services.tcxblxdeploy_controller#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Info#1#com.sap.engine.services.tcxblxdeploy_controller#Plain###The session id 14 is associated with correlator id 67431500000169001. Use this correlator id to filter the trace and log messages.#
    #1.5 #000C296B3F6A000D0000000300000A3000EF90978C2E8C29#1183013784131#/System/Server/Deployment##com.sap.engine.services.tcxblxdeploy_controller#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Info#1#com.sap.engine.services.tcxblxdeploy_controller#Plain###++++++++++++++ Starting deployment ++++++++++++++#
    #1.5 #000C296B3F6A000D0000000400000A3000EF90978C2E8C29#1183013784131#/System/Server/Deployment##com.sap.engine.services.tcxblxdeploy_controller#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Info#1#com.sap.engine.services.tcxblxdeploy_controller#Plain###Archives specified for deployment are: #
    #1.5 #000C296B3F6A000D0000000500000A3000EF90978C2E8C29#1183013784131#/System/Server/Deployment##com.sap.engine.services.tcxblxdeploy_controller#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Info#1#com.sap.engine.services.tcxblxdeploy_controller#Plain###C:/SAP/JP1/JC00/j2ee/cluster/server0/temp/tcbldeploy_controller/archives/14/Dashboard.ear#
    #1.5 #000C296B3F6A000D0000000600000A3000EF90978C2E8C29#1183013784131#/System/Server/Deployment##com.sap.engine.services.tcxblxdeploy_controller#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Info#1#com.sap.engine.services.tcxblxdeploy_controller#Plain###Start loading archives ...#
    #1.5 #000C296B3F6A000D0000000700000A3000EF90978C2E8C29#1183013784147#/System/Server/Deployment##com.sap.engine.services.tcxblxdeploy_controller#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Info#1#com.sap.engine.services.tcxblxdeploy_controller#Plain###Archives are loaded.#
    #1.5 #000C296B3F6A000D0000000800000A3000EF90978C2E8C29#1183013784147#/System/Server/Deployment##com.sap.engine.services.tcxblxdeploy_controller#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Info#1#com.sap.engine.services.tcxblxdeploy_controller#Plain###Error Handling Action: 'UndeploymentAction', Error Handling Strategy: 'OnErrorStop'.
    Error Handling Action: 'DeploymentAction', Error Handling Strategy: 'OnErrorStop'.
    Error Handling Action: 'PrerequisitesCheckAction', Error Handling Strategy: 'OnErrorStop'.
    Version Handling Rule: 'UpdateAllVersions'.
    Deployment Strategy: 'normal deploy strategy'.
    Life Cycle Deployment Strategy: 'bulk deploy strategy'.
    There are no batch filters specified.#
    #1.5 #000C296B3F6A000D0000000900000A3000EF90978C2E8C29#1183013784194#/System/Server/Deployment##com.sap.engine.services.tcxblxdeploy_controller#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Info#1#com.sap.engine.services.tcxblxdeploy_controller#Plain###The batch for session id 14 will be executed with normal parallelism strategy.#
    #1.5 #000C296B3F6A000D0000000A00000A3000EF90978C2E8C29#1183013784272#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Warning#1#com.sap.engine.services.deploy#Plain###A component loader with name sap.com/tcwddispwda doesn't exist, because is stopped or not deployed.#
    #1.5 #000C296B3F6A000D0000000B00000A3000EF90978C2E8C29#1183013784272#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Warning#1#com.sap.engine.services.deploy#Plain###A component loader with name library:tcddicddicruntime doesn't exist, because is stopped or not deployed.#
    #1.5 #000C296B3F6A000D0000000C00000A3000EF90978C2E8C29#1183013784272#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Warning#1#com.sap.engine.services.deploy#Plain###A component loader with name library:com.sap.aii.util.rb doesn't exist, because is stopped or not deployed.#
    #1.5 #000C296B3F6A000D0000000D00000A3000EF90978C2E8C29#1183013784272#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Warning#1#com.sap.engine.services.deploy#Plain###A component loader with name library:com.sap.aii.util.xml doesn't exist, because is stopped or not deployed.#
    #1.5 #000C296B3F6A000D0000000E00000A3000EF90978C2E8C29#1183013784272#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Warning#1#com.sap.engine.services.deploy#Plain###A component loader with name library:com.sap.aii.proxy.framework doesn't exist, because is stopped or not deployed.#
    #1.5 #000C296B3F6A000D0000000F00000A3000EF90978C2E8C29#1183013784272#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Warning#1#com.sap.engine.services.deploy#Plain###A component loader with name library:tc~cmi doesn't exist, because is stopped or not deployed.#
    #1.5 #000C296B3F6A000D0000001000000A3000EF90978C2E8C29#1183013784272#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Warning#1#com.sap.engine.services.deploy#Plain###A component loader with name library:com.sap.aii.util.misc doesn't exist, because is stopped or not deployed.#
    #1.5 #000C296B3F6A000D0000001100000A3000EF90978C2E8C29#1183013784272#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Warning#1#com.sap.engine.services.deploy#Plain###A component loader with name library:tcddicddicservices doesn't exist, because is stopped or not deployed.#
    #1.5 #000C296B3F6A000D0000001200000A3000EF90978C2E8C29#1183013784272#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Warning#1#com.sap.engine.services.deploy#Plain###A component loader with name library:tcgraphicsigs doesn't exist, because is stopped or not deployed.#
    #1.5 #000C296B3F6A000D0000001300000A3000EF90978C2E8C29#1183013784366#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Warning#1#com.sap.engine.services.deploy#Plain###JLinEE validation of application local/Dashboard returned result
    WARNINGS:
    References Test: Count of deploy time references (described in META-INF/SAP_MANIFEST.MF) and runtime references (described in META-INF/application-j2ee-engine.xml) does not match., file: Dashboard.ear, column 0, line 0, severity: warning
    References Test: There are no matching deploy time references (described in META-INF/SAP_MANIFEST.MF) for the following runtime references [sap.com/tcwddispwda, sap.com/com.sap.mw.jco, sap.com/tcddicddicruntime, sap.com/com.sap.aii.util.rb, sap.com/com.sap.aii.util.xml, sap.com/webservices_lib, sap.com/com.sap.aii.proxy.framework, sap.com/sapxmltoolkit, sap.com/tccmi, sap.com/com.sap.security.api.sda, sap.com/com.sap.util.monitor.jarm, sap.com/com.sap.aii.util.misc, sap.com/tcddicddicservices, sap.com/com.sap.lcr.api.cimclient, sap.com/tcgraphics~igs, sap.com/sld] (described in the META-INF/application-j2ee-engine.xml)., file: Dashboard.ear, column 0, line 0, severity: warning
    #1.5 #000C296B3F6A000D0000001400000A3000EF90978C2E8C29#1183013784366#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Error#1#com.sap.engine.services.deploy#Plain#Exception while validating application local/Dashboard.
    No one of the [] containers, which processed it, returned deployed component names.
    The registered containers in this moment were [com.sap.security.ume, app_libraries_container, Cache Configuration Upload, servlet_jsp, dbcontentcontainer, connector, Cluster File System, JMSConnector, appclient, dbschemacontainer, orpersistence, JDBCConnector, EJBContainer, webservices_container, scheduler~container].
    Possible reasons :
         1.An AS Java service, which is providing a container, is stopped or not deployed.
         2.The containers, which processed it, are not implemented correct. They deployed or started initially the application, but didn't return deployed components in the application deployment info.###
    #1.5 #000C296B3F6A000D0000001700000A3000EF90978C2E8C29#1183013784366#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Error#1#com.sap.engine.services.deploy#Plain#Exception in operation deploy with application local/Dashboard.###
    #1.5 #000C296B3F6A000D0000001B00000A3000EF90978C2E8C29#1183013784397#/System/Server##java.lang.Package#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Error#1#java.lang.Package#Java#error.action.filter#com/sap/engine/services/mngt_model/localization.properties#Exception thrown by Action Filter: com.sap.engine.services.mngt_model.spi.ActionFilteringException: com.sap.engine.services.deploy.server.utils.DSRemoteException: Application local/Dashboard is not deployed..Action will not be delivered to domain: connector. Action is: APPLICATION_DEPLOYED#3#com.sap.engine.services.mngt_model.plugins.ApplicationActionFilter@d46ed0#connector#APPLICATION_DEPLOYED#
    #1.5 #000C296B3F6A000D0000001D00000A3000EF90978C2E8C29#1183013784397#/System/Server##java.lang.Package#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Error#1#java.lang.Package#Java#error.action.filter#com/sap/engine/services/mngt_model/localization.properties#Exception thrown by Action Filter: com.sap.engine.services.mngt_model.spi.ActionFilteringException: com.sap.engine.services.deploy.server.utils.DSRemoteException: Application local/Dashboard is not deployed..Action will not be delivered to domain: servlet_jsp. Action is: APPLICATION_DEPLOYED#3#com.sap.engine.services.mngt_model.plugins.ApplicationActionFilter@d46ed0#servlet_jsp#APPLICATION_DEPLOYED#
    #1.5 #000C296B3F6A000D0000001F00000A3000EF90978C2E8C29#1183013784397#/System/Server##java.lang.Package#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Error#1#java.lang.Package#Java#error.action.filter#com/sap/engine/services/mngt_model/localization.properties#Exception thrown by Action Filter: com.sap.engine.services.mngt_model.spi.ActionFilteringException: com.sap.engine.services.deploy.server.utils.DSRemoteException: Application local/Dashboard is not deployed..Action will not be delivered to domain: appclient. Action is: APPLICATION_DEPLOYED#3#com.sap.engine.services.mngt_model.plugins.ApplicationActionFilter@d46ed0#appclient#APPLICATION_DEPLOYED#
    #1.5 #000C296B3F6A000D0000002100000A3000EF90978C2E8C29#1183013784397#/System/Server##java.lang.Package#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Error#1#java.lang.Package#Java#error.action.filter#com/sap/engine/services/mngt_model/localization.properties#Exception thrown by Action Filter: com.sap.engine.services.mngt_model.spi.ActionFilteringException: com.sap.engine.services.deploy.server.utils.DSRemoteException: Application local/Dashboard is not deployed..Action will not be delivered to domain: dbpool. Action is: APPLICATION_DEPLOYED#3#com.sap.engine.services.mngt_model.plugins.ApplicationActionFilter@d46ed0#dbpool#APPLICATION_DEPLOYED#
    #1.5 #000C296B3F6A000D0000002300000A3000EF90978C2E8C29#1183013784397#/System/Server##java.lang.Package#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Error#1#java.lang.Package#Java#error.action.filter#com/sap/engine/services/mngt_model/localization.properties#Exception thrown by Action Filter: com.sap.engine.services.mngt_model.spi.ActionFilteringException: com.sap.engine.services.deploy.server.utils.DSRemoteException: Application local/Dashboard is not deployed..Action will not be delivered to domain: jmsconnector. Action is: APPLICATION_DEPLOYED#3#com.sap.engine.services.mngt_model.plugins.ApplicationActionFilter@d46ed0#jmsconnector#APPLICATION_DEPLOYED#
    #1.5 #000C296B3F6A000D0000002500000A3000EF90978C2E8C29#1183013784397#/System/Server/Services/Deploy##com.sap.engine.services.deploy#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Error#1#com.sap.engine.services.deploy#Plain#Exception while validating application local/Dashboard.
    No one of the [] containers, which processed it, returned deployed component names.
    The registered containers in this moment were [com.sap.security.ume, app_libraries_container, Cache Configuration Upload, servlet_jsp, dbcontentcontainer, connector, Cluster File System, JMSConnector, appclient, dbschemacontainer, orpersistence, JDBCConnector, EJBContainer, webservices_container, scheduler~container].
    Possible reasons :
         1.An AS Java service, which is providing a container, is stopped or not deployed.
         2.The containers, which processed it, are not implemented correct. They deployed or started initially the application, but didn't return deployed components in the application deployment info.###
    #1.5 #000C296B3F6A000D0000002800000A3000EF90978C2E8C29#1183013784397#/System/Server/Deployment##com.sap.engine.services.tcxblxdeploy_controller#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Error#1#com.sap.engine.services.tcxblxdeploy_controller#Plain#An error occurred while deploying the deployment item 'local_Dashboard'.###
    #1.5 #000C296B3F6A000D0000002B00000A3000EF90978C2E8C29#1183013784428#/System/Server/Deployment##com.sap.engine.services.tcxblxdeploy_controller#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Info#1#com.sap.engine.services.tcxblxdeploy_controller#Plain###Unlocking the Deploy.#
    #1.5 #000C296B3F6A000D0000002C00000A3000EF90978C2E8C29#1183013784428#/System/Server/Deployment##com.sap.engine.services.tcxblxdeploy_controller#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Error#1#com.sap.engine.services.tcxblxdeploy_controller#Plain#An error occurred while deploying the deployment item 'local_Dashboard'.; nested exception is:
         java.rmi.RemoteException:  class com.sap.engine.services.dc.gd.DeliveryException: An error occurred during deployment of sdu id: local_Dashboard
    sdu file path: C:\SAP\JP1\JC00\j2ee\cluster\server0\temp\tcbldeploy_controller\archives\14\Dashboard.ear
    version status: NEW
    deployment status: Admitted
    description:
              1. Error:
    Error occurred while deploying ear file C:\SAP\JP1\JC00\j2ee\cluster\server0\temp\tcbldeploy_controller\archives\14\Dashboard.ear.
    Reason: Exception while validating application local/Dashboard.
    No one of the [] containers, which processed it, returned deployed component names.
    The registered containers in this moment were [com.sap.security.ume, app_libraries_container, Cache Configuration Upload, servlet_jsp, dbcontentcontainer, connector, Cluster File System, JMSConnector, appclient, dbschemacontainer, orpersistence, JDBCConnector, EJBContainer, webservices_container, scheduler~container].
    Possible reasons :
         1.An AS Java service, which is providing a container, is stopped or not deployed.
         2.The containers, which processed it, are not implemented correct. They deployed or started initially the application, but didn't return deployed components in the application deployment info.
    . Cannot deploy it.; nested exception is:
         java.rmi.RemoteException:  class com.sap.engine.services.deploy.server.utils.DSRemoteException: Error occurred while deploying ear file C:\SAP\JP1\JC00\j2ee\cluster\server0\temp\tcbldeploy_controller\archives\14\Dashboard.ear.
    Reason: Exception while validating application local/Dashboard.
    No one of the [] containers, which processed it, returned deployed component names.
    The registered containers in this moment were [com.sap.security.ume, app_libraries_container, Cache Configuration Upload, servlet_jsp, dbcontentcontainer, connector, Cluster File System, JMSConnector, appclient, dbschemacontainer, orpersistence, JDBCConnector, EJBContainer, webservices_container, scheduler~container].
    Possible reasons :
         1.An AS Java service, which is providing a container, is stopped or not deployed.
         2.The containers, which processed it, are not implemented correct. They deployed or started initially the application, but didn't return deployed components in the application deployment info.###
    #1.5 #000C296B3F6A000D0000002F00000A3000EF90978C2E8C29#1183013784428#/System/Server/Deployment##com.sap.engine.services.tcxblxdeploy_controller#Administrator#4#####Thread[RMI/IIOP Worker [3],5,Dedicated_Application_Thread]##0#0#Info#1#com.sap.engine.services.tcxblxdeploy_controller#Plain###Deployment has finished#
    Thanks,
    MK

  • Getting java.lang.NullpointerException while closing resultset aft using it

    Hi,
    I kindly request to share your ideas reg. my problem.
    I am opening a database connection using connection pool and i am using two or more resultsets and statement objects.I am closing these objects at the end of their usage.But i am getting java.lang.NullpointerException when i close them(if i don't close them it works fine). what might be the reason. Had i did any thing wrong in the code.
    please view the code
    public String storeNewConnection(String CIRCLE,String DIVISION,String SUB_DIVISION,String SECTION,String CONSUMER_NAME,String FATHER_NAME,String STREET_NAME,String DOOR_NO,String TOWN_CITY,String LAND_MARK,String PINCODE,String STDCODE,String PHONE_NO,String EMAIL,String NEIGHBOUR_SCNO,String DOCUMENT_CODE,String LT_APR_NO,String year1,String month1,String day1,String PCBNO,String CONSUMER_STATUS,String SOCIAL_GROUP,String CATEGORY_SUPPLY,String LOCATION_PREMISES,String PURPOSE_OF_SUPPLY,String DURATION,String LOAD_TYPE,String CONNECTED_LOAD,String CONTRACTED_LOAD,String APPLICATION_FEE,String DEVELOPMENT_CHARGES,String SECURITY_DEPOSIT,String ADDL_SECURITY_DESPOSIT,String DEPOSITED_THRU,String DD_CHEQUE_DETAILS,String year2,String month2,String day2,String REMARKS,String POLE_NO)
              int count=0;
              Statement st=null;
              ResultSet rs=null,rs1=null,rs2=null,rs3=null;
              PreparedStatement pst=null;
              String result="",query="",sysDate="",sysDate2="";
              String reg_no = "";
              try
                   st=con.createStatement();
                   //Check dates with sys date
                   String date1 =null;                    
                   String date2 =null;
                   if(! (year1.equals("") || month1.equals("") || day1.equals("")) )
                        date1=day1+"-"+month1+"-"+year1;
                        rs2=st.executeQuery("select round(to_date('"+date1+"','dd-Mon-yyyy')-to_date(sysdate,'dd-Mon-yy')) from dual");
                        rs2.next();
                        if(rs2.getInt(1) != 0)
                             return "false";                              
                   if(! (year2.equals("") || month2.equals("") || day2.equals("")) )
                        date2=day2+"-"+month2+"-"+year2;
                        rs3=st.executeQuery("select round(to_date('"+date2+"','dd-Mon-yyyy')-to_date(sysdate,'dd-Mon-yy')) from dual");
                        rs3.next();
                        if(rs3.getInt(1) != 0)
                             return "false";     
                   rs1=st.executeQuery("select to_char(sysdate,'yyyyMONdd'),to_char(sysdate,'dd-Mon-yyyy') from dual");
                   rs1.next();
                   sysDate=rs1.getString(1);
                   sysDate2=rs1.getString(2);
                   rs=st.executeQuery("select max(SERIAL_NO) from NEW_CONNECTIONS where to_char(sysdate,'yyyy') = to_char(REG_DATE,'yyyy') and to_char(sysdate,'mm') = to_char(REG_DATE,'mm') and SUB_DIVISION_CODE = "+SUB_DIVISION+" and DIVISION_CODE = "+DIVISION+" and CIRCLE_CODE = "+CIRCLE+" ");
                   if(rs.next())
                        count = rs.getInt(1);
                        count++;                              
                   else
                        count=1;
                   query="insert into NEW_CONNECTIONS ( "+
                        " REG_NO,SERIAL_NO,REG_DATE,CIRCLE_CODE,DIVISION_CODE,SUB_DIVISION_CODE,SECTION_CODE, "+
                        " CONSUMER_NAME,FATHER_NAME,STREET_NAME,DOOR_NO,TOWN_CITY,LAND_MARK,PINCODE, "+
                        " STDCODE,PHONE_NO,EMAIL,NEIGHBOUR_SCNO,DOCUMENT_CODE,LT_APR_NO,LT_APR_DATE, "+
                        " PCBNO,CONSUMER_STATUS,SOCIAL_GROUP,CATEGORY_SUPPLY,LOCATION_PREMISES,PURPOSE_OF_SUPPLY,"+
                        " DURATION,LOAD_TYPE,CONNECTED_LOAD,CONTRACTED_LOAD,APPLICATION_FEE,DEVELOPMENT_CHARGES, "+
                        " SECURITY_DEPOSIT,ADDL_SECURITY_DEPOSIT,DEPOSITED_THRU,DD_CHEQUE_DETAILS,DD_CHEQUE_DATE,REMARKS,APPLICATION_STATUS,POLE_NO) "+
                        " values(?,?,'"+sysDate2+"',?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                   pst = con.prepareStatement(query);
                   String cnt ="";
                   if(count <= 9)
                        cnt="0000";
                   else if(count <= 99)
                        cnt="000";
                   else if(count <= 999)
                        cnt="00";
                   else if(count <= 9999)
                        cnt="0";
                   cnt+=Integer.toString(count);
                   reg_no = CIRCLE+DIVISION+SUB_DIVISION+SECTION+"N"+cnt+sysDate;               
                   int serial_no =count;
                   int pin = 0;
                   if(!PINCODE.equals(""))
                        pin =Integer.parseInt(PINCODE);
                   int std = 0;
                   if(!STDCODE.equals(""))
                        std = Integer.parseInt(STDCODE);
                   int status = Integer.parseInt(CONSUMER_STATUS);
                   int social_group = Integer.parseInt(SOCIAL_GROUP);
                   int supply = Integer.parseInt(CATEGORY_SUPPLY);
                   int location = Integer.parseInt(LOCATION_PREMISES);
                   int purpose = Integer.parseInt(PURPOSE_OF_SUPPLY);
                   int duration = Integer.parseInt(DURATION);
                   int laod_type = Integer.parseInt(LOAD_TYPE);
                   float conn_load = Float.parseFloat(CONNECTED_LOAD);
                   int cont_load = 0;
                   if(!CONTRACTED_LOAD.equals(""))
                        cont_load =Integer.parseInt(CONTRACTED_LOAD);
                   int app_fee = Integer.parseInt(APPLICATION_FEE);
                   int dev_chg = Integer.parseInt(DEVELOPMENT_CHARGES);
                   int sec_dep = Integer.parseInt(SECURITY_DEPOSIT);
                   int addl_sec_dep = 0;     
                   if(!ADDL_SECURITY_DESPOSIT.equals(""))
                        addl_sec_dep =Integer.parseInt(ADDL_SECURITY_DESPOSIT);
                   int dep_thru = Integer.parseInt(DEPOSITED_THRU);          
                   pst.setString(1,reg_no);
                   pst.setInt(2,serial_no);
                   pst.setString(3,CIRCLE);
                   pst.setString(4,DIVISION);
                   pst.setString(5,SUB_DIVISION);
                   pst.setString(6,SECTION);
                   pst.setString(7,CONSUMER_NAME);
                   pst.setString(8,FATHER_NAME);
                   pst.setString(9,STREET_NAME);
                   pst.setString(10,DOOR_NO);
                   pst.setString(11,TOWN_CITY);
                   pst.setString(12,LAND_MARK);
                   pst.setInt(13,pin);
                   pst.setInt(14,std);
                   pst.setString(15,PHONE_NO);
                   pst.setString(16,EMAIL);
                   pst.setString(17,NEIGHBOUR_SCNO);
                   pst.setString(18,DOCUMENT_CODE);
                   pst.setString(19,LT_APR_NO);
                   pst.setString(20,date1);
                   pst.setString(21,PCBNO);
                   pst.setInt(22,status);
                   pst.setInt(23,social_group);
                   pst.setInt(24,supply );
                   pst.setInt(25,location);
                   pst.setInt(26,purpose);
                   pst.setInt(27,duration);
                   pst.setInt(28,laod_type);
                   pst.setFloat(29,conn_load );
                   pst.setInt(30,cont_load);
                   pst.setInt(31,app_fee);
                   pst.setInt(32,dev_chg);
                   pst.setInt(33,sec_dep);
                   pst.setInt(34,addl_sec_dep);
                   pst.setInt(35,dep_thru );
                   pst.setString(36,DD_CHEQUE_DETAILS);
                   pst.setString(37,date2);
                   pst.setString(38,REMARKS);
                   pst.setInt(39,1);
                   pst.setString(40,POLE_NO);
                   pst.executeUpdate();
                   result=reg_no;                                   
                   rs.close();
                   rs=null;
                   rs1.close();
                   rs1=null;
                   rs2.close();
                   rs2=null;
                   rs3.close();
                   rs3=null;
                   st.close();
                   st=null;
                   pst.close();
                   pst=null;
              catch(Exception e)
                   e.printStackTrace();
                   result="false";
                   return result;
              finally
                   if (rs != null)
                        try
                             rs.close();
                        catch (SQLException e)
                        rs = null;
                   if (rs1 != null)
                        try
                             rs1.close();
                        catch (SQLException e)
                        rs1 = null;
                   if (rs2 != null)
                        try
                             rs2.close();
                        catch (SQLException e)
                        rs2 = null;
                   if (rs3 != null)
                        try
                             rs3.close();
                        catch (SQLException e)
                        rs3 = null;
                   if (st != null)
                        try
                             st.close();
                        catch (SQLException e)
                        st = null;
                   if (pst != null)
                        try
                             pst.close();
                        catch (SQLException e)
                        pst = null;
              return result;
    Also plz help me to improve the code if necessary so that it will work fine for multiple users
    thaks & regards
    Prasanth.C

    Thanks a lot.
    i replaced the code below
    if (rs != null)
                        try
                             rs.close();
                        catch (SQLException e)
                        rs = null;
                   if (rs1 != null)
                        try
                             rs1.close();
                        catch (SQLException e)
                        rs1 = null;
                   if (rs2 != null)
                        try
                             rs2.close();
                        catch (SQLException e)
                        rs2 = null;
                   if (rs3 != null)
                        try
                             rs3.close();
                        catch (SQLException e)
                        rs3 = null;
                   if (st != null)
                        try
                             st.close();
                        catch (SQLException e)
                        st = null;
                   if (pst != null)
                        try
                             pst.close();
                        catch (SQLException e)
                        pst = null;
    instead of blindly closing the resultsets and statements
    now it works fine.
    One more thing, is my code structurally correct, i mean the variables, try...catch blocks,results,statements,database connections and overall coding. whether it looks like professional code.
    thaks & regards,
    Prasanth.C

Maybe you are looking for