A couple of WebLogic specifec questions
Jason <[email protected]> Sun, 16 Feb 2003 20:26:42 -0800
| Newsgroups | gmane.comp.java.sun.connector |
|---|---|
| Message-ID | <[email protected]> |
Hello,
First of all, I apoligize if this post is off-topic
for this list, but I'm trying to deploy my RA into
WebLogic and I've run into an issue.
I've successfully deployed my RA in WebLogic 7.0 and
added a bit of test code to a jsp to do a lookup for a
ConnectionFactory and call getConnection( ). The code
looks like this:
com.mycompany.ConnectionFactory cf =
(com.mycompany.ConnectionFactory)
ic.lookup("java:comp/env/MyCtr");
cf.getConnection( );
The lookup( ) succeeds but I get a class cast
exception on the cast to ConnectionFactory. If I
instead just declare the reference to Object and then
call getClass( .getName( ) I get
com.mycompany.ConnectionFactoryImpl just as I'd
expect. Further, if I then use reflection I can
verify that the object does in fact implement
ConnectionFactory. However, if I do 'cf instanceof
ConnectionFactory' it fails which is in agreement with
the Class Cast Exception. I've also tried 'casting'
the ConnectionFactoryImpl to a ConnectionFactoryImpl
and this also fails.
I've included all of the relevent classes in both the
Deployed Resource adapter (stand alone) as well as the
classes directory of the war file containing the JSP
so I can't figure out what's going on.
The only way I've found to solve the problem is to add
the classes to the App Servers ClassPath explictly but
I'd really rather not do that and in fact WebLogic's
own documentation discourages it. Actually, I'm
bothered that this solves the problem; since I wasn't
getting a ClassDefNotFound error, but rather a CCE.
In any case, can anyone explain this behavior?
-Jason
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff CONNECTOR-INTEREST". For general help, send email to
[email protected] and include in the body of the message "help".