Discussions

EJB programming & troubleshooting: Error in deploying CMP Bean to J2ee Server

  1. Error in deploying CMP Bean to J2ee Server (3 messages)

    I am trying to develop a simple CMP Entity bean, which uses a table in MS-Access database. on deploying this bean on J2ee server, when I generate SQL for CMP bean I get an RMI exception as

    "Error while generating sql.java.rmi.ServerException : Remote Exception occoured in error thread. Nested Exception is
    java.rmi.RemoteExcfeption : Error Connection to database ;
    Nested Exception is java.sql.SQLException:Microsoft[ODBC Microsoft Access Driver] Attribute cannot be set now. Please make sure that the database name, user/Password are valid and J2ee server and database are running."

    I am using jdk1.2 and j2sdkee1.2.1 and I have changed jdbc.drivers property to sun.jdbc.odbc.JdbcOdbcDrivers and jdbc.datasources to jdbc/ds|jdbc:odbc:ds;create=false in default.properties.


    any feedback to the message is appreciated.
  2. Make sure your J2EE_CLASSPATH include the driver your are trying to use (check your userconfig.bat).

    Hopes this help,
    Stephane.
  3. Thanks for your response. I am using JdbcOdbc Bridge to connect to the MS-Access database. This is already included in the libraries provided by sun in JDK. Also J2ee -verbose shows database bound properly.
  4. Iam new to ejb but i suppose if u want to use some database you have to use BMP.CMP uses it's own database to maintain rows (EJB Object).That's why may be the exception is raised.

    In case ian wrong please rectify me and explain the solution


    thanks

    somal