0 Replies Latest reply on Dec 3, 2003 5:43 PM by fordeeps

    database access.

    fordeeps

      The basic idea is to use a ejb and upload data in a MS Access database. We use JBoss as our application server.

      I have been trying to learn ejb thro various tutorials. The first session bean worked fine. NExt i tried to create a bmp entity bean. The code that i used is in this site:
      http://www.fluffycat.com/java/JavaNotes-EJBEntityBeanManaged.html

      Except for the last "application-client.xml", i copied the rest of the code, made a jar and deployed it in the server. My problem is I dont know how or where to specify the jndi name for my database.

      public class DvdBean implements EntityBean {
      private EntityContext entityContext;
      private Connection connection;
      private String dbName = "java:comp/env/dvdejb/jdbc/DvdDB"; (Here is where i have changed. The name of my database is DvdDB and I have stored it under the folder(s) dvdejb/jdbc.)

      When i try to run my client, the following error is displayed.

      java.rmi.ServerException: RemoteException occurred in server thread; nested exce
      ption is:
      java.rmi.ServerException: EJBException:; nested exception is:
      javax.ejb.EJBException: ejbCreate():dbInsertRowCalled with isbn: 0780633
      44X title: Best of Show format: WS exception: null
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
      60)

      Please do help me out. In google i came across a article which asks me to do some changes to standardjaws.xml file. But i couldnt understand it.

      thanks in advance
      Deepa.