Java.lang.NullPointerException and javaBeans

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

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

Similar Messages

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

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

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

  • Java.lang.NullPointerException and ConnectionPool problem

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

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

  • Validate failure and report java.lang.NullPointerException

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

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

  • TreeView has a java.lang.NullPointerException

    Hi,guys
    I got a TreeView issue which is said that java.lang.NullPointerException.below are my words:
    public class TreeViewController<T> implements Initializable {
         public TreeView<T> tree;
    .........there are some codes about the oher thing.....
         @Override
         public void initialize(URL arg0, ResourceBundle arg1) {     
         tree.setOnMouseClicked(new EventHandler(){
              @Override
              public void handle(Event arg0) {
                   System.out.println(tree.getSelectionModel().getSelectedItem().getValue());
    I need to get the current clicked treeItem value.but once I use the codes : tree.getSelectionModel().getSelectedItem().getValue() or tree.getSelectionModel().getSelectedItem().toString(),I will get a java.lang.NullPointerException.and this issue occurs sometimes. and I have to use tree.getSelectionModel().getSelectedItems().get(0);instead.So,is this a issue? wish to get your help.thanks a million.

    If nothing is selected, tree.getSelectionModel().getSelectedItem() will return null. In this case, the call to getValue() will generate a NullPointerException.
    You need something like
    TreeItem<T> selectedItem = tree.getSelectionModel().getSelectedItem();
    if (selectedItem == null) {
      System.out.println("Nothing selected");
    } else {
      System.out.println(selectedItem.getValue());
    }Typically, to track changes in selection, you would add a change listener to the selected item property, rather than using a mouse event handler (though I think you still need to check for the case where nothing is selected).

  • Cisco UC560 java.lang.NullPointerException error when opening "auto attendant" CCA

    Hi Guys,
    In CCA i get the error:java.lang.NullPointerException and it is only when selecting "Auto Attendant".
    No Configuration has been done via CLI
    Cisco IOS Software, UC500 Software (UC500-ADVIPSERVICESK9-M), Version 15.1(4)M5, RELEASE SOFTWARE (fc1)
    CCA version 3.2(2)
    Attaching CCA logs
    Any Ideas ?

    I would suggest downloading the latest version of the IDE (v. 5.0) which is available at:
    http://wwws.sun.com/software/sundev/jde/index.html

  • HANA Suddenly no connection "Java.lang.NullpointerException"

    Hi,
    Need assistance in our hana server. Its connectivity suddenly disconnected after an internet interruption.
    Please refer to the attachment for reference.
    Errors are Java.lang.NullpointerException and Database connection is not available cause by com.sap.db.jdbc.exceptions. JDBCDriverException
    Need your assistance.
    Thank you in advance.
    Regards,
    Clint

    Hi Clint,
    If your internet connection is up and the HANA server is up and running.
    1. Close and re-open the HANA studio and refresh the system node. Does not work then
    2. Delete and add the system in navigator panel.
    If you could not add system and getting error, post the error message.
    Regards
    Raj

  • JAVA.LANG.NULLPOINTEREXCEPTION WHILE USING GETCLIENTINFO JAVABEAN IN FORM

    We are using GetClientInfo JavaBean in Oracle 6i Form registered in Oracle Applications. Earlier, when we used Jinitiator, the Form used to open properly. Recently we started using Java Plug-in 1.6.0_12 (JRE version 1.6.0_12 Java HotSpot(TM) Client VM), we get following errors and then entire application closes.
    java.lang.NullPointerException
         at oracle.forms.ui.VBean.isFocusTraversable(Unknown Source)
         at java.awt.Component.isFocusable(Unknown Source)
         at java.awt.Component.isRequestFocusAccepted(Unknown So

    Get Client Information
    http://www.oracle.com/technology/sample_code/products/forms/6idemos.html
    java.lang.NullPointerException
         at oracle.forms.ui.VBean.isFocusTraversable(Unknown Source)
         at java.awt.Component.isFocusable(Unknown Source)
         at java.awt.Component.isRequestFocusAccepted(Unknown Source)
         at java.awt.Component.requestFocusHelper(Unknown Source)
         at java.awt.Component.requestFocusHelper(Unknown Source)
         at java.awt.Component.requestFocus(Unknown Source)
         at oracle.forms.handler.UICommon.updateFocus(Unknown Source)
         at oracle.forms.handler.UICommon.setFVP(Unknown Source)
         at oracle.forms.handler.UICommon.setFVP(Unknown Source)
         at oracle.forms.handler.UICommon.onUpdate(Unknown Source)
         at oracle.forms.handler.ComponentItem.onUpdate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onUpdate(Unknown Source)
         at oracle.forms.handler.UICommon.onUpdate(Unknown Source)
         at oracle.forms.engine.Runform.onUpdateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.sendDeferredMessages(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.startRunform(Unknown Source)
         at oracle.forms.engine.Main.createRunform(Unknown Source)
         at oracle.forms.engine.Main.start(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)

  • Ticker JavaBean giving java.lang.NullPointerException

    I am running Ticker form which calls Ticker JavaBean via Form Bean Area. Sometimes clock starts up, other times it doesn't start when form is loaded. When the clock doesn't start there is always an associated error in the JInitiator Java Console. See below. Any ideas as to why this error and inconsistency ?
    oracle.forms.demos.TickerApplet: start()
    oracle.forms.demos.TickerApplet: run()
    java.lang.NullPointerException
    OUTERSIZE:java.awt.Point[x=232,y=30]
    oracle.forms.demos.TickerApplet:setSize(java.awt.Dimension[width=232,height=30])
         at oracle.forms.demos.TickerApplet.run(Compiled Code)
    oracle.forms.demos.TickerAppletcalcOffsets() 10:36:11 AM x=69, y=25
    att java.lang.Thread.run(Thread.java:466)

    I am running Ticker form which calls Ticker JavaBean via Form Bean Area. Sometimes clock starts up, other times it doesn't start when form is loaded. When the clock doesn't start there is always an associated error in the JInitiator Java Console. See below. Any ideas as to why this error and inconsistency ?
    oracle.forms.demos.TickerApplet: start()
    oracle.forms.demos.TickerApplet: run()
    java.lang.NullPointerException
    OUTERSIZE:java.awt.Point[x=232,y=30]
    oracle.forms.demos.TickerApplet:setSize(java.awt.Dimension[width=232,height=30])
         at oracle.forms.demos.TickerApplet.run(Compiled Code)
    oracle.forms.demos.TickerAppletcalcOffsets() 10:36:11 AM x=69, y=25
    att java.lang.Thread.run(Thread.java:466)

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

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

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

  • Java.lang.NullPointerException with and update statement

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Maybe you are looking for