NullPointerException in RaraClassLoader instead of ClassNotFound...

weblogic.utils.classloaders.RarClassLoader.java:125
          private synchronized Class loadFromManifest(String s)
          throws IOException
          if(manifestFinder == null)
          manifestFinder =
          ClassFinderUtils.getManifestFinder(rar, new HashSet());
          Source source = manifestFinder.getClassSource(s);
          But someone has forgoten that ClassFinderUtils.getManifestFinder can return
          null...
          The fix can be quite simple, but the NullPointerException is too hard to
          trace...
          The workaround is to set manifest Class-Path to any jar name. This will slow
          down the application a bit, but you'll get
          the real source of your problems (ClassNotFoundException) instead of
          mysterious NullPointers.
          Cheers,
          Dmitri "Vinny" Girenko [email protected]
          Software Developer http://www.akumiitti.fi/
          Akumiitti Ltd GSM: +358 40 846 2486
          Tammasaarenkatu 5 Tel: +358 201 500 574
          00180 Helsinki FAX: +358 201 500 502
          Finland
          

weblogic.utils.classloaders.RarClassLoader.java:125
          private synchronized Class loadFromManifest(String s)
          throws IOException
          if(manifestFinder == null)
          manifestFinder =
          ClassFinderUtils.getManifestFinder(rar, new HashSet());
          Source source = manifestFinder.getClassSource(s);
          But someone has forgoten that ClassFinderUtils.getManifestFinder can return
          null...
          The fix can be quite simple, but the NullPointerException is too hard to
          trace...
          The workaround is to set manifest Class-Path to any jar name. This will slow
          down the application a bit, but you'll get
          the real source of your problems (ClassNotFoundException) instead of
          mysterious NullPointers.
          Cheers,
          Dmitri "Vinny" Girenko [email protected]
          Software Developer http://www.akumiitti.fi/
          Akumiitti Ltd GSM: +358 40 846 2486
          Tammasaarenkatu 5 Tel: +358 201 500 574
          00180 Helsinki FAX: +358 201 500 502
          Finland
          

Similar Messages

  • Doubt: NullPointerException instead of RemoteException???

    Hi,
    Scenario:
    1. An external object (hosted by another process) registers itself in WebLogic
    JNDI by invoking bind
    2. WebLogic EJBs invoke the external object, everything is OK
    3. Process hosting the external object goes down
    4. Remote reference still exists in JNDI
    5. Invoking the remote object throws the following exception:
    2002-09-09 15:54:13,492 ERROR [ExecuteThread: '6' for queue: 'default'] cz.oskarmobil.is.bmg.connectivity.protocolhandler.ucp.UCPPostprocessorBean
    - Failed to send message to clientconnector: Test-SMSC
    java.lang.NullPointerException
         at weblogic.transaction.internal.PropagationContext.getVersion(PropagationContext.java:646)
         at weblogic.transaction.internal.PropagationContext.writeExternal(PropagationContext.java:165)
         at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:92)
         at weblogic.common.internal.ChunkedObjectOutputStream.writeObjectWL(ChunkedObjectOutputStream.java:113)
         at weblogic.rjvm.MsgAbbrevOutputStream.setTxContext(MsgAbbrevOutputStream.java:111)
         at weblogic.rmi.internal.BasicOutboundRequest.setTxContext(BasicOutboundRequest.java:143)
         at weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:95)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:116)
         at cz.oskarmobil.is.bmg.connectivity.tcpip.UCPClientConnector_WLStub.sendMessage(Unknown
    Source)
         at cz.oskarmobil.is.bmg.connectivity.protocolhandler.ucp.UCPPostprocessorBean.sendMessage(UCPPostprocessorBean.java:294)
         at cz.oskarmobil.is.bmg.connectivity.protocolhandler.ucp.UCPPostprocessorBean.sendMessage(UCPPostprocessorBean.java:237)
         at cz.oskarmobil.is.bmg.connectivity.protocolhandler.ucp.UCPPostprocessorBean.onMessage(UCPPostprocessorBean.java:177)
         at weblogic.ejb20.internal.MDListener.execute(MDListener.java:348)
         at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:282)
         at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:263)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2309)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:2232)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
    Why not RemoteException??? Why NullPointerException??? Wouldn't be RemoteException
    the right exception in this case?
    Please clarify this, since I thought it is enough to catch only RemoteException
    and relookup the object but now seems NullPointerException is also needed to be
    catched.
    Or, do I miss something?
    /SB

    while inserting data inserted into Temp_EmployeeDetails1, but not inserting in EmployeeDetails1,
    Because it is an INSTEAD OF trigger; instead of directly inserting the data into the base table the Trigger is fired and you have to insert the data on your own, e.g. after validationg or modifying the data.
    See
    INSTEAD OF INSERT Triggers /
    Designing INSTEAD OF Triggers
    Use an AFTER Trigger instead or modify your INSTEAD OF Trigger =>
    create trigger [dbo].[tr_emp1]
    on [dbo].[Employeedetails1]
    instead of insert
    as
    begin
    insert into Emploeeydetails1
    [EmployeeID],
    [Employeename],
    [Deptname]
    select ins.[EmployeeID],
    ins.[Employeename],
    ins.[Deptname]
    from inserted ins
    insert into Temp_Emploeeydetails1
    [EmployeeID],
    [Employeename],
    [Deptname]
    select ins.[EmployeeID],
    ins.[Employeename],
    ins.[Deptname]
    from inserted ins
    end
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Getting java.lang.NullpointerException while closing resultset aft using it

    Hi,
    I kindly request to share your ideas reg. my problem.
    I am opening a database connection using connection pool and i am using two or more resultsets and statement objects.I am closing these objects at the end of their usage.But i am getting java.lang.NullpointerException when i close them(if i don't close them it works fine). what might be the reason. Had i did any thing wrong in the code.
    please view the code
    public String storeNewConnection(String CIRCLE,String DIVISION,String SUB_DIVISION,String SECTION,String CONSUMER_NAME,String FATHER_NAME,String STREET_NAME,String DOOR_NO,String TOWN_CITY,String LAND_MARK,String PINCODE,String STDCODE,String PHONE_NO,String EMAIL,String NEIGHBOUR_SCNO,String DOCUMENT_CODE,String LT_APR_NO,String year1,String month1,String day1,String PCBNO,String CONSUMER_STATUS,String SOCIAL_GROUP,String CATEGORY_SUPPLY,String LOCATION_PREMISES,String PURPOSE_OF_SUPPLY,String DURATION,String LOAD_TYPE,String CONNECTED_LOAD,String CONTRACTED_LOAD,String APPLICATION_FEE,String DEVELOPMENT_CHARGES,String SECURITY_DEPOSIT,String ADDL_SECURITY_DESPOSIT,String DEPOSITED_THRU,String DD_CHEQUE_DETAILS,String year2,String month2,String day2,String REMARKS,String POLE_NO)
              int count=0;
              Statement st=null;
              ResultSet rs=null,rs1=null,rs2=null,rs3=null;
              PreparedStatement pst=null;
              String result="",query="",sysDate="",sysDate2="";
              String reg_no = "";
              try
                   st=con.createStatement();
                   //Check dates with sys date
                   String date1 =null;                    
                   String date2 =null;
                   if(! (year1.equals("") || month1.equals("") || day1.equals("")) )
                        date1=day1+"-"+month1+"-"+year1;
                        rs2=st.executeQuery("select round(to_date('"+date1+"','dd-Mon-yyyy')-to_date(sysdate,'dd-Mon-yy')) from dual");
                        rs2.next();
                        if(rs2.getInt(1) != 0)
                             return "false";                              
                   if(! (year2.equals("") || month2.equals("") || day2.equals("")) )
                        date2=day2+"-"+month2+"-"+year2;
                        rs3=st.executeQuery("select round(to_date('"+date2+"','dd-Mon-yyyy')-to_date(sysdate,'dd-Mon-yy')) from dual");
                        rs3.next();
                        if(rs3.getInt(1) != 0)
                             return "false";     
                   rs1=st.executeQuery("select to_char(sysdate,'yyyyMONdd'),to_char(sysdate,'dd-Mon-yyyy') from dual");
                   rs1.next();
                   sysDate=rs1.getString(1);
                   sysDate2=rs1.getString(2);
                   rs=st.executeQuery("select max(SERIAL_NO) from NEW_CONNECTIONS where to_char(sysdate,'yyyy') = to_char(REG_DATE,'yyyy') and to_char(sysdate,'mm') = to_char(REG_DATE,'mm') and SUB_DIVISION_CODE = "+SUB_DIVISION+" and DIVISION_CODE = "+DIVISION+" and CIRCLE_CODE = "+CIRCLE+" ");
                   if(rs.next())
                        count = rs.getInt(1);
                        count++;                              
                   else
                        count=1;
                   query="insert into NEW_CONNECTIONS ( "+
                        " REG_NO,SERIAL_NO,REG_DATE,CIRCLE_CODE,DIVISION_CODE,SUB_DIVISION_CODE,SECTION_CODE, "+
                        " CONSUMER_NAME,FATHER_NAME,STREET_NAME,DOOR_NO,TOWN_CITY,LAND_MARK,PINCODE, "+
                        " STDCODE,PHONE_NO,EMAIL,NEIGHBOUR_SCNO,DOCUMENT_CODE,LT_APR_NO,LT_APR_DATE, "+
                        " PCBNO,CONSUMER_STATUS,SOCIAL_GROUP,CATEGORY_SUPPLY,LOCATION_PREMISES,PURPOSE_OF_SUPPLY,"+
                        " DURATION,LOAD_TYPE,CONNECTED_LOAD,CONTRACTED_LOAD,APPLICATION_FEE,DEVELOPMENT_CHARGES, "+
                        " SECURITY_DEPOSIT,ADDL_SECURITY_DEPOSIT,DEPOSITED_THRU,DD_CHEQUE_DETAILS,DD_CHEQUE_DATE,REMARKS,APPLICATION_STATUS,POLE_NO) "+
                        " values(?,?,'"+sysDate2+"',?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                   pst = con.prepareStatement(query);
                   String cnt ="";
                   if(count <= 9)
                        cnt="0000";
                   else if(count <= 99)
                        cnt="000";
                   else if(count <= 999)
                        cnt="00";
                   else if(count <= 9999)
                        cnt="0";
                   cnt+=Integer.toString(count);
                   reg_no = CIRCLE+DIVISION+SUB_DIVISION+SECTION+"N"+cnt+sysDate;               
                   int serial_no =count;
                   int pin = 0;
                   if(!PINCODE.equals(""))
                        pin =Integer.parseInt(PINCODE);
                   int std = 0;
                   if(!STDCODE.equals(""))
                        std = Integer.parseInt(STDCODE);
                   int status = Integer.parseInt(CONSUMER_STATUS);
                   int social_group = Integer.parseInt(SOCIAL_GROUP);
                   int supply = Integer.parseInt(CATEGORY_SUPPLY);
                   int location = Integer.parseInt(LOCATION_PREMISES);
                   int purpose = Integer.parseInt(PURPOSE_OF_SUPPLY);
                   int duration = Integer.parseInt(DURATION);
                   int laod_type = Integer.parseInt(LOAD_TYPE);
                   float conn_load = Float.parseFloat(CONNECTED_LOAD);
                   int cont_load = 0;
                   if(!CONTRACTED_LOAD.equals(""))
                        cont_load =Integer.parseInt(CONTRACTED_LOAD);
                   int app_fee = Integer.parseInt(APPLICATION_FEE);
                   int dev_chg = Integer.parseInt(DEVELOPMENT_CHARGES);
                   int sec_dep = Integer.parseInt(SECURITY_DEPOSIT);
                   int addl_sec_dep = 0;     
                   if(!ADDL_SECURITY_DESPOSIT.equals(""))
                        addl_sec_dep =Integer.parseInt(ADDL_SECURITY_DESPOSIT);
                   int dep_thru = Integer.parseInt(DEPOSITED_THRU);          
                   pst.setString(1,reg_no);
                   pst.setInt(2,serial_no);
                   pst.setString(3,CIRCLE);
                   pst.setString(4,DIVISION);
                   pst.setString(5,SUB_DIVISION);
                   pst.setString(6,SECTION);
                   pst.setString(7,CONSUMER_NAME);
                   pst.setString(8,FATHER_NAME);
                   pst.setString(9,STREET_NAME);
                   pst.setString(10,DOOR_NO);
                   pst.setString(11,TOWN_CITY);
                   pst.setString(12,LAND_MARK);
                   pst.setInt(13,pin);
                   pst.setInt(14,std);
                   pst.setString(15,PHONE_NO);
                   pst.setString(16,EMAIL);
                   pst.setString(17,NEIGHBOUR_SCNO);
                   pst.setString(18,DOCUMENT_CODE);
                   pst.setString(19,LT_APR_NO);
                   pst.setString(20,date1);
                   pst.setString(21,PCBNO);
                   pst.setInt(22,status);
                   pst.setInt(23,social_group);
                   pst.setInt(24,supply );
                   pst.setInt(25,location);
                   pst.setInt(26,purpose);
                   pst.setInt(27,duration);
                   pst.setInt(28,laod_type);
                   pst.setFloat(29,conn_load );
                   pst.setInt(30,cont_load);
                   pst.setInt(31,app_fee);
                   pst.setInt(32,dev_chg);
                   pst.setInt(33,sec_dep);
                   pst.setInt(34,addl_sec_dep);
                   pst.setInt(35,dep_thru );
                   pst.setString(36,DD_CHEQUE_DETAILS);
                   pst.setString(37,date2);
                   pst.setString(38,REMARKS);
                   pst.setInt(39,1);
                   pst.setString(40,POLE_NO);
                   pst.executeUpdate();
                   result=reg_no;                                   
                   rs.close();
                   rs=null;
                   rs1.close();
                   rs1=null;
                   rs2.close();
                   rs2=null;
                   rs3.close();
                   rs3=null;
                   st.close();
                   st=null;
                   pst.close();
                   pst=null;
              catch(Exception e)
                   e.printStackTrace();
                   result="false";
                   return result;
              finally
                   if (rs != null)
                        try
                             rs.close();
                        catch (SQLException e)
                        rs = null;
                   if (rs1 != null)
                        try
                             rs1.close();
                        catch (SQLException e)
                        rs1 = null;
                   if (rs2 != null)
                        try
                             rs2.close();
                        catch (SQLException e)
                        rs2 = null;
                   if (rs3 != null)
                        try
                             rs3.close();
                        catch (SQLException e)
                        rs3 = null;
                   if (st != null)
                        try
                             st.close();
                        catch (SQLException e)
                        st = null;
                   if (pst != null)
                        try
                             pst.close();
                        catch (SQLException e)
                        pst = null;
              return result;
    Also plz help me to improve the code if necessary so that it will work fine for multiple users
    thaks & regards
    Prasanth.C

    Thanks a lot.
    i replaced the code below
    if (rs != null)
                        try
                             rs.close();
                        catch (SQLException e)
                        rs = null;
                   if (rs1 != null)
                        try
                             rs1.close();
                        catch (SQLException e)
                        rs1 = null;
                   if (rs2 != null)
                        try
                             rs2.close();
                        catch (SQLException e)
                        rs2 = null;
                   if (rs3 != null)
                        try
                             rs3.close();
                        catch (SQLException e)
                        rs3 = null;
                   if (st != null)
                        try
                             st.close();
                        catch (SQLException e)
                        st = null;
                   if (pst != null)
                        try
                             pst.close();
                        catch (SQLException e)
                        pst = null;
    instead of blindly closing the resultsets and statements
    now it works fine.
    One more thing, is my code structurally correct, i mean the variables, try...catch blocks,results,statements,database connections and overall coding. whether it looks like professional code.
    thaks & regards,
    Prasanth.C

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

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

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

  • NullPointerException Error

    Hello, I hope you can help me out with a Java excercise I am working on. I am using "Learn to Program with Java by John Smiley.
    It involves error checking to see if the user clicks cancel without sending a required string or sending an empty string on a JOptionPane
    prompt.
    If you look at the code you will see what I mean. On my machine
    it compiles fine. But when I run it, instead of returning a string with
    message "You clicked on CANCEL button" or you sent an empty screen the program bombs
    Specifically when click Cancel I get
    NullPointerException error.
    When I click OK on an empty string the program bombs black screen without any error messages.
    Here is the code:
    import javax.swing.JOptionPane;
    class Excercise6_1
              static double adjustment=0;
              static double balance =0;
              static double newBalance=0;
         public static void main(String args[])
              String response;
              String moreBankingBusiness;
              moreBankingBusiness=JOptionPane.showInputDialog
              ("Do you want to do some banking?");
              moreBankingBusiness=moreBankingBusiness.toUpperCase();
              while(moreBankingBusiness.equals("YES"))
                   response=JOptionPane.showInputDialog
                   ("***Select Banking Options***\n\n"+
                   "1 for deposit" + "\n"+"2 for withdrawal"+
                   "\n" +"3 for balance query");
              response=JOptionPane.showInputDialog
              ("Enter subject number,(English:1,Maths:2,Science:3");
              if(response==null)
                   JOptionPane.showMessageDialog
                   (null,"You clicked CANCEL");
                   System.exit(0);
              else if(response.equals(""))
                   JOptionPane.showMessageDialog
                   (null,"You sent and empty string");
                   System.exit(0);
              }// end of while
         } // end of main
    }// end of class
    The curious thing is that the program actually worked initially which lead me to think it had to do with SDK getting corrupt.
    I have reinstalled JDK and the IDE JCreator several times and still get
    the same problem.
    Would you be kind enough to provide some insight into the problem.?
    I thank you in advance for your support and co-operation.
    Regards
    SS

    The solution is already given but why it doesn't happen when pressed ok is because at that condition it returns an empty string i.e("") whereas if you press cancel it returns a null value.Try replacing the code below and you can understand everything.
    try
    moreBankingBusiness=JOptionPane.showInputDialog
    ("Do you want to do some banking?");
    if(moreBankingBusiness.equals(""))
    System.out.println("empty String");
    System.exit(0);
    moreBankingBusiness=moreBankingBusiness.toUpperCase();
    catch(NullPointerException e)
    System.out.println("we caught it");
    System.exit(0);
    }

  • JSPX Design View shows 'boxes' instead of WYSIWYG

    For a particular project I've just created to examine/try some custom JSF tags, when I edit mypage.jspx file, I get a display of nested boxes instead of a WYSIWYG view of the mypage.jspx page.
    This does not happen in a similar project that I've already completed & can display a .jspx from that project in a window next to the one displaying the boxes for mypage.jspx.
    Any ideas how to get it to display correctly?
    The code of the page that doesn't display correctly is below:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:view>
        <af:document binding="#{backing_login.document1}" id="document1">
          <af:form binding="#{backing_login.form1}" id="form1">
            <af:panelFormLayout binding="#{backing_login.panelFormLayout1}"
                                id="panelFormLayout1">
              <f:facet name="footer">
                <af:commandButton text="commandButton 1"
                                  binding="#{backing_login.commandButton1}"
                                  id="commandButton1"/>
              </f:facet>
            </af:panelFormLayout>
          </af:form>
        </af:document>
      </f:view>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_login-->
    </jsp:root>Edit: 10/26 2:20P - Spelling & small correction
    Edit: 10/30 - Code Formatting

    Doing this showed me that I was missing a library - JSTL.
    I added the JSTL 1.2 library, then closed and re-opened the .jspx and am seeing the page correctly.
    I am still getting an error when loading one of the 2 pages in the project. In this case an ADF/JSF only page. The page does display properly, but I get an error message in the log.
    The error is:
    Error in f:view.doEndTag while servicing /faces/results.jspx.
    java.lang.NullPointerException
         at javax.faces.webapp.UIComponentClassicTagBase.popUIComponentClassicTagBase(UIComponentClassicTagBase.java:727)
         at javax.faces.webapp.UIComponentClassicTagBase.doEndTag(UIComponentClassicTagBase.java:1234)
         at com.sun.faces.taglib.jsf_core.ViewTag.doEndTag(ViewTag.java:241)
    results.jspx contents... PanelStretchLayout, PanelGroupLayout, PanelLabel&Message, OutputText, CommandButton only.
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:loadBundle basename="UIResources" var="UIRes"/>
      <f:view>
        <af:document>
          <af:form>
            <af:panelStretchLayout binding="#{backing_results.panelStretchLayout1}"
                                   id="panelStretchLayout1">
              <f:facet name="bottom"/>
              <f:facet name="center">
                <af:panelGroupLayout binding="#{backing_results.group1}" id="group1"
                                     layout="vertical">
                  <af:panelLabelAndMessage label="#{UIRes['results.label']}"
                                           binding="#{backing_results.panelLabelAndMessage1}"
                                           id="panelLabelAndMessage1">
                    <af:outputText binding="#{backing_results.outputText11}"
                                   id="outputText11"
                                   value="#{labeledInputBean.name}"/>
                  </af:panelLabelAndMessage>
                  <af:commandButton binding="#{backing_results.commandButton1}"
                                    id="commandButton1"
                                    text="#{UIRes['results.button.text']}"
                                    action="logout"/>
                </af:panelGroupLayout>
              </f:facet>
              <f:facet name="top"/>
              <f:facet name="start"/>
              <f:facet name="end"/>
            </af:panelStretchLayout>
          </af:form>
        </af:document>
      </f:view>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_results-->
    </jsp:root>Edit: Formatting

  • A critical error has occured: java.lang.NullPointerException in bank detail

    Hi all,
            When i maintain data for infotype 0009 in R3, bank details link works fine. But when there is no data maintained in R3 for infotype 9..... instead of option for creating new bank details...im getting the following error...
    java.lang.NullPointerException
         at com.sap.xss.hr.per.nz.bank.fc.FcPerBankNz.readRecord(FcPerBankNz.java:276)
         at com.sap.xss.hr.per.nz.bank.fc.wdp.InternalFcPerBankNz.readRecord(InternalFcPerBankNz.java:631)
         at com.sap.xss.hr.per.nz.bank.fc.FcPerBankNzInterface.readRecord(FcPerBankNzInterface.java:146)
         at com.sap.xss.hr.per.nz.bank.fc.wdp.InternalFcPerBankNzInterface.readRecord(InternalFcPerBankNzInterface.java:219)
         at com.sap.xss.hr.per.nz.bank.fc.wdp.InternalFcPerBankNzInterface$External.readRecord(InternalFcPerBankNzInterface.java:295)
         at com.sap.xss.hr.per.nz.bank.overview.VcPerBankNzOverview.onBeforeOutput(VcPerBankNzOverview.java:257)
         at com.sap.xss.hr.per.nz.bank.overview.wdp.InternalVcPerBankNzOverview.onBeforeOutput(InternalVcPerBankNzOverview.java:265)
         at com.sap.xss.hr.per.nz.bank.overview.VcPerBankNzOverviewInterface.onBeforeOutput(VcPerBankNzOverviewInterface.java:134)
         at com.sap.xss.hr.per.nz.bank.overview.wdp.InternalVcPerBankNzOverviewInterface.onBeforeOutput(InternalVcPerBankNzOverviewInterface.java:132)
         at com.sap.xss.hr.per.nz.bank.overview.wdp.InternalVcPerBankNzOverviewInterface$External.onBeforeOutput(InternalVcPerBankNzOverviewInterface.java:208)
    I have maintained all configs in SPRO and active subtypes have been maintained....
    Please help me solve this... ITs CRITICAL for me to solve this problem....
    thanks,

    Hi,
    I think system working fine ....logically there should be entry for the infotype "0009"
    But if you want to change that then you need change the "Time constraint"  for this ...
    You can set that in table "T591A"
    go to se16 give 'T591A" then selection screen give "0009" and check the DATA.
    I think for infotype "0009 subtype "0" ( main bank ) the time contain will be "1" ......
    And its means there should be data in the PA30 for infotype "0009" .

  • NullPointerException was thrown while extracting a value from an instance

    Dear all,
    We have got a null point exception during commit call. According to the stack trace shown below, it seems that it is a problem due to instance variable accessor. As we know toplink use reflection to access the instance variable value. I am curious whether the exception we got is related to any class-loader setting. Thanks a lot.
    =================
    Stack Trace:
    Exception [TOPLINK-69] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle
    .toplink.exceptions.DescriptorException
    Exception Description: A NullPointerException was thrown while extracting a valu
    e from the instance variable [versionID] in the object [com.oocl.csc.frm.pom.tes
    t.model.Company].
    Internal Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.mappings.DirectToFieldMapping[versionID-->COMPANY.VERSIO
    NID]
    Descriptor: Descriptor(com.oocl.csc.frm.pom.test.model.Company --> [DatabaseTabl
    e(COMPANY)])
    at oracle.toplink.exceptions.DescriptorException.nullPointerWhileGetting
    ValueThruInstanceVariableAccessor(DescriptorException.java:1022)
    at oracle.toplink.internal.descriptors.InstanceVariableAttributeAccessor
    .getAttributeValueFromObject(InstanceVariableAttributeAccessor.java:68)
    at oracle.toplink.mappings.DatabaseMapping.getAttributeValueFromObject(D
    atabaseMapping.java:304)
    at oracle.toplink.mappings.DirectToFieldMapping.iterate(DirectToFieldMap
    ping.java:355)
    at oracle.toplink.internal.descriptors.ObjectBuilder.iterate(ObjectBuild
    er.java:1438)
    at oracle.toplink.internal.descriptors.DescriptorIterator.iterateReferen
    ceObjects(DescriptorIterator.java:258)
    at oracle.toplink.internal.descriptors.DescriptorIterator.startIteration
    On(DescriptorIterator.java:407)
    at oracle.toplink.publicinterface.UnitOfWork.discoverUnregisteredNewObje
    cts(UnitOfWork.java:1368)
    at oracle.toplink.publicinterface.UnitOfWork.discoverAllUnregisteredNewO
    bjects(UnitOfWork.java:1290)
    at oracle.toplink.publicinterface.UnitOfWork.assignSequenceNumbers(UnitO
    fWork.java:326)
    at oracle.toplink.publicinterface.UnitOfWork.collectAndPrepareObjectsFor
    Commit(UnitOfWork.java:664)
    at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeS
    et(UnitOfWork.java:1130)
    at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(UnitOf
    Work.java:956)
    at oracle.toplink.publicinterface.UnitOfWork.commit(UnitOfWork.java:771)
    ====================
    ====================
    Mapping Description:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <project>
    <project-name>POM-TEST</project-name>
    <login>
    <database-login>
    <platform>oracle.toplink.oraclespecific.Oracle9Platform</platform>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <connection-url>jdbc:oracle:thin:@sjcngdb2:1521:cdrfrmdv</connection-ur
    l>
    <user-name>pomowner</user-name>
    <password>BB742416276274A47F360CCDD2711570</password>
    <uses-native-sequencing>false</uses-native-sequencing>
    <sequence-preallocation-size>50</sequence-preallocation-size>
    <sequence-table>SEQUENCE</sequence-table>
    <sequence-name-field>SEQ_NAME</sequence-name-field>
    <sequence-counter-field>SEQ_COUNT</sequence-counter-field>
    <should-bind-all-parameters>false</should-bind-all-parameters>
    <should-cache-all-statements>false</should-cache-all-statements>
    <uses-byte-array-binding>true</uses-byte-array-binding>
    <uses-string-binding>false</uses-string-binding>
    <uses-streams-for-binding>false</uses-streams-for-binding>
    <should-force-field-names-to-upper-case>false</should-force-field-names
    -to-upper-case>
    <should-optimize-data-conversion>true</should-optimize-data-conversion>
    <should-trim-strings>true</should-trim-strings>
    <uses-batch-writing>false</uses-batch-writing>
    <uses-jdbc-batch-writing>true</uses-jdbc-batch-writing>
    <uses-external-connection-pooling>false</uses-external-connection-pooli
    ng>
    <uses-external-transaction-controller>false</uses-external-transaction-
    controller>
    <type>oracle.toplink.sessions.DatabaseLogin</type>
    </database-login>
    </login>
    <java-class>com.oocl.csc.frm.pom.test.model.Company</java-class>
    <tables>
    <table>COMPANY</table>
    </tables>
    <primary-key-fields>
    <field>COMPANY.COMPANY_KEY</field>
    </primary-key-fields>
    <descriptor-type-value>Normal</descriptor-type-value>
    <identity-map-class>oracle.toplink.internal.identitymaps.SoftCacheWeakI
    dentityMap</identity-map-class>
    <remote-identity-map-class>oracle.toplink.internal.identitymaps.SoftCac
    heWeakIdentityMap</remote-identity-map-class>
    <identity-map-size>100</identity-map-size>
    <remote-identity-map-size>100</remote-identity-map-size>
    <should-always-refresh-cache>false</should-always-refresh-cache>
    <should-always-refresh-cache-on-remote>false</should-always-refresh-cac
    he-on-remote>
    <should-only-refresh-cache-if-newer-version>false</should-only-refresh-
    cache-if-newer-version>
    <should-disable-cache-hits>false</should-disable-cache-hits>
    <should-disable-cache-hits-on-remote>false</should-disable-cache-hits-o
    n-remote>
    <alias>Company</alias>
    <copy-policy>
    <descriptor-copy-policy>
    <type>oracle.toplink.internal.descriptors.CopyPolicy</type>
    </descriptor-copy-policy>
    </copy-policy>
    <instantiation-policy>
    <descriptor-instantiation-policy>
    <type>oracle.toplink.internal.descriptors.InstantiationPolicy</ty
    pe>
    </descriptor-instantiation-policy>
    </instantiation-policy>
    <query-manager>
    <descriptor-query-manager>
    <existence-check>Check cache</existence-check>
    </descriptor-query-manager>
    </query-manager>
    <event-manager>
    <descriptor-event-manager empty-aggregate="true"/>
    </event-manager>
    <mappings>
    <database-mapping>
    <attribute-name>companyKey</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.COMPANY_KEY</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>contact</attribute-name>
    <read-only>false</read-only>
    <reference-class>com.oocl.csc.frm.pom.test.model.Contact</referen
    ce-class>
    <is-private-owned>false</is-private-owned>
    <uses-batch-reading>false</uses-batch-reading>
    <indirection-policy>
    <mapping-indirection-policy>
    <type>oracle.toplink.internal.indirection.NoIndirectionPoli
    cy</type>
    </mapping-indirection-policy>
    </indirection-policy>
    <uses-joining>false</uses-joining>
    <foreign-key-fields>
    <field>COMPANY.CONTACT_OID</field>
    </foreign-key-fields>
    <source-to-target-key-field-associations>
    <association>
    <association-key>COMPANY.CONTACT_OID</association-key>
    <association-value>CONTACT.POID</association-value>
    </association>
    </source-to-target-key-field-associations>
    <type>oracle.toplink.mappings.OneToOneMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>createdBy</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.CREATED_BY</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>creationClientID</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.CREATION_CLIENTID</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>creationTime</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.CREATION_TIME</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>employeeList</attribute-name>
    <read-only>false</read-only>
    <reference-class>com.oocl.csc.frm.pom.test.model.Person</referenc
    e-class>
    <is-private-owned>false</is-private-owned>
    <uses-batch-reading>false</uses-batch-reading>
    <indirection-policy>
    <mapping-indirection-policy>
    <type>oracle.toplink.internal.indirection.NoIndirectionPoli
    cy</type>
    </mapping-indirection-policy>
    </indirection-policy>
    <container-policy>
    <mapping-container-policy>
    <container-class>com.oocl.csc.frm.pom.impl.FWPersistentArra
    yList</container-class>
    <type>oracle.toplink.internal.queryframework.ListContainerP
    olicy</type>
    </mapping-container-policy>
    </container-policy>
    <relation-table>EMPLOYEMENT</relation-table>
    <source-key-fields>
    <field>COMPANY.COMPANY_KEY</field>
    </source-key-fields>
    <source-relation-key-fields>
    <field>EMPLOYEMENT.EMPLOYER_KEY</field>
    </source-relation-key-fields>
    <target-key-fields>
    <field>PERSON.POID</field>
    </target-key-fields>
    <target-relation-key-fields>
    <field>EMPLOYEMENT.EMPLOYEE_ID</field>
    </target-relation-key-fields>
    <type>oracle.toplink.mappings.ManyToManyMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>lastUpdateClientID</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.LAST_UPDATE_CLIENTID</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>lastUpdatedBy</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.LAST_UPDATED_BY</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>lastUpdateTime</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.LAST_UPDATE_TIME</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>name</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.NAME</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>partner</attribute-name>
    <read-only>false</read-only>
    <reference-class>com.oocl.csc.frm.pom.test.model.Company</referen
    ce-class>
    <is-private-owned>false</is-private-owned>
    <uses-batch-reading>false</uses-batch-reading>
    <indirection-policy>
    <mapping-indirection-policy>
    <type>oracle.toplink.internal.indirection.NoIndirectionPoli
    cy</type>
    </mapping-indirection-policy>
    </indirection-policy>
    <uses-joining>false</uses-joining>
    <foreign-key-fields>
    <field>COMPANY.PARTNER</field>
    </foreign-key-fields>
    <source-to-target-key-field-associations>
    <association>
    <association-key>COMPANY.PARTNER</association-key>
    <association-value>COMPANY.COMPANY_KEY</association-value>
    </association>
    </source-to-target-key-field-associations>
    <type>oracle.toplink.mappings.OneToOneMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>persistentCtxt</attribute-name>
    <read-only>false</read-only>
    <reference-class>com.oocl.csc.frm.pom.impl.FWPOMPersistentContext
    </reference-class>
    <is-null-allowed>false</is-null-allowed>
    <aggregate-to-source-field-name-associations>
    <association>
    <association-key>OWNERID</association-key>
    <association-value>COMPANY.OWNERID</association-value>
    </association>
    <association>
    <association-key>ROOTID</association-key>
    <association-value>COMPANY.ROOTID</association-value>
    </association>
    </aggregate-to-source-field-name-associations>
    <type>oracle.toplink.mappings.AggregateObjectMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>poid</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.POID</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>version</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.VERSION</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>versionID</attribute-name>
    <read-only>false</read-only>
    <field-name>COMPANY.VERSIONID</field-name>
    <type>oracle.toplink.mappings.DirectToFieldMapping</type>
    </database-mapping>
    </mappings>
    <type>oracle.toplink.publicinterface.Descriptor</type>
    </descriptor>
    </descriptors>
    </project>
    ====================
    ====================
    Session Creation Method:
    SessionBroker broker = (SessionBroker) manager.getSession(brokerName, Thread.currentThread().getContextClassLoader());
    broker.getLogin().getPlatform().getConversionManager().setLoader(Thread.currentThread().getContextClassLoader());
    ====================
    ===================
    Class Hierarchy:
    Object extends> ..xxx.. extends> FWObject extends> Company
    The problematic attribute -- versionID -- is defined at "FWObject" level.
    ===================
    ===================
    Environment Configuration:
    Application Server version: 10.1.2
    TopLink version : 9.0.4.5
    TopLink classpath: specified at container level
    FWObject classpath: specified at container level
    Company classpath: specified at application level
    ===================
    Thanks and regards,
    William

    Dear All,
    We have loaded the toplink.jar to container level instead of application level. Don't know whether it is a possible source of error. Moreover, what is the purpose of loading antlr.jar? What is this jar for?
    Thanks and regards,
    William

  • MailServiceHelper Failed while sending email java.lang.NullPointerException

    Hi guys,
    I am trying to send email with Adobe CQ API.
    But i am getting a nullpointer exception at this line:  MsgGateway.send(htmlEmail);    
    This is my method that i am using to send.
    import com.day.cq.mailer.MessageGateway;
    import com.day.cq.mailer.MessageGatewayService;
    import javax.mail.internet.InternetAddress;
       public boolean sendHtmlEmail(SlingHttpServletRequest sling,
                String fromMailAdress, List<String> recepientmailAddress,
                String emailSubject, String htmlbodyMail) {
            HtmlEmail htmlEmail = new HtmlEmail();
            List<InternetAddress> emailAddress = new ArrayList<InternetAddress>();
            try {
                for (String recipient : recepientmailAddress) {
                    if (!StringUtil.isEmpty(recipient)) {
                        emailAddress.add(new InternetAddress(recipient));
                        log.error(recipient);
                if (!StringUtil.isEmpty(fromMailAdress)) {
                    htmlEmail.setFrom(fromMailAdress);
                htmlEmail.setTo(emailAddress);
                htmlEmail.setSubject(emailSubject);
                htmlEmail.setHtmlMsg(htmlbodyMail);
                htmlEmail.setCharset("utf-8");
                MessageGatewayService MsgService = getMessageGateWayService(sling);
                MessageGateway<HtmlEmail> MsgGateway = MsgService.getGateway(HtmlEmail.class);
                MsgGateway.send(htmlEmail);   //nullpointer exception caught here        
                return true;
            } catch (Exception e) {
                log.error("Failed while sending email", e);
            return false;
    I have checked to ensure the bundle com.day.cq.cq-mail and my own bundle is running .
    I am also sure that 'htmlEmail' is not null by retrieving the email subject via .getSubject and it did return me the subject.
    I do not understand what is returning the nullpointerexception.
    Thanks in advance !

    The MessageGateway instance (MessageGateway<HtmlEmail> MsgGateway) is null therby throwing a null pointer.
    Instead of instanciating msgGateway as :
    MessageGatewayService MsgService = getMessageGateWayService(sling);
    MessageGateway<HtmlEmail> MsgGateway = MsgService.getGateway(HtmlEmail.class);
    Inject your MessageGateway as:
    @Reference
    private MessageGateway<HtmlEmail> msgGateway;
    and then call send on msgGateway as msgGateway.send(htmlEmail)
    ~ Aditya

  • Weblogic 10 - SEVERE: null java.lang.NullPointerException

    I'm facing this Error while invoking a webservice
    SEVERE: null
    java.lang.NullPointerException
    at com.bea.staxb.buildtime.internal.bts.XmlTypeName.findTypeIn(XmlTypeName.java:555)
    at weblogic.wsee.bind.runtime.internal.AnonymousTypeFinder.getTypeNamed(AnonymousTypeFinder.java:73)
    at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.createBindingTypeFrom(Deploytime109MappingHelper.java:1088)
    at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.processTypeMappings(Deploytime109MappingHelper.java:519)
    at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.initBindingFileFrom109dd(Deploytime109MappingHelper.java:266)
    at weblogic.wsee.bind.runtime.internal.Deploytime109MappingHelper.<init>(Deploytime109MappingHelper.java:166)
    at weblogic.wsee.bind.runtime.internal.RuntimeBindingsBuilderImpl.createRuntimeBindings(RuntimeBindingsBuilderImpl.java:86)
    at weblogic.wsee.ws.WsBuilder.createRuntimeBindingProvider(WsBuilder.java:709)
    at weblogic.wsee.ws.WsBuilder.buildService(WsBuilder.java:409)
    at weblogic.wsee.ws.WsFactory.createClientService(WsFactory.java:45)
    at weblogic.wsee.jaxrpc.ServiceImpl.init(ServiceImpl.java:154)
    at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:122)
    at com.samba.service.client.GosiPaymentSambaServices_Impl.<init>(Unknown Source)
    at com.samba.service.client.GosiPaymentSambaServices_Impl.<init>(Unknown Source)
    can Any body Help me through this?

    Hi,
    Resource adapter is not available remotely - with your JNDI context
    ctx.lookup("tangosol.coherenceTx");will return null. Instead of using resource adapter remotely you can implement a session bean, deploy it on a WLS instance and invoke it remotely.
    Regards,
    Dimitri

  • JCO3: NullPointerException unregistering server with custom repository

    Hello,
    I have a JCO 2 project running on a J2EE server that we ported over to JCO3, and the ultimate issue is that when I
    stop the JCoServer in the application, it's throwing a null pointer exception.  Seemingly because the JCoServers
    are in a higher classloader, they are still there on restart, and then I get the NullPointerException trying to
    recreate the server as well.  I very well may be doing something totally wrong here...
    I'm creating the Data Provider, Repository, and Server as follows:
    ========================================================
    // This is a simple implementation of ServerDataProvider
    markviewDataProvider = new MarkviewServerDataProvider();
    if (!Environment.isServerDataProviderRegistered()){
      log.debug("Registering data provider");
      Environment.registerServerDataProvider(markviewDataProvider);
    else{
      log.error("Data provider already registered.");
      throw new IllegalStateException("Data provider already registered.  Please restart application server.");
    // Create the neccessary properties and assign to data provider
    // Their values are being read from a database
    serverProperties.setProperty(ServerDataProvider.JCO_GWSERV, rfcServerInfo.getGatewayServer());
    serverProperties.setProperty(ServerDataProvider.JCO_GWHOST, rfcServerInfo.getGatewayHost());
    serverProperties.setProperty(ServerDataProvider.JCO_PROGID, rfcServerInfo.getProgramId());
    serverProperties.setProperty(ServerDataProvider.JCO_CONNECTION_COUNT, maxConnections.toString());
    //XXX: We have to get this to work or else the server will not restart correctly
    //More on this later.
    //serverProperties.setProperty(ServerDataProvider.JCO_REP_DEST, "custom destination");
    markviewDataProvider.setServerProperties(serverName, serverProperties);
    // Get back the configured server from the factory.
    JCoServer server;
    try
      server = JCoServerFactory.getServer(serverName);
    catch(JCoException ex)
      throw new RuntimeException("Unable to create the server " + serverName
      + ", because of " + ex.getMessage(), ex);
    // rfcRepository is a singleton that contains
    // repository = JCo.createCustomRepository(name);  
    // and methods to add structures to the repository            
    server.setRepository(rfcRepository.exposeRepository());
    // add in the handlers, start the server
    ========================================================
    So...the first issue is this: if I set ServerDataProvider.JCO_REP_DEST to anything, the program won't run because
    it looks for the repository host connection info in a text file with that name, just like the example code does. 
    According to the javadoc, custom repositories don't have a destination, so it seems this property should be NULL. 
    Yet if I leave that property null, it works fine...until I need to stop the server (or, I get the same error when
    the above code runs again on restart, as the JCoServerFactory.getServer code runs in both places - tries to refresh
    a server that survived the restart as it failed to shut down due to the error).
    For completeness, the shutdown code essentially reads:
    =========================================================
    JCoServer server = JCoServerFactory.getServer(serverName);
    server.stop();
    =========================================================
    Then what happens is this:
    java.lang.NullPointerException
            at com.sap.conn.jco.rt.StandaloneServerFactory.compareServerCfg(StandaloneServerFactory.java:91)
            at com.sap.conn.jco.rt.StandaloneServerFactory.getServerInstance(StandaloneServerFactory.java:116)
            at com.sap.conn.jco.server.JCoServerFactory.getServer(JCoServerFactory.java:56)
            at com.markview.integrations.sap.gateway.sap2mv.JCoServerController.destroy(JCoServerController.java:310)
    I decompiled and debugged StandaloneServerFactory and I'm seeing this in compareServerCfg:
    =========================================================
            key = "jco.server.repository_destination";
            if(!current.getProperty(key).equals(updated.getProperty(key)))
                return CompareResult.CHANGED_RESTART;
            } else
                return CompareResult.CHANGED_UPDATE;
    =========================================================
    Clearly, if getProperty() returns null, the .equals is going to raise NullPointerException, so this appears to be
    the cause of that error.  In other words, if this code runs, I'm going to have this problem because the property
    needs to (seemingly) be null for my program to run at all.
    Any insights on how to fix this / work around this would be greatly appreciated!
    Thanks in advance,
    Corey

    <div style="width:58em;text-align:left">
    Whoa, a long posting and I'm not sure I read it thoroughly enough to fully understand your problem - so please be patient with me if any comments are silly...
    Your RFC server program provides an implementation for your own ServerDataProvider. If you reference a repository destination the default DestinationDataProvider implemented will look for a file name with the repository and extension .jcoDestination. If you don't like this behavior you simply need to provide your own implementation and register it, same as you did for the server data.
    According to the javadoc, custom repositories don't have a destination, so it seems this property should be NULL.
    Not sure where you found this. I'm assuming that you're talking about com.sap.conn.jco.JCoCustomRepository, which can of course be backed by a destination, i.e. see the comments in method setDestination:
    <div style="text-align:left">Set the destination for the remote queries.
    If the requested meta data objects are not available in the repository cache, i.e. not set by the application, the remote query to the specified destination will be started. Default value is null meaning the remote queries are not allowed.
    Note: As soon the destination is provided, the repository can contain mixed meta data - set statically by the application and requested dynamically from the ABAP backend.</div>
    I usually prefer using a connection to a backend providing the meta data instead of hard coding the meta data insertion into a custom repository. As the data is cached this introduces an acceptable overhead for retrieving meta data for long running server programs.
    Anyhow, when you create your custom repository via JCo.createCustomRepository(java.lang.String name) you obviously must give it a name. That's the name I'd expect in the server data as a reference for your repository (property ServerDataProvider.JCO_REP_DEST). However, if your custom repository is not backed by a complete online repository you obviously have to ensure that all meta data is already provided.
    So for testing it might be interesting to see if adding a JCoDestination to your custom repository helps. Another option might be to enable tracing and see what goes wrong...
    Cheers, harald
    </div>

  • Pointer on what to look for (NullPointerException in FontManager.getFont2D)

    I have a screen that we are trying to display remotely (via an RMI bridge). On the local application it displays properly everytime, but when displayed remotely It displays properly once. From then on it comes up blank with a null pointer exception (Posted below). Right now I'm thinking there is something in the set-up for the local applicateion that is not happening on the remote one. But I didn't write either and my brute force investigation hasn't trned up anything.
    Since I only have to disconnect and close the remote application and restart to get it to display again this could also be a problem cleaning up resources on a window close. I'm hoping that someonw might have an idea of what causes this Exception. Moste references I've found to it appear to be listed as fixed (And aren't the same thing since they happen all the time) or are in threads that just stopped with no resolution. I'm hoping that if I find out what it means I might have a better idea what to look for.
    java.lang.NullPointerException
         at sun.font.FontManager.getFont2D(Native Method)
         at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:343)
         at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:336)
         at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:284)
         at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:943)
         at javax.swing.JComponent.getFontMetrics(JComponent.java:1599)
         at javax.swing.plaf.basic.BasicTabbedPaneUI.getFontMetrics(BasicTabbedPaneUI.java:1801)
         at javax.swing.plaf.basic.BasicTabbedPaneUI.calculateMaxTabWidth(BasicTabbedPaneUI.java:1754)
         at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateSize(BasicTabbedPaneUI.java:2314)
         at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.preferredLayoutSize(BasicTabbedPaneUI.java:2261)
         at java.awt.Container.preferredSize(Container.java:1599)
         at java.awt.Container.getPreferredSize(Container.java:1584)
         at javax.swing.JComponent.getPreferredSize(JComponent.java:1636)
         at psip.gui.util.UIDelegate.defineComponentSizes(UIDelegate.java:927)
         at psip.gui.util.UIDelegate.applyAllResources(UIDelegate.java:865)
         at psip.gui.jfc.panel.AbstractContainer.applyAllResources(AbstractContainer.java:254)
         at psip.gui.jfc.panel.AGDTabbedPane.applyAllResources(AGDTabbedPane.java:471)
         at psip.gui.jfc.panel.AGDTabbedPane.<init>(AGDTabbedPane.java:101)
         at psip.gui.jfc.panel.ControlPanelFactory.getUIDelegate(ControlPanelFactory.java:167)
         at psip.gui.uiDelegate.UIDelegateDirector.getUIDelegate(UIDelegateDirector.java:124)
         at psip.gui.viewMap.GUIComponentFactory.createUIDelegate(GUIComponentFactory.java:593)

    Anna:
    Yes, rule no. 1, Firewire or FW/USB
    2. Largest HDD you can afford (having more space than you need it not a problem; needing more space than you have, is.)
    3. 7200 rpms. (Most of them are, but not all)
    Here is a list of some of the best buys already sorted for 200-300 GB.
    Different folks like different manufacturers. I have had my LaCie for 2 years. No problems. I like it for it's compact size and elegance.
    Here are some good hints from Dr. Smoke on Backup and Recovery. Instead of Retropect, which I could never quite figure out, I use Carbon Copy Cloner or SuperDuper.
    Post back with further questions or comments.
    Good luck.
    cornelius
    Message was edited by: cornelius

  • Error in file-webservice- file (Error: java.lang.NullPointerException)

    Hi everybody,
    I have configured a file-webservice-file without BPM scenario...as explained by Bhavesh in the following thread:
    File - RFC - File without a BPM - Possible from SP 19.
    I have  used a soap adapter (for webservice) instead of rfc .My input file sends the date as request message and gets the sales order details from the webservice and then creates a file at my sender side.
    1 communication channel for sender file
    1 for receiver soap
    1 for receiver file
    Error: java.lang.NullPointerException
    What could be the reason for this error
    thanks a lot
    Ramya

    Hi Tanaya,
    I monitored the channels in the Runtime work bench and the error is in the sender ftp channel.The other 2 channel status is "not used" in RWB.
    1 sender ftp channel
    1 receiver soap channel
    1 receiver ftp channel.
    2009-12-16 15:02:00 Information Send binary file  "b.xml" from ftp server "10.58.201.122:/", size 194 bytes with QoS EO
    2009-12-16 15:02:00 Information MP: entering1
    2009-12-16 15:02:00 Information MP: processing local module localejbs/AF_Modules/RequestResponseBean
    2009-12-16 15:02:00 Information RRB: entering RequestResponseBean
    2009-12-16 15:02:00 Information RRB: suspending the transaction
    2009-12-16 15:02:00 Information RRB: passing through ...
    2009-12-16 15:02:00 Information RRB: leaving RequestResponseBean
    2009-12-16 15:02:00 Information MP: processing local module localejbs/CallSapAdapter
    2009-12-16 15:02:00 Information The application tries to send an XI message synchronously using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:02:00 Information Trying to put the message into the call queue.
    2009-12-16 15:02:00 Information Message successfully put into the queue.
    2009-12-16 15:02:00 Information The message was successfully retrieved from the call queue.
    2009-12-16 15:02:00 Information The message status was set to DLNG.
    2009-12-16 15:02:02 Error The message was successfully transmitted to endpoint com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 500 : Internal Server Error using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:02:02 Error The message status was set to FAIL.
    Now, the error is internal server error.What can I do about this?
    thanks a lot
    Ramya

  • NullPointerException, how do i get rid of?

    Hey guys,
    I'm totally puzzled by this one. All i'm trying to do is to change the content of JTextField(), but every time i do i get a NullPointerException. Here's the code:
    public class PrivateMessageWindow extends JFrame
        private  Container container;
        private  JTextArea textArea;
        private  JTextField inputField;
        private  String windowId, messageDestination;
        private  Message m;
         public PrivateMessageWindow(String Id)
               super("Private Message");
               Container container = getContentPane();
               JTextArea textArea = new JTextArea();
               textArea.setEditable(false);
               JTextField inputField = new JTextField();
                //ActionListener for inputField
               ActionListener k = new PrivateWindowListener();
               inputField.addActionListener(k);
               //Placement of element on Panel
               container.setLayout(new BorderLayout(5,5));
               container.add(textArea, BorderLayout.CENTER);
               container.add(inputField, BorderLayout.SOUTH);
               //Initializes a message of type private Message
              setSize( 300, 150);
              setVisible(true);
          }//end of constructor
           private class PrivateWindowListener implements ActionListener
                   public void actionPerformed(ActionEvent event)
                        inputField.setText("");
    }// end of  private class PrivateMessageWindowThe problem occurs anytime i access a variable outside the actionPerformed method i get a NullPointerException. I'm not sure if it helps but this class gets triggered by a JButton object.
    any clue of wats happening here?
    Tanx.

    You are not initializing your JTextField inputField. Instead, you instantiate a local variable. The same applies to your JTextArea. You should have:textArea = new JTextArea();
    textArea.setEditable(false);
    inputField = new JTextField();Moreover, I don't think you really need the field container.

  • NullPointerException in OraclePreparedStatement.processCompletedBindRow

    In the context of a very slow LAN with very little
    bandwidth left, we occasionally get:
    java.lang.NullPointerException
         at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1581)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2883)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2960)
    etc etc
    I guess Oracle loses or lets go of something (some kind
    of time out) and when the action resumes after a long
    lull you get this null pointer exception but that does
    not help me much. Can anybody offer advice on such
    errors? Clearly it is unexpected since Oracle throws
    a "naked" NullPointerException instead of a well-formed
    SQLException with an error code.

    I think you've answered it yourself,
    user setNull or make suer aVar is not null...

Maybe you are looking for

  • How can i tell if my iphone 4 is unlocked?

    My father bought me a prepaid iphone 4 from korea. I can't tell if the phone is unlocked or not because when I'm tring to put a diffirent miro sim other than the SK Telecom it display an error "Sim Failure". If its locked how can I contact SK Telecom

  • How to find BAPI to create incident

    Hi. I am a newbie to Abap. How can a find a BAPI or RFC to log a Incident / Accident. Normally this is done by transaction cbih82. Much appreciated. Rodney

  • Help with rendering a commandlink

    Hello, I am trying to render a command link in a custom renderer that I created. Basically, I am looping through an ArrayList and rendering each element's value in the ArrayList on screen in a custom way. I want the text to show as a link. However, I

  • BAPI Error Message Handling

    Hi Group, I am using BAPI ,How to display the BAPI  Error Message (eg:BAPIRET1) which is returning by BAPI

  • Remotely Executing BW Queries

    Hello, Trying to execute BW Queries against BW Cube data via BAPI calls over SAPJCO.  I use the BAPIs BAPI_MDDATASET_CREATE_OBJECT (to construct the MDX-based query) and BAPI_MDDATASET_GET_DATA_XMLA to return query results in XML. the XML in BAPI_MDD