Null Pointer and cache problem

Simple program...reads 4 images from html and prints them on the page. That all works, but when observing the java console, a "Null Pointer Exception" error pops up after a while. I believe it has something to do with the cache. Is there any way you can see to avoid this error showing in the java console? What in tarnation could be causing this?
Here is the snip from the consol:
Java(TM) Plug-in: Version 1.4.1_02
Using JRE version 1.4.1_02 Java HotSpot(TM) Client VM
User home directory = C:\WINDOWS
Proxy Configuration: Browser Proxy Configuration
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
Trace level set to 5: basic, net, security, ext, liveconnect ... completed.
Logging set to : true ... completed.
Cache size is: 52022779 bytes, cleanup is necessary
Apr 29, 2005 4:40:02 PM sun.plugin.usability.PluginLogger log
INFO: Cache size is: 52022779 bytes, cleanup is necessary
java.lang.NullPointerException
     at sun.plugin.cache.CacheFile.getFileType(CacheFile.java:81)
     at sun.plugin.cache.CacheFile.before(CacheFile.java:127)
     at sun.plugin.cache.CleanupThread$1.compare(CleanupThread.java:204)
     at java.util.Arrays.mergeSort(Arrays.java:1237)
     at java.util.Arrays.mergeSort(Arrays.java:1244)
     at java.util.Arrays.mergeSort(Arrays.java:1245)
     at java.util.Arrays.mergeSort(Arrays.java:1244)
     at java.util.Arrays.mergeSort(Arrays.java:1245)
     at java.util.Arrays.mergeSort(Arrays.java:1244)
     at java.util.Arrays.mergeSort(Arrays.java:1244)
     at java.util.Arrays.sort(Arrays.java:1185)
     at sun.plugin.cache.CleanupThread.getFilesInCache(CleanupThread.java:200)
     at sun.plugin.cache.CleanupThread.cleanCache(CleanupThread.java:122)
     at sun.plugin.cache.CleanupThread.run(CleanupThread.java:93)
Here is a snip of the html page:
<applet code="jewelry3custom.class" align="baseline"
width="750" height="300" >
<param name="image1"      value="web-heart-musician-4.jpg">
<param name="image2"      value="web-circle-musician-4.jpg">
<param name="image3"      value="web-oval-musician-4.jpg">
<param name="image4"      value="web-rectangle-musician-4.jpg">
<param name="BackGround" value="FFFFFF">
<param name="Steps"      value="277">
<param name="Speed"      value="16">
</applet>Here is the java program:
*          Created on Apr 25, 2005 7:16:27 AM
import java.awt.*;
import java.awt.image.*;
import java.util.*;
import java.applet.*;
import java.awt.event.*;
import java.awt.event.MouseEvent;
public class jewelry3custom extends Applet implements MouseListener
     Image imag1, imag2, imag3, imag4;
  public void init()
          imag1 = getImage(getDocumentBase(), getParameter("image1"));
          imag2 = getImage(getDocumentBase(), getParameter("image2"));
          imag3 = getImage(getDocumentBase(), getParameter("image3"));
          imag4 = getImage(getDocumentBase(), getParameter("image4"));
  public void paint(Graphics g)
     g.drawImage(imag1,10,10,100,100,this);          
     g.drawImage(imag2,120,10,100,100,this);          
     g.drawImage(imag3,230,10,100,100,this);          
     g.drawImage(imag4,340,10,100,100,this);          
  public void mouseClicked(MouseEvent event){
  public void mousePressed(MouseEvent event){
  public void mouseReleased(MouseEvent event){
  public void mouseEntered(MouseEvent event){
  public void mouseExited(MouseEvent event){
}

Those database defaults are only applied when you use an INSERT statement that specifies a list of columns excluding the ones with defaults. Presumably your persistence code always sets all columns when it does an INSERT, so the defaults won't apply. You'll have to find the way to set the defaults in the persistence layer, not in the database.

Similar Messages

  • Null Pointer and URL parsing

    I am trying to write a Bookmark reader to go through bookmarks on a windows machine and let you know if your booksmarks are old and not valid.
    Anyway, I am getting a nullpointer and having all sorts of problems. My error comes at line 56. (See below, I will point it out)
    import java.io.*;
    import java.net.HttpURLConnection;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.util.Vector;
    * Created by IntelliJ IDEA.
    * User: mlubrano
    * Date: Jan 29, 2003
    * Time: 3:01:20 PM
    * To change this template use Options | File Templates.
    public class LinkMain {
    static String desktopDir = System.getProperty("user.home");
    static String osName = System.getProperty("os.name");
    static String FSEP = System.getProperty("file.separator");
    static String workingDir = new File(System.getProperty("user.dir")).getParent().replace('\\', '/');
    private Vector bookmarkList = new Vector();
    private Vector bookmarkURLs = new Vector();
    public static void main(String[] args) {
    String rootDir = desktopDir + FSEP + "Favorites" + FSEP;
    LinkMain lm = new LinkMain(rootDir);
    //lm.recurseDir(rootDir);
    LinkMain(String root) {
    //LinkHTTPConnect();
    //ReadInBookmarks();
    recurseDir(root);
    ReadInBookmarks();
    //read in boookmarks
    public void ReadInBookmarks() {
    BufferedReader br = null;
    for (int i = 0; i < bookmarkList.size(); i++) {
    try {
    br = new BufferedReader(new FileReader((File)bookmarkList.get(i)));
    while(br.ready()) {
    String line = new String("");
    System.err.println(br.readLine());
    line = br.readLine();
    //Problem is somewhere in here!!!!!!!!!!!!!!!!!!!!!!!!!!!
    if (line.startsWith("URL=")) {
    LinkHTTPConnect(line.substring(4).trim());
    //System.out.println(line.substring(4).trim());
    } catch (FileNotFoundException e) {
    e.printStackTrace(); //To change body of catch statement use Options | File Templates.
    catch (IOException ioe) {
    ioe.printStackTrace();
    public void recurseDir(String startDir) {
    File[] children = new File(startDir).listFiles();
    for (int i = 0; i < children.length; i++) {
    if (children.isDirectory())
    recurseDir(children[i].getAbsolutePath());
    bookmarkList.add(new File(children[i].getAbsolutePath()));
    //System.err.println(children[i].getAbsolutePath());
    //Connect and get results
    public void LinkHTTPConnect(String s) {
    try {
    URL url = new URL(s);
    HttpURLConnection conn = (HttpURLConnection) url.openConnection();
    conn.setRequestMethod("HEAD");
    conn.connect();
    // GET seems to do a better job of locating it
    if (conn.getResponseCode() != 200) {
    conn = (HttpURLConnection) url.openConnection();
    conn.setRequestMethod("GET");
    conn.connect();
    if (conn.getResponseCode() == 200) {
    System.out.println("ok");
    //System.out.println(desktopDir);
    } else
    System.out.println("not found");
    } catch (MalformedURLException e) {
    System.out.println(e);
    } catch (IOException e) {
    System.out.println(e);
    //Print Results in some format

    Oops....
    Well it is not looping right... It seems to be looping the right # of times, but not moving on to the next file...
    The idea is that is looks through your favorites folder and check to make sure that url is valid.. if you run this..
    import java.io.*;
    import java.net.HttpURLConnection;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.util.Vector;
    * Created by IntelliJ IDEA.
    * User: mlubrano
    * Date: Jan 29, 2003
    * Time: 3:01:20 PM
    * To change this template use Options | File Templates.
    public class LinkMain {
      //C:\Documents and Settings\mlubrano
      static String desktopDir = System.getProperty("user.home");
      static String osName = System.getProperty("os.name");
      static String FSEP = System.getProperty("file.separator");
      static String workingDir = new File(System.getProperty("user.dir")).getParent().replace('\\', '/');
      private Vector bookmarkList = new Vector();
      private Vector bookmarkURLs = new Vector();
      public static void main(String[] args) {
        String rootDir = desktopDir + FSEP + "Favorites" + FSEP;
        LinkMain lm = new LinkMain(rootDir);
        //lm.recurseDir(rootDir);
      LinkMain(String root) {
        //LinkHTTPConnect();
        //ReadInBookmarks();
        recurseDir(root);
        ReadInBookmarks();
      //read in boookmarks
      public void ReadInBookmarks() {
        BufferedReader br = null;
        for (int i = 0; i < bookmarkList.size(); i++) {
          try {
            br = new BufferedReader(new FileReader((File) bookmarkList.get(i)));
            while (br.ready()) {
              String line = new String("");
              System.err.println(br.readLine());
              line = br.readLine();
              while (line != null) {
                if (line.startsWith("URL=") && line != null) {
                  LinkHTTPConnect(line.substring(4).trim());
                  System.out.println(line.substring(4).trim());
          } catch (FileNotFoundException e) {
            e.printStackTrace();  //To change body of catch statement use Options | File Templates.
          } catch (IOException ioe) {
            ioe.printStackTrace();
      public void recurseDir(String startDir) {
        File[] children = new File(startDir).listFiles();
        for (int i = 0; i < children.length; i++) {
          if (children.isDirectory())
    recurseDir(children[i].getAbsolutePath());
    bookmarkList.add(new File(children[i].getAbsolutePath()));
    //System.err.println(children[i].getAbsolutePath());
    //Connect and get results
    public void LinkHTTPConnect(String s) {
    try {
    URL url = new URL(s);
    HttpURLConnection conn = (HttpURLConnection) url.openConnection();
    conn.setRequestMethod("HEAD");
    conn.connect();
    // GET seems to do a better job of locating it
    if (conn.getResponseCode() != 200) {
    conn = (HttpURLConnection) url.openConnection();
    conn.setRequestMethod("GET");
    conn.connect();
    if (conn.getResponseCode() == 200) {
    System.out.println("ok");
    //System.out.println(desktopDir);
    } else
    System.out.println("not found");
    } catch (MalformedURLException e) {
    System.out.println(e);
    } catch (IOException e) {
    System.out.println(e);
    //Print Results in some format
    It loops through the first file it finds x number of times (x being the total number of files you have)
    Thx,
    Usul

  • Null Date and Time Problem

    I created my entity classes from a database by using netbeans 6.0 and I'm using H2 as a database. I've the following table in my database.
    CREATE CACHED TABLE OPEN_TABLE ( ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY, TABLE_ID INTEGER, WAITER_ID INTEGER, OPEN_HOUR TIME DEFAULT CURRENT_TIME, OPEN_DATE DATE DEFAULT CURRENT_DATE );
    and here is the entity class netbeans created for me.
    import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * * @author Yupp */ @Entity @Table(name = "OPEN_TABLE") @NamedQueries({@NamedQuery(name = "OpenTable.findById", query = "SELECT o FROM OpenTable o WHERE o.id = :id"), @NamedQuery(name = "OpenTable.findByTableId", query = "SELECT o FROM OpenTable o WHERE o.tableId = :tableId"), @NamedQuery(name = "OpenTable.findByWaiterId", query = "SELECT o FROM OpenTable o WHERE o.waiterId = :waiterId"), @NamedQuery(name = "OpenTable.findByOpenHour", query = "SELECT o FROM OpenTable o WHERE o.openHour = :openHour"), @NamedQuery(name = "OpenTable.findByOpenDate", query = "SELECT o FROM OpenTable o WHERE o.openDate = :openDate")}) public class OpenTable implements Serializable {     private static final long serialVersionUID = 1L;     @Id     @Column(name = "ID", nullable = false)     private Integer id;     @Column(name = "TABLE_ID")     private Integer tableId;     @Column(name = "WAITER_ID")     private Integer waiterId;     @Column(name = "OPEN_HOUR")     @Temporal(TemporalType.TIME)     private Date openHour;     @Column(name = "OPEN_DATE")     @Temporal(TemporalType.DATE)     private Date openDate;     public OpenTable() {     }     public OpenTable(Integer id) {         this.id = id;     }     public OpenTable(Integer id, Date openHour, Date openDate) {         this.id = id;         this.openHour = openHour;         this.openDate = openDate;     }     public Integer getId() {         return id;     }     public void setId(Integer id) {         this.id = id;     }     public Integer getTableId() {         return tableId;     }     public void setTableId(Integer tableId) {         this.tableId = tableId;     }     public Integer getWaiterId() {         return waiterId;     }     public void setWaiterId(Integer waiterId) {         this.waiterId = waiterId;     }     public Date getOpenHour() {         return openHour;     }     public void setOpenHour(Date openHour) {         this.openHour = openHour;     }     public Date getOpenDate() {         return openDate;     }     public void setOpenDate(Date openDate) {         this.openDate = openDate;     }     @Override     public int hashCode() {         int hash = 0;         hash += (id != null ? id.hashCode() : 0);         return hash;     }     @Override     public boolean equals(Object object) {         // TODO: Warning - this method won't work in the case the id fields are not set         if (!(object instanceof OpenTable)) {             return false;         }         OpenTable other = (OpenTable) object;         if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {             return false;         }         return true;     }     @Override     public String toString() {         return "OpenTable[id=" + id + "]";     } }
    The problem is when I try to insert a new OpenTable to the database, Open_Date and Open_Hour columns stay as null. I want them to get the automatic CURRENT_DATE and CURRENT_TIME values. I can't see where the problem is because I used CURRENT_DATE and CURRENT_TIME words when I created the table. I don't have any problems when I use standart SQL statements to insert a new row. I just use INSERT INTO OPEN_TABLE(TABLE_ID, WAITER_ID) VALUES(2,3) and get current date and hour values automatically but JPA doesn't do that for me. What should I do to solve the problem?

    Those database defaults are only applied when you use an INSERT statement that specifies a list of columns excluding the ones with defaults. Presumably your persistence code always sets all columns when it does an INSERT, so the defaults won't apply. You'll have to find the way to set the defaults in the persistence layer, not in the database.

  • Max Beans in Cache causes NULL Pointer Exception

    Hi All,
    a rather weird event (from our perspective) occurs when we do the
    following:
    We have an entity bean set to max beans in cache 100 (default value of
    our deployment tool ), the database table related to that bean holds
    lets say 300 entries.
    Doing a find all and in the same session bean instanciated transaction a
    processing loop over the enumeration of beans we get an NULL Pointer
    exception when accesing the 101 Bean. Neverthless the Weblogic server
    increases the cache size automatically but obviously not fast enough and
    not on time.
    has anyone experienced the same problem and has a fix for it, appart
    from increasing the cache size in the deployment descriptor ?
    any help welcome
    Michael

    Hi Michael.
    Can you post the stack trace of the NullPointerException? Was it in
    your code or ours? Also, what version of WebLogic are you using?
    -- Rob
    Rob Woollen
    Software Engineer
    BEA WebLogic
    [email protected]
    Michael Rupprecht wrote:
    Hi All,
    a rather weird event (from our perspective) occurs when we do the
    following:
    We have an entity bean set to max beans in cache 100 (default value of
    our deployment tool ), the database table related to that bean holds
    lets say 300 entries.
    Doing a find all and in the same session bean instanciated transaction a
    processing loop over the enumeration of beans we get an NULL Pointer
    exception when accesing the 101 Bean. Neverthless the Weblogic server
    increases the cache size automatically but obviously not fast enough and
    not on time.
    has anyone experienced the same problem and has a fix for it, appart
    from increasing the cache size in the deployment descriptor ?
    any help welcome
    Michael

  • Null Pointer Exception and Illegal Arguement when ran with Wireless Toolkit

    The following code throws a null pointer exception after it tried to initialize the textBox. I am not sure if there is something I am not importing, or if it's just because I'm sick and my head is cloudy. :-}.
    I am using Wireless Toolkit 2.2 and Java 5.0
    Anyhelp would be appreicated. Thank You.
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    public class TacticalTestMain extends MIDlet implements CommandListener {
         private Display display;
         private Form formMain;
         private TextBox tbHelp;          //Text Box for help Command
         private Command cmExit;          //A button to exit midLet
         private Command cmBack;          //Go "back" to main form
         private Command cmHelp;          //Ask for help
         public TacticalTestMain()
              display = Display.getDisplay(this);
              formMain = new Form("Tactical Survey Program");
              cmExit = new Command("Exit", Command.SCREEN, 1);
              cmBack = new Command("Back", Command.BACK, 1);
              cmHelp = new Command("Help", Command.HELP, 1);
              formMain.addCommand(cmExit);
              formMain.addCommand(cmBack);
              formMain.addCommand(cmHelp);
              formMain.setCommandListener(this);
              System.out.println("Before Create Text Box");
              //Create the help textBox with a max of 25 charecters
              tbHelp = new TextBox("HeLp", "You can press the back button", 25, 0);
              tbHelp.addCommand(cmBack);
              tbHelp.setCommandListener(this);
              System.out.println("AfTER Create Text Box");               
         }//end constructor
         public void startApp()
              System.out.println("Inside StartApp()");
              display.setCurrent(formMain);
         }//end startApp()
         public void pauseApp()
         }//end pauseApp
         public void destroyApp(boolean unconditional)
              notifyDestroyed();
         }//end destroyApp()
         //Check to see if the exit button was selected
         public void commandAction(Command c, Displayable d)
              System.out.println("Inside commandAction()");
              String sLabel = c.getLabel();
              if(sLabel.equals("Exit"))
                   destroyApp(true);
    Errors from the KToolbar:
    Running with storage root DefaultColorPhone
    Before Create Text Box
    Unable to create MIDlet TacticalTestMain
    java.lang.IllegalArgumentException
         at javax.microedition.lcdui.TextField.setChars(+105)
         at javax.microedition.lcdui.TextField.setString(+27)
         at javax.microedition.lcdui.TextField.<init>(+134)
         at javax.microedition.lcdui.TextBox.<init>(+74)
         at TacticalTestMain.<init>(+134)
         at java.lang.Class.runCustomCode(+0)
         at com.sun.midp.midlet.MIDletState.createMIDlet(+19)
         at com.sun.midp.midlet.Selector.run(+22)
    Execution completed.
    743701 bytecodes executed
    23 thread switches
    741 classes in the system (including system classes)
    4071 dynamic objects allocated (120440 bytes)
    2 garbage collections (91412 bytes collected)

    Hi zoya,
    Here is the problem:
    tbHelp = new TextBox("HeLp", "You can press the back button", 25, 0);
    This line declares a maximum textbox size of 25 but in reality he is declaring a textbox of size 29.
    Thats why it is throwing the illegal argument.
    happy coding :)

  • Null pointer problems. Need help

    I have a class that scrolls text across the screen. the class is a Jpanel and uses a thread to produce a scroller effect. The panel is created and called in the constructor and uses a String Array.
    This application is now a client and its server sends over a new String array as an object to the client uses stream sockets. I wish to use this new Server string array but since no array exists until it connects i suppse thats the reason im getting null pointer exceptions.
    What can i do to solve this problem?

    Do you get a stack trace printed to the console window? Look at the stack trace. It tells you in which line of your source code the NullPointerException occurred. Go to that place in your source code and find out what happens. Fix the problem in the source code.

  • My macbook seems to be going crazy. At certain points (and for hours) I get the oh snap page on chrome, safari doesnt work, macbook wont let me create any files or for example upload music to itunes. I restored my mac so im sure its not a malware problem.

    My macbook seems to be going crazy. At certain points (and for hours) I get the oh snap page on chrome, safari doesnt work, macbook wont let me create any files or for example upload music to itunes. I restored my mac so im sure its not a malware problem. The only thing that solves it is switching off and on , but sometimes I have to do that for 6-7 times before its ok or wait for a few hours. Some help please

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Problems in SLD and Cache refresh (SXI_CACHE).

    Dear Experts,
    I am facing SLD and Cache refresh problems in PI 7.0 on HP-UX.
    1) SXI_CACHE : Last Error During Cache refresh is showing LCR_GET_OWN_BUSINESS_SYSTEM - NO_BUSINESS_SYSTEM error. And also Start Delta Cache Refresh / Start Complete Cache refresh are in deactive mode (Frozen).
    2) SLDCHECK : Log says No Business System for ABC Client 100 ".
    where ABC=SID. Business System INTEGRATION_SERVER_ABC is declared in SLD and client 100 is assigned.
    My question is : Is this a BASIS or DEVELOPER issue? Also please let me know if you have any solutions for the above mentioned issue. Thanks in Advance.
    SLDCHECK Log Snippet:
    SLD server access settings:
    host name: ABCXIDEV
    port number: 50000
    user : PIAPPLUSER
    Use transaction SLDAPICUST if you wish to maintain the SLD server access data
    Launching the SLD GUI in a separate browser window...
    => Verify in the browser GUI that the SLD is in a healthy running state!
    Calling function LCR_LIST_BUSINESS_SYSTEMS
    Retrieving data from the SLD server...
    Function call terminated sucessfully
    List of business systems maintained in the SLD:
    INTEGRATION_SERVER_ABC
    ERP_DEV_100
    Calling function LCR_GET_OWN_BUSINESS_SYSTEM
    Retrieving data from the SLD server...
    No corresponding business system found for system ABC client 100
    => Check and maintain the SLD content for the current client

    Hello,
    Since this is an PI system, your XI consultant must have created/will need to create business systems in SLD for the scenario to work properly. This error is because it cannot find the business system.
    You cannot point out the fingers on Basis or XI and say that it is THEIR issue. Please consult with the consultant who is doing the XI interface and check if the business systems he require are properly created in SLD. If not, create them or ask them to create it (if they are allowed to..).
    From the error, what i can see is that you have defined an integration server INTEGRATION_SERVER_ABC in SLD . the XI interface is checking the required business system in the integration server INTEGRATION_SERVER_ABC in SLD but cannot find it over there. Please check the integration server INTEGRATION_SERVER_ABC in SLD and talk to the XI consultant and you will be able to fix this with their help.
    Hope this helps you..
    Regards,
    Jazz

  • Problem in getEelementById() method-null pointer exception

    Hi All,
    I am using DocumentBuilder factory for parsing a xml file.
    I am getting the document object and also creating an element in
    the root element .And also I am setting the element id for the
    element as attiribute .I need to select the element having same ID
    using getElementById() method .But it is giving null pointer
    exception.
    N.B: My parsing file contains dtd declaration and root element.
    My sample code look like this;
    DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
    DocumentBuilder db=dbf.newDocumentBuilder();
    Document doc=db.parse(ne File("C:/index.xml");
    Element root t=doc.getDocumentElement();
    root.setAttribute("ID","12345");
    Element oElement = doc.createElement(element_name);
    oElement.setAttribute("ID",element_id);
    Element oEle=doc.getElementById(element_id);
    Could anyone please to solve this problem.
    Please do favour with me.
    Thanks and Regards,
    Sreekanth

    while creating xml you should mention which attribute is ID attribute using
    setIDAttribute() method,
    as you are setting "ID" attribute as ID so
    after adding Id attribute to the root element
    use setIDAttribute("ID",true);
    then getElementById will return the element by using ID
    regards
    shivakumar.T

  • Returning vector and null pointer exception

    Hi, I'm writing a mailing program which so far is working fine, but I have now run into a problem which is completely throwing me. My mailer needs to be able to load multiple attachments - and also to be able to deal with an HTML text which contains multiple images. In each case, what I'm trying to do is to put the attachments and the images into separate vectors and process them through an iterator. The logic, at least, I hope is correct.
    I can get my code to compile but it keeps throwing a null pointer exception a runtime. Somehow, I just can't get it to pass the vector from one part of the code to another.
    Can anyone help me? I've tried various things, none of which seem to work. My code, as it stands, is posted in a skeletal form below.
    Thanks for any ideas:
    public class MailSender
       // declare various variables, including:   
         Vector embeddedImages;
         String HTMLString;
        public MailSender()
            setup();
        private void setup()
         //this part of the program sets up the various parts of the mail  (to, from, body etc)    
          HTMLString = "blah blah blah";  //sample HTMLString   
           Vector embeddedImages = null; //is this correct?
            if (HTMLString.length() > 0)
                processHTMLString(HTMLString);
         private String procesHTMLString(String htmlText)
            Vector embeddedImages = new Vector(); // I construct my vector here, is this correct?
            //Here I process the HTML string to extract the images
            //get the file path of the image and pass it to the vector
            addToVector(imageFile);
            return HTMLString;
        public Vector addToVector(String imageFile)
            embeddedImages.add(imageFile);
            return embeddedImages;
        private void send()
            //this part does the sending of the mail
            //at some part in this method I need to get at the contents of the vector:
            //but this part isn't working, I keep getting a null pointer exception
            Iterator singleImage = embeddedImages.iterator();
            while (singleImage.hasNext())
        public static void main(String[] args)
            MailSender ms = new MailSender();
            ms.send();
            System.out.println("MailSender is done ");
    }

    >>>>while they don't have a clue on how the language and/or programming in general works.
    Thank you, salpeter, for your esteemed estimation of my programming competence.
    >>>What I'm wondering is: how come people always start building applications... blah blah
    The reason being, is that it happens to be my job.
    OK, I'm perhaps slower than most and there are things I don't yet understand but I get paid probably about a tenth of what you do (and maybe even less). I regard it as a kind of apprenticeship which, after a past life having spent twenty years packing crates in a warehouse, is worth the sacrifice. Six months ago I'd never written a line of code in my life and everything I've learned since has been from books, the good people in these forums, and a lot of patient trial and error. It's hard work, but I'll get there.
    I say this, only as encouragement to anyone else who is trying to learn java and hasn't had the benefit of IT training at school and a four year computing course at university paid for by the parents, and for whom the prohibitive cost (in both time and money) of most java courses would never allow them to get on this ladder.
    Excuse my somewhat acerbic posting, but comments such as yours tend to provoke...
    Thank you EverNewJoy for explaining this to me. I haven't had time yet to try it out, but at least the concept now is clear to me.

  • JTextArea, getText, and Null pointer exception

    Hi, I am having trouble figuring out why i get a null pointer exception when i call
    ta = theGUI.AbName_TA;
    ta.getText();does anyone have any ideas as to what the problem is?
    (NOTE: i am somewhat new to java, and am DEFINITELY new to swing. so, if there is a better way to go about the stuff that i'm trying to accomplish, PLEASE feel free to offer suggestions.)
    Thanks, Kim
    Code for GUI_CreateAntibody
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    import java.util.*;
    public class GUI_CreateAntibody implements ActionListener
         private String AntibodyName;
         private TheDBInterface3 TheInterface2 = new TheDBInterface3();
         private JTextArea ta;
         GUI_CreateAntibody_Sketcher theGUI = new GUI_CreateAntibody_Sketcher();
         public static void main (String[] args) {
              System.out.println("In Main");
              GUI_CreateAntibody atry = new GUI_CreateAntibody();
              atry.init();
         protected void init () {
              System.out.println("In init");
              GUI_CreateAntibody atry = new GUI_CreateAntibody();
              theGUI.init();
              theGUI.button1.addActionListener(atry);
              System.out.println("added the actionlistener");
              System.out.println(theGUI.button1.toString());
         public void CloseWindow() {
              theGUI.window.dispose();
         public void actionPerformed(ActionEvent e) {
              System.out.println("In actionPerformed");
              Object source = e.getSource();
              System.out.println(source.toString());
              System.out.println("");
         //     System.out.println(theGUI.button1.toString());
         //     if (source == theGUI.button1) {
                   System.out.println("BUTTON1 WAS PRESSED");
                   ta = theGUI.AbName_TA;
                   ta.getText();
                   // String name = theGUI.AbName_TA.getText();
                   System.out.println("hi");
                   //TheInterface2.CreateAb(name);
                   //GUI_AddingAntibody AddingAb = new GUI_AddingAntibody();
                   //AddingAb.init();
                   //CloseWindow();
    Code for GUI_CreateAntibody_Sketcher
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class GUI_CreateAntibody_Sketcher implements WindowListener
         public JTextArea AbName_TA;          
         public JButton button1;
         String currentPattern;
         String[] patternExamples = {
                     "Yes",
                     "No",
         JComboBox patternList;
         JLabel result;
         JComboBox AbList;
         public void init ()
              window  = new SketchFrame("GUI_CreateAntibody_Sketcher");     // create the application window
              Toolkit theKit = window.getToolkit();     // get the window toolkit
              Dimension wndSize = theKit.getScreenSize();     //     get screen size
              double xPosition = 200;
              double yPosition = 200;
              double xSize = 200;
              double ySize = 200;
              window.setBounds((int) xPosition, (int) yPosition,
                                   (int) xSize, (int) ySize);
              theApp.window.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
              GridBagLayout gridbag = new GridBagLayout();     // create a layout manager
              GridBagConstraints constraints = new GridBagConstraints();
              JPanel contentPane  = new JPanel();
              theApp.window.getContentPane().setLayout(gridbag); // set the container layout mgr
              contentPane.setBorder(BorderFactory.createCompoundBorder(
                                  BorderFactory.createMatteBorder(
                                                  1,1,2,2,Color.black),
                                  BorderFactory.createEmptyBorder(5,5,5,5)));
            constraints.fill = GridBagConstraints.BOTH;
            constraints.gridy = 0;
            constraints.gridx = 1;
            constraints.insets = new Insets(10,0,10,10);
            JLabel l = null;
            l = new JLabel("Add Antibody");
            l.setFont(new Font("Serif", Font.BOLD + Font.ITALIC, 18));
            gridbag.setConstraints(l, constraints);
            contentPane.add(l);
              window.getContentPane().add(l);
         /////// Antibody Name
            constraints.gridy = 2;
            JLabel AbLabel = null;
            AbLabel = new JLabel("Antibody Name:");
            AbLabel.setFont(new Font("Serif", Font.BOLD, 12));
             AbName_TA = new JTextArea();
            AbName_TA.setEditable(true);
            JScrollPane AbName_ScrollPane = new JScrollPane(AbName_TA);
            JPanel AbPanel = new JPanel();
            gridbag.setConstraints(AbPanel, constraints);
            AbPanel.setLayout(new BoxLayout(AbPanel, BoxLayout.Y_AXIS));
            AbPanel.add(AbLabel);
            AbPanel.add(AbName_ScrollPane);
            window.getContentPane().add(AbPanel);
         /////// SET CONSTRAINTS AND ADD BUTTON
         /////// Pressing button will indicate that you have
         /////// entered the Ab name
              // set constraints and add button     
              constraints.gridy = 7;          
              String label = "Enter the Antibody";     
              button1 = new JButton(label);
              addButton(button1, constraints, gridbag);
              window.setVisible(true);      
         public void windowClosing(WindowEvent e)
              window.dispose();
              System.exit(1);
         public void windowOpened(WindowEvent e) { }
         public void windowClosed(WindowEvent e) { }
         static void addButton(JButton button, GridBagConstraints constraints, GridBagLayout layout)
              // create a border object using a BorderFactory method
              // Border edge = BorderFactory.createRaisedBevelBorder();
              Border edge = BorderFactory.createRaisedBevelBorder();
              Color LightBlue = new Color(180,180,255);
              button.setBorder(edge);
              button.setFont(new Font("Times", Font.ITALIC + Font.BOLD, 14));
              button.setBackground(LightBlue);
              layout.setConstraints(button, constraints);
              window.getContentPane().add(button);           
         public void windowIconified(WindowEvent e) {}
         public void windowDeiconified(WindowEvent e) {}
         public void windowActivated(WindowEvent e) {}
         public void windowDeactivated(WindowEvent e) {}
         public static SketchFrame window;
         public static GUI_CreateAntibody_Sketcher theApp;
    }

    I changed my "actionPerformed" function a bit.
    Thanks for your comments - I hadn't realized some mistakes I had made while trying to fix my code.
    I'm still getting a null pointer exception, though.
    Also, in the main function of GUI_CreateAntibody, I call init for GUI_CreateAntibody. Within THIS init function I call init for GUI_CreateAntibody_Sketcher. I don't understand what is wrong with this (except that I suppose I should be using constructors as opposed to init functions.)
    Thanks,
    Kim
    Code for GUI_CreateAntibody
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    import java.util.*;
    public class GUI_CreateAntibody implements ActionListener
         private String AntibodyName;
         private TheDBInterface3 TheInterface2 = new TheDBInterface3();
         private JTextArea ta;
         GUI_CreateAntibody_Sketcher theGUI = new GUI_CreateAntibody_Sketcher();
         public static void main (String[] args) {
              System.out.println("In Main");
              GUI_CreateAntibody atry = new GUI_CreateAntibody();
              atry.init();
         public void init () {
              System.out.println("In init");
              GUI_CreateAntibody atry = new GUI_CreateAntibody();
              theGUI.init();
              theGUI.button1.addActionListener(atry);
              System.out.println("added the actionlistener");
              System.out.println(theGUI.button1.toString());
         public void CloseWindow() {
              theGUI.window.dispose();
         public void actionPerformed(ActionEvent e) {
              System.out.println("In actionPerformed");
              Object source = e.getSource();
              System.out.println(source.toString());
              System.out.println("");
         //     System.out.println(theGUI.button1.toString());
         //     if (source == theGUI.button1) {
                   System.out.println("BUTTON1 WAS PRESSED");
                   String name = theGUI.AbName_TA.getText();
                   // String name = theGUI.AbName_TA.getText();
                   System.out.println("hi");
                   //TheInterface2.CreateAb(name);
                   //GUI_AddingAntibody AddingAb = new GUI_AddingAntibody();
                   //AddingAb.init();
                   //CloseWindow();
    }

  • Adding a new UDF throws a null pointer exception and modifying user.xml

    Hello,
    I have a two part question.
    i. I am trying to add a UDF (using Advanced>User Configuration..Attributes) to a fully configured OIM i.e. oim with reconciliation and provisioning from and to resources but it throws a null pointer exception. Look at the log, I see
    ===============Excerpt form the log file==========
    [2012-01-26T11:28:14.447-05:00] [oim_server1] [NOTIFICATION] [] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [[
    ---Stack Trace Begins[[This is not an exception. For debugging purposes]]---
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.doCheckAccess(OESAuthzServiceImpl.java:210)
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.hasAccess(OESAuthzServiceImpl.java:188)
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.hasAccess(OESAuthzServiceImpl.java:180)
    oracle.iam.platform.authz.impl.AuthorizationServiceImpl.hasAccess(AuthorizationServiceImpl.java:173)
    oracle.iam.configservice.impl.ConfigManagerImpl.checkAuthorization(ConfigManagerImpl.java:1899)
    oracle.iam.configservice.impl.ConfigManagerImpl.addAttribute(ConfigManagerImpl.java:177)
    oracle.iam.configservice.api.ConfigManagerEJB.addAttributex(Unknown Source)
    ... 21 lines skipped..
    oracle.iam.configservice.api.ConfigManager_5u0nrx_ConfigManagerRemoteImpl.addAttributex(ConfigManager_5u0nrx_ConfigManagerRemoteImpl.java:864)
    ... 13 lines skipped..
    oracle.iam.configservice.api.ConfigManagerDelegate.addAttribute(Unknown Source)
    oracle.iam.configservice.agentry.config.CreateAttributeActor.perform(CreateAttributeActor.java:266)
    oracle.iam.consoles.faces.mvc.canonic.Model.perform(Model.java:547)
    oracle.iam.consoles.faces.mvc.admin.Model.perform(Model.java:324)
    oracle.iam.consoles.faces.mvc.canonic.Controller.doPerform(Controller.java:255)
    oracle.iam.consoles.faces.mvc.canonic.Controller.doSelectAction(Controller.java:178)
    oracle.iam.consoles.faces.event.NavigationListener.processAction(NavigationListener.java:97)
    ... 24 lines skipped..
    oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmtNavigationFilter.java:115)
    ... weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthContextFilter.java:100)
    ... 15 lines skipped..
    weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    ---Stack Tracefor this call Ends---
    [2012-01-26T11:28:14.447-05:00] [oim_server1] [NOTIFICATION] [IAM-1010010] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: 1] [arg: null] [arg: USER_MANAGEMENT_CONFIG] [arg: CREATE_ATTRIBUTE] ********** Entering the Authorization Segment with parameters:: LoggedInUserId = 1, target resourceID = null, Feature = USER_MANAGEMENT_CONFIG, Action = CREATE_ATTRIBUTE **********
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010021] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: [InternalObligation: name: noop, values: [true], convertToObligation: false, InternalObligation: name: noop, values: [true], convertToObligation: false]] Validating the Internal Obligations: [InternalObligation: name: noop, values: [true], convertToObligation: false, InternalObligation: name: noop, values: [true], convertToObligation: false]
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010022] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] ---------- The list of Internal Obligation is satisfied, returning TRUE ----------
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010026] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: Decision :PERMIT\nObligations from policy: ] ********** Exiting the Authorization Segment with result Decision :PERMIT[[
    =============Excerpt ends==============
    Is there a reason why this is and how do I get by it.
    ii. Can I just add the field directly within the MDS>file/user.xml? Would there be an issue with changing an existing attribute metadata using the user.xml?

    Pradeep thank you for your response. it was helpful. However, I also found the responses to both my questions.
    i. The null pointer exception was due to using a complex query I was using in the LOV query. I tried a simple query and that worked fine.
    ii. For modifying the user defined attributes one can consult the following forum post:
    OIM 11g - Change UDF Field Type form String to LOV
    Thanks

  • Null pointer exception and servlet

    I cant figure out why i am getting a null pointer exception. this works if i keep my form output in the same class as my driving servlet. All i did was break off the html display to a new form and i get a null pointer exception.
    this is just an excerpt. no reason to post the whole form.
    Here are my two classes...
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.text.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    import org.w3c.dom.Element;
    public class myServlet extends HttpServlet
       implements SingleThreadModel {
            displayScreen myAddressBook;
            HttpServletRequest request;
            HttpServletResponse response;
            String displayForm = "DISPLAYFORM";
            String addForm     = "ADDFORM";
            String editForm    = "EDITFORM";
         // get function
        public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException
              request = this.request;
              response = this.response;
            displayScreen myAddressBook = new displayScreen(this.request,this.response);
            myAddressBook.sendAddressBook(request,response,false,displayForm);
    public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
         errorMsg = "";
         errCount=0;
         //stores address book in hashmap. Not currently using Address Book object
         request = this.request;
        response = this.response;
         if ((request.getParameterValues("submit")[0].equals("Next")))
            myAddressBook.sendAddressBook(request,response,false,displayForm);
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.text.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.*;
    public class displayScreen {
         int errCount;
         String errorMsg;
         String displayForm = "DISPLAYFORM";
         String addForm     = "ADDFORM";
         String editForm    = "EDITFORM";
         HttpServletRequest request;
         HttpServletResponse response;
           displayScreen (HttpServletRequest request, HttpServletResponse response) {
               request = this.request;
               response = this.response;
    public void sendAddressBook (HttpServletRequest request, HttpServletResponse response,boolean FileError,String formType)
             throws ServletException, IOException {
            request = this.request;
            response = this.response;
         response.setContentType("text/html");  /*****/ I GET A NULL POINTER EXCEPTION RIGHT HERE!!!!!!
    }

    anyway to write the system.err to an html screen with
    a servlet?Why would you ask that? Surely you should have asked "Any way to write a stack trace to an HTML screen from a servlet?"
    And in fact there is. I am sure you have not yet looked up the Exception class and the versions of its printStackTrace() method. But when you do, you will see that there are printStackTrace(PrintStream) and printStackTrace(PrintWriter). And you know how to write HTML (or text in general) to the servlet response so that it shows up in the client's browser, right? I will let you figure out how to put those things together.

  • Using ExecuteWithParams and getting a null pointer error

    I'm new to Webcenter and have a question about using ExecuteWithParams. I want to know if anyone experienced a null pointer exception when using it. I was using the example from the followng page to create a parameter form to filter an adf table.
    http://www.oracle.com/technology/products/jdev/tips/muench/screencasts/threesearchpages/threesearchforms_partthree.html?_template=/ocom/technology/content/print
    I created the named bind variable in the View Object editor, changed the query and dragged the ExecuteWithParams Operation onto my page. However, when I go to run the page I get the following error:
    javax.faces.el.EvaluationException: java.lang.NullPointerException     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190)     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143)     at oracle.adf.view.faces.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:55)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer.getLabel(LabelAndMessageRenderer.java:618)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:157)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:94)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:169)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:246)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.encodeColumnChild(PanelFormRenderer.java:275)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.renderColumn(PanelFormRenderer.java:251)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer._renderColumns(PanelFormRenderer.java:545)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer._encodeChildren(PanelFormRenderer.java:153)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.encodeAll(PanelFormRenderer.java:69)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:169)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:317)     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:262)     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:239)     at oracle.adfinternal.view.faces.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(ContextPoppingUINode.java:224)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderNamedChild(BaseRenderer.java:384)     at oracle.adfinternal.view.faces.ui.laf.base.desktop.PageHeaderLayoutRenderer.renderContent(PageHeaderLayoutRenderer.java:259)     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)     at oracle.adfinternal.view.faces.ui.composite.UINodeRenderer.renderWithNode(UINodeRenderer.java:90)     at oracle.adfinternal.view.faces.ui.composite.UINodeRenderer.render(UINodeRenderer.java:36)     at oracle.adfinternal.view.faces.ui.laf.oracle.desktop.PageLayoutRenderer.render(PageLayoutRenderer.java:76)     at oracle.adfinternal.view.faces.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:177)     at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:53)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.renderkit.RenderUtils.encodeRecursive(RenderUtils.java:54)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:242)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeAllChildren(CoreRenderer.java:265)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:65)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:117)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:147)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:60)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:169)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:645)     at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:568)     at oracle.adf.view.faces.webapp.UIXComponentTag.doEndTag(UIXComponentTag.java:100)     at mdssys.viewcontroller._public__html._SoluminaOrderStatus_jspx._jspService(_SoluminaOrderStatus_jspx.java:943)     [SRC:/mdssys/ViewController/public_html/SoluminaOrderStatus.jspx:4]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:724)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at oracle.mds.jsp.MDSJSPFilter.doFilter(Unknown Source)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)     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.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:287)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)     at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)     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.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.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)     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 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[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)Caused by: java.lang.NullPointerException     at oracle.adf.model.binding.DCVariableImpl.resolveSourceVariable(DCVariableImpl.java:64)     at oracle.adf.model.binding.DCVariableImpl.resolveResourceProperty(DCVariableImpl.java:142)     at oracle.jbo.common.VariableImpl.getLabel(VariableImpl.java:800)     at oracle.jbo.uicli.binding.JUCtrlValueBinding.getLabel(JUCtrlValueBinding.java:1384)     at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:1726)     at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.internalGet(FacesCtrlAttrsBinding.java:156)     at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:649)     at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)     at oracle.adfinternal.view.faces.model.FacesPropertyResolver.getValue(FacesPropertyResolver.java:92)     at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)     at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:171)     at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)     ... 97 more
    Can anyone help me with this?

    Please, post your question on JDeveloper forum (JDeveloper and ADF

  • JAX-WS Client throws NULL Pointer Exception in NW 7.1 SP3 and higher

    All,
    My JAX-WS client is throwing an exception when attempting to create a client to connect to the calculation service. The exception is coming out of the core JAX-WS classes that are part of NetWeaver. (see exception below)
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContextExistingPort(SAPServiceDelegate.java:440)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContext(SAPServiceDelegate.java:475)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:492)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:484)
         at javax.xml.ws.Service.createDispatch(Service.java:166)
    I have done some research and it appears that as of NetWeaver 7.1 SP3 SAP stopped using the SUN JAX-WS runtime and implemented their own SAP JAX-WS runtime. I also took the time to decompile the jar file that contained the SAPServiceDelegate class which is throwing the null pointer exception. (see method from SAPServiceDelegate below)
        private ClientConfigurationContext createDispatchContextExistingPort(QName portName, JAXBContext jaxbContext)
            BindingData bindingData;
            InterfaceMapping interfaceMap;
            InterfaceData interfaceData;
            bindingData = clientServiceCtx.getServiceData().getBindingData(portName);
            if(bindingData == null)
                throw new WebServiceException((new StringBuilder()).append("Binding data '").append(portName.toString()).append("' is missing!").toString());
            QName bindingQName = new QName(bindingData.getBindingNamespace(), bindingData.getBindingName());
            interfaceMap = getInterfaceMapping(bindingQName, clientServiceCtx);
            interfaceData = getInterfaceData(interfaceMap.getPortType());
            ClientConfigurationContext result = DynamicServiceImpl.createClientConfiguration(bindingData, interfaceData, interfaceMap, null, jaxbContext, getClass().getClassLoader(), clientServiceCtx, new SOAPTransportBinding(), false, 1);
            return result;
            WebserviceClientException x;
            x;
            throw new WebServiceException(x);
    The exception is being throw on the line where the interfaceMap.getPortType() is being passed into the getInterfaceData method. I checked the getInterfaceMapping method which returns the interfaceMap (line above the line throwing the exception). This method returns NULL if an interface cannot be found. (see getInterfaceMapping method  below)
       public static InterfaceMapping getInterfaceMapping(QName bindingQName, ClientServiceContext context)
            InterfaceMapping interfaces[] = context.getMappingRules().getInterface();
            for(int i = 0; i < interfaces.length; i++)
                if(bindingQName.equals(interfaces<i>.getBindingQName()))
                    return interfaces<i>;
            return null;
    What appears to be happening is that the getInterfaceMapping method returns NULL then the next line in the createDispatchContextExistingPort method attempts to call the getPortType() method on a NULL and throws the Null Pointer Exception.
    I have included the code we use to create a client below. It works fine on all the platforms we support with the exception of NetWeaver 7.1 SP3 and higher (I already checked SP5 as well)
          //Create URL for service WSDL
          URL serviceURL = new URL(null, wsEndpointWSDL);
          //create service qname
          QName serviceQName = new QName(targetNamespace, "WSService");
          //create port qname
          QName portQName = new QName(targetNamespace, "WSPortName");
          //create service
          Service service = Service.create(serviceURL, serviceQName);
          //create dispatch on port
          serviceDispatch = service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
    What do I need to change in order to create a JAX-WS dispatch client on top of the SAP JAX-WS runtime?

    Hi Guys,
    I am getting the same error. Any resolution or updates on this.
    Were you able to fix this error.
    Thanks,
    Yomesh

Maybe you are looking for