473,385 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

javax.ejb.EJBException Error

oll3i
679 512MB
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 nullpointerexception now it suddenly stopped even opening ?
but when i run it form bat with JAVA_CLIENT parameter it throws
javax.ejb.EJBException: nested exception is: java.rmi.RemoteException:
Expand|Select|Wrap|Line Numbers
  1.  
  2. package library.common;
  3.  
  4. import java.sql.ResultSet;
  5.  
  6. import javax.ejb.Remote;
  7.  
  8.  
  9.  
  10. @Remote
  11. public interface LibraryInterface {
  12.   public ResultSet getBookByAuthor(String author);
  13.   public ResultSet getBookByName(String name);
  14.   public ResultSet getBookByISBN(String isbn);
  15.   public ResultSet getAllBooks();
  16. }
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. package library.client;
  25.  
  26. import javax.naming.InitialContext;
  27.  
  28.  
  29. import java.awt.BorderLayout;
  30. import java.awt.Color;
  31. import java.awt.FlowLayout;
  32. import java.awt.event.ActionEvent;
  33. import java.awt.event.ActionListener;
  34. import java.lang.reflect.Method;
  35. import java.sql.ResultSet;
  36. import javax.ejb.*;
  37. import javax.naming.*;
  38. import javax.swing.*;
  39.  
  40. import library.common.*;
  41.  
  42.  
  43. @SuppressWarnings("serial")
  44. public class LibraryClient extends JFrame implements ActionListener {
  45.  
  46.  
  47.   private @EJB LibraryInterface li;
  48.  
  49.   private JTextField book_author = new JTextField(10);
  50.   private JTextField book_title = new JTextField(10);
  51.   private JTextField book_isbn = new JTextField(10);
  52.   private JLabel author_label = new JLabel("Podaj autora:");
  53.   private JLabel book_title_label = new JLabel("Podaj tytul ksiazki");
  54.   private JLabel isbn_label = new JLabel("Podaj ISBN");
  55.   private JTextArea display_books = new JTextArea(20,50);
  56.   private JButton search = new JButton("Search");
  57.   private ResultSet resultset;
  58.   public LibraryClient() {
  59.     this("DEFAULT_CONTEXT");
  60.   }
  61. private JPanel createPanel1(){
  62.      JPanel panel = new JPanel();
  63.      panel.add(author_label);
  64.      panel.add(book_author);
  65.  
  66.      panel.add(book_title_label);
  67.      panel.add(book_title);
  68.  
  69.      panel.add(isbn_label);
  70.      panel.add(book_isbn);
  71.  
  72.      panel.add(search);
  73.      ////search.setActionCommand("ISBN");
  74.      search.addActionListener(this);
  75.      return panel;
  76. }
  77. private JPanel createPanel2(){
  78.      JPanel panel = new JPanel();
  79.      panel.add(display_books);
  80.      return panel;
  81. }
  82.  
  83. private JPanel createPanels(){
  84.     JPanel panel = new JPanel();
  85.     //Use default FlowLayout.
  86.     panel.setLayout(new BorderLayout());
  87.     panel.add(createPanel1(), BorderLayout.NORTH);
  88.  
  89.     panel.add(createPanel2(), BorderLayout.SOUTH);
  90.     return panel;
  91. }
  92.   public  LibraryClient(String appType) {
  93.  
  94.     init(appType);
  95.     JFrame frame = new JFrame("Library");
  96.     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  97. //    /final Table table = new Table();
  98.     frame.setContentPane(createPanels());
  99.     frame.pack();
  100. //    /f.setLocationRelativeTo(null);
  101.     frame.setVisible(true); 
  102.   }
  103.  
  104.   public void actionPerformed(ActionEvent e) {
  105.  
  106.         try {
  107.             display_books.setText("");
  108.             display_books.setText("Wyszukane Ksiazki\n");
  109.             if(!book_author.getText().equals("")){
  110.                 resultset=li.getBookByAuthor(book_author.getText());
  111.  
  112.  
  113.             }else if(!book_title.getText().equals("")){
  114.                 resultset=li.getBookByName(book_title.getText());
  115.             }else if(!book_isbn.getText().equals("")){
  116.                 resultset=li.getBookByISBN(book_isbn.getText());
  117.             }else {
  118.                 System.out.println("Before->resultset=li.getAllBooks()");
  119.                 resultset=li.getAllBooks();
  120.                 System.out.println("After->resultset=li.getAllBooks()");
  121.             }
  122.             while(resultset.next()){
  123.                 System.out.println("in while resultset.next()");  
  124.                 String name = resultset.getString("name");
  125.                    String author =resultset.getString("author");
  126.                    String isbn = resultset.getString("ISBN");
  127.                    display_books.append("\n"+ name + " " + author +" "+ isbn);
  128.  
  129.  
  130.  
  131.  
  132.             }
  133.         } catch(Exception exc) { exc.printStackTrace(); }
  134.   }
  135.  
  136.   private void init(String type) {
  137.     if (type.equals("JAVA_APP")) li = new library.ejb.LibraryBean();
  138.     else if (type.equals("JAVA_CLIENT")) {
  139.       try {
  140.         InitialContext ic = new InitialContext();
  141.         li = (LibraryInterface) ic.lookup("library.common.LibraryInterface");
  142.       } catch (NamingException e) {
  143.         e.printStackTrace();
  144.       }
  145.     }
  146.   }
  147.  
  148.  
  149.  
  150.   public static void main(String[] args) {
  151.     if (args.length >= 1) new LibraryClient(args[0]);
  152.     else new LibraryClient();
  153.   }
  154.  
  155.  
  156. }
  157.  
  158.  
  159.  
  160.  
  161.  
  162. package library.ejb;
  163. import java.sql.*;
  164. import javax.ejb.*;
  165. import library.common.*;
  166.  
  167. @Stateless 
  168. public class LibraryBean implements LibraryInterface{
  169. ResultSet resultset;
  170. Statement statement;
  171.   public LibraryBean() {
  172.   }
  173.   public ResultSet getBookByAuthor(String author){
  174.       try {
  175.           Class.forName("com.mysql.jdbc.Driver");
  176.  
  177.           //Define URL of database server for
  178.           // database named JunkDB on the localhost
  179.           // with the default port number 3306.
  180.           String url =
  181.                 "jdbc:mysql://localhost:3306/Library";
  182.  
  183.           //Get a connection to the database for a
  184.  
  185.           Connection connection =DriverManager.getConnection(
  186.                             url,"kasia", "p1fk0zs0k1em");
  187.           System.out.println("Connected to the database");
  188.  
  189.           statement = connection.createStatement();
  190.           resultset =  statement.executeQuery("SELECT * " +
  191.           "from books WHERE author = "+author+" ORDER BY name");
  192.  
  193.  
  194.           connection.close();
  195.  
  196.  
  197.       }catch( Exception e ) {
  198.               e.printStackTrace();
  199.  
  200.             }//end catch
  201.       return resultset;
  202.   }
  203.   public ResultSet getBookByName(String name){
  204.       try {
  205.           Class.forName("com.mysql.jdbc.Driver");
  206.  
  207.           //Define URL of database server for
  208.           // database named JunkDB on the localhost
  209.           // with the default port number 3306.
  210.           String url =
  211.                 "jdbc:mysql://localhost:3306/Library";
  212.  
  213.           //Get a connection to the database for a
  214.  
  215.           Connection connection =DriverManager.getConnection(
  216.                             url,"kasia", "p1fk0zs0k1em");
  217.           System.out.println("Connected to the database");
  218.           statement = connection.createStatement();
  219.           resultset =  statement.executeQuery("SELECT * " +
  220.           "from books WHERE name ="+name+" ORDER BY name");
  221.           connection.close();
  222.       }catch( Exception e ) {
  223.               e.printStackTrace();
  224.  
  225.             }//end catch
  226.  
  227.       return resultset;
  228.   }
  229.   public ResultSet getBookByISBN(String isbn){
  230.       try {
  231.           Class.forName("com.mysql.jdbc.Driver");
  232.  
  233.           //Define URL of database server for
  234.           // database named JunkDB on the localhost
  235.           // with the default port number 3306.
  236.           String url =
  237.                 "jdbc:mysql://localhost:3306/Library";
  238.  
  239.           //Get a connection to the database for a
  240.  
  241.           Connection connection =DriverManager.getConnection(
  242.                             url,"kasia", "p1fk0zs0k1em");
  243.           System.out.println("Connected to the database");
  244.           statement = connection.createStatement();
  245.           resultset =  statement.executeQuery("SELECT * " +
  246.           "from books WHERE ISBN ="+isbn+" ORDER BY name");
  247.           connection.close();
  248.       }catch( Exception e ) {
  249.               e.printStackTrace();
  250.  
  251.             }//end catch
  252.       return resultset;
  253.   }
  254.   public ResultSet getAllBooks(){
  255.       try {
  256.           Class.forName("com.mysql.jdbc.Driver");
  257.  
  258.           //Define URL of database server for
  259.           // database named JunkDB on the localhost
  260.           // with the default port number 3306.
  261.           String url =
  262.                 "jdbc:mysql://localhost:3306/Library";
  263.  
  264.           //Get a connection to the database for a
  265.  
  266.           Connection connection =DriverManager.getConnection(
  267.                             url,"kasia", "p1fk0zs0k1em");
  268.  
  269.  
  270.  
  271.           System.out.println("URL: " + url);
  272.           System.out.println("Connection: " + connection);
  273.  
  274.           statement = connection.createStatement();
  275.           resultset =  statement.executeQuery("SELECT * " +
  276.           "from books ORDER BY name");
  277.           connection.close();
  278.       }catch( Exception e ) {
  279.               e.printStackTrace();
  280.  
  281.             }//end catch
  282.       return resultset;
  283.   }
  284.  
  285.  
  286.  
  287.  
  288.   }
  289.  
  290.  
  291.  
  292.  
thank YOU
Jun 12 '07 #1
12 11297
oll3i
679 512MB
i m laughing at that GURU :) i m certainly not there yet
regards
Jun 12 '07 #2
r035198x
13,262 8TB
Can you post the full stacktrace. It usually is helpful ...
Jun 12 '07 #3
oll3i
679 512MB
now it throws

Expand|Select|Wrap|Line Numbers
  1.  java.lang.NullPointerException 
  2. at library.client.LibraryClient.actionPerformed(LibraryClient.java)
  3. at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
  4. 95)
  5. at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
  6. a:2318)
  7. at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
  8. .java:387)
  9. at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
  10. )
  11. at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
  12. istener.java:236)
  13. at java.awt.Component.processMouseEvent(Component.java:6038)
  14. at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
  15. at java.awt.Component.processEvent(Component.java:5803)
  16. at java.awt.Container.processEvent(Container.java:2058)
  17. at java.awt.Component.dispatchEventImpl(Component.java:4410)
  18. at java.awt.Container.dispatchEventImpl(Container.java:2116)
  19. at java.awt.Component.dispatchEvent(Component.java:4240)
  20. at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322
  21. )
  22. at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
  23.  
  24. at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
  25. at java.awt.Container.dispatchEventImpl(Container.java:2102)
  26. at java.awt.Window.dispatchEventImpl(Window.java:2429)
  27. at java.awt.Component.dispatchEvent(Component.java:4240)
  28. at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
  29. at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
  30. ad.java:273)
  31. at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
  32. java:183)
  33. at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
  34. ad.java:173)
  35. at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
  36.  
  37. at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
  38.  
  39. at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
  40.  
and i didnt change anything just restarted the computer
it doesnt get the resultset from librarybean
Jun 12 '07 #4
oll3i
679 512MB
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

Expand|Select|Wrap|Line Numbers
  1.  
  2. javax.ejb.EJBException: nested exception is: java.rmi.RemoteException: CORBA UNK
  3. NOWN 1398079690 Maybe; nested exception is: 
  4. org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace----------
  5.  
  6. org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
  7. at com.sun.corba.ee.impl.logging.ORBUtilSystemException.runtimeexception
  8. (ORBUtilSystemException.java:8946)
  9. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.convertThrowa
  10. bleToSystemException(CorbaMessageMediatorImpl.java:1943)
  11. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
  12. leDuringServerDispatch(CorbaMessageMediatorImpl.java:1893)
  13. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
  14. leDuringServerDispatch(CorbaMessageMediatorImpl.java:1846)
  15. at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
  16. tch(CorbaServerRequestDispatcherImpl.java:263)
  17. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
  18. Request(CorbaMessageMediatorImpl.java:1705)
  19. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
  20. (CorbaMessageMediatorImpl.java:1565)
  21. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
  22. orbaMessageMediatorImpl.java:947)
  23. at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
  24. back(RequestMessage_1_2.java:178)
  25. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
  26. (CorbaMessageMediatorImpl.java:717)
  27. at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatc
  28. h(SocketOrChannelConnectionImpl.java:473)
  29. at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(
  30. SocketOrChannelConnectionImpl.java:1270)
  31. at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
  32. run(ThreadPoolImpl.java:479)
  33. Caused by: java.lang.ClassCastException: com.mysql.jdbc.JDBC4ResultSet cannot be
  34. cast to java.io.Serializable
  35. at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14
  36. .write(DynamicMethodMarshallerImpl.java:338)
  37. at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.wr
  38. iteResult(DynamicMethodMarshallerImpl.java:430)
  39. at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(Reflecti
  40. veTie.java:125)
  41. at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
  42. tchToServant(CorbaServerRequestDispatcherImpl.java:650)
  43. at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
  44. tch(CorbaServerRequestDispatcherImpl.java:193)
  45. ... 8 more
  46.  
  47. ----------END server-side stack trace---------- 
  48.  
Expand|Select|Wrap|Line Numbers
  1.  vmcid: SUN minor code: 202 com 
  2. pleted: Maybe
  3. java.rmi.RemoteException: CORBA UNKNOWN 1398079690 Maybe; nested exception is:
  4. org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace----------
  5.  
  6. org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
  7. at com.sun.corba.ee.impl.logging.ORBUtilSystemException.runtimeexception
  8. (ORBUtilSystemException.java:8946)
  9. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.convertThrowa
  10. bleToSystemException(CorbaMessageMediatorImpl.java:1943)
  11. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
  12. leDuringServerDispatch(CorbaMessageMediatorImpl.java:1893)
  13. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
  14. leDuringServerDispatch(CorbaMessageMediatorImpl.java:1846)
  15. at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
  16. tch(CorbaServerRequestDispatcherImpl.java:263)
  17. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
  18. Request(CorbaMessageMediatorImpl.java:1705)
  19. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
  20. (CorbaMessageMediatorImpl.java:1565)
  21. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
  22. orbaMessageMediatorImpl.java:947)
  23. at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
  24. back(RequestMessage_1_2.java:178)
  25. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
  26. (CorbaMessageMediatorImpl.java:717)
  27. at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatc
  28. h(SocketOrChannelConnectionImpl.java:473)
  29. at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(
  30. SocketOrChannelConnectionImpl.java:1270)
  31. at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
  32. run(ThreadPoolImpl.java:479)
  33. Caused by: java.lang.ClassCastException: com.mysql.jdbc.JDBC4ResultSet cannot be
  34. cast to java.io.Serializable
  35. at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14
  36. .write(DynamicMethodMarshallerImpl.java:338)
  37. at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.wr
  38. iteResult(DynamicMethodMarshallerImpl.java:430)
  39. at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(Reflecti
  40. veTie.java:125)
  41. at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
  42. tchToServant(CorbaServerRequestDispatcherImpl.java:650)
  43. at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
  44. tch(CorbaServerRequestDispatcherImpl.java:193)
  45. ... 8 more
  46.  
  47. ----------END server-side stack trace---------- 
  48.  
Expand|Select|Wrap|Line Numbers
  1.  vmcid: SUN minor code: 202 com 
  2. pleted: Maybe
  3. at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.ja
  4. va:309)
  5. at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.priv
  6. ateInvoke(StubInvocationHandlerImpl.java:172)
  7. at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invo
  8. ke(StubInvocationHandlerImpl.java:119)
  9. at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELS
  10. tubBase.java:197)
  11. at library.common.__LibraryInterface_Remote_DynamicStub.getAllBooks(__Li
  12. braryInterface_Remote_DynamicStub.java)
  13. at library.common._LibraryInterface_Wrapper.getAllBooks(library.common._
  14. LibraryInterface_Wrapper.java)
  15. at library.client.LibraryClient.actionPerformed(LibraryClient.java)
  16. at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
  17. 95)
  18. at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
  19. a:2318)
  20. at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
  21. .java:387)
  22. at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
  23. )
  24. at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
  25. istener.java:236)
  26. at java.awt.Component.processMouseEvent(Component.java:6038)
  27. at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
  28. at java.awt.Component.processEvent(Component.java:5803)
  29. at java.awt.Container.processEvent(Container.java:2058)
  30. at java.awt.Component.dispatchEventImpl(Component.java:4410)
  31. at java.awt.Container.dispatchEventImpl(Container.java:2116)
  32. at java.awt.Component.dispatchEvent(Component.java:4240)
  33. at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322
  34. )
  35. at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
  36.  
  37. at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
  38. at java.awt.Container.dispatchEventImpl(Container.java:2102)
  39. at java.awt.Window.dispatchEventImpl(Window.java:2429)
  40. at java.awt.Component.dispatchEvent(Component.java:4240)
  41. at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
  42. at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
  43. ad.java:273)
  44. at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
  45. java:183)
  46. at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
  47. ad.java:173)
  48. at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
  49.  
  50. at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
  51.  
  52. at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
  53. Caused by: org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace-------
  54. ---
  55. org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
  56. at com.sun.corba.ee.impl.logging.ORBUtilSystemException.runtimeexception
  57. (ORBUtilSystemException.java:8946)
  58. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.convertThrowa
  59. bleToSystemException(CorbaMessageMediatorImpl.java:1943)
  60. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
  61. leDuringServerDispatch(CorbaMessageMediatorImpl.java:1893)
  62. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
  63. leDuringServerDispatch(CorbaMessageMediatorImpl.java:1846)
  64. at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
  65. tch(CorbaServerRequestDispatcherImpl.java:263)
  66. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
  67. Request(CorbaMessageMediatorImpl.java:1705)
  68. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
  69. (CorbaMessageMediatorImpl.java:1565)
  70. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
  71. orbaMessageMediatorImpl.java:947)
  72. at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
  73. back(RequestMessage_1_2.java:178)
  74. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
  75. (CorbaMessageMediatorImpl.java:717)
  76. at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatc
  77. h(SocketOrChannelConnectionImpl.java:473)
  78. at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(
  79. SocketOrChannelConnectionImpl.java:1270)
  80. at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
  81. run(ThreadPoolImpl.java:479)
  82. Caused by: java.lang.ClassCastException: com.mysql.jdbc.JDBC4ResultSet cannot be
  83. cast to java.io.Serializable
  84. at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14
  85. .write(DynamicMethodMarshallerImpl.java:338)
  86. at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.wr
  87. iteResult(DynamicMethodMarshallerImpl.java:430)
  88. at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(Reflecti
  89. veTie.java:125)
  90. at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
  91. tchToServant(CorbaServerRequestDispatcherImpl.java:650)
  92. at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
  93. tch(CorbaServerRequestDispatcherImpl.java:193)
  94. ... 8 more
  95.  
  96. ----------END server-side stack trace---------- vmcid: SUN minor code: 202 com
  97. pleted: Maybe
  98. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  99.  
  100. at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
  101. orAccessorImpl.java:39)
  102. at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
  103. onstructorAccessorImpl.java:27)
  104. at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
  105. at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.getSystemEx
  106. ception(MessageBase.java:933)
  107. at com.sun.corba.ee.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSys
  108. temException(ReplyMessage_1_2.java:100)
  109. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.getSystemExce
  110. ptionReply(CorbaMessageMediatorImpl.java:593)
  111. at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.proce
  112. ssResponse(CorbaClientRequestDispatcherImpl.java:429)
  113. at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marsh
  114. alingComplete(CorbaClientRequestDispatcherImpl.java:321)
  115. at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaCl
  116. ientDelegateImpl.java:194)
  117. at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.priv
  118. ateInvoke(StubInvocationHandlerImpl.java:159)
  119. ... 30 more
  120. javax.ejb.EJBException: nested exception is: java.rmi.RemoteException: CORBA UNK
  121. NOWN 1398079690 Maybe; nested exception is:
  122. org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace----------
  123.  
  124. org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
  125. at com.sun.corba.ee.impl.logging.ORBUtilSystemException.runtimeexception
  126. (ORBUtilSystemException.java:8946)
  127. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.convertThrowa
  128. bleToSystemException(CorbaMessageMediatorImpl.java:1943)
  129. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
  130. leDuringServerDispatch(CorbaMessageMediatorImpl.java:1893)
  131. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleThrowab
  132. leDuringServerDispatch(CorbaMessageMediatorImpl.java:1846)
  133. at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
  134. tch(CorbaServerRequestDispatcherImpl.java:263)
  135. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
  136. Request(CorbaMessageMediatorImpl.java:1705)
  137. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
  138. (CorbaMessageMediatorImpl.java:1565)
  139. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
  140. orbaMessageMediatorImpl.java:947)
  141. at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
  142. back(RequestMessage_1_2.java:178)
  143. at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
  144. (CorbaMessageMediatorImpl.java:717)
  145. at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatc
  146. h(SocketOrChannelConnectionImpl.java:473)
  147. at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(
  148. SocketOrChannelConnectionImpl.java:1270)
  149. at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
  150. run(ThreadPoolImpl.java:479)
  151. Caused by: java.lang.ClassCastException: com.mysql.jdbc.JDBC4ResultSet cannot be
  152. cast to java.io.Serializable
  153. at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14
  154. .write(DynamicMethodMarshallerImpl.java:338)
  155. at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.wr
  156. iteResult(DynamicMethodMarshallerImpl.java:430)
  157. at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(Reflecti
  158. veTie.java:125)
  159. at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
  160. tchToServant(CorbaServerRequestDispatcherImpl.java:650)
  161. at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
  162. tch(CorbaServerRequestDispatcherImpl.java:193)
  163. ... 8 more
  164.  
  165. ----------END server-side stack trace---------- vmcid: SUN minor code: 202 com
  166. pleted: Maybe
  167. at library.common._LibraryInterface_Wrapper.getAllBooks(library.common._
  168. LibraryInterface_Wrapper.java)
  169. at library.client.LibraryClient.actionPerformed(LibraryClient.java)
  170. at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
  171. 95)
  172. at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
  173. a:2318)
  174. at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
  175. .java:387)
  176. at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
  177. )
  178. at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
  179. istener.java:236)
  180. at java.awt.Component.processMouseEvent(Component.java:6038)
  181. at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
  182. at java.awt.Component.processEvent(Component.java:5803)
  183. at java.awt.Container.processEvent(Container.java:2058)
  184. at java.awt.Component.dispatchEventImpl(Component.java:4410)
  185. at java.awt.Container.dispatchEventImpl(Container.java:2116)
  186. at java.awt.Component.dispatchEvent(Component.java:4240)
  187. at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322
  188. )
  189. at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
  190.  
  191. at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
  192. at java.awt.Container.dispatchEventImpl(Container.java:2102)
  193. at java.awt.Window.dispatchEventImpl(Window.java:2429)
  194. at java.awt.Component.dispatchEvent(Component.java:4240)
  195. at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
  196. at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
  197. ad.java:273)
  198. at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
  199. java:183)
  200. at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
  201. ad.java:173)
  202. at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
  203.  
  204. at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
  205.  
  206. at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
  207.  
Jun 12 '07 #5
r035198x
13,262 8TB
now it throws

java.lang.NullPointerException
at library.client.LibraryClient.actionPerformed(Libra ryClient.java)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.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(DefaultB uttonModel.java:242
)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonL
istener.java:236)
at java.awt.Component.processMouseEvent(Component.jav a:6038)
at javax.swing.JComponent.processMouseEvent(JComponen t.java:3260)
at java.awt.Component.processEvent(Component.java:580 3)
at java.awt.Container.processEvent(Container.java:205 8)
at java.awt.Component.dispatchEventImpl(Component.jav a:4410)
at java.awt.Container.dispatchEventImpl(Container.jav a:2116)
at java.awt.Component.dispatchEvent(Component.java:42 40)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4322
)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3986)

at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3916)
at java.awt.Container.dispatchEventImpl(Container.jav a:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429 )
at java.awt.Component.dispatchEvent(Component.java:42 40)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 599)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThre
ad.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.
java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThre
ad.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:168)

at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:160)

at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:121)

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.println 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.
Jun 12 '07 #6
oll3i
679 512MB
yes i have system.out.printlns
when mysql server is running it throws
javax.ejb.EJBException: nested exception is: java.rmi.RemoteException
Jun 12 '07 #7
r035198x
13,262 8TB
yes i have system.out.printlns
when mysql server is running it throws
javax.ejb.EJBException: nested exception is: java.rmi.RemoteException
So sometimes it throws nullpointer and sometimes it throws rmi exception?
Jun 12 '07 #8
oll3i
679 512MB
yes
but that nullpointerexception was thrown when mysql server wasnt running
Jun 12 '07 #9
oll3i
679 512MB
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
Jun 13 '07 #10
r035198x
13,262 8TB
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.
Jun 13 '07 #11
oll3i
679 512MB
i have a connector
one app works with jdbc but it doesnt work wih ejb with my libraryBean
Jun 13 '07 #12
oll3i
679 512MB
so i dont need to configure anything in the jdbc resources to use mysql in ejb3?
Jun 13 '07 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Asad Khan | last post by:
Hi, I am using DrJava, and I am writing a program that has the following statement: import javax.swing; It gives me this error when compiled: File: C:\Program...
1
by: rajbala | last post by:
Hi all, I want to run mp3 in my netbean IDE5.0. It shows error in commands like import javax.media.bean.playerbean.*; import javax.media.ControllerEvent; import...
5
by: ajos | last post by:
hi frnds, this is the way i ve written--> <html:text name="bdgtmastForm" property="publicity_code" size="5" maxlength="5"> but its giving me an error which seems irrelevent.. type Exception...
0
by: choukse | last post by:
Hi All, I am trying to bind to ADAM instance with a windows user through JNDI and it keeps failing. My ADAM and AD is running on same Windows 2k3 server. But, through LDP I am able to bind with...
0
by: shahiz | last post by:
This the error i get when i try to run my program Error: Unable to realize com.sun.media.amovie.AMController@18b81e3 Basically i have a mediapanel class that initialize and play the media as...
2
by: prasath03 | last post by:
Hi, I wrote a java program for Encrypt and Decrypt the given string, when i execute the program it show me an error....but the string has Encrypted, if i want to Decrypt the string it show me an...
3
oll3i
by: oll3i | last post by:
when i run my create.jsp that populates the database i get javax.ejb.EJBException error it throws the exception at line phoneHome.create("01", "01", "0957205114"); i have three lookups...
3
by: naharol | last post by:
when i run this code i got an error .... can any body help me out ? <%@page import="java.sql.*"%> <form action="index.jsp?pg=13" method="post"> <table> <tr><td>class:</td><td><select name="cl">...
0
by: jerald m | last post by:
login.jsp <%@ page contentType="text/html"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <f:view> <html> <head>...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.