The example provided below worked perfectly in jBoss.  Cool!  Thanks for
learning me something new!  Any idea on what is causing the
ClassNotFoundException(s)?

Wes

-----Original Message-----
From: Wes Mckean 
Sent: Thursday, November 16, 2000 11:44 AM
To: jBoss (E-mail)
Subject: RE: [jBoss-User] Minerva Question


Great!  Thanks for that tidbit of information.  I will take it into account
immediately and make the neccessary changes.

Your response does not address the ClassNotFoundException issue as stated
below.  Is there a resolution?

Wes

-----Original Message-----
From: Aaron Mulder [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 15, 2000 5:58 PM
To: jBoss
Subject: RE: [jBoss-User] Minerva Question


        But you should instead declare a resource reference in you
ejb-jar.xml file, and then use *that* name.  So for example, if your
ejb-jar.xml declares a DB resource named "jdbc/Foo" you should be able to
look it up as "java:comp/env/jdbc/Foo" in *either* server!  That whole
point of that is to conceal the server's internal representation (which is
"Foo" in WL and "java:Foo" in jBoss, according to your description).
        Then you would of course need to hook up the "jdbc/Foo" resource
in ejb-jar.xml to "java:Whatever" in the jBoss JNDI space using a resource
ref in the bean and a resource manager in jboss.xml.
        So you should not under any circumstances be looking things up
using the java:Foo JNDI name.

Aaron

On Wed, 15 Nov 2000, Wes Mckean wrote:
> This code works in both jBoss and WebLogic.  We had to extract the pool
name
> because WebLogic does not use java:/usswebPool like jBoss does.  It just
> uses just usswebPool ( Damn them ).
>
>       Connection getConnection() {
>
>       Connection conn = null;
>
>       try {
>               ussweb.system.System sys = new ussweb.system.System();
>               Context initCtx = new InitialContext();
>               javax.sql.DataSource ds =
> (javax.sql.DataSource)initCtx.lookup(sys.getJNDIPoolName());
>               conn = ds.getConnection();
>       }
>       catch( NamingException n ) {
>               n.printStackTrace();
>       }
>       catch( Exception e ) {
>               e.printStackTrace();
>       }
>
>       return conn;
>       }
>
> The following bit of code does not work and throws a
ClassNotFoundException:
>
>       Connection getConnection() {
>
>       Connection conn = null;
>
>       try {
>               Class.forName( "org.jboss.minerva.datasource.PoolDriver");
>               conn = DriverManager.getConnection(
> "jdbc:minerva:usswebPool" );
>       }
>       catch( Exception e ) {
>               e.printStackTrace();
>       }
>
>       return conn;
>       }
>
> It never makes it to the driver manager code.  The exception thrown is as
> follows:
>
> [Pin] New Pin Entity Bean Java Object created by EJB Container.
> [Pin] setEntityContext
> [Pin] ejbFindByBarcode 150238415
> [Pin] java.lang.ClassNotFoundException:
> org.jboss.minerva.datasource.PoolDriver
> [Pin]         at java.net.URLClassLoader$1.run(Unknown Source)
> [Pin]         at java.security.AccessController.doPrivileged(Native
Method)
> [Pin]         at java.net.URLClassLoader.findClass(Unknown Source)
> [Pin]         at java.lang.ClassLoader.loadClass(Unknown Source)
> [Pin]         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown
Source)
> [Pin]         at java.lang.ClassLoader.loadClass(Unknown Source)
> [Pin]         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> [Pin]         at java.lang.Class.forName0(Native Method)
> [Pin]         at java.lang.Class.forName(Unknown Source)
> [Pin]         at ussweb.dbPin.PinBean.getConnection(PinBean.java:459)
> [Pin]         at ussweb.dbPin.PinBean.verifyCard(PinBean.java:436)
> [Pin]         at ussweb.dbPin.PinBean.ejbFindByBarcode(PinBean.java:407)
> [Pin]         at java.lang.reflect.Method.invoke(Native Method)
> [Pin]         at
>
org.jboss.ejb.plugins.BMPPersistenceManager.callFinderMethod(BMPPersistenceM
> anager.java:410)
> [Pin]         at
>
org.jboss.ejb.plugins.BMPPersistenceManager.findEntity(BMPPersistenceManager
> .java:195)
> [Pin]         at
org.jboss.ejb.EntityContainer.find(EntityContainer.java:411)
> [Pin]         at java.lang.reflect.Method.invoke(Native Method)
> [Pin]         at
>
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContaine
> r.java:591)
> [Pin]         at
>
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySync
> hronizationInterceptor.java:160)
> [Pin]         at
>
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt
> erceptor.java:86)
> [Pin]         at
>
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
> [Pin]         at
>
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
> java:226)
> [Pin]         at
>
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
> [Pin]         at
>
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav
> a:126)
> [Pin]         at
> org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
> [Pin]         at
> org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:315)
> [Pin]         at
>
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai
> nerInvoker.java:143)
> [Pin]         at java.lang.reflect.Method.invoke(Native Method)
> [Pin]         at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
> [Pin]         at sun.rmi.transport.Transport$1.run(Unknown Source)
> [Pin]         at java.security.AccessController.doPrivileged(Native
Method)
> [Pin]         at sun.rmi.transport.Transport.serviceCall(Unknown Source)
> [Pin]         at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown
Source)
> [Pin]         at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
> Source)
> [Pin]         at java.lang.Thread.run(Unknown Source)
>
> -----Original Message-----
> From: Aaron Mulder [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 15, 2000 1:59 PM
> To: jBoss
> Subject: RE: [jBoss-User] Minerva Question
>
>
>       Okay, so far, so good.  All the pools loaded successfully.  Can
> you now include the code you're using to open connections which is
> failing, and the exception stack trace that is generated?  Also, I really
> thought WebLogic supported JNDI DataSources.  Is that not true?
>
> Aaron
>
> On Wed, 15 Nov 2000, Wes Mckean wrote:
> > I'm sorry Aaron.  I'm not trying to be difficult.  I really don't think
> this
> > is a Minerva question anymore at all.  I think this is a CLASSPATH issue
> > that I don't understand.  If I put my JAR file in the lib/ext directory,
> and
> > it loads properly, and I see the JDCB Mbean load the JDBC drivers
> correctly,
> > which I have set up in the jboss.properties file, then why can't I do a
> > Class.forName on my class?
> >
> >     Class.forName( "com.inet.tds.TdsDriver");
> >     Class.forName( "org.jboss.minerva.datasource.PoolDriver");
> >
> > Both of these throw a ClassNotFoundException in my EJB.  At this point,
I
> > could care less about connection pool.  I have that working now,
although
> I
> > can't use the PoolDriver for the reason stated above.  My main wish for
> > using the PoolDriver was so that I could keep my code compatible between
> > jBoss and Darth WebLogic.  Inserted below is the Debug output from my
> jBoss
> > startup.
> >
> > You will see that the JDBC driver is loaded properly from the
Una2000.jar
> > file.
> > ...
>
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
>



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to