javax.ejb.EJBException Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oll3i
    Contributor
    • Mar 2007
    • 679

    javax.ejb.EJBException Error

    when i launch the application from sun application server
    the console opens throws something i cannt even read what and closes
    before the application opened and threw nullpointerexce ption now it suddenly stopped even opening ?
    but when i run it form bat with JAVA_CLIENT parameter it throws
    javax.ejb.EJBEx ception: nested exception is: java.rmi.Remote Exception:
    [code=java]

    package library.common;

    import java.sql.Result Set;

    import javax.ejb.Remot e;



    @Remote
    public interface LibraryInterfac e {
    public ResultSet getBookByAuthor (String author);
    public ResultSet getBookByName(S tring name);
    public ResultSet getBookByISBN(S tring isbn);
    public ResultSet getAllBooks();
    }







    package library.client;

    import javax.naming.In itialContext;


    import java.awt.Border Layout;
    import java.awt.Color;
    import java.awt.FlowLa yout;
    import java.awt.event. ActionEvent;
    import java.awt.event. ActionListener;
    import java.lang.refle ct.Method;
    import java.sql.Result Set;
    import javax.ejb.*;
    import javax.naming.*;
    import javax.swing.*;

    import library.common. *;


    @SuppressWarnin gs("serial")
    public class LibraryClient extends JFrame implements ActionListener {


    private @EJB LibraryInterfac e li;

    private JTextField book_author = new JTextField(10);
    private JTextField book_title = new JTextField(10);
    private JTextField book_isbn = new JTextField(10);
    private JLabel author_label = new JLabel("Podaj autora:");
    private JLabel book_title_labe l = new JLabel("Podaj tytul ksiazki");
    private JLabel isbn_label = new JLabel("Podaj ISBN");
    private JTextArea display_books = new JTextArea(20,50 );
    private JButton search = new JButton("Search ");
    private ResultSet resultset;
    public LibraryClient() {
    this("DEFAULT_C ONTEXT");
    }
    private JPanel createPanel1(){
    JPanel panel = new JPanel();
    panel.add(autho r_label);
    panel.add(book_ author);

    panel.add(book_ title_label);
    panel.add(book_ title);

    panel.add(isbn_ label);
    panel.add(book_ isbn);

    panel.add(searc h);
    ////search.setActio nCommand("ISBN" );
    search.addActio nListener(this) ;
    return panel;
    }
    private JPanel createPanel2(){
    JPanel panel = new JPanel();
    panel.add(displ ay_books);
    return panel;
    }

    private JPanel createPanels(){
    JPanel panel = new JPanel();
    //Use default FlowLayout.
    panel.setLayout (new BorderLayout()) ;
    panel.add(creat ePanel1(), BorderLayout.NO RTH);

    panel.add(creat ePanel2(), BorderLayout.SO UTH);
    return panel;
    }
    public LibraryClient(S tring appType) {

    init(appType);
    JFrame frame = new JFrame("Library ");
    frame.setDefaul tCloseOperation (JFrame.EXIT_ON _CLOSE);
    // /final Table table = new Table();
    frame.setConten tPane(createPan els());
    frame.pack();
    // /f.setLocationRe lativeTo(null);
    frame.setVisibl e(true);
    }

    public void actionPerformed (ActionEvent e) {

    try {
    display_books.s etText("");
    display_books.s etText("Wyszuka ne Ksiazki\n");
    if(!book_author .getText().equa ls("")){
    resultset=li.ge tBookByAuthor(b ook_author.getT ext());


    }else if(!book_title. getText().equal s("")){
    resultset=li.ge tBookByName(boo k_title.getText ());
    }else if(!book_isbn.g etText().equals ("")){
    resultset=li.ge tBookByISBN(boo k_isbn.getText( ));
    }else {
    System.out.prin tln("Before->resultset=li.g etAllBooks()");
    resultset=li.ge tAllBooks();
    System.out.prin tln("After->resultset=li.g etAllBooks()");
    }
    while(resultset .next()){
    System.out.prin tln("in while resultset.next( )");
    String name = resultset.getSt ring("name");
    String author =resultset.getS tring("author") ;
    String isbn = resultset.getSt ring("ISBN");
    display_books.a ppend("\n"+ name + " " + author +" "+ isbn);




    }
    } catch(Exception exc) { exc.printStackT race(); }
    }

    private void init(String type) {
    if (type.equals("J AVA_APP")) li = new library.ejb.Lib raryBean();
    else if (type.equals("J AVA_CLIENT")) {
    try {
    InitialContext ic = new InitialContext( );
    li = (LibraryInterfa ce) ic.lookup("libr ary.common.Libr aryInterface");
    } catch (NamingExceptio n e) {
    e.printStackTra ce();
    }
    }
    }



    public static void main(String[] args) {
    if (args.length >= 1) new LibraryClient(a rgs[0]);
    else new LibraryClient() ;
    }


    }





    package library.ejb;
    import java.sql.*;
    import javax.ejb.*;
    import library.common. *;

    @Stateless
    public class LibraryBean implements LibraryInterfac e{
    ResultSet resultset;
    Statement statement;
    public LibraryBean() {
    }
    public ResultSet getBookByAuthor (String author){
    try {
    Class.forName(" com.mysql.jdbc. Driver");

    //Define URL of database server for
    // database named JunkDB on the localhost
    // with the default port number 3306.
    String url =
    "jdbc:mysql ://localhost:3306/Library";

    //Get a connection to the database for a

    Connection connection =DriverManager. getConnection(
    url,"kasia", "p1fk0zs0k1em") ;
    System.out.prin tln("Connected to the database");

    statement = connection.crea teStatement();
    resultset = statement.execu teQuery("SELECT * " +
    "from books WHERE author = "+author+" ORDER BY name");


    connection.clos e();


    }catch( Exception e ) {
    e.printStackTra ce();

    }//end catch
    return resultset;
    }
    public ResultSet getBookByName(S tring name){
    try {
    Class.forName(" com.mysql.jdbc. Driver");

    //Define URL of database server for
    // database named JunkDB on the localhost
    // with the default port number 3306.
    String url =
    "jdbc:mysql ://localhost:3306/Library";

    //Get a connection to the database for a

    Connection connection =DriverManager. getConnection(
    url,"kasia", "p1fk0zs0k1em") ;
    System.out.prin tln("Connected to the database");
    statement = connection.crea teStatement();
    resultset = statement.execu teQuery("SELECT * " +
    "from books WHERE name ="+name+" ORDER BY name");
    connection.clos e();
    }catch( Exception e ) {
    e.printStackTra ce();

    }//end catch

    return resultset;
    }
    public ResultSet getBookByISBN(S tring isbn){
    try {
    Class.forName(" com.mysql.jdbc. Driver");

    //Define URL of database server for
    // database named JunkDB on the localhost
    // with the default port number 3306.
    String url =
    "jdbc:mysql ://localhost:3306/Library";

    //Get a connection to the database for a

    Connection connection =DriverManager. getConnection(
    url,"kasia", "p1fk0zs0k1em") ;
    System.out.prin tln("Connected to the database");
    statement = connection.crea teStatement();
    resultset = statement.execu teQuery("SELECT * " +
    "from books WHERE ISBN ="+isbn+" ORDER BY name");
    connection.clos e();
    }catch( Exception e ) {
    e.printStackTra ce();

    }//end catch
    return resultset;
    }
    public ResultSet getAllBooks(){
    try {
    Class.forName(" com.mysql.jdbc. Driver");

    //Define URL of database server for
    // database named JunkDB on the localhost
    // with the default port number 3306.
    String url =
    "jdbc:mysql ://localhost:3306/Library";

    //Get a connection to the database for a

    Connection connection =DriverManager. getConnection(
    url,"kasia", "p1fk0zs0k1em") ;



    System.out.prin tln("URL: " + url);
    System.out.prin tln("Connection : " + connection);

    statement = connection.crea teStatement();
    resultset = statement.execu teQuery("SELECT * " +
    "from books ORDER BY name");
    connection.clos e();
    }catch( Exception e ) {
    e.printStackTra ce();

    }//end catch
    return resultset;
    }




    }



    [/code]

    thank YOU
  • oll3i
    Contributor
    • Mar 2007
    • 679

    #2
    i m laughing at that GURU :) i m certainly not there yet
    regards

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Can you post the full stacktrace. It usually is helpful ...

      Comment

      • oll3i
        Contributor
        • Mar 2007
        • 679

        #4
        now it throws

        Code:
         java.lang.NullPointerException 
        at library.client.LibraryClient.actionPerformed(LibraryClient.java)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
        95)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
        a:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
        .java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
        )
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
        istener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6038)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
        at java.awt.Component.processEvent(Component.java:5803)
        at java.awt.Container.processEvent(Container.java:2058)
        at java.awt.Component.dispatchEventImpl(Component.java:4410)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322
        )
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
         
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
        at java.awt.Container.dispatchEventImpl(Container.java:2102)
        at java.awt.Window.dispatchEventImpl(Window.java:2429)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
        ad.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
        java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
        ad.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
        and i didnt change anything just restarted the computer
        it doesnt get the resultset from librarybean

        Comment

        • oll3i
          Contributor
          • Mar 2007
          • 679

          #5
          he i forgot to start mysql server
          after starting mysql server and running the app
          it throws the exception when i click any button to select data from the db

          Code:
           
          javax.ejb.EJBException: nested exception is: java.rmi.RemoteException: CORBA UNK
          NOWN 1398079690 Maybe; nested exception is: 
          org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace----------
           
          org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
          at com.sun.corba.ee.impl.logging.ORBUtilSystemException.runtimeexception
          (ORBUtilSystemException.java:8946)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.convertThrowa
          bleToSystemException(CorbaMessageMediatorImpl.java:1943)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
          leDuringServerDispatch(CorbaMessageMediatorImpl.java:1893)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
          leDuringServerDispatch(CorbaMessageMediatorImpl.java:1846)
          at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
          tch(CorbaServerRequestDispatcherImpl.java:263)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
          Request(CorbaMessageMediatorImpl.java:1705)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
          (CorbaMessageMediatorImpl.java:1565)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
          orbaMessageMediatorImpl.java:947)
          at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
          back(RequestMessage_1_2.java:178)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
          (CorbaMessageMediatorImpl.java:717)
          at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatc
          h(SocketOrChannelConnectionImpl.java:473)
          at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(
          SocketOrChannelConnectionImpl.java:1270)
          at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
          run(ThreadPoolImpl.java:479)
          Caused by: java.lang.ClassCastException: com.mysql.jdbc.JDBC4ResultSet cannot be
          cast to java.io.Serializable
          at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14
          .write(DynamicMethodMarshallerImpl.java:338)
          at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.wr
          iteResult(DynamicMethodMarshallerImpl.java:430)
          at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(Reflecti
          veTie.java:125)
          at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
          tchToServant(CorbaServerRequestDispatcherImpl.java:650)
          at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
          tch(CorbaServerRequestDispatcherImpl.java:193)
          ... 8 more
           
          ----------END server-side stack trace----------
          Code:
           vmcid: SUN minor code: 202 com 
          pleted: Maybe
          java.rmi.RemoteException: CORBA UNKNOWN 1398079690 Maybe; nested exception is:
          org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace----------
           
          org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
          at com.sun.corba.ee.impl.logging.ORBUtilSystemException.runtimeexception
          (ORBUtilSystemException.java:8946)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.convertThrowa
          bleToSystemException(CorbaMessageMediatorImpl.java:1943)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
          leDuringServerDispatch(CorbaMessageMediatorImpl.java:1893)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
          leDuringServerDispatch(CorbaMessageMediatorImpl.java:1846)
          at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
          tch(CorbaServerRequestDispatcherImpl.java:263)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
          Request(CorbaMessageMediatorImpl.java:1705)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
          (CorbaMessageMediatorImpl.java:1565)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
          orbaMessageMediatorImpl.java:947)
          at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
          back(RequestMessage_1_2.java:178)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
          (CorbaMessageMediatorImpl.java:717)
          at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatc
          h(SocketOrChannelConnectionImpl.java:473)
          at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(
          SocketOrChannelConnectionImpl.java:1270)
          at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
          run(ThreadPoolImpl.java:479)
          Caused by: java.lang.ClassCastException: com.mysql.jdbc.JDBC4ResultSet cannot be
          cast to java.io.Serializable
          at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14
          .write(DynamicMethodMarshallerImpl.java:338)
          at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.wr
          iteResult(DynamicMethodMarshallerImpl.java:430)
          at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(Reflecti
          veTie.java:125)
          at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
          tchToServant(CorbaServerRequestDispatcherImpl.java:650)
          at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
          tch(CorbaServerRequestDispatcherImpl.java:193)
          ... 8 more
           
          ----------END server-side stack trace----------
          Code:
           vmcid: SUN minor code: 202 com 
          pleted: Maybe
          at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.ja
          va:309)
          at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.priv
          ateInvoke(StubInvocationHandlerImpl.java:172)
          at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invo
          ke(StubInvocationHandlerImpl.java:119)
          at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELS
          tubBase.java:197)
          at library.common.__LibraryInterface_Remote_DynamicStub.getAllBooks(__Li
          braryInterface_Remote_DynamicStub.java)
          at library.common._LibraryInterface_Wrapper.getAllBooks(library.common._
          LibraryInterface_Wrapper.java)
          at library.client.LibraryClient.actionPerformed(LibraryClient.java)
          at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
          95)
          at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
          a:2318)
          at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
          .java:387)
          at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
          )
          at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
          istener.java:236)
          at java.awt.Component.processMouseEvent(Component.java:6038)
          at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
          at java.awt.Component.processEvent(Component.java:5803)
          at java.awt.Container.processEvent(Container.java:2058)
          at java.awt.Component.dispatchEventImpl(Component.java:4410)
          at java.awt.Container.dispatchEventImpl(Container.java:2116)
          at java.awt.Component.dispatchEvent(Component.java:4240)
          at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322
          )
          at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
           
          at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
          at java.awt.Container.dispatchEventImpl(Container.java:2102)
          at java.awt.Window.dispatchEventImpl(Window.java:2429)
          at java.awt.Component.dispatchEvent(Component.java:4240)
          at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
          at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
          ad.java:273)
          at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
          java:183)
          at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
          ad.java:173)
          at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
           
          at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
           
          at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
          Caused by: org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace-------
          ---
          org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
          at com.sun.corba.ee.impl.logging.ORBUtilSystemException.runtimeexception
          (ORBUtilSystemException.java:8946)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.convertThrowa
          bleToSystemException(CorbaMessageMediatorImpl.java:1943)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
          leDuringServerDispatch(CorbaMessageMediatorImpl.java:1893)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
          leDuringServerDispatch(CorbaMessageMediatorImpl.java:1846)
          at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
          tch(CorbaServerRequestDispatcherImpl.java:263)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
          Request(CorbaMessageMediatorImpl.java:1705)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
          (CorbaMessageMediatorImpl.java:1565)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
          orbaMessageMediatorImpl.java:947)
          at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
          back(RequestMessage_1_2.java:178)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
          (CorbaMessageMediatorImpl.java:717)
          at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatc
          h(SocketOrChannelConnectionImpl.java:473)
          at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(
          SocketOrChannelConnectionImpl.java:1270)
          at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
          run(ThreadPoolImpl.java:479)
          Caused by: java.lang.ClassCastException: com.mysql.jdbc.JDBC4ResultSet cannot be
          cast to java.io.Serializable
          at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14
          .write(DynamicMethodMarshallerImpl.java:338)
          at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.wr
          iteResult(DynamicMethodMarshallerImpl.java:430)
          at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(Reflecti
          veTie.java:125)
          at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
          tchToServant(CorbaServerRequestDispatcherImpl.java:650)
          at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
          tch(CorbaServerRequestDispatcherImpl.java:193)
          ... 8 more
           
          ----------END server-side stack trace---------- vmcid: SUN minor code: 202 com
          pleted: Maybe
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
          orAccessorImpl.java:39)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
          onstructorAccessorImpl.java:27)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.getSystemEx
          ception(MessageBase.java:933)
          at com.sun.corba.ee.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSys
          temException(ReplyMessage_1_2.java:100)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.getSystemExce
          ptionReply(CorbaMessageMediatorImpl.java:593)
          at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.proce
          ssResponse(CorbaClientRequestDispatcherImpl.java:429)
          at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marsh
          alingComplete(CorbaClientRequestDispatcherImpl.java:321)
          at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaCl
          ientDelegateImpl.java:194)
          at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.priv
          ateInvoke(StubInvocationHandlerImpl.java:159)
          ... 30 more
          javax.ejb.EJBException: nested exception is: java.rmi.RemoteException: CORBA UNK
          NOWN 1398079690 Maybe; nested exception is:
          org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace----------
           
          org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
          at com.sun.corba.ee.impl.logging.ORBUtilSystemException.runtimeexception
          (ORBUtilSystemException.java:8946)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.convertThrowa
          bleToSystemException(CorbaMessageMediatorImpl.java:1943)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
          leDuringServerDispatch(CorbaMessageMediatorImpl.java:1893)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
          leDuringServerDispatch(CorbaMessageMediatorImpl.java:1846)
          at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
          tch(CorbaServerRequestDispatcherImpl.java:263)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
          Request(CorbaMessageMediatorImpl.java:1705)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
          (CorbaMessageMediatorImpl.java:1565)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
          orbaMessageMediatorImpl.java:947)
          at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
          back(RequestMessage_1_2.java:178)
          at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
          (CorbaMessageMediatorImpl.java:717)
          at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatc
          h(SocketOrChannelConnectionImpl.java:473)
          at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(
          SocketOrChannelConnectionImpl.java:1270)
          at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
          run(ThreadPoolImpl.java:479)
          Caused by: java.lang.ClassCastException: com.mysql.jdbc.JDBC4ResultSet cannot be
          cast to java.io.Serializable
          at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14
          .write(DynamicMethodMarshallerImpl.java:338)
          at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.wr
          iteResult(DynamicMethodMarshallerImpl.java:430)
          at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(Reflecti
          veTie.java:125)
          at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
          tchToServant(CorbaServerRequestDispatcherImpl.java:650)
          at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
          tch(CorbaServerRequestDispatcherImpl.java:193)
          ... 8 more
           
          ----------END server-side stack trace---------- vmcid: SUN minor code: 202 com
          pleted: Maybe
          at library.common._LibraryInterface_Wrapper.getAllBooks(library.common._
          LibraryInterface_Wrapper.java)
          at library.client.LibraryClient.actionPerformed(LibraryClient.java)
          at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
          95)
          at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
          a:2318)
          at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
          .java:387)
          at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
          )
          at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
          istener.java:236)
          at java.awt.Component.processMouseEvent(Component.java:6038)
          at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
          at java.awt.Component.processEvent(Component.java:5803)
          at java.awt.Container.processEvent(Container.java:2058)
          at java.awt.Component.dispatchEventImpl(Component.java:4410)
          at java.awt.Container.dispatchEventImpl(Container.java:2116)
          at java.awt.Component.dispatchEvent(Component.java:4240)
          at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322
          )
          at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
           
          at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
          at java.awt.Container.dispatchEventImpl(Container.java:2102)
          at java.awt.Window.dispatchEventImpl(Window.java:2429)
          at java.awt.Component.dispatchEvent(Component.java:4240)
          at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
          at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
          ad.java:273)
          at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
          java:183)
          at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
          ad.java:173)
          at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
           
          at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
           
          at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            Originally posted by oll3i
            now it throws

            java.lang.NullP ointerException
            at library.client. LibraryClient.a ctionPerformed( LibraryClient.j ava)
            at javax.swing.Abs tractButton.fir eActionPerforme d(AbstractButto n.java:19
            95)
            at javax.swing.Abs tractButton$Han dler.actionPerf ormed(AbstractB utton.jav
            a:2318)
            at javax.swing.Def aultButtonModel .fireActionPerf ormed(DefaultBu ttonModel
            .java:387)
            at javax.swing.Def aultButtonModel .setPressed(Def aultButtonModel .java:242
            )
            at javax.swing.pla f.basic.BasicBu ttonListener.mo useReleased(Bas icButtonL
            istener.java:23 6)
            at java.awt.Compon ent.processMous eEvent(Componen t.java:6038)
            at javax.swing.JCo mponent.process MouseEvent(JCom ponent.java:326 0)
            at java.awt.Compon ent.processEven t(Component.jav a:5803)
            at java.awt.Contai ner.processEven t(Container.jav a:2058)
            at java.awt.Compon ent.dispatchEve ntImpl(Componen t.java:4410)
            at java.awt.Contai ner.dispatchEve ntImpl(Containe r.java:2116)
            at java.awt.Compon ent.dispatchEve nt(Component.ja va:4240)
            at java.awt.Lightw eightDispatcher .retargetMouseE vent(Container. java:4322
            )
            at java.awt.Lightw eightDispatcher .processMouseEv ent(Container.j ava:3986)

            at java.awt.Lightw eightDispatcher .dispatchEvent( Container.java: 3916)
            at java.awt.Contai ner.dispatchEve ntImpl(Containe r.java:2102)
            at java.awt.Window .dispatchEventI mpl(Window.java :2429)
            at java.awt.Compon ent.dispatchEve nt(Component.ja va:4240)
            at java.awt.EventQ ueue.dispatchEv ent(EventQueue. java:599)
            at java.awt.EventD ispatchThread.p umpOneEventForF ilters(EventDis patchThre
            ad.java:273)
            at java.awt.EventD ispatchThread.p umpEventsForFil ter(EventDispat chThread.
            java:183)
            at java.awt.EventD ispatchThread.p umpEventsForHie rarchy(EventDis patchThre
            ad.java:173)
            at java.awt.EventD ispatchThread.p umpEvents(Event DispatchThread. java:168)

            at java.awt.EventD ispatchThread.p umpEvents(Event DispatchThread. java:160)

            at java.awt.EventD ispatchThread.r un(EventDispatc hThread.java:12 1)

            and i didnt change anything just restarted the computer
            it doesnt get the resultset from librarybean
            So you still have that nullpointer? Put those System.out.prin tln statements in the actionPerformed method and print the variables you are using in that method. you will get which one is null and that will be it.

            Comment

            • oll3i
              Contributor
              • Mar 2007
              • 679

              #7
              yes i have system.out.prin tlns
              when mysql server is running it throws
              javax.ejb.EJBEx ception: nested exception is: java.rmi.Remote Exception

              Comment

              • r035198x
                MVP
                • Sep 2006
                • 13225

                #8
                Originally posted by oll3i
                yes i have system.out.prin tlns
                when mysql server is running it throws
                javax.ejb.EJBEx ception: nested exception is: java.rmi.Remote Exception
                So sometimes it throws nullpointer and sometimes it throws rmi exception?

                Comment

                • oll3i
                  Contributor
                  • Mar 2007
                  • 679

                  #9
                  yes
                  but that nullpointerexce ption was thrown when mysql server wasnt running

                  Comment

                  • oll3i
                    Contributor
                    • Mar 2007
                    • 679

                    #10
                    i read somwhere that it can be caused when eg the instance failed to open a database connection
                    i cannt find anywhere info about jdbc with mysql :(
                    and when i run an application that only connects to mysql and returns a row from it it works so why it's not working with ejb

                    Comment

                    • r035198x
                      MVP
                      • Sep 2006
                      • 13225

                      #11
                      Originally posted by oll3i
                      i read somwhere that it can be caused when eg the instance failed to open a database connection
                      i cannt find anywhere info about jdbc with mysql :(
                      and when i run an application that only connects to mysql and returns a row from it it works so why it's not working with ejb
                      Jdbc with mysql is very easy. You just need the connector and you're done.

                      Comment

                      • oll3i
                        Contributor
                        • Mar 2007
                        • 679

                        #12
                        i have a connector
                        one app works with jdbc but it doesnt work wih ejb with my libraryBean

                        Comment

                        • oll3i
                          Contributor
                          • Mar 2007
                          • 679

                          #13
                          so i dont need to configure anything in the jdbc resources to use mysql in ejb3?

                          Comment

                          Working...