Jax-ws 2.2.8 and ws-addressing: Client throwing java.lang.NullPointerException on receipt of HTTP 202 when using non-anonymous ReplyTo address

Server: JBoss EAP 6.2.0
Client: JDK 1.7.0_51 x64
JAX-WS: RI 2.2.8 ( via -Djava.endorsed.dirs )
I am getting a java.lang.NullPointerException when calling the operation on the WS endpoint from the client when using non-anonymous replyTo address.
I have simplified the scenario into a small test case that hopefully others can replicate. Since the exception is happening on the client instead of the server, I would think that the container used is irrelevant, but I have specified it nonetheless.
1) WebService:
package test.webservice;
import java.util.Random;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.ws.soap.Addressing;
@WebService(targetNamespace="http://services.nowhere.org/")
@Addressing(required=true)
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
public class RandomTest {
    @WebMethod
    public long nextRandom(@WebParam boolean forceException) throws Exception {
        if( forceException ) {
            throw new Exception("Some exception");
        Random rand = new Random();
        return rand.nextLong();
2) Generated WSDL by JBossEAP 6.2.2:
<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://webservice.test/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="RandomTestService" targetNamespace="http://webservice.test/">
  <wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://webservice.test/" elementFormDefault="unqualified" targetNamespace="http://webservice.test/" version="1.0">
  <xs:element name="nextRandom" type="tns:nextRandom"/>
  <xs:element name="nextRandomResponse" type="tns:nextRandomResponse"/>
  <xs:complexType name="nextRandom">
    <xs:sequence/>
  </xs:complexType>
  <xs:complexType name="nextRandomResponse">
    <xs:sequence>
      <xs:element name="return" type="xs:long"/>
    </xs:sequence>
  </xs:complexType>
</xs:schema>
  </wsdl:types>
  <wsdl:message name="nextRandom">
    <wsdl:part element="tns:nextRandom" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="nextRandomResponse">
    <wsdl:part element="tns:nextRandomResponse" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="RandomTest">
    <wsdl:operation name="nextRandom">
      <wsdl:input message="tns:nextRandom" name="nextRandom" wsam:Action="http://webservice.test/RandomTest/nextRandomRequest" wsaw:Action="http://webservice.test/RandomTest/nextRandomRequest">
    </wsdl:input>
      <wsdl:output message="tns:nextRandomResponse" name="nextRandomResponse" wsam:Action="http://webservice.test/RandomTest/nextRandomResponse" wsaw:Action="http://webservice.test/RandomTest/nextRandomResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="RandomTestServiceSoapBinding" type="tns:RandomTest">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsaw:UsingAddressing wsdl:required="true"/>
    <wsp:PolicyReference URI="#RandomTestServiceSoapBinding_WSAM_Addressing_Policy"/>
    <wsdl:operation name="nextRandom">
      <soap:operation soapAction="" style="document"/>
      <wsdl:input name="nextRandom">
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="nextRandomResponse">
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="RandomTestService">
    <wsdl:port binding="tns:RandomTestServiceSoapBinding" name="RandomTestPort">
      <soap:address location="http://localhost:8080/servertest/RandomTest"/>
    </wsdl:port>
  </wsdl:service>
    <wsp:Policy xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="RandomTestServiceSoapBinding_WSAM_Addressing_Policy"><wsam:Addressing><wsp:Policy/></wsam:Addressing></wsp:Policy>
</wsdl:definitions>
3) ant build.xml to generate the client code from WSDL
<?xml version="1.0" encoding="UTF-8"?>
<project default="build" basedir="..">
    <property name="jaxws.classpath" location="C://jaxws-2.2.8/jaxws-ri/lib/*.jar"/>
    <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
           <classpath path="${jaxws.classpath}"/>
    </taskdef>
    <target name="build" >
        <!-- For these to work, the JAR files in tools/jaxws-ri must be included in Ant's classpath -->
        <wsimport wsdl="http://localhost:8080/servertest/RandomTest?wsdl"
               verbose="true"
               sourcedestdir="src"
               destdir="bin"
               keep="true">
               <xjcarg value="-enableIntrospection"/>
        </wsimport>
    </target>
</project>
4) Client code
4a) ClientTest.java - Actual client run from client
package test.wsclient;
import java.util.ArrayList;
import java.util.List;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Endpoint;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.soap.AddressingFeature;
import org.nowhere.services.RandomTest;
import org.nowhere.services.RandomTestService;
public class ClientTest {
    public static void main(String args[]) throws Exception {
        ClientTest app = new ClientTest();
        app.testAddressing();
    public void testAddressing() throws Exception {
        String REPLY_TO_ADDRESS = "http://localhost:8082/servertest/RandomCallback";
        String FAULT_TO_ADDRESS = "http://localhost:8082/servertest/RandomCallbackFault";
        RandomTestService service = new RandomTestService();
        RandomTest port = service.getRandomTestPort(new AddressingFeature());
        BindingProvider provider = (BindingProvider) port;
        // pass the replyTo address to the handler
        provider.getRequestContext().put("ReplyTo", REPLY_TO_ADDRESS);
        provider.getRequestContext().put("FaultTo", FAULT_TO_ADDRESS);
        // Register handlers to set the ReplyTo and FaultTo on the SOAP request sent to the WS endpoint
        List<Handler> handlerChain = new ArrayList<Handler>();
        handlerChain.add(new ClientHandler());
        provider.getBinding().setHandlerChain(handlerChain);
        // Start endpoint to receive callbacks from WS
        Endpoint endpoint = Endpoint.publish(REPLY_TO_ADDRESS, new CallbackSEI());
        try {
            port.nextRandom(false);
        } catch( Exception ex ) {
            ex.printStackTrace();
        } finally {
            Thread.sleep(10000);
        endpoint.stop();
        System.exit(0);
4b) ClientHandler.java - Used to set the wsa ReplyTo address and FaultTo address when sending SOAP request from client to server
package test.wsclient;
import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPHeader;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.MessageContext.Scope;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
public class ClientHandler implements SOAPHandler<SOAPMessageContext> {
    public ClientHandler() {};
    @Override
    public Set<QName> getHeaders() {
        return null;
    @Override
    public void close(MessageContext arg0) {
    @Override
    public boolean handleFault(SOAPMessageContext context) {
        return true;
    protected void setAnAddress(SOAPHeader header, String tagName, String address) {
        NodeList nodeListReplyTo = header.getElementsByTagName(tagName);
        NodeList nodeListAddress = nodeListReplyTo.item(0).getChildNodes();
        for (int i = 0; i < nodeListAddress.getLength(); i++) {
            Node node = nodeListAddress.item(i);
            if ("Address".equals(node.getLocalName())) {
                node.setTextContent(address);
                break;
    protected String getMessageID(SOAPHeader header) {
        NodeList nodeListMessageId = header.getElementsByTagName("MessageID");
        return nodeListMessageId.item(0).getTextContent();
    @Override
    public boolean handleMessage(SOAPMessageContext context) {
        Boolean isOutbound = (Boolean) context.get(SOAPMessageContext.MESSAGE_OUTBOUND_PROPERTY);
        if (isOutbound) {
            try {
                SOAPEnvelope envelope = context.getMessage().getSOAPPart().getEnvelope();
                SOAPHeader header = envelope.getHeader();
                /* extract the generated MessageID */
                String messageID = getMessageID(header);
                context.put("MessageID", messageID);
                context.setScope("MessageID", Scope.APPLICATION);
                /* change ReplyTo address */
                setAnAddress(header, "ReplyTo", (String) context.get("ReplyTo"));
                setAnAddress(header, "FaultTo", (String) context.get("FaultTo"));
            } catch (Exception ex) {
                throw new RuntimeException(ex);
        return true;
4c) CallbackSEI.java - endpoint on the client for server to send the SOAP response back to the client
package test.wsclient;
import javax.annotation.Resource;
import javax.jws.Oneway;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.ws.Action;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.soap.Addressing;
@WebService
@Addressing
//@HandlerChain(file = "/handler-chain.xml")
public class CallbackSEI {
    @Resource
    private WebServiceContext context;
     * If there is no namespace specified in the method below, then the CallbackSEI needs to be in the same package as the
     * WS endpoint.
    @Oneway
    @Action(input="http://services.nowhere.org/RandomTest/nextRandomResponse")
    @RequestWrapper(localName="nextRandomResponse", targetNamespace="http://services.nowhere.org/")
    public void handleNotification(@WebParam(name="return")long random) {
        System.out.println("Asynch response received");
        System.out.println( random );
        //System.out.println("This response relates to the message ID: "+ getMessageID());
In summary:
Server is listening on port 8080
Client will listen in port 8082 for the callback from the server for the SOAP response
Now when I run the client, I see that the proper behaviour as far as ws-addressing is concerned. That is:
client  -- SOAP request ( on port 8080 ) --> server
client <-- HTTP 202 ( empty HTTP body )  --- server
client <-- SOAP response ( on port 8082 )  --- server
All well and good, except that I am getting a NullPointerException on the client side when I call the operation.
With debugging of the SOAP request and responses, I get the following output:
---[HTTP request - http://localhost:8080/servertest/RandomTest]---
Accept: text/xml, multipart/related
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://services.nowhere.org/RandomTest/nextRandomRequest"
User-Agent: JAX-WS RI 2.2.8 svn-revision#13980
<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><S:Header><To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:8080/servertest/RandomTest</To><Action xmlns="http://www.w3.org/2005/08/addressing">http://services.nowhere.org/RandomTest/nextRandomRequest</Action><ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
    <Address>http://localhost:8082/servertest/RandomCallback</Address>
</ReplyTo><FaultTo xmlns="http://www.w3.org/2005/08/addressing">
    <Address>http://localhost:8082/servertest/RandomCallbackFault</Address>
</FaultTo><MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:bcd2f6ef-3034-49e8-b837-dbd6a772fb93</MessageID></S:Header><S:Body><ns2:nextRandom xmlns:ns2="http://services.nowhere.org/"><arg0>false</arg0></ns2:nextRandom></S:Body></S:Envelope>--------------------
---[HTTP response - http://localhost:8080/servertest/RandomTest - 202]---
null: HTTP/1.1 202 Accepted
Content-Length: 0
Content-Type: text/xml;charset=UTF-8
Date: Fri, 18 Jul 2014 08:34:36 GMT
Server: Apache-Coyote/1.1
java.lang.NullPointerException
    at com.sun.proxy.$Proxy38.nextRandom(Unknown Source)
    at test.wsclient.ClientTest.testAddressing(ClientTest.java:43)
    at test.wsclient.ClientTest.main(ClientTest.java:18)
---[HTTP request]---
Cache-control: no-cache
Host: localhost:8082
Content-type: text/xml; charset=UTF-8
Content-length: 704
Connection: keep-alive
Pragma: no-cache
User-agent: Apache CXF 2.7.7.redhat-1
Accept: */*
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><Action xmlns="http://www.w3.org/2005/08/addressing">http://services.nowhere.org/RandomTest/nextRandomResponse</Action><MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:65d8d7fc-09e4-494a-a9c5-0a01faf4d7e6</MessageID><To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:8082/servertest/RandomCallback</To><RelatesTo xmlns="http://www.w3.org/2005/08/addressing">uuid:bcd2f6ef-3034-49e8-b837-dbd6a772fb93</RelatesTo></soap:Header><soap:Body><ns2:nextRandomResponse xmlns:ns2="http://services.nowhere.org/"><return>2870062781194370669</return></ns2:nextRandomResponse></soap:Body></soap:Envelope>--------------------
Asynch response received
2870062781194370669
As you can see from the output above, the proxy is throwing an Exception when it receives the HTTP 202 response.
Any ideas ?

I think I have found when I get this error and probably I have found a bug. I will appreciate if someone can confirm this.
In my BPEL project setup, my BPEL process's wsdl file imports another wsdl from different namespace. Here is sample snippet -
<wsdl:definitions targetNamespace="http://namespace/1">
<wsdl:import namespace="http://namespace/2" location="resources/another.wsdl"/>
<plnk:partnerLinkType....../>
</wsdl:definitions>
Please let me know. I checked the bundled samples with Oracle BPEL PM and did not find any similar case where process wsdl imports another wsdl.
Thank you.
Meghana

Similar Messages

  • Help with arrays and Exception in thread "main" java.lang.NullPointerExcept

    Hi, I have been having trouble all day getting this array sorted and put into a new array. I think it is something simple with my nested loops in sortCityArray() that is causing the problem. Any help would be greatly appreciated. The error is thrown on line 99 at Highway.sortCityArray(Highway.java:99)
    import java.util.Scanner;
    import java.io.*;
    import java.util.Arrays;
    public class Highway
    private String[] listOfCities=new String[200];
    private City[] cityArray=new City[200];
    private City[] sortedCityArray=new City[200];
    private String city="";
    private String city2="";
    private String fileName;
    private City x;
    private int milesToNextCity;
    private int milesAroundNextCity;
    private int speedToNextCity;
    public Highway(String filename)
    String fileName=filename;//"I-40cities.txt";
           File myFile = new File(fileName);
           try {
           Scanner scan=new Scanner(myFile);
           for(int i=0; scan.hasNextLine(); i++){
           String city=scan.nextLine();
           String city2=scan.nextLine();
           int milesToNextCity=scan.nextInt();
           int milesAroundNextCity=scan.nextInt();
           int speedToNextCity=scan.nextInt();
                   if(scan.hasNextLine()){
              scan.nextLine();
           cityArray=new City(city,city2,milesToNextCity,milesAroundNextCity,speedToNextCity);
    // System.out.println(cityArray[i].getCity());
    // System.out.println(cityArray[i].getNextCity());
    // System.out.println(cityArray[i].getLengthAB());
    // System.out.println(cityArray[i].getLengthAroundB());
    // System.out.println(cityArray[i].getSpeedAB());
    catch (Exception e) {
    System.out.println(e);
    //return cityArray;
    /*public City[] doCityArray(){
    File myFile = new File(fileName);
    try {
    Scanner scan=new Scanner(myFile);
    for(int i=0; scan.hasNextLine(); i++){
    String city=scan.nextLine();
    String city2=scan.nextLine();
    int milesToNextCity=scan.nextInt();
    int milesAroundNextCity=scan.nextInt();
    int speedToNextCity=scan.nextInt();
         if(scan.hasNextLine()){
              scan.nextLine();
    cityArray[i]=new City(city,city2,milesToNextCity,milesAroundNextCity,speedToNextCity);
    // System.out.println(cityArray[i].getCity());
    // System.out.println(cityArray[i].getNextCity());
    // System.out.println(cityArray[i].getLengthAB());
    // System.out.println(cityArray[i].getLengthAroundB());
    // System.out.println(cityArray[i].getSpeedAB());
    catch (Exception e) {
    System.out.println(e);
    return cityArray;
    public City[] sortCityArray(){
    sortedCityArray[0]=new City(cityArray[0].getCity(),cityArray[0].getNextCity(),cityArray[0].getLengthAB(),cityArray[0].getLengthAroundB(),cityArray[0].getSpeedAB());
    for(int j=0; j<cityArray.length; j++ )
         for(int i=0; i<cityArray.length ;i++)
              if(sortedCityArray[j].getNextCity().equals(cityArray[i].getCity())){
              sortedCityArray[j+1]=new City(cityArray[i].getCity(),cityArray[i].getNextCity(),cityArray[i].getLengthAB(),cityArray[i].getLengthAroundB(),cityArray[i].getSpeedAB());
              break;
    /*     for(int i=0; i<cityArray.length ;i++)
              if(sortedCityArray[j].getNextCity().equals(cityArray[i].getCity())){
              sortedCityArray[j+1]=new City(cityArray[i].getCity(),cityArray[i].getNextCity(),cityArray[i].getLengthAB(),cityArray[i].getLengthAroundB(),cityArray[i].getSpeedAB());
         break;
              for(int i=0; i<cityArray.length ;i++)
              if(sortedCityArray[j].getNextCity().equals(cityArray[i].getCity())){
              sortedCityArray[j+1]=new City(cityArray[i].getCity(),cityArray[i].getNextCity(),cityArray[i].getLengthAB(),cityArray[i].getLengthAroundB(),cityArray[i].getSpeedAB());
         break;
              for(int i=0; i<cityArray.length ;i++)
              if(sortedCityArray[j].getNextCity().equals(cityArray[i].getCity())){
              sortedCityArray[j+1]=new City(cityArray[i].getCity(),cityArray[i].getNextCity(),cityArray[i].getLengthAB(),cityArray[i].getLengthAroundB(),cityArray[i].getSpeedAB());
         break;
    //     j++;
    System.out.println(sortedCityArray[0].getCity());
    System.out.println(sortedCityArray[0].getNextCity());
    System.out.println(sortedCityArray[0].getLengthAB());
    System.out.println(sortedCityArray[0].getLengthAroundB());
    System.out.println(sortedCityArray[0].getSpeedAB());
    System.out.println(sortedCityArray[1].getCity());
    System.out.println(sortedCityArray[1].getNextCity());
    System.out.println(sortedCityArray[1].getLengthAB());
    System.out.println(sortedCityArray[1].getLengthAroundB());
    System.out.println(sortedCityArray[1].getSpeedAB());
    System.out.println(sortedCityArray[2].getCity());
    System.out.println(sortedCityArray[2].getNextCity());
    System.out.println(sortedCityArray[2].getLengthAB());
    System.out.println(sortedCityArray[2].getLengthAroundB());
    System.out.println(sortedCityArray[2].getSpeedAB());
    System.out.println(sortedCityArray[3].getCity());
    System.out.println(sortedCityArray[3].getNextCity());
    System.out.println(sortedCityArray[3].getLengthAB());
    System.out.println(sortedCityArray[3].getLengthAroundB());
    System.out.println(sortedCityArray[3].getSpeedAB());
    System.out.println(sortedCityArray[4].getCity());
    System.out.println(sortedCityArray[4].getNextCity());
    System.out.println(sortedCityArray[4].getLengthAB());
    System.out.println(sortedCityArray[4].getLengthAroundB());
    System.out.println(sortedCityArray[4].getSpeedAB());
    return cityArray;
    /*public String[] listOfCities(){
    File myFile = new File("I-40cities.txt");
    try {
    Scanner scan=new Scanner(myFile);
    for(int i=0; scan.hasNextLine(); i++){
         String city=scan.nextLine();
         city=city.trim();
    scan.nextLine();
    scan.nextLine();
         listOfCities[i]=city;
         System.out.println(listOfCities[i]);
    catch (Exception e) {
    System.out.println(e);
    return listOfCities;
    public static void main(String args[]) {
    Highway h = new Highway("out-of-order.txt");
    h.sortCityArray();

    the ouput is perfect according to the print lines if I use (increase the int where j is in the loop manually by one) :
         for(int i=0; i<cityArray.length ;i++)
              if(sortedCityArray[0].getNextCity().equals(cityArray.getCity())){
              sortedCityArray[0+1]=new City(cityArray[i].getCity(),cityArray[i].getNextCity(),cityArray[i].getLengthAB(),cityArray[i].getLengthAroundB(),cityArray[i].getSpeedAB());
              break;
         for(int i=0; i<cityArray.length ;i++)
              if(sortedCityArray[1].getNextCity().equals(cityArray[i].getCity())){
              sortedCityArray[1+1]=new City(cityArray[i].getCity(),cityArray[i].getNextCity(),cityArray[i].getLengthAB(),cityArray[i].getLengthAroundB(),cityArray[i].getSpeedAB());
         break;
              for(int i=0; i<cityArray.length ;i++)
              if(sortedCityArray[2].getNextCity().equals(cityArray[i].getCity())){
              sortedCityArray[2+1]=new City(cityArray[i].getCity(),cityArray[i].getNextCity(),cityArray[i].getLengthAB(),cityArray[i].getLengthAroundB(),cityArray[i].getSpeedAB());
         break;
              for(int i=0; i<cityArray.length ;i++)
              if(sortedCityArray[3].getNextCity().equals(cityArray[i].getCity())){
              sortedCityArray[3+1]=new City(cityArray[i].getCity(),cityArray[i].getNextCity(),cityArray[i].getLengthAB(),cityArray[i].getLengthAroundB(),cityArray[i].getSpeedAB());
         break;
    But I cant do this for 200 elements. Are the loops nested right?
    Edited by: modplan on Sep 22, 2008 6:49 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Make sure Webserver and Appserver are up. java.lang.NullPointerException

    I redeployed PIA (websphere version 6.1.0.3) Aix 5.3
    Webserver / Apps boot up fine and 3 tier login works perfect.
    While trying to login to the Apps (PIA) i get following Error
    Please make sure Webserver and Appserver are up.
    java.lang.NullPointerException
    i also reinstalled PIA for another instance on the same server... that is working fine.
    I checked the PIAinstall.log as well .. that also looks fine.
    I have increased the Java Heap size but that also dint help..
    Can anyone help or adivse on this ...Thanks

    Vishal,
    Is it the follow of your previous thread ? Re: Issue with PeopleSoft Sign-on url....not able to get the signon page
    Wouldn't it be Weblogic11gR1 ?
    Did you upgraded your FSCM 8.9 database to Peopletools 8.50 ?
    It seems you are not using fixed IP address and /etc/hosts not updated correctly (127.0.0.1 should not be used here).
    OS ?
    I checked the PSMSGNODEDEFN table and the node PSFT_EP is the default node and not the PT_LOCAL. Can this be the reason or something else? I'm not sure to understand you is wrong there. Why would you want PT_LOCAL ?
    Error in service HomepageT, CREF with URL can not be foundAre you using Portal ?
    This error is described here : HomepageT, CREF with URL can not be found ID 624799.1+
    Nicolas.

  • "AWT-EventQueue-0" java.lang.NullPointerException and JInternalFrame

    I have two classes one with main method second with GUI methods (JFrame, JInternalFrame). When I call method to start second JInternalFrame from main everything is working but if i call it form any other method i get:
    Exception in thread "main" java.lang.NullPointerException
    at pkg1.GUI.createFrame(GUI.java:123)
    at pkg1.GUI.startFrame2(GUI.java:66)
    at pkg1.Top.cos(Top.java:25)
    at pkg1.Top.main(Top.java:20) My code:
    GUI class
    package pkg1;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Frame;
    import java.awt.Toolkit;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JDesktopPane;
    import javax.swing.JFrame;
    import javax.swing.JInternalFrame;
    import javax.swing.JPanel;
    import javax.swing.plaf.basic.BasicInternalFrameUI;
    import oracle.jdeveloper.layout.XYLayout;
    public class GUI
        public JDesktopPane desktop;
        private XYLayout xYLayout1 = new XYLayout();
        public int openFrameCount = 0;
        JFrame f = new JFrame();
        public void GUII()  // Prepare JFrame
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setSize(500, 600);
            f.setVisible(true);
        public void startFrame()
            desktop = new JDesktopPane();
            createFrame(); //create first "window"
            f.setContentPane(desktop);
            desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
        public void startFrame2()
            createFrame(); //create second "window"
            f.setContentPane(desktop);
            desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
        public void createFrame()
            MyInternalFrame frame = new MyInternalFrame();
            frame.setVisible(true); //necessary as of 1.3
            desktop.add(frame);
            frame.add(new GUI2());
        } Top class
    public class Top
        public static void main(String[] args)
            GUI g = new GUI();
            g.GUII(); //Create JFrame
            g.startFrame(); //Create JInternalFrame
            Top t = new Top();
            t.sth();
        public void sth()
            GUI gui = new GUI();
            gui.startFrame2();
    } MyIntternalFrame class
    import javax.swing.JInternalFrame;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.SwingConstants;
    import oracle.jdeveloper.layout.XYConstraints;
    import oracle.jdeveloper.layout.XYLayout;
    /* Used by InternalFrameDemo.java. */
    public class MyInternalFrame extends JInternalFrame {
        static int openFrameCount =  0;      
        static final int xOffset = 30, yOffset = 30;
        private XYLayout xYLayout1 = new XYLayout();
        private JButton jButton1 = new JButton();
        private JLabel jLabel1 = new JLabel();
        private JFrame c = new JFrame();
        private JPanel d = new JPanel();
        private XYLayout xYLayout2 = new XYLayout();
        public MyInternalFrame() {         
            super("Document #"  + (++openFrameCount),true /*resizable*/,true /*closable*/,true /*maximizable*/,true);//iconifiable*/
            //...Create the GUI and put it in the window...
            //...Then set the window size or call pack...
            int width = new GUI2().width + 10;
            int height = new GUI2().height + 40;
            setSize(width,height);
            setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
    } Please tel me where is my mistake or maybe you knew another way to open JInternalFrame with public method form another class

    Some possibly helpful suggestions:
    1) Create one JDesktopPane, and do it in the constructor of GUI. You should call this constructor only once.
    2) Get rid of GUII. The GUI constructor will do all this and more.
    3) Get rid of startFrame and startFrame2.
    4) In GUI2, change your width and height to static variables if you are going to use them in outside classes. There is no reason to have to create a GUI2 object just to get those values. Get them from the class, not the instances.
    5) You're doing something funky in your Top class with your mixing of static code and non-static code. My gut tells me that Top is just a static universe that exists to get your code up and running, and that the code within it should all be static, but that's just my personal opinion.
    6) In MyInternalFrame, get the height and width from GUI2 (if that's what you want to do) again in a static fashion. Rather than new GUI2().width which makes no sense, use GUI2.width.
    Why can't you put the button inside of the JInternalFrame object? I believe that the contentPane of this object which may hold your button (unless you embed a jpanel) uses BorderLayout, so you have to take care how you add jcomponents to the jinternalframe (or more precisely, it's contentPane).

  • Validate failure and report java.lang.NullPointerException

    there are three required textinput field in my dialog window . after input data into them, i click button to commit data, meet the validate failure error . report a java.lang.NullPointerException at these three fields bottom. others non-required fields has no error.
    The error message in page is
    JBO-35007: Row currency has changed .... need oracle.jbo.Key[5 ] -
    Length - java.lang.NullPointerException
    RollId - java.lang.NullPointerException
    VatId - java.lang.NullPointerException
    and in application.log is
    08/02/24 12:48:15.951 fabricmis: Servlet error
    java.lang.NullPointerException
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
         at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.webcache.adf.filter.PageCachingFilter.doFilter(PageCachingFilter.java:232)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)

    the log in debug mode
    08/03/01 16:31:45 [22632] Failed to validate :1 for binding:VatId
    2008-3-1 16:31:45 oracle.adf.view.faces.util.MessageFactory getMessage
    Warning:
    java.lang.NullPointerException
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.validateAttributeValue(JUCtrlValueBinding.java:757)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.validateInputValue(JUCtrlValueBinding.java:2128)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding$AttrValidator.validate(FacesCtrlAttrsBinding.java:189)
         at oracle.adf.view.faces.component.UIXEditableValue.validateValue(UIXEditableValue.java:378)
         at oracle.adf.view.faces.component.UIXEditableValue.validate(UIXEditableValue.java:206)
         at oracle.adf.view.faces.component.UIXEditableValue._executeValidate(UIXEditableValue.java:522)
         at oracle.adf.view.faces.component.UIXEditableValue.processValidators(UIXEditableValue.java:302)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
         at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
         at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
         at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
         at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
         at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
         at oracle.adf.view.faces.component.UIXForm.processValidators(UIXForm.java:59)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
         at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
         at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
         at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
         at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:932)
         at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:362)
         at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:98)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.webcache.adf.filter.PageCachingFilter.doFilter(PageCachingFilter.java:274)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)

  • Call RFC and receive a java.lang.NullPointerException  ...

    Hello,
    I develop a RFC adaptative project.
    When i execute the application, i obtain the following exception:
       java.lang.NullPointerException
        at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModelClass.createNewBaseTypeDescriptor(AiiModelClass.java:256)
        at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModelClass.descriptor(AiiModelClass.java:222)
        at com.sap.tut.wd.rodlist.model.Ztest_Rod_Input.<init>(Ztest_Rod_Input.java:51)
        at com.sap.tut.wd.rodocomponent.RodoCust.wdDoInit(RodoCust.java:98)
        at com.sap.tut.wd.rodocomponent.wdp.InternalRodoCust.wdDoInit(InternalRodoCust.java:130)
        ... 45 more
    Ztest_Rod_Input is my adaptative RFC ...
    This excception appears with the following code line:
    > ztest_rod_Input input = new ztest_rod_Input();
    I tried with a known BAPI in other project and i don't have this exception ...
    Have you any suggestions ?
    Thanks a lot,
    Rodolphe.

    Hi Arch,
    I execute your code and in the Input View i enter the following code:
    >  public void onActionSearch  {
    >String RFCelement = wdContext.currentContextElement().getLocalMatnr();
    >wdThis.wdGetRodoCustController().wdGetContext().currentZtest_Rod_InputElement().setMatnr(RFCelement);
    > wdThis.wdGetRodoCustController().executeZtest_Rod_Input();
    When the user complete the input field and he execute the button Search ...
    i obtain the following exception:
    java.lang.NullPointerException
        at com.sap.tut.wd.rodocomponent.InputRodView.onActionSearch(InputRodView.java:145)
        at com.sap.tut.wd.rodocomponent.wdp.InternalInputRodView.wdInvokeEventHandler(InternalInputRodView.java:140)
        at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
        at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
        at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
        ... 26 more
    Then when i look  the SDL server log i see:
    #1141 05/06/2008 14:06:04.607 [SAPEngine_Application_Thread[impl:3]_12] ERROR com.sap.lcrabapapi.ejb.AbapSLDRequestBean: Caught an Exception while processing a JCO request. Check the RFC engine for sanity and check your server logs and traces for more information.
    Thrown:
    java.lang.NullPointerException
    Rodolphe

  • Is it possible to flag e-mails and/or right click an e-mail to mark as read/unread, etc. when using Microsoft Outlook Web Access in Firefox on a Mac?

    Is it possible to flag e-mails and/or right click an e-mail to mark as read/unread, etc. when using Microsoft Outlook Web Access in Firefox on a Mac?
    == This happened ==
    Every time Firefox opened
    == I've never been able to figure out how to do those things in Firefox.

    When you use OWA in something other than IE, you're using OWA lite and no--it is not possible to do either in OWA lite (well, new Exchange stuff makes my answer a little less emphatic but still: pretty much no). Thanks Microsoft. But this guy made it possible to mark unread/read and select all/none:
    http://david-burger.blogspot.com/2008/07/firefox-greasemonkey-outlook-web-access_19.html

  • Java.lang.NullPointerException with and update statement

    Hello,
    I'm getting this exception:
    java.lang.NullPointerException
         phaseone.AlbumModel.updateImageTrackerAlbums(AlbumModel.java:313)
         phaseone.AlbumModel.processRequest(AlbumModel.java:228)
         phaseone.AlbumModel.doGet(AlbumModel.java:522)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    I have an open method called before this one that connects me to the database. It works fine and have it working with a bunch of other methods but this one gives me this exception. i've even hard coded the variable 'user' and 'albumNumber' with information that exists in the database. i can't see where this logical error is coming from. I appreciate the help. I've been on this for 3 1/2 hour going blind. thanks!!
    public boolean updateImageTrackerAlbums(String user, int albumNumber){
              PreparedStatement pstmt = null;
              boolean pass = false;
              String query = "update imagetracker set totalalbums = ? where username = ?";
              try{
              pstmt = conn.prepareStatement(query);
              pstmt.setInt(1, albumNumber);
              pstmt.setString(2, user);
             int x = pstmt.executeUpdate();
             if (x >= 1){
             pass = true;
              }catch(SQLException e){
                e.printStackTrace();
                return pass;
              }finally{
              DBUtil.closePreparedStatment(pstmt);
              return pass;
              }

    code3 wrote:
    The exception is pointing to this:
    pstmt = conn.prepareStatement(query);
    Do you understand anyway when a NullPointerException would be thrown? It will be thrown if you try to access/invoke an object reference which is actually null.
    Connection conn = null;
    pstmt = conn.prepareStatement(query); // Throws NPE because conn is null.

  • Java.lang.NullPointerException while invoking Weblogic10 Webservice JAX-RPC

    hello,
    I'm facing this Eception while invoking the Webservice
    10/03/2009 01:39:19 Ú gosi.business.batch.financialaccounting.gosiSambaRets.controller.SambaClient callUploadPayment
    SEVERE: null
    java.lang.NullPointerException
    at com.bea.staxb.buildtime.internal.bts.XmlTypeName.findTypeIn(XmlTypeName.java:555)
    at weblogic.wsee.bind.runtime.internal.AnonymousTypeFinder.getTypeNamed(AnonymousTypeFinder.java:73)
    at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.createBindingTypeFrom(Deploytime109MappingHelper.java:1088)
    at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.processTypeMappings(Deploytime109MappingHelper.java:519)
    at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.initBindingFileFrom109dd(Deploytime109MappingHelper.java:266)
    at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.<init>(Deploytime109MappingHelper.java:166)
    at weblogic.wsee.bind.runtime.internal.RuntimeBindingsBuilderImpl.createRuntimeBindings(RuntimeBindingsBuilderImpl.java:86)
    at weblogic.wsee.ws.WsBuilder.createRuntimeBindingProvider(WsBuilder.java:709)
    at weblogic.wsee.ws.WsBuilder.buildService(WsBuilder.java:409)
    at weblogic.wsee.ws.WsFactory.createClientService(WsFactory.java:45)
    at weblogic.wsee.jaxrpc.ServiceImpl.init(ServiceImpl.java:154)
    at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:122)
    at com.samba.service.client.GosiPaymentSambaServices_Impl.<init>(Unknown Source)
    at com.samba.service.client.GosiPaymentSambaServices_Impl.<init>(Unknown Source)
    please can some one help me??

    user564706 wrote:
    Hi support,
    I installed cluster
    I installed Oracle ASM home
    using netca from ASM hom i cretaed listener
    Then while invoking dbca from ASM home to cretae asm instance i got the error:
    exceptio in thread "main" java.lang.NullPointerException
    at
    oracle.sysman.assistants....
    so using netca from asm home i deleted the listener and invokded dbca from asm home and it looks for the listener and since it is not there it automatically cretaes (after i confirm ok)and the asm instance cretaed.
    so is it the normal behaviour.What is the version?
    Why you are using DBCA from ASM_HOME ?
    you can use ASMCA from ASM_HOME if 11g.
    DBCA to create database from RDBMS_HOME/ORACLE_HOME
    You have very bad stats of your profile.
    user564706      
         Newbie
    Handle:      user564706
    Status Level:      Newbie
    Registered:      Mar 19, 2007
    Total Posts:      258
    Total Questions:      202 (200 unresolved)
    Out of 202 questions only 2 resolved, please check may be those also unresolved ;-)
    Keep the forum clean, close all your threads as answered. Read Etiquette. https://forums.oracle.com/forums/ann.jspa?annID=718
    Edited by: CKPT on Feb 22, 2012 6:56 AM

  • Java.lang.NullPointerException and ConnectionPool problem

    refresh page , problem gone
    java.lang.NullPointerException
    at Deferment.UpdatePostgraduate.getStatus(UpdatePostgraduate.java:278)
    at Deferment.UpdatePostgraduate.doPost(UpdatePostgraduate.java:175)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:402)
    at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    UpdatePostgraduate.java:278
    ->while (rs.next()) {
    175-> tarCount=getStatus(userid);
    now I have
    Connection conn = null;
    CallableStatement calstat=null;
    ResultSet rs = null;
    in every of my function
    and my
    public Connection getConnection()         throws SQLException, ServletException       {           Connection conn = null;           try{           pool.getConnection();           }catch (SQLException sqle) {             throw new ServletException(sqle.getMessage());         }           return conn;       }

    private DataSource pool = null; 
        int tarCount;
        int sendMail;
        @Override
        public void init() throws ServletException {
            Context env = null;
            try {
                env = (Context) new InitialContext().lookup("java:comp/env");
                pool = (DataSource) env.lookup("jdbc/test");
                if (pool == null) {
                    throw new ServletException(
                            "'jdbc/test' is an unknown DataSource");            }
            } catch (NamingException ne) {
                throw new ServletException(ne);
          public Connection getConnection()
            throws SQLException, ServletException
              Connection conn = null;
              try{
             conn=pool.getConnection();
              }catch (SQLException sqle) {
                System.out.println("JDBC error:" + sqle.getMessage());
                sqle.printStackTrace();
              return conn;
          }then on every function I call it like
    private int getFound(String UNumber) throws Exception {
            Connection conn = null;
            CallableStatement calstat=null;
            ResultSet rs = null;
            try {
                conn = pool.getConnection();
                calstat = (CallableStatement) conn.prepareCall("{call DuplicatePost(?)}");
                calstat.setString(1, UNumber);
                rs = calstat.executeQuery();
                tarCount = 0;
                while (rs.next()) {
                    tarCount++;
            } catch (SQLException se) {
                System.out.println("JDBC error:" + se.getMessage());
                se.printStackTrace();
            } catch (Exception e) {
                System.out.println("other error:" + e.getMessage());
                e.printStackTrace();
            } finally {
                try {
                    if (rs != null) {
                        rs.close();
                    if (calstat != null) {
                        calstat.close();
                } catch (SQLException e) {
                    e.printStackTrace();
            } //end finally
            return tarCount;
        }// end function
    }// end

  • Java.lang.NullPointerException when using DataSource connection and executing CallableStatement

    Hi Guys
    I am having some problem as I am using a DataSource for connections and randomly
    the CallableStatements and PreparedStatements created from this DataSource becomes
    null and everytime I get NullPointerException with this message.
    java.sql.SQLException: java.lang.NullPointerException
         at weblogic.jdbc.rmi.SerialPreparedStatement.setString(SerialPreparedStatement.java:210)
         at .........
    Help will be appreciated..

    Hi Guys
    I am having some problem as I am using a DataSource for connections and randomly
    the CallableStatements and PreparedStatements created from this DataSource becomes
    null and everytime I get NullPointerException with this message.
    java.sql.SQLException: java.lang.NullPointerException
         at weblogic.jdbc.rmi.SerialPreparedStatement.setString(SerialPreparedStatement.java:210)
         at .........
    Help will be appreciated..

  • Java.lang.nullpointerexception when I deactivate the poa and shutdown the o

    When I deactivate the poa and shutdown the orb I sometimes get this exception
    java.lang.NullPointerException
    at com.inprise.vbroker.orb.ORB.getThreadLocalObject(ORB.java:1050)
    at com.inprise.vbroker.orb.ServerThreadInfo.create(ServerThreadInfo.java:34)
    at com.inprise.vbroker.orb.TPDispatcherImpl.tls(TPDispatcherImpl.java:32)
    at com.inprise.vbroker.orb.ThreadPool$PoolWorker.run(ThreadPool.java:53)

    Typically try this:
    // for any object (class instance, array) anyObject
    if(anyObject == null) {
       // process in your own way
    }

  • JAX-RPC + Bean = deserialization error: java.lang.NullPointerException

    I�m trying to use a bean as return type from a web service method, but I get an error:
    deserialization error: java.lang.NullPointerException
    this is the class consuming the web service
    package local.jws;
    import local.jws.remote.TestBeanIF;
    import local.jws.remote.TestBean;
    import java.io.*;
    import java.net.URL;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.ServiceException;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.namespace.QName;
    public class Client implements java.io.Serializable
         private TestBean tb;
         private String somestring;
         public Client()
              try
                   String wsURL = "http://localhost:8080/webservice/testbean?WSDL";
                   String nameSpaceURI = "http://local.jws/wsdl/MyTestBean";
                   String portName = "TestBeanIFPort";
                   String serviceName = "MyTestBean";
                   URL serviceURL = new URL( wsURL );
                   ServiceFactory serviceFactory = ServiceFactory.newInstance();
                   QName qServiceName = new QName( nameSpaceURI, serviceName );
                   Service ws = serviceFactory.createService( serviceURL, qServiceName );
                   QName qPortName = new QName( nameSpaceURI, portName );
                   TestBeanIF myTestBeanIF = (TestBeanIF)ws.getPort( qPortName, local.jws.remote.TestBeanIF.class );
                   somestring = myTestBeanIF.getString();
                   tb = myTestBeanIF.getTestBean( "hello bean" );
              catch( Exception ex )
         public TestBean getTb()
              return this.tb;
         public void setTb( TestBean tb )
              this.tb = tb;
         public String getSomestring()
              return this.somestring;
         public void setSomestring( String value )
              this.somestring = value;
    this is the bean:
    package local.jws.beans;
    public class TestBean implements java.io.Serializable
         private String test;
         public TestBean(){ }
         public String getTest()
              return test;
         public void setTest( String value )
              this.test = value;
    this is the interface implementation:
    package local.jws;
    import local.jws.beans.TestBean;
    public class TestBeanImpl implements TestBeanIF
         public TestBean getTestBean( String value )
              TestBean tb = new TestBean();
              tb.setTest( value );
              return tb;
         public String getString()
              return "some string";
    using the getString() method works fine but getTestBean() doesn�t;
    any clue on this?
    thanks

    Hi,
    I'm experiencing exactly the same problem as you ...
    The only fix I found is to use static invocation ... with static invocation, WSCompile generates a deserializer and everything works fine, no mure NullPointer exception ...
    With dynamic invocation as you are trying to manage here, I didn't find any way to tell the client to use the deserializer generated with wscompile ...
    Does anyone know how to do it ?
    Thanks,
    Olivier

  • Java.lang.NullPointerException and javaBeans

    I think that part of the problem is due to some wonky requirements, but maybe not. There are three classes:
    lab02.util.MySlider -- has a JSlider and a few other bits
    lab02.util.ColorSelector -- has three JSliders and creates a Color (not a JColorChooser)
    lab02.view.View -- the driver and JFrame, has two ColorSelectors and JTextField
    However, a requirement is to have ColorSelector load as a jar file. The only way I could find of doing that was create two parallel projects: beans and lab2.
    I added MySlider to the palette for ColorSelector, and then added ColorSelector to the palette. Switching over the lab2 project, I added ColorSelector to View. When I received the following error:
    xception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at a00720398.lab02.util.MySlider.jSlider1StateChanged(MySlider.java:53)
            at a00720398.lab02.util.MySlider.access$000(MySlider.java:6)
            at a00720398.lab02.util.MySlider$1.stateChanged(MySlider.java:39)I then added both MySlider and ColorSlider to the Library Manager, and then added them to the library for lab2 project. Same result.
    Is it a coding problem? A netbeans problem? A packaging problem? I've tried some System.out statements to try to track it down but couldn't get anywhere.
    Keepin in mind that there are two projects with overlapping package structures, here's the code:
    thufir@arrakis:~/bcit3621$
    thufir@arrakis:~/bcit3621$ cat lab2beans/src/a00720398/lab02/util/MySlider.java
    package a00720398.lab02.util;
    import javax.swing.event.ChangeListener;
    public class MySlider extends javax.swing.JPanel {
        private ChangeListener changeListener;
        /** Creates new form MySlider */
        public MySlider() {
            initComponents();
        public MySlider(ChangeListener changeListener) {
            this();
            this.changeListener = changeListener;
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc="Generated
    Code">//GEN-BEGIN:initComponents
        private void initComponents() {
            bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
            jLabel1 = new javax.swing.JLabel();
            jSlider1 = new javax.swing.JSlider();
            jTextField1 = new javax.swing.JTextField();
            jLabel1.setText("jLabel1");
            add(jLabel1);
            jSlider1.setMaximum(255);
            jSlider1.addChangeListener(new javax.swing.event.ChangeListener() {
                public void stateChanged(javax.swing.event.ChangeEvent evt) {
                    jSlider1StateChanged(evt);
            add(jSlider1);
            org.jdesktop.beansbinding.Binding binding =
    org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
    jSlider1, org.jdesktop.beansbinding.ELProperty.create("${value}"), jTextField1,
    org.jdesktop.beansbinding.BeanProperty.create("text"));
            bindingGroup.addBinding(binding);
            add(jTextField1);
            bindingGroup.bind();
        }// </editor-fold>//GEN-END:initComponents
        private void jSlider1StateChanged(javax.swing.event.ChangeEvent evt)
    {//GEN-FIRST:event_jSlider1StateChanged
            // TODO add your handling code here:
            changeListener.stateChanged(evt);
        }//GEN-LAST:event_jSlider1StateChanged
        public void setName(String string) {
            jLabel1.setText(string);
        public int getValue() {
            return jSlider1.getValue();
        public void setValue(int value) {
            jSlider1.setValue(value);
        // Variables declaration - do not modify//GEN-BEGIN:variables
        private javax.swing.JLabel jLabel1;
        private javax.swing.JSlider jSlider1;
        private javax.swing.JTextField jTextField1;
        private org.jdesktop.beansbinding.BindingGroup bindingGroup;
        // End of variables declaration//GEN-END:variables
    thufir@arrakis:~/bcit3621$
    thufir@arrakis:~/bcit3621$ cat lab2beans/src/a00720398/lab02/util/ColorSelector.java
    package a00720398.lab02.util;
    import java.awt.Color;
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.ChangeListener;
    public class ColorSelector extends javax.swing.JPanel implements ChangeListener {
        private ChangeListener changeListener;
        private Color color;
        /** Creates new form ColorSelector */
        public ColorSelector() {
            initComponents();
        public ColorSelector(Color color) {
            //initComponents();
            red = new a00720398.lab02.util.MySlider(this);
            green = new a00720398.lab02.util.MySlider(this);
            blue = new a00720398.lab02.util.MySlider(this);
            setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.Y_AXIS));
            add(red);
            add(green);
            add(blue);
            this.color = color;
        public ColorSelector(Color color, ChangeListener changeListener) {
            //initComponents();
            this(color);
            this.changeListener = changeListener;
            //initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc="Generated
    Code">//GEN-BEGIN:initComponents
        private void initComponents() {
            red = new a00720398.lab02.util.MySlider();
            green = new a00720398.lab02.util.MySlider();
            blue = new a00720398.lab02.util.MySlider();
            setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.Y_AXIS));
            add(red);
            add(green);
            add(blue);
        }// </editor-fold>//GEN-END:initComponents
        // Variables declaration - do not modify//GEN-BEGIN:variables
        private a00720398.lab02.util.MySlider blue;
        private a00720398.lab02.util.MySlider green;
        private a00720398.lab02.util.MySlider red;
        // End of variables declaration//GEN-END:variables
        public void stateChanged(ChangeEvent arg0) {
            throw new UnsupportedOperationException("Not supported yet.");
            //color = new Color(red.getValue(), green.getValue(), blue.getValue());
        public Color getColor() {
            System.out.println("getColor   " + color);
            return color;
    thufir@arrakis:~/bcit3621$
    thufir@arrakis:~/bcit3621$ cat lab2/src/a00720398/lab02/view/Lab02View.java
    package a00720398.lab02.view;
    import a00720398.lab02.util.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Lab02View extends javax.swing.JFrame implements ChangeListener {
        private Color color;
        /** Creates new form Lab02View */
        public Lab02View() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc="Generated
    Code">//GEN-BEGIN:initComponents
        private void initComponents() {
            jTextArea1 = new javax.swing.JTextArea();
            colorSelector1 = new a00720398.lab02.util.ColorSelector();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(),
    javax.swing.BoxLayout.Y_AXIS));
            jTextArea1.setColumns(20);
            jTextArea1.setRows(5);
            getContentPane().add(jTextArea1);
            getContentPane().add(colorSelector1);
            pack();
        }// </editor-fold>//GEN-END:initComponents
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    //new Lab02View().setVisible(true);
                    JFrame frame = new Lab02View();
                    frame.setLocationRelativeTo(null);
                    frame.setSize(600,400);
                    frame.setVisible(true);
        public void stateChanged(ChangeEvent arg0) {
            throw new UnsupportedOperationException("Not supported yet.");
            //jTextArea1.setBackground(colorSelector1.getColor());
            //color = colorSelector1.getColor();
        // Variables declaration - do not modify//GEN-BEGIN:variables
        private a00720398.lab02.util.ColorSelector colorSelector1;
        private javax.swing.JTextArea jTextArea1;
        // End of variables declaration//GEN-END:variables
    thufir@arrakis:~/bcit3621$
    thufir@arrakis:~/bcit3621$ thanks,
    Thufir

    don't respond to this question, it's too "large". I'm creating another thread.

  • How o you gift a particular song in the Apple store FROM and iPad.  I do not see the down arrow that I see when using my IMac .

    How o you gift a particular song in the Apple store FROM and iPad.  I do not see the down arrow that I see when using my IMac .

    Search for shared library is impossible, as far as I know.  Searches supported - are local and internet.

Maybe you are looking for

  • PCG and Windows error - how I fixed

    I'll make this post in the hope it might help others. I was a sufferer of, and an early contributor to, one of the long running PCG error threads. After several years of successful Premier/Encore authoring with a successful workflow I suffered the dr

  • A problem while implementing a file to file senario

    hi all :      There is some problem while implement a file to file senario. the file couldn't be sent or recieved.       and as I try to check Check the Sender File Adapter Status  via      Runtime Workbench -> Component Monitoring -> Communication C

  • Table Cell Alignment

    Is it possible to establish default alignments for different cells in a table?  I have a table with 13 columns.  I would like to be able to set the default alignment to "center" in all columns but two.  I wish the second column to have a default alig

  • Report Based Total - when??

    Hi, sometimes I get the issue that when I put totals on groups in reports they are only correct when I have un-ticked 'report based total', but at other times, sometimes with the same source, it works fine.... I have trawled the site on advice around

  • Hyper-v Physical SAN 2 Node network: Best practis

    Hi, I have been reading alot of articles and guides on how to set up this correct! all of the guides are driffrent. in my system: 2 X server, they have 4 nics Gigabit each and 2 FC card each. 1X SAN , 2 FC controller, with 2 connections points each (