Hello,

The sample entitybean/account is coded with the Cloudscape database.  Did
any body try the Account entity bean example with DB2 database.  With any
database the userid and password need to be specified.  Base on the
documentation I am trying the following code.

        DataSource ds = (DataSource) ic.lookup(dbName);
        con =  ds.getConnection("userid", "password");

But I get some exceptions.  My classpath includes the db2 classes.zip file
also.

Based on the example provided with the DB2 example when I included the
following line:
        Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();

I get the following messages on the j2ee console:

java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at java.lang.ClassLoader.findSystemClass(ClassLoader.java:575)
        at
com.sun.enterprise.util.EJBClassLoader.loadClass(EJBClassLoader.java:
192)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:124)
        at AccountEJB.makeConnection(AccountEJB.java:192)
        at AccountEJB.setEntityContext(AccountEJB.java:137)
        at
com.sun.ejb.containers.EntityContainer.getPooledEJB(EntityContainer.j
ava:802)

Can anybody tell me what am I missing?

Thanks

Hara

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to