DO NOT REPLY [Bug 30085] - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib





--- Additional Comments From [EMAIL PROTECTED]  2004-09-17 23:07 ---
I agree with most of the points you make; however, portability is a non-issue 
for my client in this particular case, although I agree with the concept.

I've gone into the code and attempted to use the Java types instead, but it 
doesn't work when I need to pass a cursor to an Oracle stored proc, so it 
doesn't look like I can decouple the two.  I do however, understand the issue 
more clearly now, and hopefully anyone else who comes across this will too.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 30085] - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2004-09-17 15:36 ---
First, I don't buy that you have to include the vendor-specific JAR in general 
to call stored procs: we call stored procs all the time using just the methods 
and types in the java.sql package.  To do otherwise of course ties you to the 
DB vendor and limits portability.  But I can see this being a requirement in a 
specific case such as yours.

To the VM, oracle.sql.BLOB loaded in one classloader is different from 
oracle.sql.BLOB loaded in another classloader.  This is a VM issue, not a 
Tomcat one.  You can read more about in the JLS if you want.  Tomcat's 
ClassLoader model (delegation and all) is dictated by the Servlet 
Specification.  Things loaded in the common classloader cannot see things 
loaded in the WEB-INF classloaders, it's not our choice as Tomcat implementors, 
it's mandated by the Spec.

Here's one workaround: if you must include the Oracle jar in WEB-INF/lib, put 
the DBCP (and commons-pool) jars there as well, and configure your own 
connection pooling instead of using Tomcat's.  This is trivial to do and 
ensures greater portability for your app.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 30085] - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2004-09-17 15:25 ---
I've encountered this issue while doing some development with Oracle and Tomcat
as well, and believe it is a valid issue:

1)  My code will not compile without the Oracle jar file included in the
project; when you call stored procs, you have to say what kind of paramters
you're passing in and out, thus requiring jar file inclusion in the project.

2) Tomcat needs the jar file to create the pooled connections.

3) These are loaded with separate classloaders (for obvious reasons), and it
should be a supported configuration in Tomcat.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 30085] - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-07-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib





--- Additional Comments From [EMAIL PROTECTED]  2004-07-13 19:49 ---
Moreover, what is the reason that DBCP is using classes from /common/lib by
default?  My webapp configures DBCP in the webapp's  -- seems to me
that the webapp's Oracle classes should be loaded instead.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 30085] - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-07-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib





--- Additional Comments From [EMAIL PROTECTED]  2004-07-13 19:30 ---
DBCP uses classes from common/lib
WebApp uses classes from WEB-INF/lib

Those two are the same and I don't understand why a ClassCastException is
thrown: I am casting to the right class.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 30085] - ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and [webapp]/lib

2004-07-13 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30085

ClassCastException using Oracle BLOB if Oracle JDBC jar is in both /common/lib and 
[webapp]/lib

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2004-07-13 18:38 ---
Well, duh, what do you think DBCP will be using ?
And since there's no delegation in the CL (by default), your webapp will use
that other class in /WEB-INF/lib.
-> classcast

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]