Help with "Exception in thread "Thread-4" java.lang.NullPointerException"

I am new to Java and I am trying a simple bouncing ball example from Stanford. Here is their simple example that works.
import acm.program.*;
import acm.graphics.*;
import java.awt.*;
public class BouncingBallWorking extends GraphicsProgram {
/** sets diameter */
private static final int DIAM_BALL = 30;
/** amount y velocity is increased each cycle */
private static final double GRAVITY = 3;
/** Animation delay or pause time between ball moves */
private static final int DELAY = 50;
/** Initial X and Y location ball*/
private static final double X_START = DIAM_BALL / 2;
private static final double Y_START = 100;
private static final double X_VEL = 3;
private static final double BOUNCE_REDUCE = 0.9;
private double xVel = X_VEL;
private double yVel = 0.0;
private GOval BallA;
public void run() {
setup(X_START,Y_START);
//         Simulation ends when ball goes off right hand
//         end of screen
while (BallA.getX() < getWidth()) {
moveBall(BallA);
checkForCollision(BallA);
pause(DELAY);
private void setup(double X_coor, double Y_coor) {
BallA = new GOval(X_coor, Y_coor, DIAM_BALL, DIAM_BALL);
add(BallA);
private void moveBall(GOval BallObject) {
yVel += GRAVITY;
BallObject.move(xVel,yVel);
private void checkForCollision(GOval BallObject) {
if(BallObject.getY() > getHeight() - DIAM_BALL){
yVel = - yVel * BOUNCE_REDUCE;
double diff = BallObject.getY() - (getHeight() - DIAM_BALL);
BallObject.move(0, -2 * diff);
} Now I am trying to modify "setup" so it I can create several balls. I made a simple modification to "setup" and now I am getting an error.
"Exception in thread "Thread-4" java.lang.NullPointerException
at BouncingBallNotWorking.run(BouncingBallNotWorking.java:36)
at acm.program.Program.runHook(Program.java:1592)
at acm.program.Program.startRun(Program.java:1581)
at acm.program.AppletStarter.run(Program.java:1939)
at java.lang.Thread.run(Unknown Source)"
Can you describe why I am getting an error? Thanks.
Here is what I changed.
Before:
     private void setup(double X_coor, double Y_coor) {
          BallA = new GOval(X_coor, Y_coor, DIAM_BALL, DIAM_BALL);
          add(BallA);
     }After:
     private void setup(double X_coor, double Y_coor, GOval BallObject) {
          BallObject = new GOval(X_coor, Y_coor, DIAM_BALL, DIAM_BALL);
          add(BallObject);
     }Here is the complete code.
* File:BouncingBall.java
* This program graphically simulates a bouncing ball
import acm.program.*;
import acm.graphics.*;
import java.awt.*;
public class BouncingBallNotWorking extends GraphicsProgram {
/** sets diameter */
private static final int DIAM_BALL = 30;
/** amount y velocity is increased each cycle */
private static final double GRAVITY = 3;
/** Animation delay or pause time between ball moves */
private static final int DELAY = 50;
/** Initial X and Y location ball*/
private static final double X_START = DIAM_BALL / 2;
private static final double Y_START = 100;
private static final double X_VEL = 3;
private static final double BOUNCE_REDUCE = 0.9;
private double xVel = X_VEL;
private double yVel = 0.0;
private GOval BallA;
public void run() {
setup(X_START,Y_START, BallA);
//         Simulation ends when ball goes off right hand
//         end of screen
while (BallA.getX() < getWidth()) {
moveBall(BallA);
checkForCollision(BallA);
pause(DELAY);
private void setup(double X_coor, double Y_coor, GOval BallObject) {
BallObject = new GOval(X_coor, Y_coor, DIAM_BALL, DIAM_BALL);
add(BallObject);
private void moveBall(GOval BallObject) {
yVel += GRAVITY;
BallObject.move(xVel,yVel);
private void checkForCollision(GOval BallObject) {
if(BallObject.getY() > getHeight() - DIAM_BALL){
yVel = - yVel * BOUNCE_REDUCE;
double diff = BallObject.getY() - (getHeight() - DIAM_BALL);
BallObject.move(0, -2 * diff);
} Edited by: TiredRyan on Mar 19, 2010 1:47 AM

TiredRyan wrote:
That is great! Thanks. I've got two question though.
1.) Now I want to have 100 bouncing balls. Is the best way to achieve this is through an array of GOvals? I haven't gotten to the lecture on arrays on Stanford's ITunesU site yet so I am not sure what is possible with what I know now.An array would work, or a List. But it doesn't matter much in this case.
2.) Are references being passed by value only applicable to Java or is that common to object-oriented programming? Also is there a way to force Java to pass in "BallA" instead of the value "null"?I can't say about all OO languages as a whole, but at least C++ can pass by reference.
And no, there's no way to pass a reference to the BallA variable, so the method would initialize it and it wouldn't be null anymore.
When you call the method with your BallA variable, the value of the variable is examined and it's passed to the method. So you can't pass the name of a variable where you'd want to store some object you created in the method.
But you don't need to either, so there's no harm done.

Similar Messages

  • Exception in thread "RTPC Report" java.lang.NullPointerException

    Hi.. I am having the above problem when ruuning my transmission program..
    I run my code and it seems to be ok... There is message showing the web cam stream is being transmitted...
    However, it dawn on me when i could not even receive any stream via JMStudio with the specified address. e.g. 220.10.10.20 at port 2020.
    Can any one please help?
    Thanks.
    CArter
    Following is my code...
    import java.awt.*;
    import java.io.*;
    import java.util.*;
    import java.net.InetAddress;
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.format.*;
    import javax.media.control.TrackControl;
    import javax.media.control.QualityControl;
    import javax.media.rtp.*;
    import javax.media.rtp.rtcp.*;
    import javax.media.rtp.*;
    import java.io.InputStream;
    import javax.media.rtp.RTPManager;
    public class MyTransmitter extends Thread
         private MediaLocator videoLocator;
         private String ipAddress;
         private int basePort;
         private Integer stateLock=new Integer(0);
         private boolean failure;
         private Processor processor;
         private DataSource videoDataInput,videoDataOutput;
         private RTPManager rtpMgrs[];
         private VideoFormat JPEG_VIDEO=new VideoFormat(VideoFormat.JPEG_RTP);
         private SendStream sendStream;
         private SourceDescription descriptionList[];
         public MyTransmitter(String ips,String ports){
              ipAddress=ips;
              Integer bPort=Integer.valueOf(ports);
              if(bPort!=null)
                   basePort=bPort.intValue();
         public void run()
              initializeVideo();
              if(videoLocator!=null){
                   createMyProcessor();
                   createMyManager();
              // May be should put inside the if..else statements
              //createMyTransmitter();
         // Initailize the video
         public void initializeVideo()
              // Stre the devices in a vector
              VideoFormat format=new VideoFormat(VideoFormat.RGB);
              Vector deviceList=CaptureDeviceManager.getDeviceList(format);
              CaptureDeviceInfo deviceInfo=null;
              // If there is more than one device detected
              if(deviceList.size()>0){
                   // Set the first device to device Info
                   // GEt the media locator of the devie
                   deviceInfo=(CaptureDeviceInfo)deviceList.elementAt(0);
                   videoLocator=deviceInfo.getLocator();
              }else{
                   System.out.println(" --X No device found...");
         public void createMyProcessor()
              boolean result=false;
              DataSource ds=null;
              // Check if the media locator is null
              if(videoLocator==null){
                   System.out.println(" --X No video locator..");
              System.out.println(" - Trying to create a Processor..");
              // Attempt to create DataSource from media locator
              try{
                   ds=Manager.createDataSource(videoLocator);
              }catch(Exception ex){
                   System.out.println(" --X Unable to create dataSource : "+ex.getMessage());
              System.out.println(" - Video data source is created..");
              // Try to create Processor from DataSource
              try{
                   processor=Manager.createProcessor(ds);
              }catch(NoProcessorException npe){
                   System.out.println(" --X Unable to create Processor: "+npe.getMessage());
              catch(IOException ioe){
                   System.out.println(" --X IOException creating Processor..");
              // Wait for the processor to be configured
              result=waitForState(processor,Processor.Configured);
              if(result==false)
                   System.out.println(" --X Could not configure processor..");
              // Set the track controls for processor
              TrackControl []tracks=processor.getTrackControls();
              if(tracks==null || tracks.length<1){
                   System.err.println(" --X No track is found..");
              // Set the content description of processor to RAW_RTP format
              // This will limit the supported formats to reported from
              // Track.getSupportedFormats() to valid RTP format
              ContentDescriptor cdes=new ContentDescriptor(ContentDescriptor.RAW_RTP);
              processor.setContentDescriptor(cdes);
              Format []supported;
              Format chosen=null;
              boolean atLeastOneTrack=false;
              for(int i=0;i<tracks.length;i++){
                   Format format=tracks.getFormat();
                   if(tracks[i].isEnabled()){
                        supported=tracks[i].getSupportedFormats();
                        // WE've set the output content to RAW_RTP.
                        // So, all the supporte formats should work with RAW_RTP.
                        // We will pick the first one.
                        if(supported.length>0){
                             if(supported[0] instanceof VideoFormat){                              
                                  chosen=checkVideoSize(tracks[i].getFormat(),supported[0]);
                             }else
                                  chosen=supported[0];
                             tracks[i].setFormat(chosen);
                             System.out.println(" Track "+i+" is transmitted in "+chosen+" format.. ");
                             atLeastOneTrack=true;
                        }else{
                             // If no format is suitable, track is disabled
                             tracks[i].setEnabled(false);
                   }else
                        tracks[i].setEnabled(false);          
              if(!atLeastOneTrack)
                   System.out.println("atLeastOneTrack: "+atLeastOneTrack);
                   System.out.println(" --X Could Not find track to RTP format..");
              result=waitForState(processor,Controller.Realized);
              if(result==false){
                   System.out.println(" --X Could NOT realize processor...");
              // Set the JPEG Quality to value 0.5
              setJPEGQuality(processor,0.5f);
              // Set the output Data Source
              videoDataOutput=processor.getDataOutput();
              //Start the processor
              processor.start();          
         public void setJPEGQuality(Processor p,float values)
              Control []cs=p.getControls();
              QualityControl qc=null;
              VideoFormat JPEGFmt=new VideoFormat(VideoFormat.JPEG);
              // Loop through the ocntrols to find the Quality control for the JPEG encoder
              for(int i=0;i<cs.length;i++){
                   if(cs[i] instanceof QualityControl && cs[i] instanceof Owned){
                        Object owner=((Owned)cs[i]).getOwner();
                        // Check if the owner is the Codec
                        // Check the format of output as well
                        if(owner instanceof Codec){
                             Format fmts[]=((Codec)owner).getSupportedOutputFormats(null);
                             // Loop through the supported format and set the quality to 0.5
                             for(int j=0;j<fmts.length;j++){
                                  qc=(QualityControl)cs[i];
                                  qc.setQuality(values);
                                  System.out.println(" - Quality is set to "+values+" on "+qc);
                                  break;
                   if(qc!=null)
                        break;
         public Format checkVideoSize(Format originalFormat,Format supported)
              int width,height;
              Dimension size=((VideoFormat)originalFormat).getSize();     
              Format jpegFormat=new Format(VideoFormat.JPEG_RTP);
              Format h263fmt=new Format(VideoFormat.H263_RTP);
              if(supported.matches(jpegFormat)){
                   width=(size.width%8 == 0 ? size.width:(int)(size.width%8)*8);
                   height=(size.height%8 == 0 ? size.height:(int)(size.height%8)*8);
              }else if(supported.matches(h263fmt)){
                   if(size.width<128){
                        width=128;
                        height=96;
                   }else if(size.width<176){
                        width=176;
                        height=144;
                   }else{
                        width=352;
                        height=288;
              }else{
                   // Unknown format, just return it.
                   return supported;
              return (new VideoFormat(null,new Dimension(width,height),Format.NOT_SPECIFIED,null,Format.NOT_SPECIFIED)).intersects(supported);
         public boolean waitForState(Processor p,Integer status)
              p.addControllerListener(new StateListener());
              failure=false;
              if(status==Processor.Configured){
                   p.configure();               
              }else if(status==Processor.Realized){
                   p.realize();
              //Wait until an event that confirms the success of the method, or failure of an event
              while(p.getState()<status && !failure){
                   synchronized(getStateLock()){
                        try{
                             // Wait
                             getStateLock().wait();
                        }catch(InterruptedException ie){
                             return false;
              if(failure)
                   return false;
              else
                   return true;
         public Integer getStateLock(){
              return stateLock;
         public void setFailure(){
              failure=true;
         public void createMyManager()
              SessionAddress destAddress;
              InetAddress ipAddr;
              int port;
              SourceDescription srcDesList[];
              PushBufferDataSource pbds=(PushBufferDataSource)videoDataOutput;
              PushBufferStream pbss[]=pbds.getStreams();          
              rtpMgrs=new RTPManager[pbss.length];          
              for(int a=0;a<pbss.length;a++){
              try{
                   // RTP Managers or RTP Manager?????
                   rtpMgrs[a]=RTPManager.newInstance();
                   port=basePort;
                   ipAddr=InetAddress.getByName(ipAddress);
                   SessionAddress localAddr=new SessionAddress(InetAddress.getLocalHost(),port+20);
                   destAddress=new SessionAddress(ipAddr,port,1);
                   Integer myipprefix=Integer.valueOf(ipAddress.substring(0,3));
                   if((myipprefix.intValue()>223) && (myipprefix.intValue()<240)){
                        rtpMgrs[a].initialize(destAddress);
                   }else{
                        rtpMgrs[a].initialize(localAddr);
                   rtpMgrs[a].addTarget(destAddress);
                   System.out.println(" Created RTP session: "+ipAddress+" "+port+" to "+destAddress);
                   if(videoDataOutput!=null){
                        sendStream=rtpMgrs[a].createSendStream(videoDataOutput,0);
                        sendStream.start();
              }catch(UnsupportedFormatException ex){
                   System.out.println(" --X Unsupported Format : "+ex);
              catch(IOException ioe){
                   System.out.println(" --X IOException : "+ioe.getMessage());
              catch(Exception ex){
                   System.out.println(" --X Unable to create RTP Manager...");
                   System.out.println(ex.getMessage());
         /*public void createMyTransmitter()
         try{
              if(videoDataOutput!=null){
                   sendStream=rtpMgrs[i].createSendStream(videoDataOutput,0);
                   sendStream.start();
         }catch(UnsupportedFormatException ex){
                   System.out.println(" --X Unsupported Format : "+ex);
         catch(IOException ioe){
                   System.out.println(" --X IOException : "+ioe.getMessage());
         public void stopTransmitter(){
              if(processor!=null){
                   processor.stop();
                   processor.close();
                   processor=null;
                   // Loop through RTP Managers and close all managers..
                   // Dispose them for garbage collection
                   for(int i=0;i<rtpMgrs.length;i++){
                        rtpMgrs[i].removeTargets("Session ended..");
                        rtpMgrs[i].dispose();
                   //rtpMgrs.removeTargets("Session ended..");
                   //rtpMgrs.dispose();
         * StateListener class to handle Controller events
         class StateListener implements ControllerListener{
              public void controllerUpdate(ControllerEvent ce){
                   if(ce instanceof ControllerClosedEvent){
                        processor.close();
                   /* Handle all controller events and notify all
                   waiting thread in waitForState method */
                   if(ce instanceof ControllerEvent){
                        synchronized(getStateLock()){
                             getStateLock().notifyAll();

    Ok I reviewed your code and there were a couple things which I am confused about. Firstly, it looks like you have a section of code which checks to see if the ip address preffix is within the 240-223 range, which tells me that you are trying to implement multicast addresses. However, your example ip is out of the multicast range. Also the InetAddress has an isMulticastAddress() method which can check that for you.
    Those are just the first things that struck me and I'll keep going through the code.

  • Java.lang.NullPointerException in the record working time iview

    Hello,
      I am getting java.lang.NullPointerException when I try to access the record working time iView. Below is the full exception chain.
    Please help me out in fixing the issue.
    java.lang.NullPointerException
         at com.sap.pcuigp.xssutils.pernr.FcEmployeeServicesInterface.getEmployeenumber(FcEmployeeServicesInterface.java:115)
         at com.sap.pcuigp.xssutils.pernr.wdp.InternalFcEmployeeServicesInterface.getEmployeenumber(InternalFcEmployeeServicesInterface.java:175)
         at com.sap.pcuigp.xssutils.pernr.wdp.InternalFcEmployeeServicesInterface$External.getEmployeenumber(InternalFcEmployeeServicesInterface.java:235)
         at com.sap.xss.hr.cat.record.blc.RfcManager.init(RfcManager.java:791)
         at com.sap.xss.hr.cat.record.blc.wdp.InternalRfcManager.init(InternalRfcManager.java:248)
         at com.sap.xss.hr.cat.record.blc.FcCatRecordInterface.onInit(FcCatRecordInterface.java:344)
         at com.sap.xss.hr.cat.record.blc.wdp.InternalFcCatRecordInterface.onInit(InternalFcCatRecordInterface.java:234)
         at com.sap.xss.hr.cat.record.blc.wdp.InternalFcCatRecordInterface$External.onInit(InternalFcCatRecordInterface.java:484)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPM.attachComponentToUsage(FPMComponent.java:922)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPM.attachComponentToUsage(FPMComponent.java:891)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPMProxy.attachComponentToUsage(FPMComponent.java:1084)
         at com.sap.xss.hr.cat.record.vac.calendar.VcCatCalendar.onInit(VcCatCalendar.java:251)
         at com.sap.xss.hr.cat.record.vac.calendar.wdp.InternalVcCatCalendar.onInit(InternalVcCatCalendar.java:194)
         at com.sap.xss.hr.cat.record.vac.calendar.VcCatCalendarInterface.onInit(VcCatCalendarInterface.java:162)
         at com.sap.xss.hr.cat.record.vac.calendar.wdp.InternalVcCatCalendarInterface.onInit(InternalVcCatCalendarInterface.java:146)
         at com.sap.xss.hr.cat.record.vac.calendar.wdp.InternalVcCatCalendarInterface$External.onInit(InternalVcCatCalendarInterface.java:222)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:564)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:438)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:196)
         at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:110)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:430)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:783)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:303)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:761)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:696)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:253)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:192)
         at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:73)
         at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.sendDataAndProcessActionInternal(AbstractApplicationProxy.java:864)
         at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.create(AbstractApplicationProxy.java:220)
         at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1351)
         at com.sap.portal.pb.PageBuilder.createPage(PageBuilder.java:356)
         at com.sap.portal.pb.PageBuilder.init(PageBuilder.java:550)
         at com.sap.portal.pb.PageBuilder.wdDoInit(PageBuilder.java:193)
         at com.sap.portal.pb.wdp.InternalPageBuilder.wdDoInit(InternalPageBuilder.java:150)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:430)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:783)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:303)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:741)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:694)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:253)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:192)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)

    Hi,
    All the parameters are maintained in the SU01 but we are in strange situation here only for one test user id we are getting null pointer exception with the time sheet. We compared with the user id which is working there is no difference in the parameters
    maintained. Please tell me why this behavior between two user ids.
        These two are manager user ids. For employee user ids time sheet is working fine.

  • Java.lang.NullPointerException when connecting to DB

    Running what I think is the latest version of Oracle SQL Developer, 2.1.0.63.73 on JDK 1.6.0_17, Windows XP. Every 2nd or 3rd time I run SQL Dev, I get the following when I go to connect: Error Connecting, with the below in the "Details"
    java.lang.NullPointerException
         at oracle.dbtools.raptor.utils.TNSHelper$2.compare(TNSHelper.java:349)
         at java.util.Arrays.mergeSort(Arrays.java:1270)
         at java.util.Arrays.sort(Arrays.java:1210)
         at java.util.Collections.sort(Collections.java:159)
         at oracle.dbtools.raptor.utils.TNSHelper.getTNSEntries(TNSHelper.java:355)
         at oracle.dbtools.raptor.utils.TNSHelper.getEntry(TNSHelper.java:216)
         at oracle.dbtools.raptor.utils.Connections.populateConnectionInfo(Connections.java:645)
         at oracle.dbtools.raptor.standalone.connection.RaptorConnectionCreator.getConnection(RaptorConnectionCreator.java:62)
         at oracle.dbtools.raptor.dialogs.conn.ConnectionPrompt.promptForPassword(ConnectionPrompt.java:67)
         at oracle.jdeveloper.db.adapter.DatabaseProvider.getConnection(DatabaseProvider.java:321)
         at oracle.jdeveloper.db.adapter.DatabaseProvider.getConnection(DatabaseProvider.java:254)
         at oracle.jdevimpl.db.adapter.CADatabaseFactory.createConnectionImpl(CADatabaseFactory.java:60)
         at oracle.javatools.db.DatabaseFactory.createConnection(DatabaseFactory.java:534)
         at oracle.javatools.db.DatabaseFactory.createDatabase(DatabaseFactory.java:208)
         at oracle.jdeveloper.db.DatabaseConnections.getDatabase(DatabaseConnections.java:607)
         at oracle.jdeveloper.db.DatabaseConnections.getDatabase(DatabaseConnections.java:562)
         at oracle.dbtools.raptor.utils.Connections$ConnectionInfo.getDatabase(Connections.java:145)
         at oracle.dbtools.raptor.utils.Connections.getConnection(Connections.java:874)
         at oracle.dbtools.raptor.utils.Connections.getConnection(Connections.java:855)
         at oracle.dbtools.raptor.navigator.DatabaseConnection.openConnectionImpl(DatabaseConnection.java:117)
         at oracle.dbtools.raptor.navigator.AbstractConnectionNode.getConnection(AbstractConnectionNode.java:30)
         at oracle.dbtools.raptor.navigator.ConnectionFilter.getFactory(ConnectionFilter.java:92)
         at oracle.dbtools.raptor.navigator.ConnectionFilter$1.doWork(ConnectionFilter.java:117)
         at oracle.dbtools.raptor.navigator.ConnectionFilter$1.doWork(ConnectionFilter.java:102)
         at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:193)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:492)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:619)
    Other times, it works fine. Anything I might have done wrong in installing this guy? Any thoughts?
    Thanks, Michael

    I'm agree ... His behavior is very strange.
    At the first time, I decompressed zip file into a new dir and at the first run I agreed to import setup from previous version. From the beginning the v2.1 worked wrong.
    After that, I removed all, new and previous versions. I deleted sqldeveloper folder and also service folder (under \Documents and Settings\...\Application data\...)
    Also I searched into registry ...
    Nothing to do ... also new installation hangs ...
    So, perhaps I have to wait new release ... (perhaps the exceptions or the environment conflict will be fixed).
    Thanks again.
    Regards.
    PS: Please, if you have other suggestions, let me know. Many Thanks.

  • Java.lang.nullpointerexception in Guided Procedure

    Hello Guru's,
    We have integrated a WD4J application in Guided Procedure.
    And within this application there is a Submit Button, on clicking it we are getting Java.lang.NullPointerException.
    The same application works fine for other users, only 1 user is having this issue.
    And I tried replicating the same in our Development system and it works fine.
    This issue occurs only in Production.
    Full Message Text
    Exception occured during processing of Web Dynpro application sap.com/cafeugpuiinst/AInstantiation. The causing exception is nested.
    [EXCEPTION]
    java.lang.NullPointerException
    at com.sfwmd.Contract.newcontract(Contract.java:798)
    at com.sfwmd.wdp.InternalContract.newcontract(InternalContract.java:814)
    at com.sfwmd.ContractView.onActionComplete(ContractView.java:5075)
    at com.sfwmd.wdp.InternalContractView.wdInvokeEventHandler(InternalContractView.java:1142)
    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)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
    at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
    at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:333)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:741)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:694)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:253)
    at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Full Message Text
    application [webdynpro/dispatcher] Processing HTTP request to servlet [dispatcher] finished with error. The error is: java.lang.NullPointerException
    at com.sfwmd.Contract.newcontract(Contract.java:798)
    at com.sfwmd.wdp.InternalContract.newcontract(InternalContract.java:814)
    at com.sfwmd.ContractView.onActionComplete(ContractView.java:5075)
    at com.sfwmd.wdp.InternalContractView.wdInvokeEventHandler(InternalContractView.java:1142)
    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)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
    at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
    at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:333)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:741)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:694)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:253)
    at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Full Message Text
    application [webdynpro/dispatcher] Processing HTTP request to servlet [dispatcher] finished with error.
    The error is: java.lang.NullPointerException: null
    Exception id: [0003BAC3E095007900000C830000620E0004B61AE95D50D6]
    Please assist in resolving this issue.
    Thanks & Regards,
    Pramod

    Hi Maksim,
    Thanks for the reply. you are right NPE is at 798 line but this issue is only with one user, for others it works fine. That is my issue.
    Here is the code at 798 :
    wdThis.wdFireEventCallContractView(wdContext.currentNewOutputElement().getW_Zzconnum(),flag);
    public INewOutputElement(InternalContract delegate, com.sap.tc.webdynpro.progmodel.gci.IGCINodeInfo info, Object modelInstance) {
          super(info, modelInstance);
          this.gen_modelInstance = (com.s.insertmodel.Z_Bapi_Insert_Contract_Data_Output) modelInstance;
          gen_delegate = delegate;
    Can you look at this code and tell me what is wrong?
    Thanks & Regards,
    Pramod

  • Class java.lang.NullPointerException thrown on deploying Support Packages

    Hello Everybody,
    My version of <b>Enterprise Portal is 6.0</b> .Earlier the <b>Support Pack Stack level was SP</b>S09 After deploying <b>Support
    Pack Stack level SPS16</b> for <b>J2ee Engine</b>,<b>Portal Platform</b> and <b>KMC</b> and restarting the entire server,following error message is being displayed in Portal:
    <b>System Error :
    An exception occurred during the program execution. Below you will find technical information pertaining to this exception that you might want to forward to your system administrator.
    Exception Class </b> <b>class java.lang.NullPointerException</b>
    The Details of which are as follows:
    <b>
    java.lang.NullPointerException
            at com.sapportals.wcm.repository.service.appproperties.PropertiesManager.getProperty(PropertiesManager.java:144)
            at com.sapportals.wcm.repository.service.layout.cm.LayoutService$ApplicationPropertyProxy.getPropertyValue(LayoutService.java:249)
            at com.sapportals.wcm.repository.service.layout.cm.LayoutService.readProfile(LayoutService.java:409)
            at com.sapportals.wcm.repository.service.layout.cm.customizing.CustomizingController.readFolderSettings(CustomizingController.java:659)
            at com.sapportals.wcm.repository.service.layout.cm.customizing.CustomizingController.initParamters(CustomizingController.java:298)
            at com.sapportals.wcm.repository.service.layout.cm.customizing.CustomizingController.(CustomizingController.java:240)
            at com.sapportals.wcm.repository.service.layout.cm.customizing.CustomizingController.getInstance(CustomizingController.java:122)
            at sun.reflect.GeneratedMethodAccessor217.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.sapportals.wcm.repository.service.layout.customizing.CustomizingControllerFactory.createCustomizingController(CustomizingControllerFactory.java:141)
            at com.sapportals.wcm.repository.service.layout.customizing.CustomizingControllerFactory.getCustomizingController(CustomizingControllerFactory.java:30)
            at com.sapportals.wcm.rendering.layout.LayoutControllerFactory.getLC(LayoutControllerFactory.java:198)
            at com.sapportals.wcm.rendering.layout.LayoutControllerFactory.getLayoutController(LayoutControllerFactory.java:164)
            at com.sapportals.wcm.rendering.control.cm.WdfProxy.createLayoutController(WdfProxy.java:1995)
            at com.sapportals.wcm.rendering.control.cm.WdfProxy.prepareNestedControls(WdfProxy.java:1364)
            at com.sapportals.wcm.rendering.control.cm.WdfProxy.createNestedControls(WdfProxy.java:1234)
            at com.sapportals.wdf.stack.Control.create(Control.java:291)
            at com.sapportals.wcm.rendering.control.cm.WdfProxy.create(WdfProxy.java:1307)
            at com.sapportals.wdf.stack.Pane.createControls(Pane.java:464)
            at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
            at com.sapportals.wdf.stack.Pane.createControls(Pane.java:458)
            at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
            at com.sapportals.wdf.stack.Pane.createControls(Pane.java:458)
            at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
            at com.sapportals.wdf.stack.Pane.createControls(Pane.java:458)
            at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
            at com.sapportals.wdf.WdfCompositeController.doInitialization(WdfCompositeController.java:268)
            at com.sapportals.wdf.WdfCompositeController.buildComposition(WdfCompositeController.java:659)
            at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:33)
            at com.sapportals.htmlb.Container.preRender(Container.java:120)
            at com.sapportals.htmlb.Container.preRender(Container.java:120)
            at com.sapportals.htmlb.Container.preRender(Container.java:120)
            at com.sapportals.portal.htmlb.PrtContext.render(PrtContext.java:414)
            at com.sapportals.htmlb.page.DynPage.doOutput(DynPage.java:237)
            at com.sapportals.wcm.portal.component.base.KMControllerDynPage.doOutput(KMControllerDynPage.java:130)
            at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
            at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
            at com.sapportals.wcm.portal.component.base.ControllerComponent.doContent(ControllerComponent.java:73)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
            at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
            at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
            at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:545)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
            at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
            at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
            at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
            at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
            at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
            at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
            </b>
    Due to this error the screen looks distorted and none of the link opens, Does that error mean that Support Packages have not been Properly Applied ,bcoz iam not able to do anything after that.None of the link opens and window looks distorted.
    can Someody plz revert back to resolving this issue.Kindly plz revert back how to resolve this exception at earliest.
    Thanks,
    Saumya

    Hi somya
    is ur j2ee server is running?
    check with following
    http://host:j2eeport
    or login into j2ee visual administrator,
    are u able to login into it?
    is server is connected?
    regards,
    kaushal

  • FTP Adapter : java.lang.NullPointerException

    Hi,
    I am getting a java.lang.NullPointerException when I try to use the FTP Adapter.
    The message monitor for the Adapter shows this:
    2006-02-27 16:48:57 Success File adapter receiver channel OMAF_PO_FTPS_Rcvr: start processing: party " ", service "OMAF"
    2006-02-27 16:48:57 Success Connect to FTP server "fintst", directory "/"
    2006-02-27 16:49:59 Error Attempt to process file failed with java.lang.NullPointerException
    2006-02-27 16:49:59 Error Exception caught by adapter framework: java.lang.NullPointerException
    2006-02-27 16:49:59 Error Delivery of the message to the application using connection AFW failed, due to: java.lang.NullPointerException.
    When I look at the J2EE logs, I don't see much more detail that might help me troubleshoot....
    #1.5#001185B7A4A7007500000BAC00002DB400040DC9804C00C5#1141058999161#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/File#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.file.XI2File.onInternalMessage(XMBMessage, String, IGUID, String)#J2EE_GUEST#0#SAP J2EE Engine JTA Transaction : [011ffffffc6320045b]###16a1e690a7b111da8272001185b7a4a7#XI AF XI2File[/OMAF/OMAF_PO_FTPS_Rcvr]##0#0#Error#1#com.sap.aii.adapter.file.XI2File#Plain###File processing failed with java.lang.NullPointerException#
    #1.5#001185B7A4A7007500000BAE00002DB400040DC9804C2276#1141058999161#/Applications/ExchangeInfrastructure/AdapterFramework/Services/ADAPTER/ADMIN/File#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.file.XI2File.addAuditLog(PublicMessageKey, String, AuditLogStatus, String, String)#J2EE_GUEST#0#SAP J2EE Engine JTA Transaction : [011ffffffc6320045b]###16a1e690a7b111da8272001185b7a4a7#XI AF XI2File[/OMAF/OMAF_PO_FTPS_Rcvr]##0#0#Error#1#com.sap.aii.adapter.file.XI2File#Plain###FILE_ERR_211#
    Now, given the message monitor output, I assume that the adapter was able to connect successfully to the target FTP server, and that the error is occuring during the writing of the file to the folder (or the conversion of the XML to  flat file).
    I have checked the conversion parameters. The exact same ones  work if I use the comm protocol as File System rather than FTP.
    Any ideas?
    Thanks and Regards
    Manish

    Hi,
      Have you set the read write and modify properties for your local ftp server for the corrosponding path, i mean i use guildftp for unit testing, and i need to specify these in the ftp server locally.
    That may be a reason why you get this, as you donot specify the autorixation to read the folder under ftp root.
    Also refer the file adapter faq: 821267  oss note
    Regards,
    Anirban.

  • 500 Internal server error - java.lang.NullPointerException: null

    While trying to access the initial login screen of EP, we face this '500 Internal server error - java.lang.NullPointerException: null' issue very randomly. It appears sometimes and when opened from new browser we get the login screen sometimes. It is not a problem that reproduces always. On the screen where the error appears, we refresh any number of times, no help, the error remains the same, but when we open in a new window, it might give the login screen or end up with this error.
    We have 4 Dialog Instances and a Cisco load balancer.
    Upon repeated redirection to a particular instance and particular server node(https://<hostname>:<port>/irj/portal;sapj2ee_irj= XXX) from the trace files, I could get the following information :-
    #0019BBEB9F4C00190000409700001707000478F21B0BBACE#1258881142025#com.sap.tc.webdynpro.sessionmanagement#sap.com/tcwddispwda#com.sap.tc.webdynpro.sessionmanagement.ExceptionHandler.handleThrowable#2449#32347##n/a##245825a0d74711de92700019bbeb9f4c#SAPEngine_Application_Thread[impl:3]_12##0#0#Error#1#/System/UserInterface#Java###Exception occured during processing of Web Dynpro application . The causing exception is nested.
    [EXCEPTION]
    #2#sap.com/pb/PageBuilder#java.lang.NullPointerException
    #1.5_#0019BBEB9F4C00190000409800001707000478F21B0BD29A#1258881142031#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#sap.com/tcwddispwda#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#2449#32347##n/a##245825a0d74711de92700019bbeb9f4c#SAPEngine_Application_Thread[impl:3]_12##0#0#Error##Plain###application [webdynpro/dispatcher] Processing HTTP request to servlet [dispatcher] finished with error. The error is: java.lang.NullPointerException
    #1.5_#0019BBEB9F4C00190000409A00001707000478F21B0C5FDE#1258881142068#com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl#sap.com/tcwddispwda#com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl#2449#32347##n/a##245825a0d74711de92700019bbeb9f4c#SAPEngine_Application_Thread[impl:3]_12##0#0#Error#1#/System/Server/WebRequests#Plain###application [webdynpro/dispatcher] Processing HTTP request to servlet [dispatcher] finished with error.
    The error is: java.lang.NullPointerException: null
    Exception id: [0019BBEB9F4C00190000409800001707000478F21B0BD29A]#
    #1.5_#0019BBEB9F4C00310000372500001707000478F21D348764#1258881178254#com.sap.security.core.server.destinations.service.DestinationServiceImpl#sap.com/tcwddispwda#com.sap.security.core.server.destinations.service.DestinationServiceImpl.getDestination#5180#32285##juepp01_EPP_16040550#5180#392ddb50d74711de87f40019bbeb9f4c#SAPEngine_Application_Thread[impl:3]_10##0#0#Error#1#/System/Security/destinations#Java###An error occurred while reading the destination , type . The error was .#3#sap_inbox$WebFlowConnector#RFC#<Localization failed: ResourceBundle='com.sap.exception.io.IOResourceBundle', ID='No such destination sap_inbox$WebFlowConnector of type RFC exists ', Arguments: []> : Can't find resource for bundle java.util.PropertyResourceBundle, key No such destination sap_inbox$WebFlowConnector of type RFC exists #
    #1.5_#0019BBEB9F4C00310000372600001707000478F21D34893F#1258881178255#System.err#sap.com/tcwddispwda#System.err#5180#32285##juepp01_EPP_16040550#5180#392ddb50d74711de87f40019bbeb9f4c#SAPEngine_Application_Thread[impl:3]_10##0#0#Error##Plain###java.lang.Exception: Problem occured while creating JCO client for destination: sap_inbox#
    #1.5_#0019BBEB9F4C00310000372700001707000478F21D34A80D#1258881178262#System.err#sap.com/tcwddispwda#System.err#5180#32285##juepp01_EPP_16040550#5180#392ddb50d74711de87f40019bbeb9f4c#SAPEngine_Application_Thread[impl:3]_10##0#0#Error##Plain###      at com.sap.netweaver.bc.uwl.utils.r3.R3SystemInfo.createJCOClient(R3SystemInfo.java:67)#
    #1.5_#0019BBEB9F4C00310000372800001707000478F21D34A887#1258881178263#System.err#sap.com/tcwddispwda#System.err#5180#32285##juepp01_EPP_16040550#5180#392ddb50d74711de87f40019bbeb9f4c#SAPEngine_Application_Thread[impl:3]_10##0#0#Error##Plain###      at com.sap.netweaver.bc.uwl.utils.r3.R3SystemInfo.hasFunctionModule(R3SystemInfo.java:591)#
    Kindly advise as to what could be the issue..

    Hi,  either the problem should come always for us to be able to trouble shoot it or should not come at all.
    Now since it comes sometimes, i feel that you surely are using more than one app. servers in  your enviroment and some of them are not fine.
    I received this error when i accidently had deleted my sso ticket pairs in the visual admin.
    First troubleshoot by login to individual app servers where the issue is coming. after that check the certificate-cert key pair in keystore admin. you can also delete them and make new ticket pairs..
    If this does not help, replace your login page with the standard sap login page par  com.sap.portal.runtime.logon.par.
    This should certainly troubleshoot u
    cheers,
    Ankur

  • Error in End to End Monitering:  java.lang.NullPointerException

    Hi Experts,
                   while tryimg to configure the end to end monitering in my system, when i open the RW- > end to end monitering , I get teh following error.
      java.lang.NullPointerException
    I hav already added the PMI Monitering parameter in the SXMB_ADM -> integration engine configuration.
    Any feed experts!
    Regards,
    Arnab .

    Hi Arnab,
    Go Throgh the following thread.
    Re: java.lang.NullPointerException in End-to-End monitoring
    Regards
    Goli Sridhar

  • Inline property / nested tables: java.lang.NullPointerException

    Hi,
    I have a Master -> Detail1 -> Detail2 set of groups. The Table Overflow Style property of my first detail group is set to inline. The same page property of Detail2 is checked. Both Detail groups are tables.
    After a while of changing and saving the attributes of the detail groups, I get the following exception:
    500 Internal Server Error
    java.lang.NullPointerException
         at oracle.adf.view.faces.component.UIXTable.createCollectionModel(UIXTable.java:441)
         at oracle.adf.view.faces.component.UIXCollection._flushCachedModel(UIXCollection.java:969)
         at oracle.adf.view.faces.component.UIXCollection.processDecodes(UIXCollection.java:122)
         at oracle.adf.view.faces.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:818)
         at oracle.adf.view.faces.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:803)
         at oracle.adf.view.faces.component.UIXComponentBase.processDecodes(UIXComponentBase.java:673)
    when i avoid "inline" as property changing the Overflow Style to "below" everything works fine.
    jdev version: 10.1.3.20
    jheadstart version: 10.1.3.1.26
    thanks,
    Andy

    I have this similar issue aswell. Was this fixed already? I have no idea what to do with my af:table in this kind of situation.
    java.lang.NullPointerException
    at oracle.adf.view.faces.component.UIXTable.createCollectionModel(UIXTable.java:441)
    JDev 10.1.3.2.0

  • Help with Exception in thread "main" java.lang.NullPointerException

    I got this exception while running the code in Netbeans IDE 6.1. The code is compiling fine...Please tell me what the problem is
    Exception in thread "main" java.lang.NullPointerException
    at Softwareguide.chooseanswer(Softwareguide.java:32)
    at Driver.main(Driver.java:7)
    public class Driver
        public static void main(String[] args)
            Softwareguide swguide = new Softwareguide();
            swguide.chooseanswer();
    public class Softwareguide
        State test1;
        State test2;
        State test3;
        State test4;
        State test5;
        State subtest1;
        State subtest2;
        State subtest3;
        State subtest4;
        State subtest5;
        State state = test1;
        public Softwareguide()
            test1 = new Test1(this);
            test2 = new Test2(this);
            test3 = new Test3(this);
            test4 = new Test4(this);
            test5 = new Test5(this);
            subtest1 = new SubTest1(this);
            subtest2 = new SubTest2(this);
            subtest3 = new SubTest3(this);
            subtest4 = new SubTest4(this);
            subtest5 = new SubTest5(this);
        public void chooseanswer()
            state.chooseanswer();
       /* public void chooseyes()
            state.chooseyes();
        public void chooseno()
            state.chooseno();
        public State getState()
            return state;
        void setState(State state)
         this.state = state;
        public State getTest1State()
            return test1;
        public State getTest2State()
            return test2;
        public State getTest3State()
            return test3;
        public State getTest4State()
            return test4;
        public State getTest5State()
            return test5;
        public State getsubTest1State()
            return subtest1;
        public State getsubTest2State()
            return subtest2;
        public State getsubTest3State()
            return subtest3;
        public State getsubTest4State()
            return subtest4;
        public State getsubTest5State()
            return subtest5;
        public String toString()
            StringBuffer result = new StringBuffer();
            result.append("\n Starting Diagnostic Test...");
            return result.toString();
    }

    spiderjava wrote:
    the variable state is assigned to test1. This variable(test1) is not initialized anywhere.It is initialized in the c'tor. Which is invoked after the "global" object and attribute initialization. So it is there, but comes too late.
    You should definitly not write a technical Java blog and post it all over the place.

  • Need help with Exception in thread "main" java.lang.NullPointerException

    here is the error
    Exception in thread "main" java.lang.NullPointerException
    at stream.createFrame(stream.java:153)
    at chat.createMessage(chat.java:14)
    this is where the error is in stream
    public void createFrame(int id) {
              *buffer[currentOffset++] = (byte)(id + packetEncryption.getNextKey());*
    and this is where it comes from in chat
    outStream.createFrame(85);                    
    i just cant see whats causeing the exception

    spiderjava wrote:
    the variable state is assigned to test1. This variable(test1) is not initialized anywhere.It is initialized in the c'tor. Which is invoked after the "global" object and attribute initialization. So it is there, but comes too late.
    You should definitly not write a technical Java blog and post it all over the place.

  • Re: Exception in thread "main" java.lang.NullPointerException

    Hi
    I am getting the following error. I cannot see any uninitialised objects. I have spent enough time on it .Could someone help me with this.
    Thanks in advance
    Exception in thread "main" java.lang.NullPointerException
            at pointlist.pointList.add(pointList.java:31)
            at pointlist.pointList.main(pointList.java:67)
            at pointlist.pointList.add(pointList.java:31)
            at pointlist.pointList.main(pointList.java:67)
    package pointlist;
    import javax.vecmath.Point2d;
    public class pointList extends Point2d{
        protected transient int size = 0;
        protected Point2d[] pointList = new Point2d[10];
        public pointList(){       
        public void add(int x,int y){
            if(pointList.length == size)
                resize(pointList.length * 2);
                System.out.print(size+"\n");
            pointList[size].setX(x);
            pointList[size].setY(y);       
            System.out.print(x+"\n"+y);       
            size++;
            System.out.print("\n"+size);
        public int size(){
            if(size <= 0)
            return(0);
            else
            return(size-1);
        private void resize(int newsize){
            Point2d[] newpointList = new Point2d[newsize]; // Create a new array
        public int[] get(int index){
            if(index>size)
                      throw new ArrayIndexOutOfBoundsException(index);
            else
                int[] point = new int[2];
                point[0] = (int)pointList[index-1].x;
                point[1] = (int)pointList[index-1].y;
                return(point);
    public static void main(String args[]){
        pointList plist = new pointList();
        plist.add(10, 10);
    }

    An Object-array (or in your case an array of Point2D) is just an array of references in Java.
    With "new Point2D[10]" you've created an array capable of holding 10 references to Point2D objects, but you've not yet created an Point2D object (each of those references is null). You'll need to create such a Point2D object in your add() method (before you try to call setX() and setY() on it).
    Two additional hints:
    * Your class should really be called PointList, because class names should start with a upper-case letter in Java
    * your resize method doesn't keep the old values, but simply creates a new (empty) array.

  • Exception in thread "main" java.lang.NullPointerException

    hi
    I am new to Java, and taking an introductory course in java. I wrote the code given bellow and get following error "C:\java\assingment2>java test123
    Exception in thread "main" java.lang.NullPointerException
    at PartCatalog.Add(test123.java:56)
    at test123.main(test123.java:102)"
    Can any body help me please
    import java.util.*;
    class PartRecord
    public String PartName;
    public String PartNumber;
    public float Cost;
    public int Quantity;
    public static int counter ;
    public PartRecord()
    { PartName ="";
         PartNumber="";
    Cost = 0;
         Quantity = 0;
         counter = 0;
    public void Set(String name, final String num,
    float cost, int quantity)
         PartName = name;
    PartNumber= num;
    Cost = cost;
    Quantity = quantity;
    counter++;
    public float Get()
                   return Cost*Quantity;
    public static int Counter() {return counter;}
    class PartCatalog
    public PartCatalog()
    npart=0;
    public void Add(String name, String num,
    float cost, int quantity)
    if(npart>=1000) return;
    Parts[npart++].Set(name,num,cost,quantity);
    public float ShowInventory()
    int inventory = 0;
    for(int i=0; i<npart; i++)
    inventory+= Parts.Get();
    return inventory;
    public PartRecord[] Parts = new PartRecord[1000];
    public int npart;
    class ExtPartCatalog extends PartCatalog
    public void Sort()
    Arrays.sort(Parts);
    public void Print()
    for(int i=0; i<npart; i++)
    System.out.println ( Parts[i].PartName + "\t "
    + Parts[i].PartNumber + "\t "
    + Parts[i].Cost + "\t "
    + Parts[i].Quantity + "\n");
    class test123{
    public static void main(String args[])          
         ExtPartCatalog catalog = new ExtPartCatalog();
         catalog.Add("tire ", "1", 45, 200);
         catalog.Add("microwave", "2", 95, 10);
         catalog.Add("CD Player", "3", 215, 11);
         catalog.Add("Chair ", "4", 65, 10);
         catalog.Sort();
    catalog.Print();
    System.out.println("Inventory is " + catalog.ShowInventory());
    ExtPartCatalog catalog2 = new ExtPartCatalog();
    catalog2.Add("ttt ", "1", 45, 200);
    System.out.print("\n\nTotally there are " + PartRecord.Counter() );
    System.out.println(" Parts being set" );

    Thank you for your reply. I think i used
    public PartRecord[] Parts = new PartRecord[1000];
    so i have created the reference. I tries what you told me but it still did not work. I am putting the code again, but now in the formatted form so that you can read it more easily. I will appreciate your help. Thanks
    <code>
    import java.util.*;
    class PartRecord
    {      public String PartName;
    public String PartNumber;
    public float Cost;
    public int Quantity;
    public static int counter ;
         public PartRecord()
              PartName ="";
              PartNumber="";
              Cost = 0;
              Quantity = 0;
              //counter = 0;
         public void Set(String name, final String num,
    float cost, int quantity)
         PartName = name;
         PartNumber= num;
         Cost = cost;
         Quantity = quantity;
         counter++;
         public float Get()
         return Cost*Quantity;
         public static int Counter() {return counter;}
    class PartCatalog
    {      public PartRecord[] Parts = new PartRecord[1000];
         public int npart;
    public PartCatalog()
    npart=0;
         public void Add(String name, String num,
         float cost, int quantity)
         if(npart>=1000) return;
         Parts[npart++].Set(name,num,cost,quantity);
         public float ShowInventory()
              float inventory = 0;
              for(int i=0; i<npart; i++)
              inventory= Parts[npart].Get();
              return inventory;
    /*class ExtPartCatalog extends PartCatalog
         public void Sort()
         Arrays.sort(Parts);
         public void Print()
                   for(int i=0; i<npart; i++)
                   System.out.println ( Parts.PartName + "\t "
                                  + Parts[i].PartNumber + "\t "
                                  + Parts[i].Cost + "\t "
                             + Parts[i].Quantity + "\n");
    class azimi_a{
    public static void main(String args[])
    PartCatalog c = new PartCatalog() ;//= new PartCatalog[4];
    c.Add("tire ", "1", 45, 200);
    c.Add("microwave", "2", 95, 10);
    c.Add("CD Player", "3", 215, 11);
    c.Add("Chair ", "4", 65, 10);
    <code>

  • Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

    Hello everyone ... sorry for my English but I am an Italian boy with a problem that is not answered.
    I had to create a web application-service (created in Java with NetBeans 6.7) which is connected to a database postgresql (8.3.5) and for connection to the server using tomcat (3.2.4) through SOAP messages (2_2).
    OPERATING SYSTEM: WINXP
    I have created classes ... I created the database ... completed the project in NetBeans without any errors ... implemented the necessary libraries in the project (also ).... 8.3.604.jar jdbc tomcat configured and soap ... .. and set the environment variables (soap, mail, send in xerces )...... run the application on the NetBeans appears the login screen of my web service .....
    enter username and password (exactly!) and the NetBeans gives me an Exception:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at Intro.loginActionPerformed(Intro.java:522)
            at Intro.access$100(Intro.java:21)
            at Intro$2.actionPerformed(Intro.java:111)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
            at java.awt.Component.processMouseEvent(Component.java:6263)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
            at java.awt.Component.processEvent(Component.java:6028)
            at java.awt.Container.processEvent(Container.java:2041)
            at java.awt.Component.dispatchEventImpl(Component.java:4630)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2475)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 31 seconds)  The line 522 Intro class is as follows:
    private void loginActionPerformed(java.awt.event.ActionEvent evt) {                                     
            try {
                URL address= new URL("http://"+ip+":8080/soap/servlet/rpcrouter");
                //Costruzione della chiamata
                Call chiamata = new Call();
                chiamata.setTargetObjectURI("urn:server");
                chiamata.setMethodName("controllaAgenzia");
                chiamata.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
                //creazione parametri che dovro' passare al soap
                Vector<Parameter> params = new Vector<Parameter>();
                String u = user.getText();
                String p = String.valueOf(password.getPassword());
                params.addElement(new Parameter("user", String.class, u, null));
                params.addElement(new Parameter("password", String.class, p, null));
                chiamata.setParams(params);//parametri passati al soap
                try {
                    //Invocazione RPC
                    Response respons = chiamata.invoke(address, "");
                    //qui ho la risposta inviata dal server
                    *Parameter par = respons.getReturnValue();*
                    Object value = par.getValue();
                    String REP = String.valueOf(value);
                    System.out.println(REP);
                    if (REP.equals("ACK_agenzia")) {
                        new MainAgenzia(ip);
                        this.dispose();
                    } else if (REP.equals("NACK_agenzia")) {
                        JOptionPane.showMessageDialog(null, "I dati inseriti non sono corretti", "Errore", JOptionPane.ERROR_MESSAGE);
                        password.setText("");
                        user.setText("");
                    } The strange thing is that this web service was running just finished the project.
    After 4-5 days of its operation has stopped, creandomi this problem.
    I think the answer is, the server that is not the case.
    I thought all I thought was jdbc, but I can connect to the database, so I do not know what to do and how to proceed.
    thanks to all, and thanks to my translator. :P

    Parameter par = respons.getReturnValue();There is only one possible reason, "respons" is null.

Maybe you are looking for

  • Replacement hard disk for Satellite M30-604

    Having problems with my hard disk and want to change it. Believe original was a IC25N060ATMR04-0 which appears to be a Hitachi 4200rpm 60Gb UDMA drive with an 8 Meg buffer. Can I replace it with a larger, faster drive? If so what spec must I have? Gr

  • Can't get to a network printer on XP thru Windows 7

    I have network ptinter (Laserjet P2015) that is hardwired to a computer that is running XP.  I got a new laptop with Windows 7 and it is on the network, when I go to add the printer to the new laptop I get a message that says that it cannot locate th

  • ConnectionFactory lost, but session not invalidated.

    Hi guys! I Have a connectionfactory object which calls Drivermanager.getConnection(...) for new connections in my classes. and i am closing them properly. I am using servlets for the first time to handle bussiness logic instead of jsp. the problem i

  • How to merge 2 halves of an image contained within 2 separate folders + repeat (2 image sequences)?

    I have two folders of image sequences. Folder 1 contains images for the left hand side of the frame. Folder 2 contains images for the right side of the frame. Each image in folder 1 pairs with a corrosponding image in folder 2 and I want to merge the

  • W540 Graphics Card Clarification

    I had one clarification regarding the graphics card I chose for W540 which was "W540 NVIDIA Quadro K2100M 2GB" but when I got my spec confirmed it was changed some thing like "NVN15P-Q3Opt(K2000Mfollowon) Graphic Card". Are both these represent the s