EntityManager problem (nullPointer exception)

Hello,
I need help.
I have created Entity from Table (table Users) from MySQL database.
I'm using JPA.
@Entity
@NamedQueries( { @NamedQuery(name = "Users.findAll", query = "select o from Users o"),
                 @NamedQuery(name = "Users.findByUsername", query = "SELECT o FROM Users o WHERE o.username = :username")})
@Table(name = "\"users\"")
public class Users implements Serializable {
    @SuppressWarnings("compatibility:-1756790181151554415")
    private static final long serialVersionUID = 1L;
    @Column(name = "address", nullable = false)
    private String address;
    @Column(name = "city", nullable = false)
    private String city;
    @Column(name = "email", nullable = false)
    private String email;
    @Column(name = "firstPassword", nullable = false)
    private String firstPassword;
    @Column(name = "firstname", nullable = false)
    private String firstname;
    @Column(name = "lastname", nullable = false)
    private String lastname;
    @Column(name = "rank", nullable = false)
    private int rank;
    @Temporal(TemporalType.DATE)
    @Column(name = "regdate", nullable = false)
    private Date regdate;
    @Id
    @Column(name = "user_id", nullable = false)
    private long user_id;
    @Column(name = "username", nullable = false)
    private String username;
    public Users() {
    public Users(String address, String city, String email, String firstPassword, String firstname, String lastname,
                 int rank, Date regdate, long user_id, String username) {
        this.address = address;
        this.city = city;
        this.email = email;
        this.firstPassword = firstPassword;
        this.firstname = firstname;
        this.lastname = lastname;
        this.rank = rank;
        this.regdate = regdate;
        this.user_id = user_id;
        this.username = username;
    public String getAddress() {
        return address;
    public void setAddress(String address) {
        this.address = address;
    public String getCity() {
        return city;
    public void setCity(String city) {
        this.city = city;
    public String getEmail() {
        return email;
    public void setEmail(String email) {
        this.email = email;
    public String getFirstPassword() {
        return firstPassword;
    public void setFirstPassword(String firstPassword) {
        this.firstPassword = firstPassword;
    public String getFirstname() {
        return firstname;
    public void setFirstname(String firstname) {
        this.firstname = firstname;
    public String getLastname() {
        return lastname;
    public void setLastname(String lastname) {
        this.lastname = lastname;
    public int getRank() {
        return rank;
    public void setRank(int rank) {
        this.rank = rank;
    public Date getRegdate() {
        return regdate;
    public void setRegdate(Date regdate) {
        this.regdate = regdate;
    public long getUser_id() {
        return user_id;
    public void setUser_id(long user_id) {
        this.user_id = user_id;
    public String getUsername() {
        return username;
    public void setUsername(String username) {
        this.username = username;
}and I have created ManagedBean LoginUser. In this class is method getUser().
        private Users getUser() {
            System.out.println("Username: " +username);
            try{
                Users userr = (Users) entManager.createNamedQuery("Users.findByUsername").setParameter("username", username).getSingleResult();
                loginUser.user = userr;
                System.out.println("USER---- " +userr);
                return userr;
            }catch(NoResultException nre){
                System.out.println(nre.getMessage());
                return null;
        }I have problem with entity manager because this row: Users userr = (Users) entManager.createNamedQuery("Users.findByUsername").setParameter("username", username).getSingleResult();* causes exception:
Caused by: java.lang.NullPointerException
     at view.loginUser.getUser(loginUser.java:74)
        .I don't know why. This code is from my previous project from netbeans and there wasn't a problem.
I don't see a problem.
Can you help me ?
Sorry for my English.
Thanks.

Does the persistence.xml define the persistence-unit ViewController? What is the persistence provider? Hibernate or Eclipselink? Is a datasource with MySQL deifned?
With the EclipseLink provider the persistence.xml should be similar to the following.
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
     xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
     <persistence-unit name="ViewController" transaction-type="JTA">
          <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
          <jta-data-source>java:jboss/datasources/MySQLDS</jta-data-source>
          <class>packagename.Users</class>
          <properties>
               <property name="eclipselink.target-server" value="WebLogic_10"/>
               <property name="eclipselink.target-database" value="MySQL"/>
               <property name="eclipselink.ddl-generation" value="create-tables"/>
               <property name="eclipselink.logging.level" value="FINEST"/>
               <property name="eclipselink.dialect" value="org.hibernate.dialect.MySQLDialect" />
          </properties>
     </persistence-unit>
</persistence>
Edited by: dvohra16 on Feb 25, 2013 9:36 AM

Similar Messages

  • NullPointer exception in request.getParameter().indexof(.....) only in 6.1

    Hi
    I have one full working application (containing WAR + JAR) files.
    Right now this application is working absolutely fine in weblogic 6.0 sp1 on
    WINNT & Solaris.
    In this application, we accept events to save data from external
    applications like excel files.
    Now code in JSP is -->
    Line 1: String Data = request.getParameter("data");
    Line 2: Data.indexof(........);
    Now in case of weblogic 6.1, i am getting NullPointer Exception in line 2,
    but I am NOT getting any exception in case of weblogic 6.0sp1.
    To my surprise, I am also printing request obj parameters values, whenever
    jsp get called from external source, there it is printing value of "data".
    I am totally clueless!!
    Any idea plz?
    Ashish Jain

    Looking very closely at request object contents..
    Wht i am sending (posting) from excel file-->
    xmlData=<?xml version="1.0" encoding="UTF-8"?><reportSheet bu="SHKXXX"
    report="PBrandContr" sheet=
    "PBrandContr" year="2002" coType="A" status="0" brId="PIC" act_brId="PIC"
    opt="P" ></reportSheet>
    But 6.1 interprets like this ---->
    key is --------> xmlData=<?xml version="1.0" encoding="UTF-8"?><reportSheet
    bu="SHKXXX" report="PBrandContr" sheet=
    "PBrandContr" year="2002" coType="A" status="0" brId="PIC" act_brId
    And Value is -------> "PIC" opt="P" ></reportSheet>
    This thing is causing all problems.
    I am not observing this kinda behaviour in 6.0sp1.
    Thanks
    Ashish Jain
    "Ashish Jain" <[email protected]> wrote in message
    news:[email protected]..
    Hi
    I have one full working application (containing WAR + JAR) files.
    Right now this application is working absolutely fine in weblogic 6.0 sp1on
    WINNT & Solaris.
    In this application, we accept events to save data from external
    applications like excel files.
    Now code in JSP is -->
    Line 1: String Data = request.getParameter("data");
    Line 2: Data.indexof(........);
    Now in case of weblogic 6.1, i am getting NullPointer Exception in line 2,
    but I am NOT getting any exception in case of weblogic 6.0sp1.
    To my surprise, I am also printing request obj parameters values,whenever
    jsp get called from external source, there it is printing value of "data".
    I am totally clueless!!
    Any idea plz?
    Ashish Jain

  • Nullpointer exception... any help would be appreciated

    In advance, I apologize for any ignorance which I may obviously have... I'm in the process of learning Java, and am used to C/C++... In any case, I'm running into a nullpointer exception while 'compiling', which I'm having trouble figuring out... I'll list everything below, but this message will be rather long, as I will try to include everything I can. For this reason, I will ask my questions here, at the top:
    1) A null pointer exception, I believe, is generated when something is being referenced which is currently null, for example "a=null; a.b;" yields a null pointer exception. However, is there any other way that one is generated?
    2) Are there methods to figure out what/why something is null other than simply looking at it? As shown below, it seems that just looking at it runs you in a circle from line to line, file to file, which leads you back to the beginning where nothing is actually null... (I'm probably just not seeing it, but that seems to be what's happening to me)
    So now, on to the actual code:
    The following is a printout of the debugging info:
    ~/bin/jdk*/bin/java -classpath classes jamie.Main
    java.lang.NullPointerException
    at jamie.Main.Sys_Log(Main.java:110)
    at jamie.Main.Setup(Main.java:142)
    at jamie.Main.main(Main.java:54)
    Exception in thread "main" java.lang.NullPointerException
    at jamie.Main.Sys_Log(Main.java:110)
    at jamie.Main.Shutdown(Main.java:182)
    at jamie.Main.main(Main.java:92)And a short excerpt of each. (*) indicates line which error originates:
    20    )   private static Log                sys_log;
    108  )   static void Sys_Log(String msg)
    109  )   {
    110*)        sys_log.Log(msg);
    111  )   }
    142*)   Sys_Log("Server warming up...");
    182*)   Sys_Log("Server shutting down...");
    50  )     public static void main(String[] args)
    51  )     {
    52  )          try
    53  )          {
    54*)                Setup();
    85  )     catch(Exception e)
    86  )     {
    87  )          e.printStackTrace(System.out);
    88  )          err_log.Log(e.toString());
    89  )     }
    90  )     finally
    91  )     {
    92*)            Shutdown();
    93  )      }Now, various things that I have tried, and their result (you can probably skip this section, as these were mostly futile efforts):
    What seems odd to me is that the initial error is on line 110, which is the logging function Sys_Log. Since it's a null pointer exception, I would assume that sys_log is null? and thus in calling Log we're generating that error... I'm not entirely sure that that makes sense, though. Additionally, and what I find odd, is that if I change it to what I will list below, I get a slew of other seemingly unrelated problems:
    20    )   private static Log                sys_log;
    108  )   static void Sys_Log(String msg)
    109  )   {
    110#)        if (sys_log!=null)
    111  )        sys_log.Log(msg);
    112  )   }This results in a problem with function Err_Log, which I change the same way, resulting in the following:
    java.lang.NullPointerException
            at jamie.Area_LUL.Load(Area_LUL.java:23)
            at jamie.Main.Setup(Main.java:161)
            at jamie.Main.main(Main.java:55)
    Exception in thread "main" java.lang.NullPointerException
            at jamie.Main.Shutdown(Main.java:186)
            at jamie.Main.main(Main.java:93)In Main.java the following lines are generating the error:
    160  )   lul = new Area_LUL();
    161*)   lul.Load();And in Area_LUL.java I also have the following:
    14  )class Area_LUL implements LoaderUnloader
    15  ){
    16  )    public void Load()
    17  )    {
    18  )        try
    19  )        {
    20  )            areadir = new File("./areas/");
    21  )            SAXParser p = SAXParserFactory.newInstance().newSAXParser();
    22  )
    23*)            for(File curr : areadir.listFiles(new Area_Filter()))
    24  )            {
    25  )                p.parse(curr, new XMLParser());
    26  )            }
    27  )        }Where in the above, the for statement is generating the null pointer exception... which would tell me that areadir is null, however it is defined as new File("./areas/"); Also, lul (defined as new Area_LUL(); is generating the same error, though it is clearly defined in Area_LUL.java at the top of the last excerpt.
    Also, LoaderUnloader is defined in another file as follows:
    interface LoaderUnloader
        void Load();
        void Unload();
    }which are defined in Area_LUL in Area_LUL.java .
    A major theory which I currently have is that the compiler is beginning with my main.java file, and not seeing the class definition in another file, and thus attributing the class obj I create as null, which is causing the error, but I also am not sure if this is possible...
    My imports for Main.java are as follows:
    package jamie;
    import java.io.*;
    import java.util.*;I'm not entirely sure what the package is including, however I do have a jamie.jar file in another directory (../../dist) (could be referencing that?). Also, to compile the source I am using the following command:
    ~/bin/jdk*/bin/java -classpath classes jamie.MainHowever my classpath (I believe) isn't set to include all my files in the given directory. I wouldn't believe that this would be an issue, however if it could possibly be causing this, I can figure out how to set it properly. Also, this should mean I'm starting with Main.java, and perhaps I am right in concluding that it isn't referencing Area_LUL in another file properly, which is setting it as null?
    In any case... Any help would be greatly appreciated. This has been a bit of a struggle for about a month now, trying various resources, moving things around, etc... Thanks so much for your time in reading,
    -Jess

    I'm not able to follow the program flow from your post. Please create a small standalone program that exhibits the problem and post that back here.
    Your assumption re a NPE is correct, that's the only way they're generated.
    There are no "canned" methods to resolve NPEs. The best solution is to put System.out.println statements for all of the involved objects and variables immediately preceeding the error line (in this case, 110) and something will show null. Usually that's enough info to backtrace to the real cause.

  • 1 View linked to 2 CompCont: NullPointer Exception

    Hi,
    Here is the architecture of my app :
    MainView --> CompContA --> ModelA (RFC function A)
    ........|
    ........|---> IntCompB --> CompContB --> Model B (RFC function B)
    And here is the content of the MainView :
    AdviceNumber : [
    Z2_I_Rechercher_Avis_Input.AdviceNumber) | RefreshButton1
    UserId : [Z2_I_Rechercher_Bottin_Input.UserId) | RefreshButton2
    Name : [Z2_I_Rechercher_Avis_Input.Output.It_Infos_Bottin.Name) 
    Now, my application works when I populate an AdviceNumber and press the RefreshButton1.  At the return, the name field is refreshed and I use some Java code to move the UserId that my function returned to the UserId of the screen. This works well.
    Then if I change the value of the UserId in the screen and press the RefreshButton2, the second function returns me another name, and I use some Java code to move this name into the Name field of the screen. This works well too.
    The problem is that I can't use the refreshButton2 first!  I get a NullPointer exception.
    And I know why, it's because the « Output » structure of my Z2_I_Rechercher_Avis_Input is not initialized (since the refreshButton1 has not been used yet).
    But I can't find the right way to code it.
    Can you help me, thanks!
    Message was edited by:
            Emanuel Champagne

    I want the user to click on the button he wants.
    I just need to know how to initialize the Output.Struc1 when the user decides to click on the RefreshButton2 First.
    It's the line in bold that give me the error (but that line works well when the RefreshButton1 is used first!)
      public void onActionRafraichirAvis(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionRafraichirAvis(ServerEvent)
         //$$begin ActionButton(-775562010)
         wdThis.wdGetAvisCompController().executeZ2_I_Rechercher_Avis_Input();
         //$$end
         // At the return, we need to refresh the values of the screen with the ones returned by the function.
         // Access to the structure showed on the screen
    IIt_Infos_BottinElement AvisInfosBottinEl = wdContext
                                                                  .nodeIt_Infos_Bottin()
                                                                  .currentIt_Infos_BottinElement();
        // Access to the structure received by the RFC function
        IIt_Z2I053TElement BottinEl = wdContext
                                                             .nodeIt_Z2I053T()
                                                             .currentIt_Z2I053TElement();
         <b>AvisInfosBottinEl.setName(BottinEl.getName());</b>
    Message was edited by:
            Emanuel Champagne

  • JUTreeNodeBinding question (nullpointer exception in getAttribute)

    Hi,
    I've got a question about a piece of code. I've used a JTree which displays a recursive tree, which is working fine. I want to do something when a node is selected. I have the following piece of code:
    jTree1.addTreeSelectionListener(
       new TreeSelectionListener()
         public void valueChanged(TreeSelectionEvent e)
           DefaultMutableTreeNode node = (DefaultMutableTreeNode)jTree1.getLastSelectedPathComponent();
           if (node != null)
             JUTreeNodeBinding tnb = (JUTreeNodeBinding)(node.getUserObject());
             if (tnb!=null)
       });this code is taken from some example I've read on this forum and slightly modified (I can't find the original posting).
    Now, according to the sourcecompletion feature, tnb has methods like getAttribute, getAttributeDef. But when I call one of these methods on tnb (where the '...' is in the example above), I always get a nullpointer exception , somewhere inside the getAttribute call. (the variable 'tnb' itself is not null)
    Why wouldn't this work? Shouldn't the getAttribute calls give me access to the attributes of the row from the view that corresponds the selected element?
    The logwindow shows this for the nullpointer exception:
    Exception occurred during event dispatching:
    java.lang.NullPointerException
         oracle.jbo.AttributeDef[] oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDefs()
              JUCtrlValueBinding.java:173
         oracle.jbo.AttributeDef oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDef(int)
              JUCtrlValueBinding.java:239
         void mypackage.PMyData$1.valueChanged(javax.swing.event.TreeSelectionEvent)
              PMyData.java:332
         void javax.swing.JTree.fireValueChanged(javax.swing.event.TreeSelectionEvent)
              JTree.java:2269
         void javax.swing.JTree$TreeSelectionRedirector.valueChanged(javax.swing.event.TreeSelectionEvent)
              JTree.java:2575
         void javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(javax.swing.event.TreeSelectionEvent)
              DefaultTreeSelectionModel.java:612
         void javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(java.util.Vector, javax.swing.tree.TreePath)
              DefaultTreeSelectionModel.java:1006
         void javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(javax.swing.tree.TreePath[])
              DefaultTreeSelectionModel.java:288
         void javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(javax.swing.tree.TreePath)
              DefaultTreeSelectionModel.java:171
         void javax.swing.JTree.setSelectionPath(javax.swing.tree.TreePath)
              JTree.java:1088
         void javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(javax.swing.tree.TreePath, java.awt.event.MouseEvent)
              BasicTreeUI.java:2117
         void javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(java.awt.event.MouseEvent)
              BasicTreeUI.java:2683
         void java.awt.Component.processMouseEvent(java.awt.event.MouseEvent)
              Component.java:3712
         void java.awt.Component.processEvent(java.awt.AWTEvent)
              Component.java:3544
         void java.awt.Container.processEvent(java.awt.AWTEvent)
              Container.java:1164
         void java.awt.Component.dispatchEventImpl(java.awt.AWTEvent)
              Component.java:2593
         void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
              Container.java:1213
         void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
              Component.java:2497
         void java.awt.LightweightDispatcher.retargetMouseEvent(java.awt.Component, int, java.awt.event.MouseEvent)
              Container.java:2451
         boolean java.awt.LightweightDispatcher.processMouseEvent(java.awt.event.MouseEvent)
              Container.java:2210
         boolean java.awt.LightweightDispatcher.dispatchEvent(java.awt.AWTEvent)
              Container.java:2125
         void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
              Container.java:1200
         void java.awt.Window.dispatchEventImpl(java.awt.AWTEvent)
              Window.java:926
         void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
              Component.java:2497
         void java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent)
              EventQueue.java:339
         boolean java.awt.EventDispatchThread.pumpOneEventForHierarchy(java.awt.Component)
              EventDispatchThread.java:131
         void java.awt.EventDispatchThread.pumpEventsForHierarchy(java.awt.Conditional, java.awt.Component)
              EventDispatchThread.java:98
         void java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
              EventDispatchThread.java:93
         void java.awt.EventDispatchThread.run()
              EventDispatchThread.java:85

    Bit of a coincidence.. I was just running into the same problem. But if you check getAttributeDefs(), you'll see that there only is one attribute available, namely the one that is being displayed in the tree. (the 'description'-attribute)
    Or at least, that's the case with my sitation.
    I would love to be able to address all available attributes, eg. foreign key fields, but that doesn't seem possible.
    At the moment, I'm using the following work-around, which of course is far from ideal:
    Key key = tnb.getRowKey();
    ViewObject vo = panelBinding.getApplicationModule().findViewObject("SomeVO");
    Row[] rows = vo.findByKey(key);
    if (rows == null || rows.length != 1)
      System.out.println("Notice: not 1 rows");
      return;
    Row row = rows[0];
    // now you can fetch all the attributes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • NullPointer Exception in  SetCharacterEncodingFilter

    Hi All..!
    Can any one help me out in Fixing the Nullpointer Exception raised from SetCharacterEncodingFilter class which was taken by me from the Tomact ServletExamples. What should be the reason for this exception ? and how to fix this problem. Thanks in Advance to all the Gurus..!
    Please find the Stacktrace of the generated Exception
    java.lang.NullPointerException
    at org.apache.jsp.welcome_jsp._jspService(welcome_jsp.java:65)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at MalikJspPackages.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:81)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:595)
    NotifyUtil::java.net.SocketException: Software caused connection abort: recv failed
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:606)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:571)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:928)
    at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:248)

    Look up the createImage(int width, int height) method in the Component api abd follow the link to its description in the Method Detail section. Note that this method will return null if the component is not displayable. Try placing your inspection code after the call to setVisible.

  • Java.lang.NullPointer exception

    We have a report which fetches large amount of data and this report is inviked from JSP page using Crystal JRC.
    Now if we run report and click "next" or "prvious" button befor the rpeort page is rendered with data (or finishesh fetching data). It throws "Java.Lng.NullPOinter Exception".
    Can somebody please point out the problem behind this. are we doing anything wrong?
    Do we need to set any paramter for report
    Thanks,
    Kuldeep

    did  you solve your problem .I have the same .
    Thanks

  • Java.Lang.NullPoint.Exception in OWB Mapping

    Hello Everybody
    We are building Data Warehouse using OWB Repository 9.2.0.2.0. When we are validating or deploying the created map we are getting Java.Lang.NullPoint.Exception. This leads to blank screen. We are unable to recover the map. Sometimes, synchronization works to recover the map, but not all the times.
    Is there any solution to it?

    Mark
    Is it possible to solve the problem without migrating? I have the details of error as follows --
    java.lang.NullPointerException
    java.lang.NullPointerException
         at oracle.wh.service.impl.mapping.metadata.WBMappingGraphImpl.<init>(WBMappingGraphImpl.java:43)
         at oracle.wh.service.impl.mapping.metadata.WBMappingGraphHelper.createMappingGraph(WBMappingGraphHelper.java:31)
         at oracle.wh.ui.mapping.MappingGraphNew.drawStage(MappingGraphNew.java:2660)
         at oracle.wh.ui.mapping.MappingGraphNew.setStage(MappingGraphNew.java:484)
         at oracle.wh.ui.mapping.MappingEditorCanvas.refresh(MappingEditorCanvas.java:287)
         at oracle.wh.ui.common.WhFolderEditor.refreshCanvas(WhFolderEditor.java:951)
         at oracle.wh.ui.common.WhFolderEditor.refresh(WhFolderEditor.java:604)
         at oracle.wh.ui.common.WhFolderEditor$1$MyRefresh.run(WhFolderEditor.java:424)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:337)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
    I appreciate your feedback.
    Cheers, Bana

  • JTable crashes with NullPointer exception

    Hi
    I use a JTable with a selfmade TableModel.
    On first display I get an Nullpointer exception
    in the JTable, when it calls prepareRenderer.
    I'm not using the DefaultRenderer ... that is I'm not specifying it explicitly.
    Has anybody seen this behaviour before?
    Thanx a lot
    Spieler

    In your TableModel do you use a custom Renderer as well? You said you're not using the DefaultRenderer, so I assume you're calling the setDefaultRenderer() method?
    Check to make sure you have the proper class given as the class of the renderer. I had this problem once because I had accidentally given a different class than what the renderer really was.
    Example:
    // my custom renderer
    MyRenderer1 renderer = new MyRenderer1();
    // wrong class
    setDefaultRenderer(MyRenderer.class, renderer);
    // right class
    setDefaultRenderer(MyRenderer1.class, renderer);Hope this helps!
    - Brion Swanson

  • One VO used on two pages creating problem.-Nullpointer error

    Hello All,
    I have extended one VO on one page "ponAwardByQuotePG". I am done with that. But this VO is used on second next page as well.
    After pressing one "AWARD" button on 1st page , it goes to 2nd page "ponAwardQuotePG". Both these pages use same VO which i have extended. Whenever I press Save Award GO button on second page, it throws NULLPOINTER exception error attached herewith. I have also attached the flow of steps along with corresponding VO and AM code.
    I found following thing in 2nd page's CO even though my VO is extended as "XXEGAAwardByQuoteVOEx" , its showing following in CO:
    AwardByQuoteVO awardbyquotevo = (AwardByQuoteVO)awardbyquoteam.findViewObject("AwardByQuoteVO");
    Please guide what could be the reason (Contact me at [email protected] so that i can send you some more document as attachment.)
    Following is the error stack:
    "java.lang.NullPointerException<br /><br /> at oracle.apps.pon.award.creation.webui.AwardQuoteCO.processFormRequest(AwardQuoteCO.java:1710)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)<br /><br /> at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)<br /><br /> at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)<br /><br /> at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)<br /><br /> at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)<br /><br /> at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)<br /><br /> at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2676)<br /><br /> at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1683)<br /><br /> at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)<br /><br /> at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)<br /><br /> at _oa__html._OA._jspService(_OA.java:84)<br /><br /> at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)<br /><br /> at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)<br /><br /> at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)<br /><br /> at oracle.jsp.JspServlet.internalService(JspServlet.java:186)<br /><br /> at oracle.jsp.JspServlet.service(JspServlet.java:156)<br /><br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)<br /><br /> at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)<br /><br /> at org.apache.jserv.JServConnection.run(JServConnection.java:294)<br /><br /> at java.lang.Thread.run(Thread.java:619)"

    I found following thing in 2nd page's CO even though my VO is extended as "XXEGAAwardByQuoteVOEx" , its showing following in CO:
    AwardByQuoteVO awardbyquotevo = (AwardByQuoteVO)awardbyquoteam.findViewObject("AwardByQuoteVO");controller code won't change when you substitute the VO. You will see it only at the runtime.
    And to verify the substitution at the run time, select the "About this Page" link and expand the "Business Component References Details".
    And to debug the error in the standard controller, you need to decompile the controller file and include it in your project.
    This will show you the exact problem from where you can proceed further. You can use jad tool for decompilation.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • CLOB.createTemporary gives Nullpointer Exception

    Hello,
    I'm trying to create a temporary clob in my java code, but when I run the program I get the following exception.
    java.lang.NullPointerException
         at oracle.sql.LobPlsqlUtil.plsql_createTemporaryLob(LobPlsqlUtil.java:1354)
         at oracle.jdbc.dbaccess.DBAccess.createTemporaryLob(DBAccess.java:997)
         at oracle.sql.LobDBAccessImpl.createTemporaryClob(LobDBAccessImpl.java:240)
         at oracle.sql.CLOB.createTemporary(CLOB.java:527)
         at org.tennet.utils.bc4j.ApplicationModuleImpl.createClob(ApplicationModuleImpl.java:278)
         at org.tennet.utils.bc4j.ApplicationModuleImpl.createClobDomain(ApplicationModuleImpl.java:299)
         at org.tennet.nevada.loader.ResultLoader.executeProcedure(ResultLoader.java:243)
         at org.tennet.nevada.loader.ResultLoader.process(ResultLoader.java:77)
         at org.tennet.nevada.broker.processor.RequestProcessor.processResult(RequestProcessor.java:374)
         at org.tennet.nevada.broker.processor.LoadFlowVAProcessor.process(LoadFlowVAProcessor.java:132)
         at org.tennet.nevada.broker.RequestHandler.processRequest(RequestHandler.java:289)
         at org.tennet.nevada.broker.RequestHandler.run(RequestHandler.java:137)
    This error started when I began using Data Sources instate of direct JDBC Connections.
    The problem is there is no source available for this class so I can’t look what is causing the Nullpointer Exception.
    Can someone tell me what is causing this problem?
    Regards,
    Dennis Labordus

    Hi Dennis,
    I have had the same problem as this. I am going to get onto Oracle via Metalink about it.
    However - there is a work around.
    We are using OC4J with its data sources.
    There is a method on the OC4J Connection called getCoreConnection(Connection). This returns the underlying Oracle connection.
    If you then pass this underlying oracle connection to CLOB.createTemporary() it works.
    We had to use reflection to call the method as I couldn't seem to cast it statically.
    Paul McHugh
    * getOracleConnection
    * Derive oracle connection from DataSource connection
    private static OracleConnection getOracleConnection (Connection connection) throws SQLException
    System.err.println ("UserTypeImpl.getOracleConnection: " + connection);
    * Check for an existing oracle connection
    * This should be the case in a database deployment
    if (connection instanceof oracle.jdbc.driver.OracleConnection)
    System.err.println (" Connection is already the base Oracle Connection" + connection);
    return (OracleConnection) connection;
    * Check for an OC4J deployment
    else
    System.err.println (" Searching for core connection ...");
    Object conObj = (Object) connection;
    Class conclass = conObj.getClass();
    OracleConnection coreCon = null;
    Method meth = null;
    // Locate method getCoreConnection on Orion data source
    try {
    Class[] parameterTypes = new Class[] {java.sql.Connection.class};
    meth = conclass.getMethod("getCoreConnection", parameterTypes);
    } catch (NoSuchMethodException e)
    e.printStackTrace();
    throw new SQLException ("UserTypeImpl.getOracleConnection: No such method: getCoreConnection: " + e);
    // Invoke method getCoreConnection on orion data source
    try {
    Object[] args = new Object[] {connection};
    coreCon = (OracleConnection) meth.invoke(conObj, args);
    catch (InvocationTargetException e)
    e.printStackTrace();
    throw new SQLException ("UserTypeImpl.getOracleConnection: Invoke: getCoreConnection: " + e);
    catch (IllegalAccessException e)
    e.printStackTrace();
    throw new SQLException ("UserTypeImpl.getOracleConnection: Invoke: getCoreConnection: " + e);
    if (coreCon != null)
    System.err.println (" Core connection found: " + coreCon);
    return coreCon;
    } else
    System.err.println (" Unable to locate core connection.");
    throw new SQLException ("UserTypeImpl.getOracleConnection: Unable to locate core oracle connection.");

  • NullPointer Exception on Selecting Table

    I get this exception now whenever I select (left-click) a table from my tree to open a sheet showing the column names, data, etc.
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at oracle.javatools.dialogs.progress.AbstractProgressMonitor.createDialog(AbstractProgressMonitor.java:358)
            at oracle.javatools.dialogs.progress.AbstractProgressMonitor.mav$createDialog(AbstractProgressMonitor.java:39)
            at oracle.javatools.dialogs.progress.AbstractProgressMonitor$1.run(AbstractProgressMonitor.java:325)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)Any ideas?
    -Tim

    Just to add to the problems :)
    Noticed that SQL Dev hangs a while when I am trying to select a table to view from the tree... so I did a stack dump. The NullPointer Exception from the OP shows up at the end as well...
    "Background Parser" prio=6 tid=0x2eb91000 nid=0x1cd4 waiting on condition [0x3314f000..0x3314fa14]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x31172400 nid=0x1b1c waiting on condition [0x32e4f000..0x32e4fc14]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x2eb86c00 nid=0x194c waiting on condition [0x32d4f000..0x32d4fc14]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x2eb7f400 nid=0x14e0 waiting on condition [0x32c4f000..0x32c4fd94]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x2eb85400 nid=0x19a8 waiting on condition [0x32b4f000..0x32b4fc94]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x2eb7d800 nid=0xf04 waiting on condition [0x3244f000..0x3244fb14]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x2eb7a800 nid=0x1fb8 waiting on condition [0x32a4f000..0x32a4fc94]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x2ec1e400 nid=0x2dc waiting on condition [0x3294f000..0x3294fd94]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x31247c00 nid=0x410 waiting on condition [0x3284f000..0x3284fa14]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x2ec47400 nid=0x116c waiting on condition [0x3274f000..0x3274fb94]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x2ead8800 nid=0x113c waiting on condition [0x3264f000..0x3264fb94]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x2eaeec00 nid=0x334 waiting on condition [0x2ff6f000..0x2ff6fb14]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x2ec78c00 nid=0x1230 waiting on condition [0x2f12f000..0x2f12fc14]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "WeakDataReference polling" prio=2 tid=0x2e98e000 nid=0x149c in Object.wait() [0x3234f000..0x3234fa94]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
            - locked <0x082c4b08> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
            at oracle.ide.util.WeakDataReference$Cleaner.run(WeakDataReference.java:88)
            at java.lang.Thread.run(Thread.java:619)
    "Background Parser" prio=6 tid=0x2e97d400 nid=0x1128 waiting on condition [0x3036f000..0x3036fb14]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at oracle.dbtools.raptor.plsql.BackgroundParser$1.construct(BackgroundParser.java:124)
            at oracle.dbtools.raptor.utils.NamedSwingWorker$2.run(NamedSwingWorker.java:115)
            at java.lang.Thread.run(Thread.java:619)
    "pool-2-thread-1" prio=6 tid=0x2e970000 nid=0x12d8 waiting on condition [0x3224f000..0x3224fc94]
       java.lang.Thread.State: WAITING (parking)
            at sun.misc.Unsafe.park(Native Method)
            - parking to wait for  <0x069b6a28> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
            at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
            at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
            at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
            at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:946)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:906)
            at java.lang.Thread.run(Thread.java:619)
    "IconOverlayTracker Timer" prio=6 tid=0x2e99f400 nid=0x12d4 in Object.wait() [0x30f4f000..0x30f4fd14]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.util.TimerThread.mainLoop(Timer.java:483)
            - locked <0x069b6b60> (a java.util.TaskQueue)
            at java.util.TimerThread.run(Timer.java:462)
    "Timer-2" prio=6 tid=0x2eabe800 nid=0x12b8 in Object.wait() [0x3104f000..0x3104fa94]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.util.TimerThread.mainLoop(Timer.java:483)
            - locked <0x0691d3d8> (a java.util.TaskQueue)
            at java.util.TimerThread.run(Timer.java:462)
    "Timer queue for AWT thread" daemon prio=6 tid=0x2ea57000 nid=0x1278 in Object.wait() [0x30e4f000..0x30e4fb94]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x0691d458> (a java.lang.Object)
            at java.lang.Object.wait(Object.java:485)
            at ice.util.awt.TimedAWTExecutor.nextElem(TimedAWTExecutor.java:108)
            - locked <0x0691d458> (a java.lang.Object)
            at ice.util.awt.TimedAWTExecutor.runScheduler(TimedAWTExecutor.java:130)
            at ice.util.awt.TimedAWTExecutor$1.run(TimedAWTExecutor.java:19)
    "TextBufferScavenger" prio=6 tid=0x2e6cac00 nid=0x1190 in Object.wait() [0x30d4f000..0x30d4fc14]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
            - locked <0x0683df28> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
            at oracle.ide.model.TextNode$FacadeBufferReference$PollingThread.run(TextNode.java:1886)
    "Native Directory Watcher" prio=2 tid=0x2d8e4400 nid=0x6ac runnable [0x30b4f000..0x30b4fd14]
       java.lang.Thread.State: RUNNABLE
            at oracle.ide.natives.NativeHandler.enterWatcherThread(Native Method)
            at oracle.ide.natives.NativeHandler$2.run(NativeHandler.java:252)
            at java.lang.Thread.run(Thread.java:619)
    "Swing-Shell" daemon prio=6 tid=0x2e870000 nid=0xd20 waiting on condition [0x3077f000..0x3077fd94]
       java.lang.Thread.State: WAITING (parking)
            at sun.misc.Unsafe.park(Native Method)
            - parking to wait for  <0x06046f08> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
            at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
            at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
            at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
            at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:946)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:906)
            at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Win32ShellFolderManager2.java:458)
            at java.lang.Thread.run(Thread.java:619)
    "IconOverlayTracker Timer" prio=6 tid=0x2e6c3c00 nid=0x968 in Object.wait() [0x3067f000..0x3067fa14]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.util.TimerThread.mainLoop(Timer.java:483)
            - locked <0x05fc6728> (a java.util.TaskQueue)
            at java.util.TimerThread.run(Timer.java:462)
    "IconOverlayTracker Timer" prio=6 tid=0x2e533400 nid=0x728 in Object.wait() [0x3046f000..0x3046fa94]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.util.TimerThread.mainLoop(Timer.java:483)
            - locked <0x05fc67a8> (a java.util.TaskQueue)
            at java.util.TimerThread.run(Timer.java:462)
    "Meter Updater" prio=6 tid=0x2e7d5800 nid=0x2c0 waiting on condition [0x3026f000..0x3026fc14]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at elephant.insider.view.impl.MeterUpdater$Updater.run(MeterUpdater.java:131)
            at java.lang.Thread.run(Thread.java:619)
    "Meter Dispatcher" prio=6 tid=0x2e7d5400 nid=0x5a4 waiting on condition [0x3016f000..0x3016fc94]
       java.lang.Thread.State: TIMED_WAITING (sleeping)
            at java.lang.Thread.sleep(Native Method)
            at elephant.insider.view.impl.MeterUpdater$Dispatcher.run(MeterUpdater.java:282)
            at java.lang.Thread.run(Thread.java:619)
    "Adapter Monitor" prio=6 tid=0x2dbf2400 nid=0x910 waiting on condition [0x3006f000..0x3006fd14]
       java.lang.Thread.State: TIMED_WAITING (parking)
            at sun.misc.Unsafe.park(Native Method)
            - parking to wait for  <0x05e083e0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
            at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
            at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1963)
            at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:395)
            at elephant.insider.server.monitor.impl.AdapterMonitorImpl$Monitor.run(AdapterMonitorImpl.java:247)
            at java.lang.Thread.run(Thread.java:619)
    "TimerQueue" daemon prio=6 tid=0x2db1b800 nid=0x1dc in Object.wait() [0x2e4df000..0x2e4dfb14]
       java.lang.Thread.State: TIMED_WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at javax.swing.TimerQueue.run(TimerQueue.java:236)
            - locked <0x058b2d98> (a javax.swing.TimerQueue)
            at java.lang.Thread.run(Thread.java:619)
    "AWT-Windows" daemon prio=6 tid=0x2dabd000 nid=0xc34 runnable [0x2e0bf000..0x2e0bfc94]
       java.lang.Thread.State: RUNNABLE
            at sun.awt.windows.WToolkit.eventLoop(Native Method)
            at sun.awt.windows.WToolkit.run(WToolkit.java:290)
            at java.lang.Thread.run(Thread.java:619)
    "AWT-Shutdown" prio=6 tid=0x2dabc800 nid=0xc4c in Object.wait() [0x2dfbf000..0x2dfbfd14]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
            - locked <0x058b2eb0> (a java.lang.Object)
            at java.lang.Thread.run(Thread.java:619)
    "Java2D Disposer" daemon prio=6 tid=0x2daa5400 nid=0xbec in Object.wait() [0x2debf000..0x2debfd94]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
            - locked <0x058b2f40> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
            at sun.java2d.Disposer.run(Disposer.java:125)
            at java.lang.Thread.run(Thread.java:619)
    "Low Memory Detector" daemon prio=6 tid=0x00e49800 nid=0x938 runnable [0x00000000..0x00000000]
       java.lang.Thread.State: RUNNABLE
    "CompilerThread0" daemon prio=6 tid=0x00e3b800 nid=0xa8c waiting on condition [0x00000000..0x2d5bf83c]
       java.lang.Thread.State: RUNNABLE
    "Attach Listener" daemon prio=6 tid=0x00e3a400 nid=0x83c runnable [0x00000000..0x00000000]
       java.lang.Thread.State: RUNNABLE
    "Signal Dispatcher" daemon prio=6 tid=0x00e39800 nid=0xbfc waiting on condition [0x00000000..0x00000000]
       java.lang.Thread.State: RUNNABLE
    "Finalizer" daemon prio=8 tid=0x00e2a000 nid=0xdb8 in Object.wait() [0x2d2bf000..0x2d2bfc94]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
            - locked <0x05820298> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
            at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=6 tid=0x00e25c00 nid=0x388 in Object.wait() [0x2d1bf000..0x2d1bfd14]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
            - locked <0x05820320> (a java.lang.ref.Reference$Lock)
    "main" prio=6 tid=0x008c6c00 nid=0x3ac waiting on condition [0x00000000..0x0012fb3c]
       java.lang.Thread.State: RUNNABLE
    "VM Thread" prio=6 tid=0x00e22800 nid=0xc64 runnable
    "VM Periodic Task Thread" prio=6 tid=0x00e4a800 nid=0x954 waiting on condition
    JNI global references: 2275
    Heap
    def new generation   total 9280K, used 4553K [0x030c0000, 0x03ad0000, 0x05820000)
      eden space 8256K,  49% used [0x030c0000, 0x034c07d0, 0x038d0000)
      from space 1024K,  44% used [0x038d0000, 0x03941ca8, 0x039d0000)
      to   space 1024K,   0% used [0x039d0000, 0x039d0000, 0x03ad0000)
    tenured generation   total 121840K, used 90709K [0x05820000, 0x0cf1c000, 0x230c0000)
       the space 121840K,  74% used [0x05820000, 0x0b0b5450, 0x0b0b5600, 0x0cf1c000)
    compacting perm gen  total 50944K, used 50643K [0x230c0000, 0x26280000, 0x2b0c0000)
       the space 50944K,  99% used [0x230c0000, 0x26234db0, 0x26234e00, 0x26280000)
    No shared spaces configured.
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at oracle.javatools.dialogs.progress.AbstractProgressMonitor.createDialog(AbstractProgressMonitor.java:358)
            at oracle.javatools.dialogs.progress.AbstractProgressMonitor.mav$createDialog(AbstractProgressMonitor.java:39)
            at oracle.javatools.dialogs.progress.AbstractProgressMonitor$1.run(AbstractProgressMonitor.java:325)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)-Tim

  • What does a NullPointer Exception mean?

    Does anyone know what a NullPointer Exception mean? What is it trying to tell me?

    Declaring String variables with an initial value of "" (a zero-length String), isn't really going to solve the problem, which is that a String variable is being used before it's (meaningfully) initialized. I mean, if the code is something like this:
    String s = null;
    // the coder thinks he's setting s to be a line of user input here,
    // but he's really not
    int length = s.length();Then replacing null with "" in the first line of code doesn't fix the problem, it just hides it.
    Also I'd argue that in practice, it's a bad thing to do
    try {
      // stuff
    } catch (Exception e) {
      // more stuff
    }That is, to catch every single exception, including unchecked ones.
    1) It makes your code responsible for things it shouldn't be responsible for (NullPointerExceptions in any classes you used but didn't write, for example).
    2) It's unlikely that a single catch block can handle error recovery for any possible exception.
    3) It's not self-documenting. If you see "catch(NumberFormatException e)" in someone else's code, you can reasonably deduce that it's likely that some number parsing is going on. If you see "catch (Exception e)", all you know is that anything could be going on.
    4) It can make debugging difficult. If class B catches all exceptions, then an exception caught by B thrown in class C, won't be visible to class A that calls the method in class B that eventually leads to an exception being thrown. Bugs can be partially hidden, eventually turning up in especially sneaky awful ways.
    It can be useful to call all exceptions in throwaway test or debugging code, but I'd advice against using it in production code.

  • Handling a NullPointer exception....

    I'm trying to create an application that compares to data files and prints the line that's different between the 2 files. I keep getting a NullPointer exception and am not sure how to solve this problem. Any ideas??
    FILE 1
    ===================
    User 1
    User 2
    User 3
    User 4
    User 5
    FILE 2
    ===================
    User 1
    User 2
    User 6
    User 4
    User 5
    ===================
    import java.util.StringTokenizer;
    import java.io.*;
    public class DataComparison
    public static void main (String[] args)
    try
    StringTokenizer tokenizer1, tokenizer2;
    String lineFile1, lineFile2, name1, name2, file1="test1.txt", file2="test2.txt";
    FileReader fr1 = new FileReader (file1);
    BufferedReader inFile1 = new BufferedReader (fr1);
    FileReader fr2 = new FileReader (file2);
    BufferedReader inFile2 = new BufferedReader (fr2);
    lineFile1 = inFile1.readLine();
    lineFile2 = inFile2.readLine();
    while (lineFile1 != null && lineFile2 != null)
    tokenizer1 = new StringTokenizer (lineFile1);
    name1 = tokenizer1.nextToken();
    tokenizer2 = new StringTokenizer (lineFile2);
    name2 = tokenizer2.nextToken();
    while ((lineFile1.compareTo(lineFile2)<0) && (lineFile1 != null && lineFile2 != null))
    if (!lineFile1.equals(lineFile2))
    System.out.println (lineFile1 + " " + lineFile2);
    lineFile1 = inFile1.readLine();
    lineFile2 = inFile2.readLine();
    while ((lineFile1.compareTo(lineFile2)==0) && (lineFile1 != null && lineFile2 != null))
    if (!lineFile1.equals(lineFile2))
    System.out.println (lineFile1 + " " + lineFile2);
    lineFile1 = inFile1.readLine();
    lineFile2 = inFile2.readLine();
    while ((lineFile1.compareTo(lineFile2)>0) && (lineFile1 != null && lineFile2 != null))
    if (!lineFile1.equals(lineFile2))
    System.out.println (lineFile1 + " " + lineFile2);
    lineFile1 = inFile1.readLine();
    lineFile2 = inFile2.readLine();
    lineFile1 = inFile1.readLine();
    lineFile2 = inFile2.readLine();
    inFile1.close();
    inFile2.close();
    catch (FileNotFoundException exception)
    System.out.println ("The file was not found.");
    catch (IOException exception)
    System.out.println (exception);
    catch (NullPointerException exception)
    System.out.println (exception);

    If you change your program slightly replacing
    catch (NullPointerException exception)
    System.out.println (exception);
    }with
    catch (NullPointerException exception)
        exception.printStackTrace(System.out);
    }it should print out a stack trace telling you the exact line that your error occurs on. This might be enough to tell you what your actual problem is.
    Col

  • Nullpoint exception when population HtmlPanelGrid

    Hello All.
    I Have battled with this problem for two solid days now, I realy need you guys help on this one. The following code workes in another part of my program but on this part, I just can't get it right and end up with a nullpoint exception.
    Here are some code:
    test.jsp
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <f:view>
    <html>
    <head>
    <title>Test</title>
    </head>
    <body bgcolor="#ffffff">
    <h:form id="testform">
    <h:panelGrid id="listData" binding="#{TestBean.listData}" />
    </h:form>
    </body>
    </html>
    </f:view>
    TestBean.class (modified to sute forum posting)
    package beans.backingBeans;
    import beans.BeanFactory;
    //do relevant imports
    public class TestBean {
    private HtmlPanelGrid listData; //panelgrid that holds data
    public CreateSurveyBean() {
    populateData();
    public HtmlPanelGrid getListData() {
    return listData;
    public void setListData(HtmlPanelGrid listData) {
    this.listData = listData;
    * fetch data to HtmlPanelGrid
    * @param
    * @return void
    public void populateData() {
    Application application = FacesContext.getCurrentInstance().getApplication(); //getApplication context
    List children = getListData().getChildren(); //get children of component
    children.clear(); //clear children
    List dataSet = BeanFactory.geInstance().getData(); //get populationData from factoryBean
    for(int i=0; i<questionSet.size(); i++) {
         //irrelevant code that create som content for HtmlPanelGrid
    children.add(item);
    faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
    <managed-bean>
    <description>SurveyBean</description>
    <display-name>SurveyBean</display-name>
    <managed-bean-name>SurveyBean</managed-bean-name>
    <managed-bean-class>beans.backingBeans.SurveyBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    </faces-config>
    Nullpoint exception (from the webserver logfile)
    java.lang.NullPointerException     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)     at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:386)     at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:999)     at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1026)     at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:739)     at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:429)     
    The exception seems to come from the row:
    List children = getListData().getChildren(); //get children of component
    in the testBean.class file. As I said before. This has worked in other parts of the program but now it doesn't. After some debugging runs I have found out that the getListData -method indead returns null, But I can't figure out why.

    Well, Sometimes the question is more complex than the answer ;-)
    Thanks for the help.
    It still puzzels me that I don't have to instanciate the HtmlPanelGrid at the other jsf page in my app. It seems as it gets instanciated by some pagical means because I don't have a
    HtmlPanelGrid data = new HtmlPanelGrid();
    or
    data = foo;
    Anywhere.
    The only thing that separates the two jsf pages from eachother is that in the case that workes, the page reloads several times before I present the HtmlPanelGrid. Can this be the answer somehow?
    Well... Anyhwo. It workes!

Maybe you are looking for

  • To find the no of working days b/w given date

    Hi ABAP Experts,          Here i have one requirement .          table is tfacs           in  this table i want to know the no of working days b/w  the given date. Here i have attached my code .pls go through it and do me needful. TABLES : tfacs,vbrk

  • Premiere freeze

    Ive been editing HD in Premiere Pro CS3 version, with a core duo, a matrox RTx2, 4 gigs of ram and Raid drive. The drives are about 75% filled and I have been about to add a third drive. The projects have been crashing occasionally, but now Ive encou

  • Windows Event Collector - Built-in options for load balancing and high availability ?

    Hello, I have a working collector. config is source initiated, and pushed by GPO. I would like to deploy a second collector for high availability and load balancing. What are the available options ? I have not found any guidance on TechNet articles.

  • Photo rotator xml

    I've seen several sites that have an .swf that acts as the container for a photo "album" , but the images are all externally linked, and the "dissolve" and "rotating" effect is controlled by an external .xml file. Replacing the images, or editing the

  • ESC key not working outside PS in Vista...

    This haunts our users since we migrated to Vista. When Photoshop CS2/CS3 is running under Vista the ESCAPE key does not work correctly with other programs. When PS is running, the escape key works only when pressing SHIFT+ESC together. This is extrem