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

Similar Messages

  • JSP AND BEAN PROBLEm   java.lang.nullpointerexception   help me please

    hello i have a problem, when i open login.jsp and enter the form i have nullpointerexception. i don't understand where i wrong... i use tomcat 5.5 ... sorry for my english i'm italian and i speak only italian :(
    login.jsp this is the code of the java server page
    <html>
    <%@ page language="java" import="java.sql.*" %>
    <jsp:useBean id="lavoro" scope="page" class="Ok.Dino"/>
    <%@ page session="false" %>
    <style type="text/css">
    <!--
    body {
         background-color: #003366;
    a:link {
         color: #CCCCCC;
    .style1 {
         color: #000000;
         font-weight: bold;
         font-size: x-large;
    .style4 {font-size: 18px}
    -->
    </style>
    <body>
    <%if(request.getMethod()=="GET"){
    %>
    <form action="login.jsp" method= "POST" name="frmlogin" id="frmlogin">
         <div align="center">
           <p class="style1">AUTENTICAZIONE</p>
           <p> </p>
           <table width="318" height="140" border="1">
            <tr>
              <td width="95" height="60" bordercolor="#000000" bgcolor="#0066CC"><p align="center"><strong>USER</strong></p>          </td>
              <td width="207" bgcolor="#0099CC"><p align="center">
                <input type="text" name="txtnome"></p>
              </td>
            </tr>
            <tr>
              <td height="72" bordercolor="#000000" bgcolor="#0066CC"><strong>PASSWORD</strong> </td>
              <td width="207" bgcolor="#0099CC"><div align="center">
                <input name="pwdtxt" type="password">
              </div></td>
            </tr>
          </table>
           <table width="318" border="1">
            <tr>
              <td width="318" height="87"> <div align="center">
                <input name="submit" type="submit" value="invia"  >
              </div>
              <p align="center"><strong><span class="style4">Se non sei registrato fallo <a href="file:///C|/Documents and Settings/access/Documenti/My Received Files/registrazione.jsp">adesso </a></span></strong></p></td>
            </tr>
          </table>
           <p> </p>
           <p> </p>
      </div>
    </form>
    <%}else {  %>
    <%lavoro.settxtnome(request.getParameter("txtnome"));%>
    <%!ResultSet rs=null;
         String x=null;
    %>
    <% lavoro.cn_db("dbutenti");%>
    <% rs=lavoro.run_query("SELECT user FROM utenti");%>
    <%}%>
    </body>
    </html>and this is the bean code
    package Ok;
    import java.sql.*;
    public class Dino
    private String txtnome,pwdtxt;
    private Connection cn=null;
    private Statement st=null;
    private ResultSet Rs=null;
    public String gettxtnome()
    return txtnome;
    public String getpwdtxt()
    return pwdtxt;
    public void settxtnome(String n)
    this.txtnome=n;
    public void setpwdtxt(String n)
    this.pwdtxt=n;
    public void cn_db(String db)
              if(cn==null){
              //1. Caricamento del driver
              try{
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              }catch(ClassNotFoundException cnfe){
                   System.out.println("impossibile caricare il driver");
                   System.exit(1);
              try{
                   //2. Connessione al DB
                   cn = DriverManager.getConnection("jdbc:odbc:"+db);
                   //3. creazione degli oggetti Statement e ResultSet
                   st =cn.createStatement();
              }catch(SQLException e){
                   System.out.println(e+"jjj");
    }else{
         System.out.print("errore database gi�� creato");
    public ResultSet run_query(String qr)
         try{
    Rs=st.executeQuery(qr);
         }catch(SQLException e)
         System.out.print(e+"ecco l'error");
         return Rs;
    }

    Do you understand when a NullPointerException will be thrown? This will be thrown if you want to access an uninstantiated Object.
    So look to the stacktrace and go to the line where the NPE is been thrown and doublecheck if the object reference is actually instantiated.
    Or add a null-check to the object reference:if (someObject != null) {
        someObject.doSomething();
    }or just instantiate it:if (someObject == null) {
        someObject = new SomeObject();
    someObject.doSomething();

  • Java.lang.NullPointerException trying to migrate from MySQL to OracleXE

    (Originally posted in the SQL Developer forum)
    I'm trying to migrate a small MySQL database (four tables) to OracleXE. When I capture an object (table, schema or entire database), I'm receiving a java.lang.NullPointerException message from the Capture source in the Migration Log window. The migrated object doesn't show up in the Captured Objects window until after I shut down SQL Developer and restart it, then the tables in the migration script don't have any columns defined in them.
    Here's the error from the console:
    java.lang.Exception: java.lang.NullPointerException
    at oracle.dbtools.migration.workbench.core.ui.AbstractMigrationProgressRunnable.start(AbstractMigrationProgressRunnable.java:139)
    at oracle.dbtools.migration.workbench.core.CaptureInitiator.launch(CaptureInitiator.java:57)
    at oracle.dbtools.raptor.controls.sqldialog.ObjectActionController.handleEvent(ObjectActionController.java:127)
    at oracle.ide.controller.IdeAction.performAction(IdeAction.java:551)
    at oracle.ide.controller.IdeAction$2.run(IdeAction.java:804)
    at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:823)
    at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:521)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
    at java.awt.Component.processMouseEvent(Component.java:5501)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
    at java.awt.Component.processEvent(Component.java:5266)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3968)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1778)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)Caused by: java.lang.NullPointerException
    at oracle.dbtools.migration.workbench.plugin.MySQLCapturer.captureColumnDetails(MySQLCapturer.java:473)
    at oracle.dbtools.migration.workbench.plugin.MySQLCapturer.captureObjects(MySQLCapturer.java:145)
    at oracle.dbtools.migration.capture.CaptureWorker.capturePerTable(CaptureWorker.java:568)
    at oracle.dbtools.migration.capture.CaptureWorker.captureType(CaptureWorker.java:331)
    at oracle.dbtools.migration.capture.CaptureWorker.runCapture(CaptureWorker.java:282)
    at oracle.dbtools.migration.workbench.core.ui.CaptureRunner.doWork(CaptureRunner.java:63)
    at oracle.dbtools.migration.workbench.core.ui.AbstractMigrationProgressRunnable.run(AbstractMigrationProgressRunnable.java:159)
    at oracle.dbtools.migration.workbench.core.ui.MigrationProgressBar.run(MigrationProgressBar.java:532)
    at java.lang.Thread.run(Thread.java:595)
    My environment is:
    Windows Xp sp2
    SQL Developer (ver. 1.1.2.25.78)
    J2SE Development Kit 5.0 Update 11
    mysql-connector-java-5.0.5
    Oracle Database 10g Express Edition Release 10.2.0.1.0
    The MySQL database is version 4.1.2 running on a remote Mandriva Linux 2006 server.
    Are there any specific version requirements for the components involved?
    Thanks.

    Hi,
    There's a known bug in the code that captures 4.1 MySQL databases (specifically). The fix has been applied, and will be available in our next release.
    for a temporary workaround, you can put your data into a MySQL 4.0 or 5.0 database.
    Regards,
    Dermot.

  • SOAP to IDOC scenario:  java.lang.NullPointerException

    Our trading partners currently post their xml files directly to our Integration Engine, where they are converted to idocs and posted to ECC.  I am now trying to change this scenario to a SOAP to IDoc scenario so that we can process the files through the Adapter Engine using HTTPS.  But I am running into an error when trying to post an xml file and I'm wondering what I am missing.
    My SOAP communication channel is configured as follows:
    Transport protocol:  HTTP
    Message protocol:  SOAP 1.1
    Adapter engine:  Integration Server
    HTTP Security Level:  HTTP
    Do Not Use Soap Envelope:  *Checked*
    Default interface and namespace have been specified
    QoS:  Exactly Once
    If I post an xml file to this channel using the RWB test tool, I receive message java.lang.NullPointerException.  However, I can find the message via the Message Monitoring in the RWB, with versions for both the AE and IE, each with status Successful.  The idoc is created and successfully posted to ECC.
    If I post this same file to the same URL using a third-party tool, I get the same error message along with more details (listed below).  Futhermore, a message does *not* show up in the RWB and thus does not get converted to an idoc and posted to ECC.
    Any ideas???  Thank you.
      <?xml version="1.0" ?>
    - <!--  see the documentation
      -->
    - <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    - <SOAP:Body>
    - <SOAP:Fault>
      <faultcode>SOAP:Server</faultcode>
      <faultstring>Server Error</faultstring>
    - <detail>
    - <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
      <context>XIAdapter</context>
      <code>ADAPTER.JAVA_EXCEPTION</code>
    - <text>
    - <![CDATA[
    java.lang.NullPointerException
         at com.sap.aii.messaging.net.MIMEInputSource.decodeContentType(MIMEInputSource.java:425)
         at com.sap.aii.messaging.net.MIMEInputSource.readBody(MIMEInputSource.java:323)
         at com.sap.aii.messaging.net.MIMEServletInputSource.parse(MIMEServletInputSource.java:58)
         at com.sap.aii.af.mp.soap.web.MessageServlet.doPost(MessageServlet.java:381)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
      ]]>
      </text>
      </s:SystemError>
      </detail>
      </SOAP:Fault>
      </SOAP:Body>
      </SOAP:Envelope>

    Here's the message log found in End-to-End monitoring from RWB test post (different from third-party tool message):
    java.lang.NullPointerException
         at com.sap.plaf.frog.FrogScrollPaneUI$1.propertyChange(FrogScrollPaneUI.java:113)
         at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
         at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
         at java.awt.Component.firePropertyChange(Unknown Source)
         at javax.swing.JScrollPane.setHorizontalScrollBar(Unknown Source)
         at javax.swing.plaf.basic.BasicComboPopup.createScroller(Unknown Source)
         at javax.swing.plaf.basic.BasicComboPopup.<init>(Unknown Source)
         at com.sap.plaf.frog.FrogComboPopup.<init>(FrogComboPopup.java:21)
         at com.sap.plaf.frog.FrogComboBoxUI.createPopup(FrogComboBoxUI.java:410)
         at com.sap.plaf.frog.FrogComboBoxUI.installUI(FrogComboBoxUI.java:178)
         at javax.swing.JComponent.setUI(Unknown Source)
         at javax.swing.JComboBox.setUI(Unknown Source)
         at javax.swing.JComboBox.updateUI(Unknown Source)
         at javax.swing.JComboBox.init(Unknown Source)
         at javax.swing.JComboBox.<init>(Unknown Source)
         at com.sap.jnet.clib.JNcToolBar$ComboBox.<init>(JNcToolBar.java:64)
         at com.sap.jnet.clib.JNcToolBar.addComboBox(JNcToolBar.java:192)
         at com.sap.jnet.clib.JNcAppWindow.newUI(JNcAppWindow.java:607)
         at com.sap.jnet.clib.JNcAppWindow.newData(JNcAppWindow.java:1097)
         at com.sap.jnet.JNetData.createGraphFromDOM(JNetData.java:512)
         at com.sap.jnet.JNetData.load(JNetData.java:709)
         at com.sap.jnet.JNetApplet.initJNetApplet(JNetApplet.java:524)
         at com.sap.jnet.JNetApplet.access$000(JNetApplet.java:40)
         at com.sap.jnet.JNetApplet$1.run(JNetApplet.java:265)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)

  • Client_text_io.fopen causes java.lang.NullPointerException

    Hi all
    I have the following very simple snippet of code:
    declare
         f client_text_io.file_type;
    begin
         f := client_text_io.fopen('C:\test.txt', 'r');
    end;
    If "C:\Test.txt" does NOT exist on the client, Webutil correctly pops up and complains "Can't open file" etc. But... when the file actually exists and is ready to be opened for read, the following exception is thrown in the console, and nothing happens:
    java.lang.NullPointerException: charsetName
         at java.io.InputStreamReader.<init>(Unknown Source)
         at oracle.forms.webutil.file.FileFunctions.fopen(Unknown Source)
         at oracle.forms.webutil.file.FileFunctions.getProperty(Unknown Source)
         at oracle.forms.handler.UICommon.onGet(Unknown Source)
         at oracle.forms.engine.Runform.onGetHandler(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.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    2006-feb-23 10:36:18.653 ERROR>WUC-15 [FileFunctions.fopen()] Uventet fejl, undtagelse: java.lang.NullPointerException: charsetName
    I have no idea, what goes wrong here.... can anyone help? I use Sun JPI 1.5 on the client.
    Thanks in advance.

    Hi all
    I have forms 9.0.4.6 and Webutil 1.0.6
    When I use client_text_io.fopen like this:
    declare
    f client_text_io.file_type;
    begin
    f := client_text_io.fopen('C:\test.txt', 'r');
    end;
    I get an error:
    ERROR>WUC-15 [FileFunctions.fopen()] Unexpected error, Exception: java.lang.NullPointerException
    java.lang.NullPointerException
         at sun.io.Converters.getConverterClass(Unknown Source)
         at sun.io.Converters.newConverter(Unknown Source)
         at sun.io.ByteToCharConverter.getConverter(Unknown Source)
         at java.io.InputStreamReader.<init>(Unknown Source)
         at oracle.forms.webutil.file.FileFunctions.fopen(FileFunctions.java:413)
         at oracle.forms.webutil.file.FileFunctions.getProperty(FileFunctions.java:188)
         at oracle.forms.handler.UICommon.onGet(Unknown Source)
         at oracle.forms.engine.Runform.onGetHandler(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.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Could anybody help me? I really need to use this.

  • Java.lang.NullPointerException  in GP roles

    Hello SDN,
    I have assigned GP roles to user. But when i logon to that perticular user, follwing exception is thrown for all GP roles(Runtime, Design time, Administration and personal templates).
      java.lang.NullPointerException
        at com.sap.caf.eu.gp.ui.comp.ctxpan.VContextualPanel.wdDoInit(VContextualPanel.java:160)
        at com.sap.caf.eu.gp.ui.comp.ctxpan.wdp.InternalVContextualPanel.wdDoInit(InternalVContextualPanel.java:177)
        at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
        at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
        at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
    following is error log in /nwa
    Full Message Text
    Object not found in lookup of GPService.
    com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of GPService.
    at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:649)
    at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:344)
    at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:254)
    at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:271)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at com.sap.caf.eu.gp.ui.comp.ctxpan.VContextualPanel.wdDoInit(VContextualPanel.java:155)
    at com.sap.caf.eu.gp.ui.comp.ctxpan.wdp.InternalVContextualPanel.wdDoInit(InternalVContextualPanel.java:177)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
    at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
    at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
    at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
    at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
    at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
    at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
    at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:43)
    at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
    at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
    at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
    at com.sap.tc.webdynpro.progmodel.view.ViewManager.makeVisible(ViewManager.java:789)
    at com.sap.tc.webdynpro.progmodel.view.ViewManager.onComponentCreated(ViewManager.java:258)
    at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.fireComponentCreated(ComponentUsage.java:575)
    at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponentInternal(ComponentUsage.java:175)
    at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponent(ComponentUsage.java:116)
    at com.sap.caf.eu.gp.ui.rtwc.VWorkCenterRunTime.wdDoModifyView(VWorkCenterRunTime.java:185)
    at com.sap.caf.eu.gp.ui.rtwc.wdp.InternalVWorkCenterRunTime.wdDoModifyView(InternalVWorkCenterRunTime.java:615)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
    at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:337)
    at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:481)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doModifyView(WindowPhaseModel.java:551)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:148)
    at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
    at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:333)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:741)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:694)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:253)
    at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    please provide me solution.
    regards,
    Sree.
    Edited by: sree pedasingh on Apr 28, 2011 7:51 AM

    Hi Experts,
    Please provide solution. What could be the issue.
    regards,
    Sree.

  • Java.lang.NullPointerException in RFC Receiver Adapter

    Hi Experts,
    i have configured SQL Sender Adapter and this works fine, i can see the payload. and at the receiver adapter i have configured RFC Receiver Adapter this is throwing NullPointerException as mentioned below.. can someone help me out to fix this issue..
    Error Description:
    Error     Exception caught by adapter framework: null
    Success     MP: Processing local module localejbs/AF_Modules/RequestResponseBean
    Error     MP: Exception caught with cause java.lang.NullPointerException
    Error     Delivery of the message to the application using connection   
                    RFC_http://sap.com/xi/XI/System failed, due to:
                    com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.NullPointerException.
    Success     The message status set to WAIT.
    Thanks,
    Srikanth

    Hi Srikanth,
    This error Occurs because of incomplete configuration in the reciever communication channel.Please check all the required configurations in the reciever communication channel and then activate the channel.
    Regards,
    Naveen

  • Receive java.lang.NullPointerException (JCA-12563) on SCA with Stored Procedure dbAdapter (SOA Suite 12.1.3)

    Hi,
    I'm new to the Oracle SOA Suite and have been creating very simple SCA WebServices (async and sync) prototypes to INSERT, UPDATE and Poll Oracle 9i and 11g databases. So far, everything works and passes the tests from EM.
    I cannot get the Stored Procedure WebService to test successfully as I receive the error message below regardless of JNDI configuration for XA, non-XA, Last Logging Resource, Support Global Transactions,PlatformClassName, etc...  The Outbound Connection Pool is setup correctly as the other DML tests have worked fine.
    BINDING.JCA-12563
    Exception occurred when binding was invoked.
    Exception occurred during invocation of JCA binding: "JCA Binding execute of Reference operation 'dbReference' failed due to: Interaction processing error.
    Error while processing the execution of the IFSAPP.TEST_SOA_API API interaction.
    An error occurred while processing the interaction for invoking the IFSAPP.TEST_SOA_API API. Cause: java.lang.NullPointerException
    Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD.  This exception is considered not retriable, likely due to a modelling mistake.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    Caused by: BINDING.JCA-12563
    Exception occurred when binding was invoked.
    Exception occurred during invocation of JCA binding: "JCA Binding execute of Reference operation 'callAPI' failed due to: Interaction processing error.
    Error while processing the execution of the IFSAPP.TEST_SOA_API API interaction.
    An error occurred while processing the interaction for invoking the IFSAPP.TEST_SOA_API API. Cause: java.lang.NullPointerException
    Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD.  This exception is considered not retriable, likely due to a modelling mistake.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
       at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:569)
        at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeJcaReference(JCAInteractionInvoker.java:724)
        at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeAsyncJcaReference(JCAInteractionInvoker.java:689)
        at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAEndpointInteraction.performAsynchronousInteraction(JCAEndpointInteraction.java:628)
        at oracle.integration.platform.blocks.adapter.AdapterReference.post(AdapterReference.java:325)
        ... 84 more
    Caused by: BINDING.JCA-11812
    Interaction processing error.
    Error while processing the execution of the IFSAPP.TEST_SOA_API API interaction.
    An error occurred while processing the interaction for invoking the IFSAPP.TEST_SOA_API API. Cause: java.lang.NullPointerException
    Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD.  This exception is considered not retriable, likely due to a modelling mistake.
        at oracle.tip.adapter.db.exceptions.DBResourceException.createNonRetriableException(DBResourceException.java:690)
        at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:656)
        at oracle.tip.adapter.db.sp.SPUtil.createResourceException(SPUtil.java:180)
        at oracle.tip.adapter.db.sp.SPInteraction.executeStoredProcedure(SPInteraction.java:183)
        at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:1302)
        at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:307)
        at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:415)
    Caused by: java.lang.NullPointerException
        at oracle.tip.adapter.db.sp.SPInteraction.executeStoredProcedure(SPInteraction.java:162)
        ... 91 more
    The SP SCA is the simplest possible application I can think of...  The WebService accepts a single INT, calls BPEL>Receive>Assign>Invoke>dbAdapter(Stored Procedure) that accepts a single IN INTEGER parameter in an Oracle 11g database.
    Steps I've used to create the SP SCA. (Create Empty SOA Application)
    1.) Create Database Adapter in External References swim lane.
    2.) Set JNDI and Connection.
    3.) Browse to Oracle Procedure...click through Wizard and accept all defaults.
       CREATE OR REPLACE PROCEDURE TEST_SOA_API (
         wo_order_no_ IN INTEGER)
       IS
       BEGIN
         INSERT INTO TEST_TMP VALUES (wo_order_no_);
       END;
    4.) WSDL, XSD, JCA are automatically generated. 
    5.) Create BPEL Process Component and select Template "Base on a WSDL".  I choose the WSDL created from the Database Adapter wizard.
    6.) The "Exposed Service" is automatically created and everything is wired.
    7.) I deploy to my CompactDomain (running on a local Oracle12 db).  No errors.
    8.) I login to EM and Test the WebService..and ALWAYS receive the error message above.
    I've tried BPEL Process and Mediator as components to simply pass the single incoming INT parameter to the SP DbAdapter and tried every combination I can think of with DataSource/DbAdapter Deployment through the Admin console.  I used the same exact steps above for INSERT, UPDATE, Polling and have had no issues so I cannot figure out why I'm not receiving java.NullPointer exception or why I'm receiving the XML/XSD malformation error.
    Stuck now...anyone have an idea what I'm doing wrong or simply tell me I'm an idiot and shouldn't do SP's this way?
    FYI.  I've turned on logging for the oracle.soa.adapter.db class to TRACE: 32(FINEST).  Not much help to me
    [2015-04-02T09:03:55.706-05:00] [AdminServer] [WARNING] [ADF_FACES-00007] [oracle.adf.view.rich.render.RichRenderer] [tid: 118] [userId: weblogic] [ecid: 852497f1-b648-4cac-9cee-05e7972ce68e-00000788,0] [APP: em] [DSID: 0000KluHqzk0NuGayxyWMG1L7K52000003] Attempt to synchronized unknown key: viewportSize.
    [2015-04-02T09:05:23.971-05:00] [AdminServer] [TRACE] [] [oracle.soa.adapter.db.outbound] [tid: 115] [userId: <anonymous>] [ecid: 852497f1-b648-4cac-9cee-05e7972ce68e-000007db,1:17474] [APP: soa-infra] [oracle.soa.tracking.FlowId: 250004] [oracle.soa.tracking.InstanceId: 1270014] [oracle.soa.tracking.SCAEntityId: 90004] [composite_name: OraclePLSQL2!1.0] [FlowId: 0000KluSpyP0NuGayxyWMG1L7K52000007] [SRC_CLASS: oracle.tip.adapter.db.sp.AbstractStoredProcedure] [SRC_METHOD: execute]  [composite_version: 1.0] [reference_name: dbReference] BEGIN IFSAPP.TEST_SOA_API(WO_ORDER_NO_=>?); END;
    [2015-04-02T09:05:23.972-05:00] [AdminServer] [TRACE] [] [oracle.soa.adapter.db.outbound] [tid: 115] [userId: <anonymous>] [ecid: 852497f1-b648-4cac-9cee-05e7972ce68e-000007db,1:17474] [APP: soa-infra] [oracle.soa.tracking.FlowId: 250004] [oracle.soa.tracking.InstanceId: 1270014] [oracle.soa.tracking.SCAEntityId: 90004] [composite_name: OraclePLSQL2!1.0] [FlowId: 0000KluSpyP0NuGayxyWMG1L7K52000007] [SRC_CLASS: oracle.tip.adapter.db.sp.AbstractStoredProcedure] [SRC_METHOD: execute]  [composite_version: 1.0] [reference_name: dbReference] Bindings [WO_ORDER_NO_=>INTEGER(2343)]
    WSDL
    <wsdl:definitions
         name="dbReference"
         targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/OraclePLSQL2/OraclePLSQL2/dbReference"
         xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/OraclePLSQL2/OraclePLSQL2/dbReference"
         xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
         xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
         xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/sp/dbReference"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        >
      <plt:partnerLinkType name="dbReference_plt" >
        <plt:role name="dbReference_role" >
          <plt:portType name="tns:dbReference_ptt" />
        </plt:role>
      </plt:partnerLinkType>
        <wsdl:types>
         <schema xmlns="http://www.w3.org/2001/XMLSchema">
           <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/sp/dbReference"
                   schemaLocation="../Schemas/dbReference_sp.xsd" />
         </schema>
        </wsdl:types>
        <wsdl:message name="args_in_msg">
            <wsdl:part name="InputParameters" element="db:InputParameters"/>
        </wsdl:message>
        <wsdl:portType name="dbReference_ptt">
            <wsdl:operation name="dbReference">
                <wsdl:input message="tns:args_in_msg"/>
            </wsdl:operation>
        </wsdl:portType>
    </wsdl:definitions>
    XSD
    <schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/sp/dbReference" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/sp/dbReference" elementFormDefault="qualified">
       <element name="InputParameters">
          <complexType>
             <sequence>
                <element name="WO_ORDER_NO_" type="int" db:index="1" db:type="INTEGER" minOccurs="0" nillable="true"/>
             </sequence>
          </complexType>
       </element>
    </schema>
    Payload XML
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
            <soap:Body>
                    <ns1:InputParameters xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/sp/dbReference">
                            <ns1:WO_ORDER_NO_>667</ns1:WO_ORDER_NO_>
            </ns1:InputParameters>
        </soap:Body>
    </soap:Envelope>

    An even simpler request:
    Can someone create an SCA that simply accepts a single INT parameter and calls a Stored Procedure (Oracle) that inserts this INT into a table?  Maybe upload the project folder structure in a zip? 
    Seems someone with experience on this platform could execute this task in 10-15 minutes.
    CREATE TABLE TEST_TMP (WO_ORDER_NO INT);
       CREATE OR REPLACE PROCEDURE TEST_SOA_API (
         wo_order_no_ IN INTEGER)
       IS
       BEGIN
         INSERT INTO TEST_TMP VALUES (wo_order_no_);
       END;

  • SOAP Receiver Adapter Error in XI RWB - java.lang.NULLPointerException

    Hi,
    We have a asynchronous scenario in SAP-XI, where we are sending the PO data from SRM to third party (Hubspan / TNT). Proxy is being used at Sender side and SOAP Adapter is used for Receiver Communication Channel.
    u2022SRM is sending around 1000 messages through background job and around 995 or 996 messages are being processed successfully and showing the proper XML payload as well in RWB. But 4-5 messages are getting failed in XI RWB for u2018java.lang.NullPointerExceptionu2019. For these failed messages we are not able to see the XML payload as well in XI RWB while these messages are showing successful status in MONI in SRM and XI and we are able to see the payload as well in MONI. The webservice is restarting and trying to send the payload three times in RWB, but it is getting the same Nullexception error.
    04.11.2011 16:45:49.715 Success Delivering to channel: CC_B2B_HUBSPAN_RCV
    04.11.2011 16:45:49.715 Success MP: Entering module processor
    04.11.2011 16:45:49.715 Success MP: Processing local module localejbs/sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean
    04.11.2011 16:45:49.716 Success SOAP: request message entering the adapter with user J2EE_GUEST
    04.11.2011 16:45:49.716 Success SOAP: Target url: https://connect.hubspan.net/mh/server/tp=NMHG/ssid=DAA6F0E9AC1000BD03A41B363BBFD676
    04.11.2011 16:45:49.999 Error SOAP: call failed: java.lang.NullPointerException
    04.11.2011 16:45:49.999 Success SOAP: sending a delivery error ack ...
    04.11.2011 16:45:49.999 Success SOAP: sent a delivery error ack
    04.11.2011 16:45:49.999 Error SOAP: error occured: com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.NullPointerException
    04.11.2011 16:45:49.999 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.NullPointerException
    04.11.2011 16:45:50.000 Error Exception caught by adapter framework: null
    04.11.2011 16:45:50.022 Error Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.NullPointerException.
    04.11.2011 16:45:50.037 Success The message status set to WAIT.
    u2022If we are resending the failed message from XI RWB, it is getting failed again with the same error. On the other hand if we are initiating the message again from SRM to Hubspan for the same PO, it is getting processed successfully in RWB but still not showing XML payload in RWB.
    u2022If we are getting the payload from XI MONI for the failed message and doing a test with component monitoring in RWB, it is working fine.
    Please help me to solve this issue.
    Thanks
    Sumit

    Hi Sumit,
    From my experience, when you transfer  SAP POs through PI to external webservice, there should be some validation happens at the webservice layer of the target system before the web service passes the original information to  their application layer. The validation can be anything like checking the Vendor address, Checking the correctness of the order ...etc etc . So i would suggest to ask your external web service folks to check if they have any validation in place before they pass the data to their application layer.
    As you said only some POs/XMLs are failing, i strongly feel that this could be the issue.
    Please note if you receive response code other than 200 from webservice, SOAP adapter treats that as error and send the same message back to AE.
    Normally webservices won't send 200 code for any validation error
    PS: you can still try to use XMLSpy to post the failed message to the web service to know the exact cause.

  • Java.lang.NullPointerException exception in SOAP Receiver adapter

    Hi Experts,
    I have a requirement where a third party system will call a service(WSDL) generated from ID to receive some details from SAP system.
    The design and configuration part everything was created and was able to receive requests from third party system successfully till last week. But suddenly we are receiving the below error from today,
    SOAP: call failed: java.lang.NullPointerException: while trying to invoke the method com.sap.aii.af.sdk.xi.mo.xmb.XMBMessageHeader.getMessageId() of an object loaded from local variable messageHeader
    i went through some of the threads in SDN, but still we are receiving the same error.
    Could any one can help me on this?
    Thanks in advance.
    Regards,
    Govardhan Duvva.

    Hi Duvva
    Please check if there are any changes done on the web service side and double check the urls being used.
    similar error is explained in the thread : Might be useful to refer once.
    ADAPTER.JAVA_EXCEPTION: Sender soap adapter PI ... | SCN
    Server Proxy 7.3 issue with URL

  • 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

  • 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.

  • "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 with FTP receiver

    Hi All,
    I have a java.lang.NullPointerException in the Runtime Workbench for my FTP Adapter, that is a receiver.
    At SXMB_MONI all the messages are successful.
    What this could be?
    Thanks in advance,
    Daniela

    Naveen,
    Thanks for your help.
    I took a look in RWB and it seems like there was an error when CC tried to connect with the FTP server. The last two messages are:
    Success -> Connect to FTP server "10.112.144.108", directory "\interfaces2\conversionesTest"
    Error -> Attempt to process file failed with Error occurred while connecting to the FTP server "10.112.144.108:22": java.lang.NullPointerException
    Do you think ii could be an conection error (login, port) or a wrong configuration in my CC?
    Thaks in advance,
    Daniela Machado

  • SOAP: call failed: java.lang.NullPointerException

    Hi,
    We are geeting the error in RWB -->
    SOAP: call failed: java.lang.NullPointerException
    We checked the communication channel and interface and all are working fine.
    Can anybody suggest?
    Regards,
    Akki..................

    Hi,
    use this link to find the answer..
    SOAP adapter
    Regards,
    Amitanshu

Maybe you are looking for

  • UK Payroll : /111 Splitting

    Hi Experts, The issue is regarding with wage type /111 and related PCR. We have one customized wage type 1234 in IT0014. As per the requirement it should calculate percentage of /111 and percentage will be given in IT0014. For this we have written on

  • Move table to a different schema

    How can i move a particular table from one schema to another. I have no mutual depenencies on anyother tables.

  • Background image/reloading/closing applet

    2 questions: 1) How do I put a background gif/jpg image on a frame window? 2) Is there a method or command that can restart or reload the current applet? 3) What's the best normal way to kill/exit the applet? (System.exit() ?) What about browser, how

  • Using TopLink Workbench in Jdeveloper HELP!!!!!

    HI! I want to know how can I use TopLink Workbench in JDeveloper to configure java classes??? Please Help!!! Best Regards

  • Help bring a multipage scanned document (TIFF) in PDF format using XML Publ

    Help bring a multipage scanned document (TIFF) in PDF format using XML Publisher. In the generated XML file data into BLOB field is, but their XML Publisher can not handle. If the output TIFF, multipage PDF file in the report, the report prints a bla