You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(55) |
Mar
(100) |
Apr
(203) |
May
(330) |
Jun
(190) |
Jul
(302) |
Aug
(323) |
Sep
(197) |
Oct
(245) |
Nov
(490) |
Dec
(330) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(194) |
Feb
(400) |
Mar
(416) |
Apr
(415) |
May
(359) |
Jun
(381) |
Jul
(491) |
Aug
(311) |
Sep
(291) |
Oct
(273) |
Nov
(355) |
Dec
(266) |
| 2005 |
Jan
(306) |
Feb
(303) |
Mar
(520) |
Apr
(346) |
May
(255) |
Jun
(221) |
Jul
(171) |
Aug
(247) |
Sep
(147) |
Oct
(125) |
Nov
(165) |
Dec
(65) |
| 2006 |
Jan
(90) |
Feb
(53) |
Mar
(121) |
Apr
(103) |
May
(113) |
Jun
(103) |
Jul
(104) |
Aug
(67) |
Sep
(78) |
Oct
(82) |
Nov
(78) |
Dec
(70) |
| 2007 |
Jan
(77) |
Feb
(76) |
Mar
(63) |
Apr
(30) |
May
(47) |
Jun
(41) |
Jul
(44) |
Aug
(44) |
Sep
(49) |
Oct
(33) |
Nov
(25) |
Dec
(21) |
| 2008 |
Jan
(45) |
Feb
(13) |
Mar
(15) |
Apr
(12) |
May
(9) |
Jun
(33) |
Jul
(30) |
Aug
(7) |
Sep
(20) |
Oct
(17) |
Nov
(20) |
Dec
(10) |
| 2009 |
Jan
(8) |
Feb
(5) |
Mar
(12) |
Apr
(17) |
May
(19) |
Jun
(97) |
Jul
(77) |
Aug
(33) |
Sep
(24) |
Oct
(41) |
Nov
(16) |
Dec
(32) |
| 2010 |
Jan
(24) |
Feb
(14) |
Mar
(50) |
Apr
(71) |
May
(70) |
Jun
(64) |
Jul
(45) |
Aug
(62) |
Sep
(32) |
Oct
(4) |
Nov
(12) |
Dec
(2) |
| 2011 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(6) |
Jun
(1) |
Jul
(4) |
Aug
(3) |
Sep
(4) |
Oct
(6) |
Nov
(3) |
Dec
(3) |
| 2012 |
Jan
(4) |
Feb
(8) |
Mar
(6) |
Apr
(10) |
May
(2) |
Jun
(3) |
Jul
(11) |
Aug
(10) |
Sep
(4) |
Oct
|
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
(9) |
Apr
(1) |
May
(8) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(10) |
Dec
(8) |
| 2014 |
Jan
(3) |
Feb
(12) |
Mar
(9) |
Apr
(12) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(2) |
| 2015 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(9) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(7) |
Oct
(9) |
Nov
(7) |
Dec
(9) |
| 2016 |
Jan
(7) |
Feb
(5) |
Mar
(5) |
Apr
(5) |
May
(8) |
Jun
(4) |
Jul
(5) |
Aug
(4) |
Sep
(6) |
Oct
(7) |
Nov
(2) |
Dec
(3) |
| 2017 |
Jan
(7) |
Feb
(8) |
Mar
(7) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(5) |
Aug
(8) |
Sep
(4) |
Oct
(2) |
Nov
(3) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
(5) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2026 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <jue...@we...> - 2004-06-01 15:55:20
|
Unfortunately Guillaume told me about a performance issues that has been = introduce with the garbage collection fixes - at 1:00 AM. I've = integrated and tested his fix already, but wasn't able to do the actual = release anymore - at 3:45 AM. I've had an external workshop today, so = can only do the release tonight. BTW, Brandon, have you had a chance to check out the refined iBATIS SQL = Maps 2.0 support from CVS? Juergen -----Original Message----- From: spr...@li... on behalf of = tho...@tr... Sent: Tue 6/1/2004 4:25 PM To: spr...@li... Subject: Re: [Springframework-developer] release? =20 Brandon, There's always that last fix that you want to squeeze in :-). The last = word from Juergen was that it is definitely going to happen later today. Thomas Quoting Brandon Goodin <ma...@ph...>: > Didn't I read something about a release that was supposed to go out > yesterday? :D > > > > Brandon Goodin > > ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. = Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Torsten J. <tju...@ya...> - 2004-06-01 14:55:46
|
Haris, the CVS head version of Spring IDE is not complete right now. I have to sync CVS head with my local version of v1.0.3 this week (it takes very long with an 56k analog modem :-( yes, no DSL yet). Meanwhile you can use the labled version 1.0.1. This version is complete and tested with M8. Just curious, why do you need the CVS version of Spring IDE? Cheers, Torsten --- snpe <sn...@sn...> wrote: > Hello, > I try compile spring-ide with eclipse (M9 RC1), > but I haven't classes > BeansViewSorter, BeansViewLabelDecorater > > Is cvs spring-ide complete for M9 ? > > regards > Haris Peco > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the > market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the > exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ |
|
From: <tho...@tr...> - 2004-06-01 14:25:40
|
Brandon, There's always that last fix that you want to squeeze in :-). The last word from Juergen was that it is definitely going to happen later today. Thomas Quoting Brandon Goodin <ma...@ph...>: > Didn't I read something about a release that was supposed to go out > yesterday? :D > > > > Brandon Goodin > > |
|
From: Brandon G. <ma...@ph...> - 2004-06-01 14:09:57
|
Didn't I read something about a release that was supposed to go out yesterday? :D Brandon Goodin |
|
From: Mike Cannon-B. <mca...@gm...> - 2004-06-01 07:18:12
|
I just tried to reproduce it with our code against CVS HEAD and can't replicate it. Against 1.0.1 I can replicate it every time though. Should I just assume it's fixed in Spring CVS HEAD and therefore will be fixed in the next release? Cheers, Mike=20 On Fri, 28 May 2004 14:55:29 +0200, j=FCrgen h=F6ller [werk3AT] <jue...@we...> wrote: >=20 > Mike, >=20 > Your approach seems to be perfectly OK. I've just tried to reproduce your= issue but wasn't able to: I always get a single instance, no matter if imp= lementing ApplicationListener or not. Could you double-check the effect, an= d possibly send a minimal test case that reproduces the problem? >=20 > Juergen >=20 > ________________________________ >=20 > Von: spr...@li... im Auftrag von= Mike Cannon-Brookes > Gesendet: Fr 28.05.2004 08:39 > An: Spring Developer > Betreff: [Springframework-developer] Strange 'double' singleton bug >=20 >=20 >=20 >=20 > I'm not sure if this is a bug or not, it's certainly strange behaviour. >=20 > We had a singleton bean that was operating normally, but when we make > it implement ApplicationListener - we get _two_ instances of it > created. (Tested by simply putting a debug point in the constructor - > two separate beans are created) >=20 > Here's the config snippet: >=20 > <bean id=3D"macroManager" > class=3D"com.atlassian.renderer.macro.DefaultMacroManager"> > <constructor-arg> > <ref local=3D"macroStateStore"/> > </constructor-arg> > <constructor-arg> > <list> > <ref local=3D"beanMacroLoader"/> > <ref local=3D"classpathMacroLoader"/> > </list> > </constructor-arg> > </bean> >=20 > Is this a known bug, a feature or am I not meant to use > ApplicationListener this way? (if it's a bug it's quite serious I'd > say) >=20 > I want to do it this way because another part of Confluence fires an > event to say that all setup has finished - and I want this bean to > listen for that event and further initialize itself. >=20 > I just guessed that in Spring I would just need to implement the > ApplicationListener interface and listen for events - if I need to do > anything else, let me know :) >=20 > Cheers, > Mike >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: <jue...@we...> - 2004-06-01 06:20:34
|
If you can make sure that it works on Weblogic 8.1 at least, I'd suggest =
to put it into the main codebase right away. There's not much than can =
break other than compatibility with other Weblogic versions (which we =
don't claim with this version).
=20
Gonna be offline for a couple of hours now, as I have an external =
workshop today. Will - finally! - create the actual release tonight, if =
there are no further critical issues ahead...
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Thomas Risberg
Gesendet: Di 01.06.2004 05:20
An: spr...@li...
Betreff: Re: [Springframework-developer] OracleLobCreator
Bronwen,
This was a good exercise. Thanks for your help tracking things down. I
have added a WebLogicNativeJdbcExtractor that uses reflection. We
probably should test this in WLS 6.1 and 7.0 as well.
Juergen - do you want to wait for 1.0.3 so we have more time to test and
refine it. It's in the sandbox for now.
Thomas
Bronwen Cassidy wrote:
>The last message, I got it :-) now I just want to laugh.. the method to =
get
>the native driver is:
>
>// con is cast to weblogic.jdbc.wrapper.PoolConnection, this returns =
the
>oracle.jdbc.OracleConnection and from there it all works, now to figure =
out
>all the others :-)
>public Connection getNativeConnection(Connection con) throws =
SQLException {
> PoolConnection pConnection =3D (PoolConnection) con;
> return pConnection.getVendorConnection();
> }
>
>I am happy to send this to you, problem would be it would need =
weblogic.jar
>:-( as it is specific cast, unless I used reflection, let me know what =
you
>would like, send it, use reflection etc etc.
>
>And a million thanx for all your help
>All the best to spring
>Bronwen
>
>-----Original Message-----
>From: spr...@li...
>[mailto:spr...@li...] On =
Behalf Of
>j=FCrgen h=F6ller [werk3AT]
>Sent: 31 May 2004 23:39
>To: spr...@li...
>Subject: Re: [Springframework-developer] OracleLobCreator
>
>OK, seems like Weblogic's pool is among the ones that completely wrap =
all
>JDBC objects: You don't even get the native Connection on
>getMetaData().getConnection()...
>
>So I'm afraid you'll have to write a WeblogicNativeJdbcExtractor that =
knows
>how to unwrap weblogic.jdbc.wrapper.PoolConnection. Check the latter's
>signatures: Does it have a method like "getPhysicalConnection()"? Such =
a
>method would be that basis for implementing getNativeConnection.
>
>Juergen
>
>
>________________________________
>
>Von: spr...@li... im Auftrag =
von
>Bronwen Cassidy
>Gesendet: Di 01.06.2004 01:20
>An: spr...@li...
>Betreff: RE: [Springframework-developer] re: OracleLobCreator
>
>
>
>Hi,
>If I understand your question, OracleLobHandler works in a test case =
without
>weblogics pool, only using the oracle.jdbc.pool.OracleDataSource =
datasource
>bean defined as:
><bean id=3D"dataSource" class=3D"oracle.jdbc.pool.OracleDataSource">
> <property
>name=3D"driverType"><value>oracle.jdbc.OracleDriver</value></property>
> <property
>name=3D"URL"><value>jdbc:oracle:thin:@localhost:1521:ROBIN</value></prop=
erty>
> <property =
name=3D"user"><value>talentstudio</value></property>
> <property
>name=3D"password"><value>talentstudio</value></property>
> </bean>
>In deployment I have set up a weblogic pool using oracle thin driver, =
not a
>weblogic oracle driver.
>
>So from what I can determine weblogic pool + oracle driver +
>oracleLobHandler throws the exception and
>Oracle jdbc pool + oracleLobHandler (as in test case) works.
>
>The printouts:
>
>template.getDataSource().getConnection()=3D
>weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection=
@112
>
>connection.getMetaData().getConnection() =3D
>weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection=
@112
>
>-----Original Message-----
>From: spr...@li...
>[mailto:spr...@li...] On =
Behalf Of
>j=FCrgen h=F6ller [werk3AT]
>Sent: 31 May 2004 22:52
>To: spr...@li...
>Subject: Re: [Springframework-developer] re: OracleLobCreator
>
>Can you check what kind of wrappers the DataSource returns? Simply =
fetch the
>DataSource, invoke getConnection() and see what kind of handle it =
returns
>(System.out.println). Furthermore, invoke
>getConnection().getMetaData().getConnection() and see whether this is =
the
>native Connection (System.out.println again).
>
>However, if you have properly specified SimpleNativeJdbcExtractor for
>OracleLobHandler's "nativeJdbcExtractor" property and still get that
>exception, then I assume that Weblogic's own Oracle JDBC driver doesn't =
use
>the OracleConnection class at all. This would mean that =
OracleLobHandler
>cannot be used with it.
>
>Do I understand correctly that OracleLobHandler plus
>SimpleNativeJdbcExtractor work properly with Oracle's original JDBC =
driver
>plus Weblogic's connection pool?
>
>Juergen
>
>
>________________________________
>
>Von: spr...@li... im Auftrag =
von
>Bronwen Cassidy
>Gesendet: Di 01.06.2004 00:24
>An: spr...@li...
>Betreff: RE: [Springframework-developer] re: OracleLobCreator
>
>
>
>Hi,
>
>OK the results when changing the driver for the pool from =
jdbc:oracle:thin
>to: jdbc:weblogic:oracle using SimpleNativeJdbcExtractor
>
>
>Error:
>org.springframework.dao.DataAccessResourceFailureException: Could not =
create
>Oracle LOB; nested exception is org.springframework.dao.In
>validDataAccessApiUsageException: OracleLobHandler needs to work on
>oracle.jdbc.OracleConnection - specify a proper NativeJdbcExtractor
>
>org.springframework.dao.InvalidDataAccessApiUsageException: =
OracleLobHandler
>needs to work on oracle.jdbc.OracleConnection - specify a
>proper NativeJdbcExtractor
> at
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.g=
etOr
>acleConnection(OracleLobHandler.java:366)
> at
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.c=
reat
>eLob(OracleLobHandler.java:336)
> at
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.s=
etCl
>obAsString(OracleLobHandler.java:264)
> at
>com.zynap.talentstudio.dao.jdbc.oracle.datamanipulation.PortfolioDataMan=
ipul
>ation$1.setValues(PortfolioDataManipulation.java
>:50)
> at
>org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStateme=
ntCa
>llback.doInPreparedStatement(AbstractLobCreating
>PreparedStatementCallback.java:71)
> at
>org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:292=
)
> at
>org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:308=
)
>
>-----Original Message-----
>From: spr...@li...
>[mailto:spr...@li...] On =
Behalf Of
>tho...@tr...
>Sent: 31 May 2004 21:47
>To: spr...@li...
>Subject: Re: [Springframework-developer] re: OracleLobCreator
>
>
>I was finally able to reproduce the error in my own environment using =
Spring
>1.0.1. I will try 1.0.2 (current CVS) and see what happens.
>
>Thomas
>
>
>Here is my stack trace:
>
>org.springframework.dao.DataAccessResourceFailureException: Could not =
create
>Oracle LOB; nested exception is java.lang.ClassCastException: null
>java.lang.ClassCastException
> at
>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
va:5
>090)
> at
>oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConne=
ctio
>n.java:5141)
> at oracle.sql.CLOB.createTemporary(CLOB.java:1009)
> at oracle.sql.CLOB.createTemporary(CLOB.java:956)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav=
a:39
>)
> at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor=
Impl
>.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.p=
repa
>reLob(OracleLobHandler.java:375)
> at
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.c=
reat
>eLob(OracleLobHandler.java:327)
> at
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.s=
etCl
>obAsString(OracleLobHandler.java:255)
> at org.buggybean.web.TestServlet.doGet(TestServlet.java:94)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se=
rvle
>tStubImpl.java:971)
> at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.=
java
>:402)
> at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.=
java
>:305)
> at
>weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r=
un(W
>ebAppServletContext.java:6350)
> at
>weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu=
bjec
>t.java:317)
> at
>weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118=
)
> at
>weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl=
etCo
>ntext.java:3635)
> at
>weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.=
java
>:2585)
> at =
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>
>
>
>
>Quoting "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>:
>
>=20
>
>>Changing the pool should just affect the NativeJdbcExtractor choice, =
=3D
>>i.e. a different bean wired to OracleLobHandler's =
"nativeJdbcExtractor" =3D
>>property.
>>=3D20
>>Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
=3D
>>good chance that it will work, avoiding the need for a specific =
Weblogic =3D
>>implementation of the NativeJdbcExtractor interface.
>>=3D20
>>As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =3D
>>Commons DBCP too, avoiding the need for a different =
NativeJdbcExtractor =3D
>>configuration when switching between Commons DBCP and another pool.
>>=3D20
>>Side note: The new version of SimpleNativeJdbcExtractor will also work =
=3D
>>with C3P0. This allows the use of C3P0's ComboPooledDataSource as =
direct =3D
>>replacement of Commons DBCP's BasicDataSource.
>>=3D20
>>Juergen
>>=3D20
>>
>>________________________________
>>
>>Von: spr...@li... im Auftrag =
=3D
>>von Bronwen Cassidy
>>Gesendet: Mo 31.05.2004 22:25
>>An: spr...@li...
>>Betreff: Re: [Springframework-developer] re: OracleLobCreator
>>
>>
>>
>>Hi
>>I have no concern as to the pool i use, i am actually
>>completely ignorant and have been blindly feeling my
>>way using the spring test cases, samples, docs and
>>some googling, until 4 months ago i had never used
>>oracle and until a week ago i did not need to do more
>>than work out db agnostic sql queries :-)
>>
>>so please i am more than happy to use weblogic pool,
>>which i am using when the app is deployed, hence the
>>test time passes and deploy time failures most
>>likely!! I am guessing the changes are needed in the
>>nativeJdbcExtractor class in the spring.xml needs to
>>point to a weblogic equivalent??
>>
>> --- Thomas Risberg <tho...@tr...> wrote:
>> =20
>>
>>>Since you are using the Commons DBCP rather than a
>>>WebLogic pool the
>>>issue is slightly different. We have to figure out
>>>why the connection
>>>returned from the DBCP pool is not unwrapped
>>>properly.
>>>
>>>Thomas
>>>
>>>
>>>Bronwen Cassidy wrote:
>>>
>>> =20
>>>
>>>>Thank-you Jurgen
>>>>This was the approach i had come to conclude as the
>>>>only difference between passing test case and
>>>> =20
>>>>
>>>failing
>>> =20
>>>
>>>>deployed app is the connection pool handled by
>>>>weblogic , ahh well another trip into the unknown,
>>>> =20
>>>>
>>>the
>>> =20
>>>
>>>>best part of being a developer ;-)
>>>>
>>>>regards
>>>>Bronwen
>>>>
>>>>--- j=3DFCrgen_h=3DF6ller_[werk3AT]
>>>><jue...@we...> wrote: >
>>>>OracleLobHandler needs to work on a native
>>>>=3D20
>>>>
>>>> =20
>>>>
>>>>>OracleConnection as it comes from the driver. The
>>>>>usual problem in that respect is not the driver
>>>>> =20
>>>>>
>>>but
>>> =20
>>>
>>>>>the connection pool: Every connection pool needs
>>>>> =20
>>>>>
>>>to
>>> =20
>>>
>>>>>wrap native connections with pooled connections
>>>>> =20
>>>>>
>>>that
>>> =20
>>>
>>>>>at least have different closing behavior.
>>>>>
>>>>>To address this, OracleLobHandler has the
>>>>>"nativeJdbcExtractor" property, taking an
>>>>>implementation of Spring's NativeJdbcExtractor
>>>>>interface. Spring includes out-of-the-box
>>>>>implementations for Commons DBCP, XAPool, and
>>>>> =20
>>>>>
>>>JBoss.
>>> =20
>>>
>>>>>I guess what you need to do is write such an
>>>>>extractor for Weblogic.
>>>>>
>>>>>What's odd about your exception is that
>>>>>OracleLobCreator does not complain that it doesn't
>>>>>receive an OracleConnection (there's an explicit
>>>>>check in there). It seems to get a wrapped
>>>>>connection that is still assignable to
>>>>>OracleConnection, although it's not the native
>>>>>OracleConnection from the driver...
>>>>>
>>>>>Maybe Weblogic uses some special way of pooling
>>>>>connections for the Oracle driver, using poolable
>>>>>OracleConnections? The getPhysicalConnection
>>>>> =20
>>>>>
>>>method
>>> =20
>>>
>>>>>will probably be in the OracleConnection class,
>>>>> =20
>>>>>
>>>not
>>> =20
>>>
>>>>>in the CLOB class. Try writing a
>>>>> =20
>>>>>
>>>NativeJdbcExtractor
>>> =20
>>>
>>>>>that unwraps an OracleConnection with that method.
>>>>> =20
>>>>>
>>>>>Juergen
>>>>>
>>>>>
>>>>>________________________________
>>>>>
>>>>>Von:
>>>>>
>>>>> =3D20
>>>>>
>>>>> =20
>>>>>
>>>spr...@li...
>>> =20
>>>
>>>>=3D20
>>>>
>>>> =20
>>>>
>>>>>im Auftrag von Bronwen Cassidy
>>>>>Gesendet: Mo 31.05.2004 04:27
>>>>>An:
>>>>> =20
>>>>>
>>>spr...@li...
>>> =20
>>>
>>>>>Betreff: RE: [Springframework-developer] re:
>>>>>OracleLobCreator
>>>>>
>>>>>
>>>>>
>>>>>Hi I have:
>>>>>
>>>>>Weblogic 8 service pack 2
>>>>>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
>>>>>Oracle9i
>>>>>I have set up the connection pool using the
>>>>>jdbc:oracle:thin (oracle thin
>>>>>drivers (not weblogic ones)
>>>>>
>>>>>Actually I managed to find some information (very
>>>>>little) one from a
>>>>>hibernate mail, suggested using the
>>>>>getPhysicalConnection() instead of
>>>>>createTemporary, but this method does not seem to
>>>>>available on the CLOB
>>>>>class??
>>>>>
>>>>>-----Original Message-----
>>>>>From:
>>>>>
>>>>> =3D20
>>>>>
>>>>> =20
>>>>>
>>>spr...@li...
>>> =20
>>>
>>>>=3D20
>>>>
>>>> =20
>>>>
>>>[mailto:spr...@li...]
>>> =20
>>>
>>>>=3D20
>>>>
>>>> =20
>>>>
>>>>>On Behalf Of
>>>>>Thomas Risberg
>>>>>Sent: 31 May 2004 02:09
>>>>>To:
>>>>> =20
>>>>>
>>>spr...@li...
>>> =20
>>>
>>>>>Subject: Re: [Springframework-developer] re:
>>>>>OracleLobCreator
>>>>>
>>>>>Bronwen,
>>>>>
>>>>>In order to pinpoint the problem quicker - what
>>>>>version of WebLogic,
>>>>>Oracle and JDBC drivers are you using?
>>>>>
>>>>>Thomas
>>>>>
>>>>>Bronwen Cassidy wrote:
>>>>>
>>>>> =3D20
>>>>>
>>>>> =20
>>>>>
>>>>>>Hi I have a CLOB column in oracle and in the test
>>>>>> =3D20
>>>>>>
>>>>>> =20
>>>>>>
>>>>>there are no
>>>>> =3D20
>>>>>
>>>>> =20
>>>>>
>>>>>>problems, unfortunately deploying to weblogic I
>>>>>> =3D20
>>>>>>
>>>>>> =20
>>>>>>
>>>>>get the exception
>>>>> =3D20
>>>>>
>>>>> =20
>>>>>
>>>>>>below. We are using classes12.jar whereas
>>>>>> =20
>>>>>>
>>>weblogic
>>> =20
>>>
>>>>>> =3D20
>>>>>>
>>>>>> =20
>>>>>>
>>>>>uses ojdbc14.jar, I
>>>>> =3D20
>>>>>
>>>>> =20
>>>>>
>>>>>>firstly replaced weblogics jars and classpath
>>>>>> =3D20
>>>>>>
>>>>>> =20
>>>>>>
>>>>>settings to use the
>>>>> =3D20
>>>>>
>>>>> =20
>>>>>
>>>>>>classes12.jar, but got the same error, so I
>>>>>> =20
>>>>>>
>>>pulled
>>> =20
>>>
>>>>>> =3D20
>>>>>>
>>>>>> =20
>>>>>>
>>>>>weblogic oracle jar
>>>>> =3D20
>>>>>
>>>>> =20
>>>>>
>>>>>>into my test classpath to test if the problem was
>>>>>> =3D20
>>>>>>
>>>>>> =20
>>>>>>
>>>>>with the jars but
>>>>> =3D20
>>>>>
>>>>> =20
>>>>>
>>>>>>the test worked fine ?? I am really stuck as to
>>>>>> =3D20
>>>>>>
>>>>>> =20
>>>>>>
>>>>>whom this should go to
>>>>> =3D20
>>>>>
>>>>> =20
>>>>>
>>>>>>weblogic, oracle, or . I am hoping there is an
>>>>>> =3D20
>>>>>>
>>>>>> =20
>>>>>>
>>>>>expert there who can
>>>>> =3D20
>>>>>
>>>>> =20
>>>>>
>>>>>>shed some light. Google did not have a single
>>>>>> =3D20
>>>>>>
>>>>>> =20
>>>>>>
>>>>>match for variations of
>>>>> =3D20
>>>>>
>>>>> =20
>>>>>
>>>>>>the first 2 lines!!
>>>>>>
>>>>>>java.lang.ClassCastException
>>>>>>
>>>>>>at
>>>>>>
>>>>>> =3D20
>>>>>>
>>>>>> =20
>>>>>>
>>>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.=
ja=3D
>>> =20
>>>
>>va:5
>> =20
>>
>>>>=3D20
>>>> =20
>>>>
>>=3D3D=3D3D=3D3D message truncated =3D3D=3D3D=3D3D
>>
>>
>> =3D20
>> =3D20
>> =3D20
>>____________________________________________________________
>>Yahoo! Messenger - Communicate instantly..."Ping"
>>your friends today! Download Messenger Now
>>http://uk.messenger.yahoo.com/download/index.html
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by: Oracle 10g
>>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>>Take an Oracle 10g class now, and we'll give you the exam FREE.
>>http://ads.osdn.com/?ad_id=3D3D3149&alloc_id=3D3D8166&op=3D3Dclick
>>_______________________________________________
>>Springframework-developer mailing list
>>Spr...@li...
>>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>
>>
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by: Oracle 10g
>>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>>Take an Oracle 10g class now, and we'll give you the exam FREE.
>>http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
>>_______________________________________________
>>Springframework-developer mailing list
>>Spr...@li...
>>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>
>> =20
>>
>
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle =
10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>=20
>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Thomas R. <tho...@tr...> - 2004-06-01 03:20:53
|
Bronwen,
This was a good exercise. Thanks for your help tracking things down. I
have added a WebLogicNativeJdbcExtractor that uses reflection. We
probably should test this in WLS 6.1 and 7.0 as well.
Juergen - do you want to wait for 1.0.3 so we have more time to test and
refine it. It's in the sandbox for now.
Thomas
Bronwen Cassidy wrote:
>The last message, I got it :-) now I just want to laugh.. the method to get
>the native driver is:
>
>// con is cast to weblogic.jdbc.wrapper.PoolConnection, this returns the
>oracle.jdbc.OracleConnection and from there it all works, now to figure out
>all the others :-)
>public Connection getNativeConnection(Connection con) throws SQLException {
> PoolConnection pConnection = (PoolConnection) con;
> return pConnection.getVendorConnection();
> }
>
>I am happy to send this to you, problem would be it would need weblogic.jar
>:-( as it is specific cast, unless I used reflection, let me know what you
>would like, send it, use reflection etc etc.
>
>And a million thanx for all your help
>All the best to spring
>Bronwen
>
>-----Original Message-----
>From: spr...@li...
>[mailto:spr...@li...] On Behalf Of
>jürgen höller [werk3AT]
>Sent: 31 May 2004 23:39
>To: spr...@li...
>Subject: Re: [Springframework-developer] OracleLobCreator
>
>OK, seems like Weblogic's pool is among the ones that completely wrap all
>JDBC objects: You don't even get the native Connection on
>getMetaData().getConnection()...
>
>So I'm afraid you'll have to write a WeblogicNativeJdbcExtractor that knows
>how to unwrap weblogic.jdbc.wrapper.PoolConnection. Check the latter's
>signatures: Does it have a method like "getPhysicalConnection()"? Such a
>method would be that basis for implementing getNativeConnection.
>
>Juergen
>
>
>________________________________
>
>Von: spr...@li... im Auftrag von
>Bronwen Cassidy
>Gesendet: Di 01.06.2004 01:20
>An: spr...@li...
>Betreff: RE: [Springframework-developer] re: OracleLobCreator
>
>
>
>Hi,
>If I understand your question, OracleLobHandler works in a test case without
>weblogics pool, only using the oracle.jdbc.pool.OracleDataSource datasource
>bean defined as:
><bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource">
> <property
>name="driverType"><value>oracle.jdbc.OracleDriver</value></property>
> <property
>name="URL"><value>jdbc:oracle:thin:@localhost:1521:ROBIN</value></property>
> <property name="user"><value>talentstudio</value></property>
> <property
>name="password"><value>talentstudio</value></property>
> </bean>
>In deployment I have set up a weblogic pool using oracle thin driver, not a
>weblogic oracle driver.
>
>So from what I can determine weblogic pool + oracle driver +
>oracleLobHandler throws the exception and
>Oracle jdbc pool + oracleLobHandler (as in test case) works.
>
>The printouts:
>
>template.getDataSource().getConnection()=
>weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@112
>
>connection.getMetaData().getConnection() =
>weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@112
>
>-----Original Message-----
>From: spr...@li...
>[mailto:spr...@li...] On Behalf Of
>jürgen höller [werk3AT]
>Sent: 31 May 2004 22:52
>To: spr...@li...
>Subject: Re: [Springframework-developer] re: OracleLobCreator
>
>Can you check what kind of wrappers the DataSource returns? Simply fetch the
>DataSource, invoke getConnection() and see what kind of handle it returns
>(System.out.println). Furthermore, invoke
>getConnection().getMetaData().getConnection() and see whether this is the
>native Connection (System.out.println again).
>
>However, if you have properly specified SimpleNativeJdbcExtractor for
>OracleLobHandler's "nativeJdbcExtractor" property and still get that
>exception, then I assume that Weblogic's own Oracle JDBC driver doesn't use
>the OracleConnection class at all. This would mean that OracleLobHandler
>cannot be used with it.
>
>Do I understand correctly that OracleLobHandler plus
>SimpleNativeJdbcExtractor work properly with Oracle's original JDBC driver
>plus Weblogic's connection pool?
>
>Juergen
>
>
>________________________________
>
>Von: spr...@li... im Auftrag von
>Bronwen Cassidy
>Gesendet: Di 01.06.2004 00:24
>An: spr...@li...
>Betreff: RE: [Springframework-developer] re: OracleLobCreator
>
>
>
>Hi,
>
>OK the results when changing the driver for the pool from jdbc:oracle:thin
>to: jdbc:weblogic:oracle using SimpleNativeJdbcExtractor
>
>
>Error:
>org.springframework.dao.DataAccessResourceFailureException: Could not create
>Oracle LOB; nested exception is org.springframework.dao.In
>validDataAccessApiUsageException: OracleLobHandler needs to work on
>oracle.jdbc.OracleConnection - specify a proper NativeJdbcExtractor
>
>org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobHandler
>needs to work on oracle.jdbc.OracleConnection - specify a
>proper NativeJdbcExtractor
> at
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.getOr
>acleConnection(OracleLobHandler.java:366)
> at
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.creat
>eLob(OracleLobHandler.java:336)
> at
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setCl
>obAsString(OracleLobHandler.java:264)
> at
>com.zynap.talentstudio.dao.jdbc.oracle.datamanipulation.PortfolioDataManipul
>ation$1.setValues(PortfolioDataManipulation.java
>:50)
> at
>org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStatementCa
>llback.doInPreparedStatement(AbstractLobCreating
>PreparedStatementCallback.java:71)
> at
>org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:292)
> at
>org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:308)
>
>-----Original Message-----
>From: spr...@li...
>[mailto:spr...@li...] On Behalf Of
>tho...@tr...
>Sent: 31 May 2004 21:47
>To: spr...@li...
>Subject: Re: [Springframework-developer] re: OracleLobCreator
>
>
>I was finally able to reproduce the error in my own environment using Spring
>1.0.1. I will try 1.0.2 (current CVS) and see what happens.
>
>Thomas
>
>
>Here is my stack trace:
>
>org.springframework.dao.DataAccessResourceFailureException: Could not create
>Oracle LOB; nested exception is java.lang.ClassCastException: null
>java.lang.ClassCastException
> at
>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.java:5
>090)
> at
>oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnectio
>n.java:5141)
> at oracle.sql.CLOB.createTemporary(CLOB.java:1009)
> at oracle.sql.CLOB.createTemporary(CLOB.java:956)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
>)
> at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
>.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.prepa
>reLob(OracleLobHandler.java:375)
> at
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.creat
>eLob(OracleLobHandler.java:327)
> at
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setCl
>obAsString(OracleLobHandler.java:255)
> at org.buggybean.web.TestServlet.doGet(TestServlet.java:94)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
>tStubImpl.java:971)
> at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
>:402)
> at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
>:305)
> at
>weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
>ebAppServletContext.java:6350)
> at
>weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
>t.java:317)
> at
>weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
> at
>weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
>ntext.java:3635)
> at
>weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
>:2585)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>
>
>
>
>Quoting "jürgen höller [werk3AT]" <jue...@we...>:
>
>
>
>>Changing the pool should just affect the NativeJdbcExtractor choice, =
>>i.e. a different bean wired to OracleLobHandler's "nativeJdbcExtractor" =
>>property.
>>=20
>>Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
>>good chance that it will work, avoiding the need for a specific Weblogic =
>>implementation of the NativeJdbcExtractor interface.
>>=20
>>As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =
>>Commons DBCP too, avoiding the need for a different NativeJdbcExtractor =
>>configuration when switching between Commons DBCP and another pool.
>>=20
>>Side note: The new version of SimpleNativeJdbcExtractor will also work =
>>with C3P0. This allows the use of C3P0's ComboPooledDataSource as direct =
>>replacement of Commons DBCP's BasicDataSource.
>>=20
>>Juergen
>>=20
>>
>>________________________________
>>
>>Von: spr...@li... im Auftrag =
>>von Bronwen Cassidy
>>Gesendet: Mo 31.05.2004 22:25
>>An: spr...@li...
>>Betreff: Re: [Springframework-developer] re: OracleLobCreator
>>
>>
>>
>>Hi
>>I have no concern as to the pool i use, i am actually
>>completely ignorant and have been blindly feeling my
>>way using the spring test cases, samples, docs and
>>some googling, until 4 months ago i had never used
>>oracle and until a week ago i did not need to do more
>>than work out db agnostic sql queries :-)
>>
>>so please i am more than happy to use weblogic pool,
>>which i am using when the app is deployed, hence the
>>test time passes and deploy time failures most
>>likely!! I am guessing the changes are needed in the
>>nativeJdbcExtractor class in the spring.xml needs to
>>point to a weblogic equivalent??
>>
>> --- Thomas Risberg <tho...@tr...> wrote:
>>
>>
>>>Since you are using the Commons DBCP rather than a
>>>WebLogic pool the
>>>issue is slightly different. We have to figure out
>>>why the connection
>>>returned from the DBCP pool is not unwrapped
>>>properly.
>>>
>>>Thomas
>>>
>>>
>>>Bronwen Cassidy wrote:
>>>
>>>
>>>
>>>>Thank-you Jurgen
>>>>This was the approach i had come to conclude as the
>>>>only difference between passing test case and
>>>>
>>>>
>>>failing
>>>
>>>
>>>>deployed app is the connection pool handled by
>>>>weblogic , ahh well another trip into the unknown,
>>>>
>>>>
>>>the
>>>
>>>
>>>>best part of being a developer ;-)
>>>>
>>>>regards
>>>>Bronwen
>>>>
>>>>--- j=FCrgen_h=F6ller_[werk3AT]
>>>><jue...@we...> wrote: >
>>>>OracleLobHandler needs to work on a native
>>>>=20
>>>>
>>>>
>>>>
>>>>>OracleConnection as it comes from the driver. The
>>>>>usual problem in that respect is not the driver
>>>>>
>>>>>
>>>but
>>>
>>>
>>>>>the connection pool: Every connection pool needs
>>>>>
>>>>>
>>>to
>>>
>>>
>>>>>wrap native connections with pooled connections
>>>>>
>>>>>
>>>that
>>>
>>>
>>>>>at least have different closing behavior.
>>>>>
>>>>>To address this, OracleLobHandler has the
>>>>>"nativeJdbcExtractor" property, taking an
>>>>>implementation of Spring's NativeJdbcExtractor
>>>>>interface. Spring includes out-of-the-box
>>>>>implementations for Commons DBCP, XAPool, and
>>>>>
>>>>>
>>>JBoss.
>>>
>>>
>>>>>I guess what you need to do is write such an
>>>>>extractor for Weblogic.
>>>>>
>>>>>What's odd about your exception is that
>>>>>OracleLobCreator does not complain that it doesn't
>>>>>receive an OracleConnection (there's an explicit
>>>>>check in there). It seems to get a wrapped
>>>>>connection that is still assignable to
>>>>>OracleConnection, although it's not the native
>>>>>OracleConnection from the driver...
>>>>>
>>>>>Maybe Weblogic uses some special way of pooling
>>>>>connections for the Oracle driver, using poolable
>>>>>OracleConnections? The getPhysicalConnection
>>>>>
>>>>>
>>>method
>>>
>>>
>>>>>will probably be in the OracleConnection class,
>>>>>
>>>>>
>>>not
>>>
>>>
>>>>>in the CLOB class. Try writing a
>>>>>
>>>>>
>>>NativeJdbcExtractor
>>>
>>>
>>>>>that unwraps an OracleConnection with that method.
>>>>>
>>>>>
>>>>>Juergen
>>>>>
>>>>>
>>>>>________________________________
>>>>>
>>>>>Von:
>>>>>
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>spr...@li...
>>>
>>>
>>>>=20
>>>>
>>>>
>>>>
>>>>>im Auftrag von Bronwen Cassidy
>>>>>Gesendet: Mo 31.05.2004 04:27
>>>>>An:
>>>>>
>>>>>
>>>spr...@li...
>>>
>>>
>>>>>Betreff: RE: [Springframework-developer] re:
>>>>>OracleLobCreator
>>>>>
>>>>>
>>>>>
>>>>>Hi I have:
>>>>>
>>>>>Weblogic 8 service pack 2
>>>>>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
>>>>>Oracle9i
>>>>>I have set up the connection pool using the
>>>>>jdbc:oracle:thin (oracle thin
>>>>>drivers (not weblogic ones)
>>>>>
>>>>>Actually I managed to find some information (very
>>>>>little) one from a
>>>>>hibernate mail, suggested using the
>>>>>getPhysicalConnection() instead of
>>>>>createTemporary, but this method does not seem to
>>>>>available on the CLOB
>>>>>class??
>>>>>
>>>>>-----Original Message-----
>>>>>From:
>>>>>
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>spr...@li...
>>>
>>>
>>>>=20
>>>>
>>>>
>>>>
>>>[mailto:spr...@li...]
>>>
>>>
>>>>=20
>>>>
>>>>
>>>>
>>>>>On Behalf Of
>>>>>Thomas Risberg
>>>>>Sent: 31 May 2004 02:09
>>>>>To:
>>>>>
>>>>>
>>>spr...@li...
>>>
>>>
>>>>>Subject: Re: [Springframework-developer] re:
>>>>>OracleLobCreator
>>>>>
>>>>>Bronwen,
>>>>>
>>>>>In order to pinpoint the problem quicker - what
>>>>>version of WebLogic,
>>>>>Oracle and JDBC drivers are you using?
>>>>>
>>>>>Thomas
>>>>>
>>>>>Bronwen Cassidy wrote:
>>>>>
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>>Hi I have a CLOB column in oracle and in the test
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>there are no
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>>problems, unfortunately deploying to weblogic I
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>get the exception
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>>below. We are using classes12.jar whereas
>>>>>>
>>>>>>
>>>weblogic
>>>
>>>
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>uses ojdbc14.jar, I
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>>firstly replaced weblogics jars and classpath
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>settings to use the
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>>classes12.jar, but got the same error, so I
>>>>>>
>>>>>>
>>>pulled
>>>
>>>
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>weblogic oracle jar
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>>into my test classpath to test if the problem was
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>with the jars but
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>>the test worked fine ?? I am really stuck as to
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>whom this should go to
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>>weblogic, oracle, or . I am hoping there is an
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>expert there who can
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>>shed some light. Google did not have a single
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>match for variations of
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>>the first 2 lines!!
>>>>>>
>>>>>>java.lang.ClassCastException
>>>>>>
>>>>>>at
>>>>>>
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
>>>
>>>
>>va:5
>>
>>
>>>>=20
>>>>
>>>>
>>=3D=3D=3D message truncated =3D=3D=3D
>>
>>
>> =20
>> =20
>> =20
>>____________________________________________________________
>>Yahoo! Messenger - Communicate instantly..."Ping"
>>your friends today! Download Messenger Now
>>http://uk.messenger.yahoo.com/download/index.html
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by: Oracle 10g
>>Get certified on the hottest thing ever to hit the market... Oracle 10g.
>>Take an Oracle 10g class now, and we'll give you the exam FREE.
>>http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
>>_______________________________________________
>>Springframework-developer mailing list
>>Spr...@li...
>>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>
>>
>>
>>
>>-------------------------------------------------------
>>This SF.Net email is sponsored by: Oracle 10g
>>Get certified on the hottest thing ever to hit the market... Oracle 10g.
>>Take an Oracle 10g class now, and we'll give you the exam FREE.
>>http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
>>_______________________________________________
>>Springframework-developer mailing list
>>Spr...@li...
>>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>
>>
>>
>
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle 10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle 10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id66&op=ick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle 10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id66&op=ick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle 10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id66&op=ick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle 10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id66&op=ick
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: Oracle 10g
>Get certified on the hottest thing ever to hit the market... Oracle 10g.
>Take an Oracle 10g class now, and we'll give you the exam FREE.
>http://ads.osdn.com/?ad_id149&alloc_id66&op=click
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
>
|
|
From: <jue...@we...> - 2004-06-01 01:48:39
|
I've just done several tests, and you're right. Garbage collections will =
quickly throw away the CachedIntrospectionResults objects, as it's not =
held in a strong reference anywhere else - just the class which is the =
key in the cache is, but that doesn't affect the WeakReference value... =
So I've just adopted your patch: keeping strong references if in a =
cache-safe classloader, using weak references else.
=20
I see why the JavaBeans Introspector was implemented that way... It's =
indeed not that simple to be both performant and ready for garbage =
collection. The JDK 1.5 solution sounds like a final solution for this =
issue. Up until then, we'll have to flush the Introspector cache =
accordingly. Our final solution of specific flushFromCaches calls and =
the strong/weak reference combo that results from your patch should =
represent the best compromise.
=20
Anyway, I'm too tired to upload the release now... it's already 3:45 AM =
here. Once again, we've managed to find yet another issue that delays =
for a day - at least it's already solved this time. I'll be really happy =
when that release is finally out... As I have an external workshop =
during the day, the actual release will happen tonight (in about 16 =
hours). Please, no crucial issues anymore ;-)
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Guillaume Poirier
Gesendet: Di 01.06.2004 00:58
An: spr...@li...
Betreff: Re: [Springframework-developer] Cleanup of context resources on =
webapp reload
Juergen,
I'm not sure I'm following you on this one, as far I as can tell,
CachedIntrospectionResults.forClass(Class) is only called in
BeanWrapperImpl, and the result is only kept in the BeanWrapper was =
instance
variable. So anytime a BeanWrapperImpl instance is collected, its
CachedIntrospectionResults would get collected too. Both the factories =
the
web controllers hold references only on the class, not the
CachedIntrospectionResults for that class, don't they? Holding a strong
reference on the former won't prevent garbage collecting on the latter. =
So
that means, most of the time when the garbage collector runs, you would =
need
to create the CachedIntrospectionResults again for any binding of
command/form in a web controller, creation of prototype beans in the
factory, use of BeanUtils.copyProperties(), direct use of =
BeanWrapperImpl,
etc.. I'm mostly guessing here, but I would think the performance hit =
could
be potentially significant.
But reading your post makes me think of something that I think would be =
the
best solution for those kind of memory leaks, except it would need to be
implemented within the JDK. The best would be to have kind of an =
equivalent
of ThreadLocal but for class. Have a HashMap in java.lang.Class, and =
e.g.
ClassReference (or a better name) holding a WeakReference on the target, =
and
placing the strong reference in the java.lang.Class's HashMap. May be =
I'll take a look at sun's bug list and suggest it. It looks like =
something that would work, doesn't it?
Guillaume
---- Messages d=B4origine ----
De: j=FCrgen h=F6ller [werk3AT] <jue...@we...>
Date: lundi, mai 31, 2004 7:08 am
Objet: Re: [Springframework-developer] Cleanup of context resources on =
webapp reload
> Guillaume,
>
> As far as I see, the only benefit that we would gain with such a
> classloader check is that we avoid recaching introspection results
> during application runtime, for the case where the garbage
> collector has eagerly removed them. However, the latter can only
> happen when there are no other references to the given Class: This
> won't be the case with typical Spring usage, as both bean
> factories and web command controllers (i.e. the main usages of
> BeanWrapper) hold a reference to the bean class respectively
> command class.
>
> And if there are no other references to a specific Class, I
> suppose the garbage collector is free to remove the cached
> introspection results for it; this can be considered a desirable
> thing. So I guess it's better to leave CachedIntrospectionResults
> as it is, as there's no noteworthy difference in all other
> respects. Do you see any negative impact on performance, given the
> scenario from above? Your earlier point comes to my mind here:
> It's also about a simple implementation that doesn't obscure the
> purpose of the code.
>
> Juergen
>
>
> ________________________________
>
> Von: spr...@li... im
> Auftrag von Guillaume Poirier
> Gesendet: Mo 31.05.2004 00:26
> An: spr...@li...
> Betreff: Re: [Springframework-developer] Cleanup of context
> resources on webapp reload
>
>
>
> Juergen,
>
> I think that Introspector.flushCaches() on a
> ServletContextListener it still
> the lesser of evils for that memory leak, the effect on other
> webapps would
> not be that bad anyway, just slow a little bit the next few calls to
> Introspector.getBeanInfo(). However, I agree with you that this
> shouldprobably be dealt with by the application rather than
> Spring. But may be it
> could be an option with Spring's ContextLoaderListener (probably
> off by
> default)?
>
> Concerning your solution with CachedIntrospectionResults, I would
> have a
> sugestion for performance. For the majority of the use cases,
> CachedIntrospectionResults would be in the same ClassLoader as the
> targetclass. So I would suggest to first check the ClassLoader to
> know if it's
> safe to cache the class without WeakReference. I've attached a
> patch to the
> E-Mail if you would like to include my suggestion.
>
> Thanks,
> Guillaume
>
> ----- Original Message -----
> From: "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>
> To: <spr...@li...>
> Sent: Sunday, May 30, 2004 11:09 AM
> Subject: Re: [Springframework-developer] Cleanup of context
> resources on
> webapp reload
>
>
> Guillaume,
>
> I'm using a profiler, explicitly running garbage collection after
> application shutdown and then seeing what remains on the heap.
> It's actually
> my first really instance profiler work for about two years;
> haven't had any
> need for it in the meantime.
>
> Anyway, I did some further tests today, changing
> SQLErrorCodesFactory and
> GlobalAdvisorAdapterRegistry to classic singletons again, with an
> Introspector.flushCaches call on shutdown. While this didn't have
> any effect
> with Petclinic, it did result in proper cleanup with Image Database.
>
> So the Introspector.flushCaches call *does* have some effect,
> contrary to my
> assumption from yesterday, but not in all scenarios. After some
> furthertests, I found out that Hibernate (-> Petclinic) has its
> own leaks, thus
> keeps the web app class loader around, thus no cleanup of Spring's
> singletons in that class loader. If Hibernate isn't used,
> everything gets
> cleaned up properly.
>
> This means that you're perfectly right: Coding singletons with
> WeakReferences only cleans up that particular singleton object but
> of course
> doesn't do anything about the class loader itself with its
> remaining leaks.
> As the code *is* uglier with WeakReferences, I've permanently changed
> SQLErrorCodesFactory and GlobalAdvisorAdapterRegistry back to classic
> singletons (like they were until a week ago).
>
> I'd like to leave CachedIntrospectionResults as-is with a
> WeakHashMap and
> WeakReferences, as this holds references to classes and might
> reside in a
> parent classloader of the referenced classes. That's how the JDK's
> Introspector class should be coded too...
>
> The remaining issue is: Where to invoke Introspector.flushCaches?
> EveryApplicationContext shutdown? How to avoid cleaning all
> BeanInfos *of the
> entire VM*, when all we want to do is clean up all BeanInfos of
> the current
> app?
> Sure, a general flushCaches call cleans up all BeanInfo leaks of
> the app
> too, be it from Spring or Quartz or whatever, but all we want to
> provideout-of-the-box is proper cleanup of Spring itself.
>
> So my solution for Spring is simple: CachedIntrospectionResults
> flushes the
> Introspector cache for the given class (and its superclasses)
> right after it
> fetched the BeanInfo for it (i.e. right after it's been cached).
> As we cache
> the introspection results ourselves anyway, we wouldn't benefit
> from the
> Introspector cache in the first place. That shouldn't have any
> negativeimpact on performance.
>
> I did quite a lot of tests with this new strategy, and everything gets
> cleaned up nicely within Spring. Just if you add Hibernate or
> Quartz to the
> mix, you'll get leaks from them that prevent the class loader from
> gettinggarbage collected. With Quartz, a general flushCaches call
> helps; with
> Hibernate, even that doesn't.
>
> So in certain scenarios, it might help to add a custom
> ServletContextListener that does an Introspector.flushCaches call on
> shutdown - but for Spring itself, this isn't necessary, as the beans
> infrastructure does not cause any leaks anymore. I'm happy with
> the current
> solution: classic singletons as before, just a flushFromCaches
> call for each
> introspected class right when building the CachedIntrospectionResults
> object.
>
> We should probably tell the Quartz guys to apply specific
> flushFromCachescalls after their Introspector usage. I've also
> noticed that JDOM, as used
> within iBATIS SQL Maps 1.3, has a resource leak too. I haven't
> researchedwhere the Hibernate leaks come from in detail, but the
> root of the problem
> seems to be CGLIB there.
>
> Many thanks for pointing this out! :-)
>
> Juergen
>
>
> ________________________________
>
> Von: spr...@li... im
> Auftrag von
> Guillaume Poirier
> Gesendet: So 30.05.2004 07:01
> An: spr...@li...
> Betreff: Re: [Springframework-developer] Cleanup of context
> resources on
> webapp reload
>
>
>
> Juergen, I'm curious about how exactly you assert what is leaking,
> what is
> not, and exactly what is it better with WeakReference? Are you
> using a
> profiler that tells you the non-garbage collected objects in the
> JVM or do
> you use other means?
>
> Concerning SQLErrorCodesFactory, while the class' constructor does
> cause a
> leak (indirectly by the use of XmlBeanFactory), it is not itself
> the leak,
> it's the class instance of SQLErrorCodes that prevent the
> ClassLoader'scollection. I did a test calling
> SQLErrorCodesFactory.getInstance().getErrorCodes("DB2") in a child
> ClassLoader, and it caused a leak when the ClassLoader is thrown
> away. Then
> I tried to create my own SQLErrorCodesFactory implementation, and
> it kept
> leaking until I stopped using the XmlBeanFactory to create the
> instances of
> SQLErrorCodes. Then I tried to just use an Introspector directly
> to set the
> properties on the SQLErrorCodes instances by reflection, and it
> leaked just
> as the SQLErrorCodesFactory. You have to keep in mind that if e.g.
> Introspector has an hard reference on SQLErrorCodes.class, then
> none of the
> class loaded by its ClassLoader can be collected. So it would be
> the cause
> of SQLErrorCodesFactory singleton to be kept alive, not because
> SQLFactoryErrorCodes has an hard reference on it, but because the
> ClassLoader does, and SQLErrorCodes.class has an hard reference on the
> ClassLoader, and the Introspector has an hard reference on
> SQLErrorCodes.class. So the singleton of SQLFactoryCodesFactory
> is really
> kept alive because Introspector has an hard reference on the class
> instanceof SQLErrorCodes.
>
> I might misunderstand the situation, but as I see it, you're
> working on the
> symptom rather than the cause. If you allow the singleton to be
> garbagecollected when the class itself is retained, then you might
> save some
> memory, but it's just like adding memory to the JVM to solve a
> leak, it will
> only delay the OutOfMemoryError, it won't prevent it. However, if
> you allow
> the ClassLoader to be collected by removing any hard reference to its
> classes, that would prevent the leak to even take place at all.
>
> That's why I'm curious as to why you say it's better with
> WeakReference on
> singleton and Introspector.flushCaches() does nothing, how do you
> make that
> assertion? I realize that if there's something else than
> Introspector that
> has an hard reference on a class of the ClassLoader being thown away,
> flushing the Introspector's cache will have no effect on the leak,
> it would
> still leak as fast. But while the WeakReference on the singleton
> will delay
> the OutOfMemoryError, does it really help that much, since anyway
> all the
> Class definitions and static members cannot be collected? You
> have to
> consider that coding defensively on this might reduce performance
> because of
> more object creation and use of synchronization, while also
> complicating the
> code. Is it really worth it, did your tests really showed a
> significanteffect on a typical application?
>
> Guillaume
>
>
> ----- Original Message -----
> From: "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>
> To: <spr...@li...>
> Sent: Saturday, May 29, 2004 2:28 PM
> Subject: Re: [Springframework-developer] Cleanup of context
> resources on
> webapp reload
>
>
> Guillaume,
>
> I've prototypically added an Introspector.flushCaches call to context
> shutdown: I don't see any difference in the profiler. That's not too
> surprising, as the originally leaking classes are not managed by beans
> facilities in the first place: for example, SQLErrorCodesFactory,
> which is
> just used internally by SQLErrorCodeSQLExceptionTranslator.
>
> Of course, since my changes from a week ago, those classes don't leak
> anymore, as they hold their singleton instance in a WeakReference
> now... I
> still don't understand why this is necessary, but I'm 100% sure
> that it does
> make a difference on both Sun JDK 1.4.2 and Sun JDK 1.3.1. I've
> also tried
> various GC configuration options - always the same effect.
>
> Juergen
>
>
> ________________________________
>
> Von: spr...@li... im
> Auftrag von
> Guillaume Poirier
> Gesendet: Sa 29.05.2004 06:12
> An: spr...@li...
> Betreff: Re: [Springframework-developer] Cleanup of context
> resources on
> webapp reload
>
>
>
> I experimented some more about this cleanup issue, and I was able
> to narrow
> down the problem to the caching done by the
> java.beans.Introspector. It
> stores the BeanInfo instances in a WeakHashMap, but in that Map
> implementation, only the keys uses WeakReference, the values are
> stored with
> hard references since BeanInfo has an hard reference on the class
> it gives
> info about (indirectly through BeanDescriptor and others), any time
> Introspector.getBeanInfo(Class) is used, that class and it's
> static members
> will not ever be able to be garbage collected. I kind of remember
> someonementioning something related to this in the mailling list,
> but I cannot find
> the mail. I wonder if there's other case where the java[x]
> classes might
> have an hard reference on a class or its instances. A fix for this
> particular problem is to have a ServletContextListener call
> Introspector.flushCaches() when the context is destroyed.
>
> It seems like a known issue at Sun :
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=3D4291376
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=3D4730581
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=3D4809008
>
> So, unless I'm missing something here, that means fixes like using
> synchronization and WeakReference on singleton probably won't help
> much if
> at all. The only way that I can see for a class not to be gargage
> collectedwhen no more active thread use it, is if another
> ClassLoader has an hard
> reference to the class instance, or an instance of that class.=20
> Having the
> class itself have an hard reference on a its own singleton has no
> effect,it's a circular reference that will not prevent the class
> or the instance to
> be gargabe collected when neither is being refered to by something
> else.
> Guillaume
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market...
> Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market...
> Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id149&alloc_id?66&op=3Dick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market...
> Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market...
> Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id149&alloc_id?66&op=3Dick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market...
> Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id149&alloc_id?66&op=D5ick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: snpe <sn...@sn...> - 2004-06-01 01:45:16
|
Hello, I try compile spring-ide with eclipse (M9 RC1), but I haven't classes BeansViewSorter, BeansViewLabelDecorater Is cvs spring-ide complete for M9 ? regards Haris Peco |
|
From: Thomas R. <tho...@tr...> - 2004-06-01 01:41:48
|
FWIW, the latest Oracle 10g JDBC driver seems to support standard JDBC
syntax even for CLOBS that are more than 4k. What took them so long? :-)
This did work with a large CLOB
Reader r = new StringReader(newString);
ps.setCharacterStream(3, r, newString.length());
Thomas
Thomas Risberg wrote:
> The WebLogic wrappers are dynamic proxies and they supposedly support
> whatever the underlying connection supports, including any
> extendsions. See
> http://dev2dev.bea.com/products/wlserver81/articles/WLS81JDBC.jsp
>
> I'll keep trying. Will see if we can create a
> WebLogicNativeJdbcExtractor based on what Bronwen discovered.
>
> Thomas
>
>
> jürgen höller [werk3AT] wrote:
>
>> OK, seems like Weblogic's pool is among the ones that completely wrap
>> all JDBC objects: You don't even get the native Connection on
>> getMetaData().getConnection()...
>>
>> So I'm afraid you'll have to write a WeblogicNativeJdbcExtractor that
>> knows how to unwrap weblogic.jdbc.wrapper.PoolConnection. Check the
>> latter's signatures: Does it have a method like
>> "getPhysicalConnection()"? Such a method would be that basis for
>> implementing getNativeConnection.
>>
>> Juergen
>>
>>
>> ________________________________
>>
>> Von: spr...@li... im Auftrag
>> von Bronwen Cassidy
>> Gesendet: Di 01.06.2004 01:20
>> An: spr...@li...
>> Betreff: RE: [Springframework-developer] re: OracleLobCreator
>>
>>
>>
>> Hi,
>> If I understand your question, OracleLobHandler works in a test case
>> without
>> weblogics pool, only using the oracle.jdbc.pool.OracleDataSource
>> datasource
>> bean defined as:
>> <bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource">
>> <property
>> name="driverType"><value>oracle.jdbc.OracleDriver</value></property>
>> <property
>> name="URL"><value>jdbc:oracle:thin:@localhost:1521:ROBIN</value></property>
>>
>> <property
>> name="user"><value>talentstudio</value></property>
>> <property
>> name="password"><value>talentstudio</value></property>
>> </bean>
>> In deployment I have set up a weblogic pool using oracle thin driver,
>> not a
>> weblogic oracle driver.
>>
>> So from what I can determine weblogic pool + oracle driver +
>> oracleLobHandler throws the exception and
>> Oracle jdbc pool + oracleLobHandler (as in test case) works.
>>
>> The printouts:
>>
>> template.getDataSource().getConnection()=
>> weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@112
>>
>>
>> connection.getMetaData().getConnection() =
>> weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@112
>>
>>
>> -----Original Message-----
>> From: spr...@li...
>> [mailto:spr...@li...] On
>> Behalf Of
>> jürgen höller [werk3AT]
>> Sent: 31 May 2004 22:52
>> To: spr...@li...
>> Subject: Re: [Springframework-developer] re: OracleLobCreator
>>
>> Can you check what kind of wrappers the DataSource returns? Simply
>> fetch the
>> DataSource, invoke getConnection() and see what kind of handle it
>> returns
>> (System.out.println). Furthermore, invoke
>> getConnection().getMetaData().getConnection() and see whether this is
>> the
>> native Connection (System.out.println again).
>>
>> However, if you have properly specified SimpleNativeJdbcExtractor for
>> OracleLobHandler's "nativeJdbcExtractor" property and still get that
>> exception, then I assume that Weblogic's own Oracle JDBC driver
>> doesn't use
>> the OracleConnection class at all. This would mean that OracleLobHandler
>> cannot be used with it.
>>
>> Do I understand correctly that OracleLobHandler plus
>> SimpleNativeJdbcExtractor work properly with Oracle's original JDBC
>> driver
>> plus Weblogic's connection pool?
>>
>> Juergen
>>
>>
>> ________________________________
>>
>> Von: spr...@li... im Auftrag
>> von
>> Bronwen Cassidy
>> Gesendet: Di 01.06.2004 00:24
>> An: spr...@li...
>> Betreff: RE: [Springframework-developer] re: OracleLobCreator
>>
>>
>>
>> Hi,
>>
>> OK the results when changing the driver for the pool from
>> jdbc:oracle:thin
>> to: jdbc:weblogic:oracle using SimpleNativeJdbcExtractor
>>
>>
>> Error:
>> org.springframework.dao.DataAccessResourceFailureException: Could not
>> create
>> Oracle LOB; nested exception is org.springframework.dao.In
>> validDataAccessApiUsageException: OracleLobHandler needs to work on
>> oracle.jdbc.OracleConnection - specify a proper NativeJdbcExtractor
>>
>> org.springframework.dao.InvalidDataAccessApiUsageException:
>> OracleLobHandler
>> needs to work on oracle.jdbc.OracleConnection - specify a
>> proper NativeJdbcExtractor
>> at
>> org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.getOr
>>
>> acleConnection(OracleLobHandler.java:366)
>> at
>> org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.creat
>>
>> eLob(OracleLobHandler.java:336)
>> at
>> org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setCl
>>
>> obAsString(OracleLobHandler.java:264)
>> at
>> com.zynap.talentstudio.dao.jdbc.oracle.datamanipulation.PortfolioDataManipul
>>
>> ation$1.setValues(PortfolioDataManipulation.java
>> :50)
>> at
>> org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStatementCa
>>
>> llback.doInPreparedStatement(AbstractLobCreating
>> PreparedStatementCallback.java:71)
>> at
>> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:292)
>>
>> at
>> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:308)
>>
>>
>> -----Original Message-----
>> From: spr...@li...
>> [mailto:spr...@li...] On
>> Behalf Of
>> tho...@tr...
>> Sent: 31 May 2004 21:47
>> To: spr...@li...
>> Subject: Re: [Springframework-developer] re: OracleLobCreator
>>
>>
>> I was finally able to reproduce the error in my own environment using
>> Spring
>> 1.0.1. I will try 1.0.2 (current CVS) and see what happens.
>>
>> Thomas
>>
>>
>> Here is my stack trace:
>>
>> org.springframework.dao.DataAccessResourceFailureException: Could not
>> create
>> Oracle LOB; nested exception is java.lang.ClassCastException: null
>> java.lang.ClassCastException
>> at
>> oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.java:5
>>
>> 090)
>> at
>> oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnectio
>>
>> n.java:5141)
>> at oracle.sql.CLOB.createTemporary(CLOB.java:1009)
>> at oracle.sql.CLOB.createTemporary(CLOB.java:956)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
>>
>> )
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
>>
>> .java:25)
>> at java.lang.reflect.Method.invoke(Method.java:324)
>> at
>> org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.prepa
>>
>> reLob(OracleLobHandler.java:375)
>> at
>> org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.creat
>>
>> eLob(OracleLobHandler.java:327)
>> at
>> org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setCl
>>
>> obAsString(OracleLobHandler.java:255)
>> at org.buggybean.web.TestServlet.doGet(TestServlet.java:94)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> at
>> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
>>
>> tStubImpl.java:971)
>> at
>> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
>>
>> :402)
>> at
>> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
>>
>> :305)
>> at
>> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
>>
>> ebAppServletContext.java:6350)
>> at
>> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
>>
>> t.java:317)
>> at
>> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
>>
>> at
>> weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
>>
>> ntext.java:3635)
>> at
>> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
>>
>> :2585)
>> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
>> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>>
>>
>>
>>
>> Quoting "jürgen höller [werk3AT]" <jue...@we...>:
>>
>>
>>
>>> Changing the pool should just affect the NativeJdbcExtractor choice, =
>>> i.e. a different bean wired to OracleLobHandler's
>>> "nativeJdbcExtractor" =
>>> property.
>>> =20
>>> Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
>>> good chance that it will work, avoiding the need for a specific
>>> Weblogic =
>>> implementation of the NativeJdbcExtractor interface.
>>> =20
>>> As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =
>>> Commons DBCP too, avoiding the need for a different
>>> NativeJdbcExtractor =
>>> configuration when switching between Commons DBCP and another pool.
>>> =20
>>> Side note: The new version of SimpleNativeJdbcExtractor will also
>>> work =
>>> with C3P0. This allows the use of C3P0's ComboPooledDataSource as
>>> direct =
>>> replacement of Commons DBCP's BasicDataSource.
>>> =20
>>> Juergen
>>> =20
>>>
>>> ________________________________
>>>
>>> Von: spr...@li... im Auftrag =
>>> von Bronwen Cassidy
>>> Gesendet: Mo 31.05.2004 22:25
>>> An: spr...@li...
>>> Betreff: Re: [Springframework-developer] re: OracleLobCreator
>>>
>>>
>>>
>>> Hi
>>> I have no concern as to the pool i use, i am actually
>>> completely ignorant and have been blindly feeling my
>>> way using the spring test cases, samples, docs and
>>> some googling, until 4 months ago i had never used
>>> oracle and until a week ago i did not need to do more
>>> than work out db agnostic sql queries :-)
>>>
>>> so please i am more than happy to use weblogic pool,
>>> which i am using when the app is deployed, hence the
>>> test time passes and deploy time failures most
>>> likely!! I am guessing the changes are needed in the
>>> nativeJdbcExtractor class in the spring.xml needs to
>>> point to a weblogic equivalent??
>>>
>>> --- Thomas Risberg <tho...@tr...> wrote:
>>>
>>>
>>>> Since you are using the Commons DBCP rather than a
>>>> WebLogic pool the
>>>> issue is slightly different. We have to figure out
>>>> why the connection
>>>> returned from the DBCP pool is not unwrapped
>>>> properly.
>>>>
>>>> Thomas
>>>>
>>>>
>>>> Bronwen Cassidy wrote:
>>>>
>>>>
>>>>
>>>>> Thank-you Jurgen
>>>>> This was the approach i had come to conclude as the
>>>>> only difference between passing test case and
>>>>>
>>>>
>>>> failing
>>>>
>>>>
>>>>> deployed app is the connection pool handled by
>>>>> weblogic , ahh well another trip into the unknown,
>>>>>
>>>>
>>>> the
>>>>
>>>>
>>>>> best part of being a developer ;-)
>>>>>
>>>>> regards
>>>>> Bronwen
>>>>>
>>>>> --- j=FCrgen_h=F6ller_[werk3AT]
>>>>> <jue...@we...> wrote: >
>>>>> OracleLobHandler needs to work on a native
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>> OracleConnection as it comes from the driver. The
>>>>>> usual problem in that respect is not the driver
>>>>>>
>>>>>
>>>> but
>>>>
>>>>
>>>>>> the connection pool: Every connection pool needs
>>>>>>
>>>>>
>>>> to
>>>>
>>>>
>>>>>> wrap native connections with pooled connections
>>>>>>
>>>>>
>>>> that
>>>>
>>>>
>>>>>> at least have different closing behavior.
>>>>>>
>>>>>> To address this, OracleLobHandler has the
>>>>>> "nativeJdbcExtractor" property, taking an
>>>>>> implementation of Spring's NativeJdbcExtractor
>>>>>> interface. Spring includes out-of-the-box
>>>>>> implementations for Commons DBCP, XAPool, and
>>>>>>
>>>>>
>>>> JBoss.
>>>>
>>>>
>>>>>> I guess what you need to do is write such an
>>>>>> extractor for Weblogic.
>>>>>>
>>>>>> What's odd about your exception is that
>>>>>> OracleLobCreator does not complain that it doesn't
>>>>>> receive an OracleConnection (there's an explicit
>>>>>> check in there). It seems to get a wrapped
>>>>>> connection that is still assignable to
>>>>>> OracleConnection, although it's not the native
>>>>>> OracleConnection from the driver...
>>>>>>
>>>>>> Maybe Weblogic uses some special way of pooling
>>>>>> connections for the Oracle driver, using poolable
>>>>>> OracleConnections? The getPhysicalConnection
>>>>>>
>>>>>
>>>> method
>>>>
>>>>
>>>>>> will probably be in the OracleConnection class,
>>>>>>
>>>>>
>>>> not
>>>>
>>>>
>>>>>> in the CLOB class. Try writing a
>>>>>>
>>>>>
>>>> NativeJdbcExtractor
>>>>
>>>>
>>>>>> that unwraps an OracleConnection with that method.
>>>>>>
>>>>>> Juergen
>>>>>>
>>>>>>
>>>>>> ________________________________
>>>>>>
>>>>>> Von:
>>>>>>
>>>>>> =20
>>>>>>
>>>>>>
>>>>>
>>>> spr...@li...
>>>>
>>>>
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>> im Auftrag von Bronwen Cassidy
>>>>>> Gesendet: Mo 31.05.2004 04:27
>>>>>> An:
>>>>>>
>>>>>
>>>> spr...@li...
>>>>
>>>>
>>>>>> Betreff: RE: [Springframework-developer] re:
>>>>>> OracleLobCreator
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi I have:
>>>>>>
>>>>>> Weblogic 8 service pack 2
>>>>>> ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
>>>>>> Oracle9i
>>>>>> I have set up the connection pool using the
>>>>>> jdbc:oracle:thin (oracle thin
>>>>>> drivers (not weblogic ones)
>>>>>>
>>>>>> Actually I managed to find some information (very
>>>>>> little) one from a
>>>>>> hibernate mail, suggested using the
>>>>>> getPhysicalConnection() instead of
>>>>>> createTemporary, but this method does not seem to
>>>>>> available on the CLOB
>>>>>> class??
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From:
>>>>>>
>>>>>> =20
>>>>>>
>>>>>>
>>>>>
>>>> spr...@li...
>>>>
>>>>
>>>>> =20
>>>>>
>>>>>
>>>>
>>>> [mailto:spr...@li...]
>>>>
>>>>
>>>>> =20
>>>>>
>>>>>
>>>>>
>>>>>> On Behalf Of
>>>>>> Thomas Risberg
>>>>>> Sent: 31 May 2004 02:09
>>>>>> To:
>>>>>>
>>>>>
>>>> spr...@li...
>>>>
>>>>
>>>>>> Subject: Re: [Springframework-developer] re:
>>>>>> OracleLobCreator
>>>>>>
>>>>>> Bronwen,
>>>>>>
>>>>>> In order to pinpoint the problem quicker - what
>>>>>> version of WebLogic,
>>>>>> Oracle and JDBC drivers are you using?
>>>>>>
>>>>>> Thomas
>>>>>>
>>>>>> Bronwen Cassidy wrote:
>>>>>>
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi I have a CLOB column in oracle and in the test
>>>>>>> =20
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> there are no
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>>> problems, unfortunately deploying to weblogic I
>>>>>>> =20
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> get the exception
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>>> below. We are using classes12.jar whereas
>>>>>>>
>>>>>>
>>>> weblogic
>>>>
>>>>
>>>>>>> =20
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> uses ojdbc14.jar, I
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>>> firstly replaced weblogics jars and classpath
>>>>>>> =20
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> settings to use the
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>>> classes12.jar, but got the same error, so I
>>>>>>>
>>>>>>
>>>> pulled
>>>>
>>>>
>>>>>>> =20
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> weblogic oracle jar
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>>> into my test classpath to test if the problem was
>>>>>>> =20
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> with the jars but
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>>> the test worked fine ?? I am really stuck as to
>>>>>>> =20
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> whom this should go to
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>>> weblogic, oracle, or . I am hoping there is an
>>>>>>> =20
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> expert there who can
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>>> shed some light. Google did not have a single
>>>>>>> =20
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> match for variations of
>>>>>> =20
>>>>>>
>>>>>>
>>>>>>
>>>>>>> the first 2 lines!!
>>>>>>>
>>>>>>> java.lang.ClassCastException
>>>>>>>
>>>>>>> at
>>>>>>>
>>>>>>> =20
>>>>>>>
>>>>>>>
>>>>>>
>>>> oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
>>>>
>>>>
>>>
>>> va:5
>>>
>>>
>>>>> =20
>>>>>
>>>>
>>> =3D=3D=3D message truncated =3D=3D=3D
>>>
>>>
>>> =20
>>> =20
>>> =20
>>> ____________________________________________________________
>>> Yahoo! Messenger - Communicate instantly..."Ping"
>>> your friends today! Download Messenger Now
>>> http://uk.messenger.yahoo.com/download/index.html
>>>
>>>
>>> -------------------------------------------------------
>>> This SF.Net email is sponsored by: Oracle 10g
>>> Get certified on the hottest thing ever to hit the market... Oracle
>>> 10g.
>>> Take an Oracle 10g class now, and we'll give you the exam FREE.
>>> http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
>>> _______________________________________________
>>> Springframework-developer mailing list
>>> Spr...@li...
>>> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>>
>>>
>>>
>>>
>>> -------------------------------------------------------
>>> This SF.Net email is sponsored by: Oracle 10g
>>> Get certified on the hottest thing ever to hit the market... Oracle
>>> 10g.
>>> Take an Oracle 10g class now, and we'll give you the exam FREE.
>>> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
>>> _______________________________________________
>>> Springframework-developer mailing list
>>> Spr...@li...
>>> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>>
>>>
>>
>>
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by: Oracle 10g
>> Get certified on the hottest thing ever to hit the market... Oracle 10g.
>> Take an Oracle 10g class now, and we'll give you the exam FREE.
>> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
>> _______________________________________________
>> Springframework-developer mailing list
>> Spr...@li...
>> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by: Oracle 10g
>> Get certified on the hottest thing ever to hit the market... Oracle 10g.
>> Take an Oracle 10g class now, and we'll give you the exam FREE.
>> http://ads.osdn.com/?ad_id149&alloc_id66&op=ick
>> _______________________________________________
>> Springframework-developer mailing list
>> Spr...@li...
>> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by: Oracle 10g
>> Get certified on the hottest thing ever to hit the market... Oracle 10g.
>> Take an Oracle 10g class now, and we'll give you the exam FREE.
>> http://ads.osdn.com/?ad_id149&alloc_id66&op=ick
>> _______________________________________________
>> Springframework-developer mailing list
>> Spr...@li...
>> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by: Oracle 10g
>> Get certified on the hottest thing ever to hit the market... Oracle 10g.
>> Take an Oracle 10g class now, and we'll give you the exam FREE.
>> http://ads.osdn.com/?ad_id149&alloc_id66&op=ick
>> _______________________________________________
>> Springframework-developer mailing list
>> Spr...@li...
>> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by: Oracle 10g
>> Get certified on the hottest thing ever to hit the market... Oracle
>> 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
>> http://ads.osdn.com/?ad_id149&alloc_id66&op=click
>> _______________________________________________
>> Springframework-developer mailing list
>> Spr...@li...
>> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>
>>
>>
>>
>>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle
> 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
|
|
From: Thomas R. <tho...@tr...> - 2004-06-01 01:21:22
|
The WebLogic wrappers are dynamic proxies and they supposedly support whatever the underlying connection supports, including any extendsions. See http://dev2dev.bea.com/products/wlserver81/articles/WLS81JDBC.jsp I'll keep trying. Will see if we can create a WebLogicNativeJdbcExtractor based on what Bronwen discovered. Thomas jürgen höller [werk3AT] wrote: >OK, seems like Weblogic's pool is among the ones that completely wrap all JDBC objects: You don't even get the native Connection on getMetaData().getConnection()... > >So I'm afraid you'll have to write a WeblogicNativeJdbcExtractor that knows how to unwrap weblogic.jdbc.wrapper.PoolConnection. Check the latter's signatures: Does it have a method like "getPhysicalConnection()"? Such a method would be that basis for implementing getNativeConnection. > >Juergen > > >________________________________ > >Von: spr...@li... im Auftrag von Bronwen Cassidy >Gesendet: Di 01.06.2004 01:20 >An: spr...@li... >Betreff: RE: [Springframework-developer] re: OracleLobCreator > > > >Hi, >If I understand your question, OracleLobHandler works in a test case without >weblogics pool, only using the oracle.jdbc.pool.OracleDataSource datasource >bean defined as: ><bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource"> > <property >name="driverType"><value>oracle.jdbc.OracleDriver</value></property> > <property >name="URL"><value>jdbc:oracle:thin:@localhost:1521:ROBIN</value></property> > <property name="user"><value>talentstudio</value></property> > <property >name="password"><value>talentstudio</value></property> > </bean> >In deployment I have set up a weblogic pool using oracle thin driver, not a >weblogic oracle driver. > >So from what I can determine weblogic pool + oracle driver + >oracleLobHandler throws the exception and >Oracle jdbc pool + oracleLobHandler (as in test case) works. > >The printouts: > >template.getDataSource().getConnection()= >weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@112 > >connection.getMetaData().getConnection() = >weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@112 > >-----Original Message----- >From: spr...@li... >[mailto:spr...@li...] On Behalf Of >jürgen höller [werk3AT] >Sent: 31 May 2004 22:52 >To: spr...@li... >Subject: Re: [Springframework-developer] re: OracleLobCreator > >Can you check what kind of wrappers the DataSource returns? Simply fetch the >DataSource, invoke getConnection() and see what kind of handle it returns >(System.out.println). Furthermore, invoke >getConnection().getMetaData().getConnection() and see whether this is the >native Connection (System.out.println again). > >However, if you have properly specified SimpleNativeJdbcExtractor for >OracleLobHandler's "nativeJdbcExtractor" property and still get that >exception, then I assume that Weblogic's own Oracle JDBC driver doesn't use >the OracleConnection class at all. This would mean that OracleLobHandler >cannot be used with it. > >Do I understand correctly that OracleLobHandler plus >SimpleNativeJdbcExtractor work properly with Oracle's original JDBC driver >plus Weblogic's connection pool? > >Juergen > > >________________________________ > >Von: spr...@li... im Auftrag von >Bronwen Cassidy >Gesendet: Di 01.06.2004 00:24 >An: spr...@li... >Betreff: RE: [Springframework-developer] re: OracleLobCreator > > > >Hi, > >OK the results when changing the driver for the pool from jdbc:oracle:thin >to: jdbc:weblogic:oracle using SimpleNativeJdbcExtractor > > >Error: >org.springframework.dao.DataAccessResourceFailureException: Could not create >Oracle LOB; nested exception is org.springframework.dao.In >validDataAccessApiUsageException: OracleLobHandler needs to work on >oracle.jdbc.OracleConnection - specify a proper NativeJdbcExtractor > >org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobHandler >needs to work on oracle.jdbc.OracleConnection - specify a >proper NativeJdbcExtractor > at >org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.getOr >acleConnection(OracleLobHandler.java:366) > at >org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.creat >eLob(OracleLobHandler.java:336) > at >org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setCl >obAsString(OracleLobHandler.java:264) > at >com.zynap.talentstudio.dao.jdbc.oracle.datamanipulation.PortfolioDataManipul >ation$1.setValues(PortfolioDataManipulation.java >:50) > at >org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStatementCa >llback.doInPreparedStatement(AbstractLobCreating >PreparedStatementCallback.java:71) > at >org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:292) > at >org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:308) > >-----Original Message----- >From: spr...@li... >[mailto:spr...@li...] On Behalf Of >tho...@tr... >Sent: 31 May 2004 21:47 >To: spr...@li... >Subject: Re: [Springframework-developer] re: OracleLobCreator > > >I was finally able to reproduce the error in my own environment using Spring >1.0.1. I will try 1.0.2 (current CVS) and see what happens. > >Thomas > > >Here is my stack trace: > >org.springframework.dao.DataAccessResourceFailureException: Could not create >Oracle LOB; nested exception is java.lang.ClassCastException: null >java.lang.ClassCastException > at >oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.java:5 >090) > at >oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnectio >n.java:5141) > at oracle.sql.CLOB.createTemporary(CLOB.java:1009) > at oracle.sql.CLOB.createTemporary(CLOB.java:956) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 >) > at >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl >.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at >org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.prepa >reLob(OracleLobHandler.java:375) > at >org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.creat >eLob(OracleLobHandler.java:327) > at >org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setCl >obAsString(OracleLobHandler.java:255) > at org.buggybean.web.TestServlet.doGet(TestServlet.java:94) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at >weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle >tStubImpl.java:971) > at >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java >:402) > at >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java >:305) > at >weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W >ebAppServletContext.java:6350) > at >weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec >t.java:317) > at >weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) > at >weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo >ntext.java:3635) > at >weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java >:2585) > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) > > > > >Quoting "jürgen höller [werk3AT]" <jue...@we...>: > > > >>Changing the pool should just affect the NativeJdbcExtractor choice, = >>i.e. a different bean wired to OracleLobHandler's "nativeJdbcExtractor" = >>property. >>=20 >>Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a = >>good chance that it will work, avoiding the need for a specific Weblogic = >>implementation of the NativeJdbcExtractor interface. >>=20 >>As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with = >>Commons DBCP too, avoiding the need for a different NativeJdbcExtractor = >>configuration when switching between Commons DBCP and another pool. >>=20 >>Side note: The new version of SimpleNativeJdbcExtractor will also work = >>with C3P0. This allows the use of C3P0's ComboPooledDataSource as direct = >>replacement of Commons DBCP's BasicDataSource. >>=20 >>Juergen >>=20 >> >>________________________________ >> >>Von: spr...@li... im Auftrag = >>von Bronwen Cassidy >>Gesendet: Mo 31.05.2004 22:25 >>An: spr...@li... >>Betreff: Re: [Springframework-developer] re: OracleLobCreator >> >> >> >>Hi >>I have no concern as to the pool i use, i am actually >>completely ignorant and have been blindly feeling my >>way using the spring test cases, samples, docs and >>some googling, until 4 months ago i had never used >>oracle and until a week ago i did not need to do more >>than work out db agnostic sql queries :-) >> >>so please i am more than happy to use weblogic pool, >>which i am using when the app is deployed, hence the >>test time passes and deploy time failures most >>likely!! I am guessing the changes are needed in the >>nativeJdbcExtractor class in the spring.xml needs to >>point to a weblogic equivalent?? >> >> --- Thomas Risberg <tho...@tr...> wrote: >> >> >>>Since you are using the Commons DBCP rather than a >>>WebLogic pool the >>>issue is slightly different. We have to figure out >>>why the connection >>>returned from the DBCP pool is not unwrapped >>>properly. >>> >>>Thomas >>> >>> >>>Bronwen Cassidy wrote: >>> >>> >>> >>>>Thank-you Jurgen >>>>This was the approach i had come to conclude as the >>>>only difference between passing test case and >>>> >>>> >>>failing >>> >>> >>>>deployed app is the connection pool handled by >>>>weblogic , ahh well another trip into the unknown, >>>> >>>> >>>the >>> >>> >>>>best part of being a developer ;-) >>>> >>>>regards >>>>Bronwen >>>> >>>>--- j=FCrgen_h=F6ller_[werk3AT] >>>><jue...@we...> wrote: > >>>>OracleLobHandler needs to work on a native >>>>=20 >>>> >>>> >>>> >>>>>OracleConnection as it comes from the driver. The >>>>>usual problem in that respect is not the driver >>>>> >>>>> >>>but >>> >>> >>>>>the connection pool: Every connection pool needs >>>>> >>>>> >>>to >>> >>> >>>>>wrap native connections with pooled connections >>>>> >>>>> >>>that >>> >>> >>>>>at least have different closing behavior. >>>>> >>>>>To address this, OracleLobHandler has the >>>>>"nativeJdbcExtractor" property, taking an >>>>>implementation of Spring's NativeJdbcExtractor >>>>>interface. Spring includes out-of-the-box >>>>>implementations for Commons DBCP, XAPool, and >>>>> >>>>> >>>JBoss. >>> >>> >>>>>I guess what you need to do is write such an >>>>>extractor for Weblogic. >>>>> >>>>>What's odd about your exception is that >>>>>OracleLobCreator does not complain that it doesn't >>>>>receive an OracleConnection (there's an explicit >>>>>check in there). It seems to get a wrapped >>>>>connection that is still assignable to >>>>>OracleConnection, although it's not the native >>>>>OracleConnection from the driver... >>>>> >>>>>Maybe Weblogic uses some special way of pooling >>>>>connections for the Oracle driver, using poolable >>>>>OracleConnections? The getPhysicalConnection >>>>> >>>>> >>>method >>> >>> >>>>>will probably be in the OracleConnection class, >>>>> >>>>> >>>not >>> >>> >>>>>in the CLOB class. Try writing a >>>>> >>>>> >>>NativeJdbcExtractor >>> >>> >>>>>that unwraps an OracleConnection with that method. >>>>> >>>>> >>>>>Juergen >>>>> >>>>> >>>>>________________________________ >>>>> >>>>>Von: >>>>> >>>>> =20 >>>>> >>>>> >>>>> >>>spr...@li... >>> >>> >>>>=20 >>>> >>>> >>>> >>>>>im Auftrag von Bronwen Cassidy >>>>>Gesendet: Mo 31.05.2004 04:27 >>>>>An: >>>>> >>>>> >>>spr...@li... >>> >>> >>>>>Betreff: RE: [Springframework-developer] re: >>>>>OracleLobCreator >>>>> >>>>> >>>>> >>>>>Hi I have: >>>>> >>>>>Weblogic 8 service pack 2 >>>>>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers) >>>>>Oracle9i >>>>>I have set up the connection pool using the >>>>>jdbc:oracle:thin (oracle thin >>>>>drivers (not weblogic ones) >>>>> >>>>>Actually I managed to find some information (very >>>>>little) one from a >>>>>hibernate mail, suggested using the >>>>>getPhysicalConnection() instead of >>>>>createTemporary, but this method does not seem to >>>>>available on the CLOB >>>>>class?? >>>>> >>>>>-----Original Message----- >>>>>From: >>>>> >>>>> =20 >>>>> >>>>> >>>>> >>>spr...@li... >>> >>> >>>>=20 >>>> >>>> >>>> >>>[mailto:spr...@li...] >>> >>> >>>>=20 >>>> >>>> >>>> >>>>>On Behalf Of >>>>>Thomas Risberg >>>>>Sent: 31 May 2004 02:09 >>>>>To: >>>>> >>>>> >>>spr...@li... >>> >>> >>>>>Subject: Re: [Springframework-developer] re: >>>>>OracleLobCreator >>>>> >>>>>Bronwen, >>>>> >>>>>In order to pinpoint the problem quicker - what >>>>>version of WebLogic, >>>>>Oracle and JDBC drivers are you using? >>>>> >>>>>Thomas >>>>> >>>>>Bronwen Cassidy wrote: >>>>> >>>>> =20 >>>>> >>>>> >>>>> >>>>>>Hi I have a CLOB column in oracle and in the test >>>>>> =20 >>>>>> >>>>>> >>>>>> >>>>>there are no >>>>> =20 >>>>> >>>>> >>>>> >>>>>>problems, unfortunately deploying to weblogic I >>>>>> =20 >>>>>> >>>>>> >>>>>> >>>>>get the exception >>>>> =20 >>>>> >>>>> >>>>> >>>>>>below. We are using classes12.jar whereas >>>>>> >>>>>> >>>weblogic >>> >>> >>>>>> =20 >>>>>> >>>>>> >>>>>> >>>>>uses ojdbc14.jar, I >>>>> =20 >>>>> >>>>> >>>>> >>>>>>firstly replaced weblogics jars and classpath >>>>>> =20 >>>>>> >>>>>> >>>>>> >>>>>settings to use the >>>>> =20 >>>>> >>>>> >>>>> >>>>>>classes12.jar, but got the same error, so I >>>>>> >>>>>> >>>pulled >>> >>> >>>>>> =20 >>>>>> >>>>>> >>>>>> >>>>>weblogic oracle jar >>>>> =20 >>>>> >>>>> >>>>> >>>>>>into my test classpath to test if the problem was >>>>>> =20 >>>>>> >>>>>> >>>>>> >>>>>with the jars but >>>>> =20 >>>>> >>>>> >>>>> >>>>>>the test worked fine ?? I am really stuck as to >>>>>> =20 >>>>>> >>>>>> >>>>>> >>>>>whom this should go to >>>>> =20 >>>>> >>>>> >>>>> >>>>>>weblogic, oracle, or . I am hoping there is an >>>>>> =20 >>>>>> >>>>>> >>>>>> >>>>>expert there who can >>>>> =20 >>>>> >>>>> >>>>> >>>>>>shed some light. Google did not have a single >>>>>> =20 >>>>>> >>>>>> >>>>>> >>>>>match for variations of >>>>> =20 >>>>> >>>>> >>>>> >>>>>>the first 2 lines!! >>>>>> >>>>>>java.lang.ClassCastException >>>>>> >>>>>>at >>>>>> >>>>>> =20 >>>>>> >>>>>> >>>>>> >>>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja= >>> >>> >>va:5 >> >> >>>>=20 >>>> >>>> >>=3D=3D=3D message truncated =3D=3D=3D >> >> >> =20 >> =20 >> =20 >>____________________________________________________________ >>Yahoo! Messenger - Communicate instantly..."Ping" >>your friends today! Download Messenger Now >>http://uk.messenger.yahoo.com/download/index.html >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: Oracle 10g >>Get certified on the hottest thing ever to hit the market... Oracle 10g. >>Take an Oracle 10g class now, and we'll give you the exam FREE. >>http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick >>_______________________________________________ >>Springframework-developer mailing list >>Spr...@li... >>https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: Oracle 10g >>Get certified on the hottest thing ever to hit the market... Oracle 10g. >>Take an Oracle 10g class now, and we'll give you the exam FREE. >>http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click >>_______________________________________________ >>Springframework-developer mailing list >>Spr...@li... >>https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> >> > > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: Oracle 10g >Get certified on the hottest thing ever to hit the market... Oracle 10g. >Take an Oracle 10g class now, and we'll give you the exam FREE. >http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: Oracle 10g >Get certified on the hottest thing ever to hit the market... Oracle 10g. >Take an Oracle 10g class now, and we'll give you the exam FREE. >http://ads.osdn.com/?ad_id149&alloc_id66&op=ick >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: Oracle 10g >Get certified on the hottest thing ever to hit the market... Oracle 10g. >Take an Oracle 10g class now, and we'll give you the exam FREE. >http://ads.osdn.com/?ad_id149&alloc_id66&op=ick >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: Oracle 10g >Get certified on the hottest thing ever to hit the market... Oracle 10g. >Take an Oracle 10g class now, and we'll give you the exam FREE. >http://ads.osdn.com/?ad_id149&alloc_id66&op=ick >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: Oracle 10g >Get certified on the hottest thing ever to hit the market... Oracle 10g. >Take an Oracle 10g class now, and we'll give you the exam FREE. >http://ads.osdn.com/?ad_id149&alloc_id66&op=click >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > |
|
From: Bronwen C. <bro...@ya...> - 2004-06-01 01:01:33
|
The last message, I got it :-) now I just want to laugh.. the method to =
get
the native driver is:
// con is cast to weblogic.jdbc.wrapper.PoolConnection, this returns the
oracle.jdbc.OracleConnection and from there it all works, now to figure =
out
all the others :-)
public Connection getNativeConnection(Connection con) throws =
SQLException {
PoolConnection pConnection =3D (PoolConnection) con;
return pConnection.getVendorConnection();
}
I am happy to send this to you, problem would be it would need =
weblogic.jar
:-( as it is specific cast, unless I used reflection, let me know what =
you
would like, send it, use reflection etc etc.
And a million thanx for all your help
All the best to spring
Bronwen
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
j=FCrgen h=F6ller [werk3AT]
Sent: 31 May 2004 23:39
To: spr...@li...
Subject: Re: [Springframework-developer] OracleLobCreator
OK, seems like Weblogic's pool is among the ones that completely wrap =
all
JDBC objects: You don't even get the native Connection on
getMetaData().getConnection()...
=20
So I'm afraid you'll have to write a WeblogicNativeJdbcExtractor that =
knows
how to unwrap weblogic.jdbc.wrapper.PoolConnection. Check the latter's
signatures: Does it have a method like "getPhysicalConnection()"? Such a
method would be that basis for implementing getNativeConnection.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von
Bronwen Cassidy
Gesendet: Di 01.06.2004 01:20
An: spr...@li...
Betreff: RE: [Springframework-developer] re: OracleLobCreator
Hi,
If I understand your question, OracleLobHandler works in a test case =
without
weblogics pool, only using the oracle.jdbc.pool.OracleDataSource =
datasource
bean defined as:
<bean id=3D"dataSource" class=3D"oracle.jdbc.pool.OracleDataSource">
<property
name=3D"driverType"><value>oracle.jdbc.OracleDriver</value></property>
<property
name=3D"URL"><value>jdbc:oracle:thin:@localhost:1521:ROBIN</value></prope=
rty>
<property =
name=3D"user"><value>talentstudio</value></property>
<property
name=3D"password"><value>talentstudio</value></property>
</bean>
In deployment I have set up a weblogic pool using oracle thin driver, =
not a
weblogic oracle driver.
So from what I can determine weblogic pool + oracle driver +
oracleLobHandler throws the exception and
Oracle jdbc pool + oracleLobHandler (as in test case) works.
The printouts:
template.getDataSource().getConnection()=3D
weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@=
112
connection.getMetaData().getConnection() =3D
weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@=
112
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
j=FCrgen h=F6ller [werk3AT]
Sent: 31 May 2004 22:52
To: spr...@li...
Subject: Re: [Springframework-developer] re: OracleLobCreator
Can you check what kind of wrappers the DataSource returns? Simply fetch =
the
DataSource, invoke getConnection() and see what kind of handle it =
returns
(System.out.println). Furthermore, invoke
getConnection().getMetaData().getConnection() and see whether this is =
the
native Connection (System.out.println again).
However, if you have properly specified SimpleNativeJdbcExtractor for
OracleLobHandler's "nativeJdbcExtractor" property and still get that
exception, then I assume that Weblogic's own Oracle JDBC driver doesn't =
use
the OracleConnection class at all. This would mean that OracleLobHandler
cannot be used with it.
Do I understand correctly that OracleLobHandler plus
SimpleNativeJdbcExtractor work properly with Oracle's original JDBC =
driver
plus Weblogic's connection pool?
Juergen
________________________________
Von: spr...@li... im Auftrag =
von
Bronwen Cassidy
Gesendet: Di 01.06.2004 00:24
An: spr...@li...
Betreff: RE: [Springframework-developer] re: OracleLobCreator
Hi,
OK the results when changing the driver for the pool from =
jdbc:oracle:thin
to: jdbc:weblogic:oracle using SimpleNativeJdbcExtractor
Error:
org.springframework.dao.DataAccessResourceFailureException: Could not =
create
Oracle LOB; nested exception is org.springframework.dao.In
validDataAccessApiUsageException: OracleLobHandler needs to work on
oracle.jdbc.OracleConnection - specify a proper NativeJdbcExtractor
org.springframework.dao.InvalidDataAccessApiUsageException: =
OracleLobHandler
needs to work on oracle.jdbc.OracleConnection - specify a
proper NativeJdbcExtractor
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.ge=
tOr
acleConnection(OracleLobHandler.java:366)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr=
eat
eLob(OracleLobHandler.java:336)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se=
tCl
obAsString(OracleLobHandler.java:264)
at
com.zynap.talentstudio.dao.jdbc.oracle.datamanipulation.PortfolioDataMani=
pul
ation$1.setValues(PortfolioDataManipulation.java
:50)
at
org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStatemen=
tCa
llback.doInPreparedStatement(AbstractLobCreating
PreparedStatementCallback.java:71)
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:292)=
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:308)=
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
tho...@tr...
Sent: 31 May 2004 21:47
To: spr...@li...
Subject: Re: [Springframework-developer] re: OracleLobCreator
I was finally able to reproduce the error in my own environment using =
Spring
1.0.1. I will try 1.0.2 (current CVS) and see what happens.
Thomas
Here is my stack trace:
org.springframework.dao.DataAccessResourceFailureException: Could not =
create
Oracle LOB; nested exception is java.lang.ClassCastException: null
java.lang.ClassCastException
at
oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.jav=
a:5
090)
at
oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnec=
tio
n.java:5141)
at oracle.sql.CLOB.createTemporary(CLOB.java:1009)
at oracle.sql.CLOB.createTemporary(CLOB.java:956)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java=
:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI=
mpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.pr=
epa
reLob(OracleLobHandler.java:375)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr=
eat
eLob(OracleLobHandler.java:327)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se=
tCl
obAsString(OracleLobHandler.java:255)
at org.buggybean.web.TestServlet.doGet(TestServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Ser=
vle
tStubImpl.java:971)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava
:402)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava
:305)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.ru=
n(W
ebAppServletContext.java:6350)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSub=
jec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)=
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServle=
tCo
ntext.java:3635)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.j=
ava
:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Quoting "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>:
> Changing the pool should just affect the NativeJdbcExtractor choice, =
=3D
> i.e. a different bean wired to OracleLobHandler's =
"nativeJdbcExtractor" =3D
> property.
> =3D20
> Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
=3D
> good chance that it will work, avoiding the need for a specific =
Weblogic =3D
> implementation of the NativeJdbcExtractor interface.
> =3D20
> As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =3D
> Commons DBCP too, avoiding the need for a different =
NativeJdbcExtractor =3D
> configuration when switching between Commons DBCP and another pool.
> =3D20
> Side note: The new version of SimpleNativeJdbcExtractor will also work =
=3D
> with C3P0. This allows the use of C3P0's ComboPooledDataSource as =
direct =3D
> replacement of Commons DBCP's BasicDataSource.
> =3D20
> Juergen
> =3D20
>
> ________________________________
>
> Von: spr...@li... im Auftrag =
=3D
> von Bronwen Cassidy
> Gesendet: Mo 31.05.2004 22:25
> An: spr...@li...
> Betreff: Re: [Springframework-developer] re: OracleLobCreator
>
>
>
> Hi
> I have no concern as to the pool i use, i am actually
> completely ignorant and have been blindly feeling my
> way using the spring test cases, samples, docs and
> some googling, until 4 months ago i had never used
> oracle and until a week ago i did not need to do more
> than work out db agnostic sql queries :-)
>
> so please i am more than happy to use weblogic pool,
> which i am using when the app is deployed, hence the
> test time passes and deploy time failures most
> likely!! I am guessing the changes are needed in the
> nativeJdbcExtractor class in the spring.xml needs to
> point to a weblogic equivalent??
>
> --- Thomas Risberg <tho...@tr...> wrote:
> > Since you are using the Commons DBCP rather than a
> > WebLogic pool the
> > issue is slightly different. We have to figure out
> > why the connection
> > returned from the DBCP pool is not unwrapped
> > properly.
> >
> > Thomas
> >
> >
> > Bronwen Cassidy wrote:
> >
> > >Thank-you Jurgen
> > >This was the approach i had come to conclude as the
> > >only difference between passing test case and
> > failing
> > >deployed app is the connection pool handled by
> > >weblogic , ahh well another trip into the unknown,
> > the
> > >best part of being a developer ;-)
> > >
> > >regards
> > >Bronwen
> > >
> > >--- j=3DFCrgen_h=3DF6ller_[werk3AT]
> > ><jue...@we...> wrote: >
> > >OracleLobHandler needs to work on a native
> > >=3D20
> > >
> > >>OracleConnection as it comes from the driver. The
> > >>usual problem in that respect is not the driver
> > but
> > >>the connection pool: Every connection pool needs
> > to
> > >>wrap native connections with pooled connections
> > that
> > >>at least have different closing behavior.
> > >>
> > >>To address this, OracleLobHandler has the
> > >>"nativeJdbcExtractor" property, taking an
> > >>implementation of Spring's NativeJdbcExtractor
> > >>interface. Spring includes out-of-the-box
> > >>implementations for Commons DBCP, XAPool, and
> > JBoss.
> > >>I guess what you need to do is write such an
> > >>extractor for Weblogic.
> > >>
> > >>What's odd about your exception is that
> > >>OracleLobCreator does not complain that it doesn't
> > >>receive an OracleConnection (there's an explicit
> > >>check in there). It seems to get a wrapped
> > >>connection that is still assignable to
> > >>OracleConnection, although it's not the native
> > >>OracleConnection from the driver...
> > >>
> > >>Maybe Weblogic uses some special way of pooling
> > >>connections for the Oracle driver, using poolable
> > >>OracleConnections? The getPhysicalConnection
> > method
> > >>will probably be in the OracleConnection class,
> > not
> > >>in the CLOB class. Try writing a
> > NativeJdbcExtractor
> > >>that unwraps an OracleConnection with that method.
> >
> > >>
> > >>Juergen
> > >>
> > >>
> > >>________________________________
> > >>
> > >>Von:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> > >>im Auftrag von Bronwen Cassidy
> > >>Gesendet: Mo 31.05.2004 04:27
> > >>An:
> > spr...@li...
> > >>Betreff: RE: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>
> > >>
> > >>Hi I have:
> > >>
> > >>Weblogic 8 service pack 2
> > >>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
> > >>Oracle9i
> > >>I have set up the connection pool using the
> > >>jdbc:oracle:thin (oracle thin
> > >>drivers (not weblogic ones)
> > >>
> > >>Actually I managed to find some information (very
> > >>little) one from a
> > >>hibernate mail, suggested using the
> > >>getPhysicalConnection() instead of
> > >>createTemporary, but this method does not seem to
> > >>available on the CLOB
> > >>class??
> > >>
> > >>-----Original Message-----
> > >>From:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> >
> >[mailto:spr...@li...]
> > >=3D20
> > >
> > >>On Behalf Of
> > >>Thomas Risberg
> > >>Sent: 31 May 2004 02:09
> > >>To:
> > spr...@li...
> > >>Subject: Re: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>Bronwen,
> > >>
> > >>In order to pinpoint the problem quicker - what
> > >>version of WebLogic,
> > >>Oracle and JDBC drivers are you using?
> > >>
> > >>Thomas
> > >>
> > >>Bronwen Cassidy wrote:
> > >>
> > >> =3D20
> > >>
> > >>>Hi I have a CLOB column in oracle and in the test
> > >>> =3D20
> > >>>
> > >>there are no
> > >> =3D20
> > >>
> > >>>problems, unfortunately deploying to weblogic I
> > >>> =3D20
> > >>>
> > >>get the exception
> > >> =3D20
> > >>
> > >>>below. We are using classes12.jar whereas
> > weblogic
> > >>> =3D20
> > >>>
> > >>uses ojdbc14.jar, I
> > >> =3D20
> > >>
> > >>>firstly replaced weblogics jars and classpath
> > >>> =3D20
> > >>>
> > >>settings to use the
> > >> =3D20
> > >>
> > >>>classes12.jar, but got the same error, so I
> > pulled
> > >>> =3D20
> > >>>
> > >>weblogic oracle jar
> > >> =3D20
> > >>
> > >>>into my test classpath to test if the problem was
> > >>> =3D20
> > >>>
> > >>with the jars but
> > >> =3D20
> > >>
> > >>>the test worked fine ?? I am really stuck as to
> > >>> =3D20
> > >>>
> > >>whom this should go to
> > >> =3D20
> > >>
> > >>>weblogic, oracle, or . I am hoping there is an
> > >>> =3D20
> > >>>
> > >>expert there who can
> > >> =3D20
> > >>
> > >>>shed some light. Google did not have a single
> > >>> =3D20
> > >>>
> > >>match for variations of
> > >> =3D20
> > >>
> > >>>the first 2 lines!!
> > >>>
> > >>>java.lang.ClassCastException
> > >>>
> > >>>at
> > >>>
> > >>> =3D20
> > >>>
> >
> =
>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
=3D
> va:5
> > >=3D20
> >
> =3D3D=3D3D=3D3D message truncated =3D3D=3D3D=3D3D
>
>
> =3D20
> =3D20
> =3D20
> ____________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3D3149&alloc_id=3D3D8166&op=3D3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. =
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Bronwen C. <bro...@ya...> - 2004-05-31 23:51:30
|
Hi I found this, Does this mean anything to you?? The link is here:=20 http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#1045809 WebLogic Server provides its own interfaces to access the extension = methods for those classes (CLOBS and BLOBS) In this try catch block, you get the BLOB locator and access the Oracle = BLOB extension.=20 try {=20 // get our BLOB locator..=20 myStatement =3D myConnect.createStatement(); rs =3D myStatement.executeQuery(selectBlob); while (rs.next()) { myRegularBlob =3D rs.getBlob("blobCol");=20 } // Access the underlying Oracle extension functionality for // writing. Cast to the OracleThinBlob interface to access // the = Oracle method. os =3D ((OracleThinBlob)myRegularBlob).getBinaryOutputStream(); = ... } catch (SQLException sqe) { = System.out.println("ERROR(general SQE): " + sqe.getMessage()); } Once you cast to the Oracle.ThinBlob interface, you can access the BEA supported methods -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf = Of Bronwen Cassidy Sent: 31 May 2004 23:20 To: spr...@li... Subject: RE: [Springframework-developer] re: OracleLobCreator Hi, If I understand your question, OracleLobHandler works in a test case = without weblogics pool, only using the oracle.jdbc.pool.OracleDataSource = datasource bean defined as: <bean id=3D"dataSource" class=3D"oracle.jdbc.pool.OracleDataSource"> <property name=3D"driverType"><value>oracle.jdbc.OracleDriver</value></property> <property name=3D"URL"><value>jdbc:oracle:thin:@localhost:1521:ROBIN</value></prope= rty> <property name=3D"user"><value>talentstudio</value></property> <property name=3D"password"><value>talentstudio</value></property> </bean> In deployment I have set up a weblogic pool using oracle thin driver, = not a weblogic oracle driver.=20 So from what I can determine weblogic pool + oracle driver + oracleLobHandler throws the exception and Oracle jdbc pool + oracleLobHandler (as in test case) works. The printouts: template.getDataSource().getConnection()=3D weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@= 112 connection.getMetaData().getConnection() =3D weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@= 112 -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf = Of j=FCrgen h=F6ller [werk3AT] Sent: 31 May 2004 22:52 To: spr...@li... Subject: Re: [Springframework-developer] re: OracleLobCreator Can you check what kind of wrappers the DataSource returns? Simply fetch = the DataSource, invoke getConnection() and see what kind of handle it = returns (System.out.println). Furthermore, invoke getConnection().getMetaData().getConnection() and see whether this is = the native Connection (System.out.println again).=20 =20 However, if you have properly specified SimpleNativeJdbcExtractor for OracleLobHandler's "nativeJdbcExtractor" property and still get that exception, then I assume that Weblogic's own Oracle JDBC driver doesn't = use the OracleConnection class at all. This would mean that OracleLobHandler cannot be used with it. =20 Do I understand correctly that OracleLobHandler plus SimpleNativeJdbcExtractor work properly with Oracle's original JDBC = driver plus Weblogic's connection pool? =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Bronwen Cassidy Gesendet: Di 01.06.2004 00:24 An: spr...@li... Betreff: RE: [Springframework-developer] re: OracleLobCreator Hi, OK the results when changing the driver for the pool from = jdbc:oracle:thin to: jdbc:weblogic:oracle using SimpleNativeJdbcExtractor Error: org.springframework.dao.DataAccessResourceFailureException: Could not = create Oracle LOB; nested exception is org.springframework.dao.In validDataAccessApiUsageException: OracleLobHandler needs to work on oracle.jdbc.OracleConnection - specify a proper NativeJdbcExtractor org.springframework.dao.InvalidDataAccessApiUsageException: = OracleLobHandler needs to work on oracle.jdbc.OracleConnection - specify a proper NativeJdbcExtractor at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.ge= tOr acleConnection(OracleLobHandler.java:366) at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr= eat eLob(OracleLobHandler.java:336) at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se= tCl obAsString(OracleLobHandler.java:264) at com.zynap.talentstudio.dao.jdbc.oracle.datamanipulation.PortfolioDataMani= pul ation$1.setValues(PortfolioDataManipulation.java :50) at org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStatemen= tCa llback.doInPreparedStatement(AbstractLobCreating PreparedStatementCallback.java:71) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:292)= at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:308)= -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf = Of tho...@tr... Sent: 31 May 2004 21:47 To: spr...@li... Subject: Re: [Springframework-developer] re: OracleLobCreator I was finally able to reproduce the error in my own environment using = Spring 1.0.1. I will try 1.0.2 (current CVS) and see what happens. Thomas Here is my stack trace: org.springframework.dao.DataAccessResourceFailureException: Could not = create Oracle LOB; nested exception is java.lang.ClassCastException: null java.lang.ClassCastException at oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.jav= a:5 090) at oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnec= tio n.java:5141) at oracle.sql.CLOB.createTemporary(CLOB.java:1009) at oracle.sql.CLOB.createTemporary(CLOB.java:956) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.pr= epa reLob(OracleLobHandler.java:375) at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr= eat eLob(OracleLobHandler.java:327) at org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se= tCl obAsString(OracleLobHandler.java:255) at org.buggybean.web.TestServlet.doGet(TestServlet.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Ser= vle tStubImpl.java:971) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j= ava :402) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j= ava :305) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.ru= n(W ebAppServletContext.java:6350) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSub= jec t.java:317) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)= at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServle= tCo ntext.java:3635) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.j= ava :2585) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) Quoting "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>: > Changing the pool should just affect the NativeJdbcExtractor choice, = =3D > i.e. a different bean wired to OracleLobHandler's = "nativeJdbcExtractor" =3D > property. > =3D20 > Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a = =3D > good chance that it will work, avoiding the need for a specific = Weblogic =3D > implementation of the NativeJdbcExtractor interface. > =3D20 > As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =3D > Commons DBCP too, avoiding the need for a different = NativeJdbcExtractor =3D > configuration when switching between Commons DBCP and another pool. > =3D20 > Side note: The new version of SimpleNativeJdbcExtractor will also work = =3D > with C3P0. This allows the use of C3P0's ComboPooledDataSource as = direct =3D > replacement of Commons DBCP's BasicDataSource. > =3D20 > Juergen > =3D20 > > ________________________________ > > Von: spr...@li... im Auftrag = =3D > von Bronwen Cassidy > Gesendet: Mo 31.05.2004 22:25 > An: spr...@li... > Betreff: Re: [Springframework-developer] re: OracleLobCreator > > > > Hi > I have no concern as to the pool i use, i am actually > completely ignorant and have been blindly feeling my > way using the spring test cases, samples, docs and > some googling, until 4 months ago i had never used > oracle and until a week ago i did not need to do more > than work out db agnostic sql queries :-) > > so please i am more than happy to use weblogic pool, > which i am using when the app is deployed, hence the > test time passes and deploy time failures most > likely!! I am guessing the changes are needed in the > nativeJdbcExtractor class in the spring.xml needs to > point to a weblogic equivalent?? > > --- Thomas Risberg <tho...@tr...> wrote: > > Since you are using the Commons DBCP rather than a > > WebLogic pool the > > issue is slightly different. We have to figure out > > why the connection > > returned from the DBCP pool is not unwrapped > > properly. > > > > Thomas > > > > > > Bronwen Cassidy wrote: > > > > >Thank-you Jurgen > > >This was the approach i had come to conclude as the > > >only difference between passing test case and > > failing > > >deployed app is the connection pool handled by > > >weblogic , ahh well another trip into the unknown, > > the > > >best part of being a developer ;-) > > > > > >regards > > >Bronwen > > > > > >--- j=3DFCrgen_h=3DF6ller_[werk3AT] > > ><jue...@we...> wrote: > > > >OracleLobHandler needs to work on a native > > >=3D20 > > > > > >>OracleConnection as it comes from the driver. The > > >>usual problem in that respect is not the driver > > but > > >>the connection pool: Every connection pool needs > > to > > >>wrap native connections with pooled connections > > that > > >>at least have different closing behavior. > > >> > > >>To address this, OracleLobHandler has the > > >>"nativeJdbcExtractor" property, taking an > > >>implementation of Spring's NativeJdbcExtractor > > >>interface. Spring includes out-of-the-box > > >>implementations for Commons DBCP, XAPool, and > > JBoss. > > >>I guess what you need to do is write such an > > >>extractor for Weblogic. > > >> > > >>What's odd about your exception is that > > >>OracleLobCreator does not complain that it doesn't > > >>receive an OracleConnection (there's an explicit > > >>check in there). It seems to get a wrapped > > >>connection that is still assignable to > > >>OracleConnection, although it's not the native > > >>OracleConnection from the driver... > > >> > > >>Maybe Weblogic uses some special way of pooling > > >>connections for the Oracle driver, using poolable > > >>OracleConnections? The getPhysicalConnection > > method > > >>will probably be in the OracleConnection class, > > not > > >>in the CLOB class. Try writing a > > NativeJdbcExtractor > > >>that unwraps an OracleConnection with that method. > > > > >> > > >>Juergen > > >> > > >> > > >>________________________________ > > >> > > >>Von: > > >> > > >> =3D20 > > >> > > > >spr...@li... > > >=3D20 > > > > > >>im Auftrag von Bronwen Cassidy > > >>Gesendet: Mo 31.05.2004 04:27 > > >>An: > > spr...@li... > > >>Betreff: RE: [Springframework-developer] re: > > >>OracleLobCreator > > >> > > >> > > >> > > >>Hi I have: > > >> > > >>Weblogic 8 service pack 2 > > >>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers) > > >>Oracle9i > > >>I have set up the connection pool using the > > >>jdbc:oracle:thin (oracle thin > > >>drivers (not weblogic ones) > > >> > > >>Actually I managed to find some information (very > > >>little) one from a > > >>hibernate mail, suggested using the > > >>getPhysicalConnection() instead of > > >>createTemporary, but this method does not seem to > > >>available on the CLOB > > >>class?? > > >> > > >>-----Original Message----- > > >>From: > > >> > > >> =3D20 > > >> > > > >spr...@li... > > >=3D20 > > > > > > >[mailto:spr...@li...] > > >=3D20 > > > > > >>On Behalf Of > > >>Thomas Risberg > > >>Sent: 31 May 2004 02:09 > > >>To: > > spr...@li... > > >>Subject: Re: [Springframework-developer] re: > > >>OracleLobCreator > > >> > > >>Bronwen, > > >> > > >>In order to pinpoint the problem quicker - what > > >>version of WebLogic, > > >>Oracle and JDBC drivers are you using? > > >> > > >>Thomas > > >> > > >>Bronwen Cassidy wrote: > > >> > > >> =3D20 > > >> > > >>>Hi I have a CLOB column in oracle and in the test > > >>> =3D20 > > >>> > > >>there are no > > >> =3D20 > > >> > > >>>problems, unfortunately deploying to weblogic I > > >>> =3D20 > > >>> > > >>get the exception > > >> =3D20 > > >> > > >>>below. We are using classes12.jar whereas > > weblogic > > >>> =3D20 > > >>> > > >>uses ojdbc14.jar, I > > >> =3D20 > > >> > > >>>firstly replaced weblogics jars and classpath > > >>> =3D20 > > >>> > > >>settings to use the > > >> =3D20 > > >> > > >>>classes12.jar, but got the same error, so I > > pulled > > >>> =3D20 > > >>> > > >>weblogic oracle jar > > >> =3D20 > > >> > > >>>into my test classpath to test if the problem was > > >>> =3D20 > > >>> > > >>with the jars but > > >> =3D20 > > >> > > >>>the test worked fine ?? I am really stuck as to > > >>> =3D20 > > >>> > > >>whom this should go to > > >> =3D20 > > >> > > >>>weblogic, oracle, or . I am hoping there is an > > >>> =3D20 > > >>> > > >>expert there who can > > >> =3D20 > > >> > > >>>shed some light. Google did not have a single > > >>> =3D20 > > >>> > > >>match for variations of > > >> =3D20 > > >> > > >>>the first 2 lines!! > > >>> > > >>>java.lang.ClassCastException > > >>> > > >>>at > > >>> > > >>> =3D20 > > >>> > > > = >oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja= =3D > va:5 > > >=3D20 > > > =3D3D=3D3D=3D3D message truncated =3D3D=3D3D=3D3D > > > =3D20 > =3D20 > =3D20 > ____________________________________________________________ > Yahoo! Messenger - Communicate instantly..."Ping" > your friends today! Download Messenger Now > http://uk.messenger.yahoo.com/download/index.html > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3D3D3149&alloc_id=3D3D8166&op=3D3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. = Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. = Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-05-31 23:44:14
|
OK, seems like Weblogic's pool is among the ones that completely wrap =
all JDBC objects: You don't even get the native Connection on =
getMetaData().getConnection()...
=20
So I'm afraid you'll have to write a WeblogicNativeJdbcExtractor that =
knows how to unwrap weblogic.jdbc.wrapper.PoolConnection. Check the =
latter's signatures: Does it have a method like =
"getPhysicalConnection()"? Such a method would be that basis for =
implementing getNativeConnection.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Bronwen Cassidy
Gesendet: Di 01.06.2004 01:20
An: spr...@li...
Betreff: RE: [Springframework-developer] re: OracleLobCreator
Hi,
If I understand your question, OracleLobHandler works in a test case =
without
weblogics pool, only using the oracle.jdbc.pool.OracleDataSource =
datasource
bean defined as:
<bean id=3D"dataSource" class=3D"oracle.jdbc.pool.OracleDataSource">
<property
name=3D"driverType"><value>oracle.jdbc.OracleDriver</value></property>
<property
name=3D"URL"><value>jdbc:oracle:thin:@localhost:1521:ROBIN</value></prope=
rty>
<property =
name=3D"user"><value>talentstudio</value></property>
<property
name=3D"password"><value>talentstudio</value></property>
</bean>
In deployment I have set up a weblogic pool using oracle thin driver, =
not a
weblogic oracle driver.
So from what I can determine weblogic pool + oracle driver +
oracleLobHandler throws the exception and
Oracle jdbc pool + oracleLobHandler (as in test case) works.
The printouts:
template.getDataSource().getConnection()=3D
weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@=
112
connection.getMetaData().getConnection() =3D
weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@=
112
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
j=FCrgen h=F6ller [werk3AT]
Sent: 31 May 2004 22:52
To: spr...@li...
Subject: Re: [Springframework-developer] re: OracleLobCreator
Can you check what kind of wrappers the DataSource returns? Simply fetch =
the
DataSource, invoke getConnection() and see what kind of handle it =
returns
(System.out.println). Furthermore, invoke
getConnection().getMetaData().getConnection() and see whether this is =
the
native Connection (System.out.println again).
However, if you have properly specified SimpleNativeJdbcExtractor for
OracleLobHandler's "nativeJdbcExtractor" property and still get that
exception, then I assume that Weblogic's own Oracle JDBC driver doesn't =
use
the OracleConnection class at all. This would mean that OracleLobHandler
cannot be used with it.
Do I understand correctly that OracleLobHandler plus
SimpleNativeJdbcExtractor work properly with Oracle's original JDBC =
driver
plus Weblogic's connection pool?
Juergen
________________________________
Von: spr...@li... im Auftrag =
von
Bronwen Cassidy
Gesendet: Di 01.06.2004 00:24
An: spr...@li...
Betreff: RE: [Springframework-developer] re: OracleLobCreator
Hi,
OK the results when changing the driver for the pool from =
jdbc:oracle:thin
to: jdbc:weblogic:oracle using SimpleNativeJdbcExtractor
Error:
org.springframework.dao.DataAccessResourceFailureException: Could not =
create
Oracle LOB; nested exception is org.springframework.dao.In
validDataAccessApiUsageException: OracleLobHandler needs to work on
oracle.jdbc.OracleConnection - specify a proper NativeJdbcExtractor
org.springframework.dao.InvalidDataAccessApiUsageException: =
OracleLobHandler
needs to work on oracle.jdbc.OracleConnection - specify a
proper NativeJdbcExtractor
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.ge=
tOr
acleConnection(OracleLobHandler.java:366)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr=
eat
eLob(OracleLobHandler.java:336)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se=
tCl
obAsString(OracleLobHandler.java:264)
at
com.zynap.talentstudio.dao.jdbc.oracle.datamanipulation.PortfolioDataMani=
pul
ation$1.setValues(PortfolioDataManipulation.java
:50)
at
org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStatemen=
tCa
llback.doInPreparedStatement(AbstractLobCreating
PreparedStatementCallback.java:71)
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:292)=
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:308)=
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
tho...@tr...
Sent: 31 May 2004 21:47
To: spr...@li...
Subject: Re: [Springframework-developer] re: OracleLobCreator
I was finally able to reproduce the error in my own environment using =
Spring
1.0.1. I will try 1.0.2 (current CVS) and see what happens.
Thomas
Here is my stack trace:
org.springframework.dao.DataAccessResourceFailureException: Could not =
create
Oracle LOB; nested exception is java.lang.ClassCastException: null
java.lang.ClassCastException
at
oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.jav=
a:5
090)
at
oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnec=
tio
n.java:5141)
at oracle.sql.CLOB.createTemporary(CLOB.java:1009)
at oracle.sql.CLOB.createTemporary(CLOB.java:956)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java=
:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI=
mpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.pr=
epa
reLob(OracleLobHandler.java:375)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr=
eat
eLob(OracleLobHandler.java:327)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se=
tCl
obAsString(OracleLobHandler.java:255)
at org.buggybean.web.TestServlet.doGet(TestServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Ser=
vle
tStubImpl.java:971)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava
:402)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava
:305)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.ru=
n(W
ebAppServletContext.java:6350)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSub=
jec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)=
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServle=
tCo
ntext.java:3635)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.j=
ava
:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Quoting "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>:
> Changing the pool should just affect the NativeJdbcExtractor choice, =
=3D
> i.e. a different bean wired to OracleLobHandler's =
"nativeJdbcExtractor" =3D
> property.
> =3D20
> Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
=3D
> good chance that it will work, avoiding the need for a specific =
Weblogic =3D
> implementation of the NativeJdbcExtractor interface.
> =3D20
> As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =3D
> Commons DBCP too, avoiding the need for a different =
NativeJdbcExtractor =3D
> configuration when switching between Commons DBCP and another pool.
> =3D20
> Side note: The new version of SimpleNativeJdbcExtractor will also work =
=3D
> with C3P0. This allows the use of C3P0's ComboPooledDataSource as =
direct =3D
> replacement of Commons DBCP's BasicDataSource.
> =3D20
> Juergen
> =3D20
>
> ________________________________
>
> Von: spr...@li... im Auftrag =
=3D
> von Bronwen Cassidy
> Gesendet: Mo 31.05.2004 22:25
> An: spr...@li...
> Betreff: Re: [Springframework-developer] re: OracleLobCreator
>
>
>
> Hi
> I have no concern as to the pool i use, i am actually
> completely ignorant and have been blindly feeling my
> way using the spring test cases, samples, docs and
> some googling, until 4 months ago i had never used
> oracle and until a week ago i did not need to do more
> than work out db agnostic sql queries :-)
>
> so please i am more than happy to use weblogic pool,
> which i am using when the app is deployed, hence the
> test time passes and deploy time failures most
> likely!! I am guessing the changes are needed in the
> nativeJdbcExtractor class in the spring.xml needs to
> point to a weblogic equivalent??
>
> --- Thomas Risberg <tho...@tr...> wrote:
> > Since you are using the Commons DBCP rather than a
> > WebLogic pool the
> > issue is slightly different. We have to figure out
> > why the connection
> > returned from the DBCP pool is not unwrapped
> > properly.
> >
> > Thomas
> >
> >
> > Bronwen Cassidy wrote:
> >
> > >Thank-you Jurgen
> > >This was the approach i had come to conclude as the
> > >only difference between passing test case and
> > failing
> > >deployed app is the connection pool handled by
> > >weblogic , ahh well another trip into the unknown,
> > the
> > >best part of being a developer ;-)
> > >
> > >regards
> > >Bronwen
> > >
> > >--- j=3DFCrgen_h=3DF6ller_[werk3AT]
> > ><jue...@we...> wrote: >
> > >OracleLobHandler needs to work on a native
> > >=3D20
> > >
> > >>OracleConnection as it comes from the driver. The
> > >>usual problem in that respect is not the driver
> > but
> > >>the connection pool: Every connection pool needs
> > to
> > >>wrap native connections with pooled connections
> > that
> > >>at least have different closing behavior.
> > >>
> > >>To address this, OracleLobHandler has the
> > >>"nativeJdbcExtractor" property, taking an
> > >>implementation of Spring's NativeJdbcExtractor
> > >>interface. Spring includes out-of-the-box
> > >>implementations for Commons DBCP, XAPool, and
> > JBoss.
> > >>I guess what you need to do is write such an
> > >>extractor for Weblogic.
> > >>
> > >>What's odd about your exception is that
> > >>OracleLobCreator does not complain that it doesn't
> > >>receive an OracleConnection (there's an explicit
> > >>check in there). It seems to get a wrapped
> > >>connection that is still assignable to
> > >>OracleConnection, although it's not the native
> > >>OracleConnection from the driver...
> > >>
> > >>Maybe Weblogic uses some special way of pooling
> > >>connections for the Oracle driver, using poolable
> > >>OracleConnections? The getPhysicalConnection
> > method
> > >>will probably be in the OracleConnection class,
> > not
> > >>in the CLOB class. Try writing a
> > NativeJdbcExtractor
> > >>that unwraps an OracleConnection with that method.
> >
> > >>
> > >>Juergen
> > >>
> > >>
> > >>________________________________
> > >>
> > >>Von:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> > >>im Auftrag von Bronwen Cassidy
> > >>Gesendet: Mo 31.05.2004 04:27
> > >>An:
> > spr...@li...
> > >>Betreff: RE: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>
> > >>
> > >>Hi I have:
> > >>
> > >>Weblogic 8 service pack 2
> > >>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
> > >>Oracle9i
> > >>I have set up the connection pool using the
> > >>jdbc:oracle:thin (oracle thin
> > >>drivers (not weblogic ones)
> > >>
> > >>Actually I managed to find some information (very
> > >>little) one from a
> > >>hibernate mail, suggested using the
> > >>getPhysicalConnection() instead of
> > >>createTemporary, but this method does not seem to
> > >>available on the CLOB
> > >>class??
> > >>
> > >>-----Original Message-----
> > >>From:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> >
> >[mailto:spr...@li...]
> > >=3D20
> > >
> > >>On Behalf Of
> > >>Thomas Risberg
> > >>Sent: 31 May 2004 02:09
> > >>To:
> > spr...@li...
> > >>Subject: Re: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>Bronwen,
> > >>
> > >>In order to pinpoint the problem quicker - what
> > >>version of WebLogic,
> > >>Oracle and JDBC drivers are you using?
> > >>
> > >>Thomas
> > >>
> > >>Bronwen Cassidy wrote:
> > >>
> > >> =3D20
> > >>
> > >>>Hi I have a CLOB column in oracle and in the test
> > >>> =3D20
> > >>>
> > >>there are no
> > >> =3D20
> > >>
> > >>>problems, unfortunately deploying to weblogic I
> > >>> =3D20
> > >>>
> > >>get the exception
> > >> =3D20
> > >>
> > >>>below. We are using classes12.jar whereas
> > weblogic
> > >>> =3D20
> > >>>
> > >>uses ojdbc14.jar, I
> > >> =3D20
> > >>
> > >>>firstly replaced weblogics jars and classpath
> > >>> =3D20
> > >>>
> > >>settings to use the
> > >> =3D20
> > >>
> > >>>classes12.jar, but got the same error, so I
> > pulled
> > >>> =3D20
> > >>>
> > >>weblogic oracle jar
> > >> =3D20
> > >>
> > >>>into my test classpath to test if the problem was
> > >>> =3D20
> > >>>
> > >>with the jars but
> > >> =3D20
> > >>
> > >>>the test worked fine ?? I am really stuck as to
> > >>> =3D20
> > >>>
> > >>whom this should go to
> > >> =3D20
> > >>
> > >>>weblogic, oracle, or . I am hoping there is an
> > >>> =3D20
> > >>>
> > >>expert there who can
> > >> =3D20
> > >>
> > >>>shed some light. Google did not have a single
> > >>> =3D20
> > >>>
> > >>match for variations of
> > >> =3D20
> > >>
> > >>>the first 2 lines!!
> > >>>
> > >>>java.lang.ClassCastException
> > >>>
> > >>>at
> > >>>
> > >>> =3D20
> > >>>
> >
> =
>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
=3D
> va:5
> > >=3D20
> >
> =3D3D=3D3D=3D3D message truncated =3D3D=3D3D=3D3D
>
>
> =3D20
> =3D20
> =3D20
> ____________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3D3149&alloc_id=3D3D8166&op=3D3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Mason, R. <ros...@vi...> - 2004-05-31 23:37:02
|
Hi J=FCrgen, Any more thoughts on this?=20 >I can't help be feel the ApplicationEventMulticaster is one object with = two roles that >might be best implementated as two objects. Maybe the the = EventMulticaster on the >AbstractApplicationContext should really be a 'SimpleEventManager' = implementing >'SpringEventManager' and the the ApplicationEventMulticaster is just = another type of >listener that dispatches to other listeners. Mule could implemlement = it's own >SpringEventManager, say MuleEventManager, that could be obtained from = the context. As >SpringEventManager doesn't implement ApplicationEventListener there = would be no need need >to make special checks to make sure the MuleEventManager isn't = registered as a listener to >itself. Cheers Ross >-----Original Message----- >From: spr...@li... >[mailto:spr...@li...]On Behalf >Of j=FCrgen h=F6ller [werk3AT] >Sent: Saturday, 29 May 2004 6:31 AM >To: spr...@li... >Subject: Re: [Springframework-developer] Spring / Mule integration - >step 1 > > >OK, let's open up the ApplicationEventMulticaster, which is=20 >currently more or less an implementation detail of=20 >AbstractApplicationContext. First thing I've just done is=20 >renamed ApplicationEventMulticasterImpl to=20 >SimpleApplicationEventMulticaster, to reflect the possibility=20 >for other implementations. >=20 >The central question is: How to specify the=20 >ApplicationEventMulticaster implementation that a context=20 >should use? A typical Spring way would be a special bean in=20 >the context, similar to the MessageSource (and=20 >DispatcherServlet's special beans): A logical bean name would=20 >be "applicationEventMulticaster". >=20 >So far, so good, so prototypically implemented :-) Works=20 >nicely, and is actually just a minor change that does not=20 >affect the rest of the framework, besides reserving the bean=20 >name "applicationEventMulticaster". >=20 >The only remaining problem is that ApplicationEventMulticaster=20 >derives from ApplicationListener. On startup, the context=20 >retrieves all ApplicationListener beans and registers them=20 >with the multicaster. Unfortunately, this means that there=20 >needs to be an explicit check that the multicaster is not=20 >registered as a listener with itself. >=20 >While the latter does work, it feels a bit unclean. However,=20 >registering the multicaster via a=20 >setApplicationEventMulticaster method isn't too convincing=20 >either, as the multicaster should not change after a refresh.=20 >Having it as special bean in the context just seems to be the=20 >natural Spring way. >=20 >Of course, unless it is absolutely cristal clear how we're=20 >gonna approach this, the ApplicationEventMulticaster bean=20 >mechanism will not become part of a release. Introducing a=20 >programmatic hook to set an ApplicationEventMulticaster for=20 >the time being could be undesirable too if we consider=20 >defining a bean mechanism for 1.0.3 (or the like). >=20 >Thoughts? >=20 >Juergen >=20 > >________________________________ > >Von: spr...@li... im=20 >Auftrag von Mason, Ross >Gesendet: Fr 28.05.2004 15:43 >An: spr...@li...;=20 >spr...@li... >Betreff: RE: [Springframework-developer] Spring / Mule=20 >integration - step 1 > > >Hi Juergen, >=20 >For events being published by Spring beans the=20 >MuleEventManager can simply implement the ApplicationListener=20 >interface. But in order for Mule to publish events to spring=20 >beans based on subscriptions, you would need to provide=20 >another implementation of EventMulticaster that published=20 >events based on listener type and subscription. For example,=20 >you may have two beans listening on separate jms queues i.e.=20 >an orders.queue and exception.queue, you don't want your=20 >orders bean receiving exceptions and vice versa. =20 >=20 >Also, the current EventMulticaster only allows one listerner=20 >to be registered for each type, which means you couldn't have=20 >two beans listening on jms topics/queues.=20 >=20 >Cheers, >=20 >Ross > > -----Original Message-----=20 > From:=20 >spr...@li... on=20 >behalf of j=FCrgen h=F6ller [werk3AT]=20 > Sent: Fri 28/05/2004 1:49 PM=20 > To: spr...@li...=20 > Cc:=20 > Subject: Re: [Springframework-developer] Spring / Mule=20 >integration - step 1 >=09 >=09 > > Hi Ross, >=09 > Interesting stuff! Out of curiosity, are you using Mule=20 >yourself in a concrete application at Atlassian? >=09 > Regarding getting notified of events published by=20 >Spring beans: Why not simply make the MuleEventManager=20 >implement the ApplicationListener interface? It would=20 >automatically receive all ApplicationEvents then (like any=20 >other ApplicationListener in the context), being able to=20 >process them accordingly (all other listeners will ignore=20 >events that they don't know anyway). >=09 > So I don't really see a reason why you'd need to hook=20 >into the ApplicationEventMulticaster here. Please tell me if I=20 >missed your point :-) >=09 > Juergen >=09 >=09 > ________________________________ >=09 > Von:=20 >spr...@li... im=20 >Auftrag von Mason, Ross > Gesendet: Fr 28.05.2004 13:42 > An: spr...@li... > Betreff: [Springframework-developer] Spring / Mule=20 >integration - step 1 >=09 >=09 > Hi, > I'm writing some extensions to integrate Spring with=20 >Mule (Mule is an ESB - www.muleumo.org). I'm starting with an=20 >extension to Spring's ApplicationEvent implementation to allow=20 >beans to receive Mule events. >=09 > Mule events can be sent over transports such as jms,=20 >http, smtp, pop3, tcp, etc so a bean in a Spring context could=20 >implement a JmsEventListener, pop3EventListener, etc to=20 >receive events published in Mule. Plus the observer interface=20 >could expose subscription methods to enable Mule to publish to=20 >different subscriptions, i.e. >=09 > public class JmsEventListener implements ApplicationEvent { >=09 > public void setSubscription(String subscription); >=09 > public String getSubscription(); > } >=09 > This would allow springs beans to receive Jms messages,=20 >emails, data over http. Mule handles the transformation of=20 >these events transparently. >=09 > for publishing events, the application code could=20 >publish a MuleEvent with an endpoint and a transport to the=20 >applicationContext, which could be recieved by a MuleEventManager bean. >=09 > The problem is that I'm having trouble seeing how to=20 >change the way Spring manages events. Ideally, the=20 >EventMulticaster on the AbstractApplicationContext would be=20 >accessible with getter and setter methods so that the=20 >'MuleEventManager' bean could hook in it's own=20 >eventMulticaster that knows how to deal subscription events=20 >and how to manage MuleEvents published by Spring Beans. >=09 > I think this sort of extension would add value to=20 >Spring, would you guys consider exposing the EventMulticaster? >=09 > Cheers, >=09 > Ross >=09 >=09 > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the=20 >market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... >=09 >https://lists.sourceforge.net/lists/listinfo/spr>ingframework-developer >=09 > > > >------------------------------------------------------- >This SF.Net email is sponsored by: Oracle 10g >Get certified on the hottest thing ever to hit the market...=20 >Oracle 10g.=20 >Take an Oracle 10g class now, and we'll give you the exam FREE. >http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: Guillaume P. <gpo...@gl...> - 2004-05-31 23:22:59
|
=3E=3E Of course=2C it would be ideal if the JavaBeans Introspector used = a WeakHashMap =3E=3E with WeakReference values - none of this would be necessary then=2E= After all=2C it=27s a =3E=3E pretty obvious bug in the current JDK=3A What=27s the point in usi= ng a WeakHashMap =3E=3E with values that reference the key but are not held in WeakReferen= ces=3F If they wouldn=27t =3E=3E care about garbage collection in the first place=2C they could use= a plain HashMap=2E=2E=2E =3E=3E Currently=2C they seem to go just half the way=2E =3E=3E With the current JDK implementation=2C it would also be nice if th= e servlet container did =3E=3E an Introspector=2EflushCaches call on web app shutdown=2C or prefe= rably a flushFromCaches =3E=3E call for each class loader by the corresponding class loader=2E Ho= wever=2C it=27s unrealistic that =3E=3E all containers will do this any time soon - and this wouldn=27t be= necessary either if that d*** =3E=3E JavaBeans Introspector implementation properly used WeakReferences= =2E From what I understand=2C Sun simply prefered to have caching of BeanInfo= s=2C at the risk of causing memory leaks=2C for performance reasons=2E I= don=27t think that caching with WeakReference has much performance impro= vement=2E From the javadoc =3A -------------------------------------------------------------------------= ------------- http=3A//java=2Esun=2Ecom/j2se/1=2E4=2E1/docs/api/java/beans/Introspector= =2Ehtml Because the Introspector caches BeanInfo classes for better performance=2C= = take care if you use it in an application that uses multiple class loader= s=2E = In general=2C when you destroy a ClassLoader that has been used to intros= pect classes=2C you should use the Introspector=2EflushCaches or Introspe= ctor=2EflushFromCaches method to flush all of the introspected classes ou= t of the cache=2E = -------------------------------------------------------------------------= ------------- I tried to find the quote where they say what I just paraphared above=2C = but I can=27t find it anymore=2E But one of the bug URL I = sent on this thread earlier has just been updated this weekend=2C it seem= s like they have a fix for this problem in Tiger =3A http=3A//bugs=2Esun=2Ecom/bugdatabase/view=5Fbug=2Edo=3Fbug=5Fid=3D480900= 8 Quote =3A =22Strong references to Method=2C Method=5B=5D=2C Class and Cla= ss=5B=5D have been changed to a combination of Soft and Weak = refererences=2E=22 So the Instrospector will still hold a strong reference on the BeanInfo=2C= but the BeanInfo won=27t have a strong reference on = the Class anymore=2E =3E=3E So I guess I=27ll add IntrospectorCleanupListener and Introspector= CleanupServlet classes=2E=2E=2E thoughts=3F Sound good to me=2C but just to be sure=2C Servlets that never throw Unav= alaibleException from the service method cannot be destroyed unless the c= ontext is being destroyed=2C right=3F Guillaume ---- Messages d=B4origine ---- De=3A j=FCrgen h=F6ller =5Bwerk3AT=5D =3Cjuergen=2Ehoeller=40werk3at=2Eco= m=3E Date=3A lundi=2C mai 31=2C 2004 8=3A22 am Objet=3A =5BAVIS-NOTICE=5D Re=3A =5BSpringframework-developer=5D Cleanup = of context resources on webapp reload =3E I=27ve just found out that our JPetStore=27s remaining resource leak = =3E is not caused by iBATIS or JDOM but by Struts=3A Struts uses Commons = =3E BeanUtils which in turn uses the JavaBeans Introspector without = =3E flushing=2E=2E=2E So on web app shutdown=2C the Introspector cache ho= lds = =3E references to Struts Actions from the web app classloder=2E This = =3E prevents garbage collection of JDOM=27s singletons because the web = =3E app classloader (which holds its loaded classes and thus their = =3E static references) is still around=2E So it=27s not JDOM=27s fault=3B= it=27s = =3E rather like with Spring=27s SQLErrorCodesFactory and co=2E =3E = =3E Which gives 2 candidates that would benefit from a general = =3E Introspector=2EflushCaches call on shutdown so far=3A Struts and = =3E Quartz=2E As per my mail from yesterday=2C Spring does not need that = =3E anymore as it flushes the JavaBeans Introspector for each class = =3E that it caches introspection results for itself=2E If you still see = =3E Spring classes hanging around after web app shutdown=2C that=27s = =3E caused by leaks of *other* tools that prevent the class loader = =3E (which is referencing Spring classes) from being disposed=2E =3E = =3E So the remaining question is=3A Should we provide a way to call = =3E Introspector=2EflushCaches on web app shutdown=3F Doing this in = =3E ContextLoaderListener will just affect apps that actually use = =3E ContextLoaderListener=3A What about DispatcherServlet-only apps=3F = =3E What about Struts apps that load a Spring context via a plugin=3F = =3E What about Servlet 2=2E2 apps that can=27t register listeners=3F I gu= ess = =3E it would be better to provide separate IntrospectorCleanupListener = =3E and IntrospectorCleanupServlet classes (analogous to = =3E Log4jConfigListener and Log4jConfigServlet)=2C just doing a = =3E Introspector=2EflushCaches call on shutdown=2E =3E = =3E Of course=2C it would be ideal if the JavaBeans Introspector used a = =3E WeakHashMap with WeakReference values - none of this would be = =3E necessary then=2E After all=2C it=27s a pretty obvious bug in the = =3E current JDK=3A What=27s the point in using a WeakHashMap with values = =3E that reference the key but are not held in WeakReferences=3F If they = =3E wouldn=27t care about garbage collection in the first place=2C they = =3E could use a plain HashMap=2E=2E=2E Currently=2C they seem to go just = half = =3E the way=2E =3E = =3E With the current JDK implementation=2C it would also be nice if the = =3E servlet container did an Introspector=2EflushCaches call on web app = =3E shutdown=2C or preferably a flushFromCaches call for each class = =3E loader by the corresponding class loader=2E However=2C it=27s = =3E unrealistic that all containers will do this any time soon - and = =3E this wouldn=27t be necessary either if that d*** JavaBeans = =3E Introspector implementation properly used WeakReferences=2E =3E = =3E So I guess I=27ll add IntrospectorCleanupListener and = =3E IntrospectorCleanupServlet classes=2E=2E=2E thoughts=3F =3E = =3E Juergen =3E = =3E = =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F =3E = =3E Von=3A springframework-developer-admin=40lists=2Esourceforge=2Enet im= = =3E Auftrag von j=FCrgen h=F6ller =5Bwerk3AT=5D =3E Gesendet=3A Mo 31=2E05=2E2004 13=3A08 =3E An=3A springframework-developer=40lists=2Esourceforge=2Enet =3E Betreff=3A Re=3A =5BSpringframework-developer=5D Cleanup of context = =3E resources on webapp reload =3E = =3E = =3E = =3E Guillaume=2C =3E = =3E As far as I see=2C the only benefit that we would gain with such a = =3E classloader check is that we avoid recaching introspection results = =3E during application runtime=2C for the case where the garbage = =3E collector has eagerly removed them=2E However=2C the latter can only = =3E happen when there are no other references to the given Class=3A This = =3E won=27t be the case with typical Spring usage=2C as both bean = =3E factories and web command controllers (i=2Ee=2E the main usages of = =3E BeanWrapper) hold a reference to the bean class respectively = =3E command class=2E =3E = =3E And if there are no other references to a specific Class=2C I = =3E suppose the garbage collector is free to remove the cached = =3E introspection results for it=3B this can be considered a desirable = =3E thing=2E So I guess it=27s better to leave CachedIntrospectionResults= = =3E as it is=2C as there=27s no noteworthy difference in all other = =3E respects=2E Do you see any negative impact on performance=2C given th= e = =3E scenario from above=3F Your earlier point comes to my mind here=3A = =3E It=27s also about a simple implementation that doesn=27t obscure the = =3E purpose of the code=2E =3E = =3E Juergen =3E = =3E = =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F =3E = =3E Von=3A springframework-developer-admin=40lists=2Esourceforge=2Enet im= = =3E Auftrag von Guillaume Poirier =3E Gesendet=3A Mo 31=2E05=2E2004 00=3A26 =3E An=3A springframework-developer=40lists=2Esourceforge=2Enet =3E Betreff=3A Re=3A =5BSpringframework-developer=5D Cleanup of context = =3E resources on webapp reload =3E = =3E = =3E = =3E Juergen=2C =3E = =3E I think that Introspector=2EflushCaches() on a = =3E ServletContextListener it still =3E the lesser of evils for that memory leak=2C the effect on other = =3E webapps would =3E not be that bad anyway=2C just slow a little bit the next few calls t= o =3E Introspector=2EgetBeanInfo()=2E However=2C I agree with you that thi= s = =3E shouldprobably be dealt with by the application rather than = =3E Spring=2E But may be it =3E could be an option with Spring=27s ContextLoaderListener (probably = =3E off by =3E default)=3F =3E = =3E Concerning your solution with CachedIntrospectionResults=2C I would = =3E have a =3E sugestion for performance=2E For the majority of the use cases=2C =3E CachedIntrospectionResults would be in the same ClassLoader as the = =3E targetclass=2E So I would suggest to first check the ClassLoader to = =3E know if it=27s =3E safe to cache the class without WeakReference=2E I=27ve attached a = =3E patch to the =3E E-Mail if you would like to include my suggestion=2E =3E = =3E Thanks=2C =3E Guillaume =3E = =3E ----- Original Message ----- =3E From=3A =22j=FCrgen h=F6ller =5Bwerk3AT=5D=22 =3Cjuergen=2Ehoeller=40= werk3at=2Ecom=3E =3E To=3A =3Cspringframework-developer=40lists=2Esourceforge=2Enet=3E =3E Sent=3A Sunday=2C May 30=2C 2004 11=3A09 AM =3E Subject=3A Re=3A =5BSpringframework-developer=5D Cleanup of context = =3E resources on =3E webapp reload =3E = =3E = =3E Guillaume=2C =3E = =3E I=27m using a profiler=2C explicitly running garbage collection after= =3E application shutdown and then seeing what remains on the heap=2E = =3E It=27s actually =3E my first really instance profiler work for about two years=3B = =3E haven=27t had any =3E need for it in the meantime=2E =3E = =3E Anyway=2C I did some further tests today=2C changing = =3E SQLErrorCodesFactory and =3E GlobalAdvisorAdapterRegistry to classic singletons again=2C with an =3E Introspector=2EflushCaches call on shutdown=2E While this didn=27t ha= ve = =3E any effect =3E with Petclinic=2C it did result in proper cleanup with Image Database= =2E =3E = =3E So the Introspector=2EflushCaches call *does* have some effect=2C = =3E contrary to my =3E assumption from yesterday=2C but not in all scenarios=2E After some = =3E furthertests=2C I found out that Hibernate (-=3E Petclinic) has its = =3E own leaks=2C thus =3E keeps the web app class loader around=2C thus no cleanup of Spring=27= s =3E singletons in that class loader=2E If Hibernate isn=27t used=2C = =3E everything gets =3E cleaned up properly=2E =3E = =3E This means that you=27re perfectly right=3A Coding singletons with =3E WeakReferences only cleans up that particular singleton object but = =3E of course =3E doesn=27t do anything about the class loader itself with its = =3E remaining leaks=2E =3E As the code *is* uglier with WeakReferences=2C I=27ve permanently cha= nged =3E SQLErrorCodesFactory and GlobalAdvisorAdapterRegistry back to classic= =3E singletons (like they were until a week ago)=2E =3E = =3E I=27d like to leave CachedIntrospectionResults as-is with a = =3E WeakHashMap and =3E WeakReferences=2C as this holds references to classes and might = =3E reside in a =3E parent classloader of the referenced classes=2E That=27s how the JDK=27= s =3E Introspector class should be coded too=2E=2E=2E =3E = =3E The remaining issue is=3A Where to invoke Introspector=2EflushCaches=3F= = =3E EveryApplicationContext shutdown=3F How to avoid cleaning all = =3E BeanInfos *of the =3E entire VM*=2C when all we want to do is clean up all BeanInfos of = =3E the current =3E app=3F =3E Sure=2C a general flushCaches call cleans up all BeanInfo leaks of = =3E the app =3E too=2C be it from Spring or Quartz or whatever=2C but all we want to = =3E provideout-of-the-box is proper cleanup of Spring itself=2E =3E = =3E So my solution for Spring is simple=3A CachedIntrospectionResults = =3E flushes the =3E Introspector cache for the given class (and its superclasses) = =3E right after it =3E fetched the BeanInfo for it (i=2Ee=2E right after it=27s been cached)= =2E = =3E As we cache =3E the introspection results ourselves anyway=2C we wouldn=27t benefit = =3E from the =3E Introspector cache in the first place=2E That shouldn=27t have any = =3E negativeimpact on performance=2E =3E = =3E I did quite a lot of tests with this new strategy=2C and everything g= ets =3E cleaned up nicely within Spring=2E Just if you add Hibernate or = =3E Quartz to the =3E mix=2C you=27ll get leaks from them that prevent the class loader fro= m = =3E gettinggarbage collected=2E With Quartz=2C a general flushCaches call= = =3E helps=3B with =3E Hibernate=2C even that doesn=27t=2E =3E = =3E So in certain scenarios=2C it might help to add a custom =3E ServletContextListener that does an Introspector=2EflushCaches call o= n =3E shutdown - but for Spring itself=2C this isn=27t necessary=2C as the = beans =3E infrastructure does not cause any leaks anymore=2E I=27m happy with = =3E the current =3E solution=3A classic singletons as before=2C just a flushFromCaches = =3E call for each =3E introspected class right when building the CachedIntrospectionResults= =3E object=2E =3E = =3E We should probably tell the Quartz guys to apply specific = =3E flushFromCachescalls after their Introspector usage=2E I=27ve also = =3E noticed that JDOM=2C as used =3E within iBATIS SQL Maps 1=2E3=2C has a resource leak too=2E I haven=27= t = =3E researchedwhere the Hibernate leaks come from in detail=2C but the = =3E root of the problem =3E seems to be CGLIB there=2E =3E = =3E Many thanks for pointing this out! =3A-) =3E = =3E Juergen =3E = =3E = =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F =3E = =3E Von=3A springframework-developer-admin=40lists=2Esourceforge=2Enet im= = =3E Auftrag von =3E Guillaume Poirier =3E Gesendet=3A So 30=2E05=2E2004 07=3A01 =3E An=3A springframework-developer=40lists=2Esourceforge=2Enet =3E Betreff=3A Re=3A =5BSpringframework-developer=5D Cleanup of context = =3E resources on =3E webapp reload =3E = =3E = =3E = =3E Juergen=2C I=27m curious about how exactly you assert what is leaking= =2C = =3E what is =3E not=2C and exactly what is it better with WeakReference=3F Are you = =3E using a =3E profiler that tells you the non-garbage collected objects in the = =3E JVM or do =3E you use other means=3F =3E = =3E Concerning SQLErrorCodesFactory=2C while the class=27 constructor doe= s = =3E cause a =3E leak (indirectly by the use of XmlBeanFactory)=2C it is not itself = =3E the leak=2C =3E it=27s the class instance of SQLErrorCodes that prevent the = =3E ClassLoader=27scollection=2E I did a test calling =3E SQLErrorCodesFactory=2EgetInstance()=2EgetErrorCodes(=22DB2=22) in a = child =3E ClassLoader=2C and it caused a leak when the ClassLoader is thrown = =3E away=2E Then =3E I tried to create my own SQLErrorCodesFactory implementation=2C and = =3E it kept =3E leaking until I stopped using the XmlBeanFactory to create the = =3E instances of =3E SQLErrorCodes=2E Then I tried to just use an Introspector directly = =3E to set the =3E properties on the SQLErrorCodes instances by reflection=2C and it = =3E leaked just =3E as the SQLErrorCodesFactory=2E You have to keep in mind that if e=2Eg= =2E =3E Introspector has an hard reference on SQLErrorCodes=2Eclass=2C then = =3E none of the =3E class loaded by its ClassLoader can be collected=2E So it would be = =3E the cause =3E of SQLErrorCodesFactory singleton to be kept alive=2C not because =3E SQLFactoryErrorCodes has an hard reference on it=2C but because the =3E ClassLoader does=2C and SQLErrorCodes=2Eclass has an hard reference o= n the =3E ClassLoader=2C and the Introspector has an hard reference on =3E SQLErrorCodes=2Eclass=2E So the singleton of SQLFactoryCodesFactory = =3E is really =3E kept alive because Introspector has an hard reference on the class = =3E instanceof SQLErrorCodes=2E =3E = =3E I might misunderstand the situation=2C but as I see it=2C you=27re = =3E working on the =3E symptom rather than the cause=2E If you allow the singleton to be = =3E garbagecollected when the class itself is retained=2C then you might = =3E save some =3E memory=2C but it=27s just like adding memory to the JVM to solve a = =3E leak=2C it will =3E only delay the OutOfMemoryError=2C it won=27t prevent it=2E However=2C= if = =3E you allow =3E the ClassLoader to be collected by removing any hard reference to its= =3E classes=2C that would prevent the leak to even take place at all=2E =3E = =3E That=27s why I=27m curious as to why you say it=27s better with = =3E WeakReference on =3E singleton and Introspector=2EflushCaches() does nothing=2C how do you= = =3E make that =3E assertion=3F I realize that if there=27s something else than = =3E Introspector that =3E has an hard reference on a class of the ClassLoader being thown away=2C= =3E flushing the Introspector=27s cache will have no effect on the leak=2C= = =3E it would =3E still leak as fast=2E But while the WeakReference on the singleton = =3E will delay =3E the OutOfMemoryError=2C does it really help that much=2C since anyway= = =3E all the =3E Class definitions and static members cannot be collected=3F You = =3E have to =3E consider that coding defensively on this might reduce performance = =3E because of =3E more object creation and use of synchronization=2C while also = =3E complicating the =3E code=2E Is it really worth it=2C did your tests really showed a = =3E significanteffect on a typical application=3F =3E = =3E Guillaume =3E = =3E = =3E ----- Original Message ----- =3E From=3A =22j=FCrgen h=F6ller =5Bwerk3AT=5D=22 =3Cjuergen=2Ehoeller=40= werk3at=2Ecom=3E =3E To=3A =3Cspringframework-developer=40lists=2Esourceforge=2Enet=3E =3E Sent=3A Saturday=2C May 29=2C 2004 2=3A28 PM =3E Subject=3A Re=3A =5BSpringframework-developer=5D Cleanup of context = =3E resources on =3E webapp reload =3E = =3E = =3E Guillaume=2C =3E = =3E I=27ve prototypically added an Introspector=2EflushCaches call to con= text =3E shutdown=3A I don=27t see any difference in the profiler=2E That=27s = not too =3E surprising=2C as the originally leaking classes are not managed by be= ans =3E facilities in the first place=3A for example=2C SQLErrorCodesFactory=2C= = =3E which is =3E just used internally by SQLErrorCodeSQLExceptionTranslator=2E =3E = =3E Of course=2C since my changes from a week ago=2C those classes don=27= t leak =3E anymore=2C as they hold their singleton instance in a WeakReference = =3E now=2E=2E=2E I =3E still don=27t understand why this is necessary=2C but I=27m 100=25 su= re = =3E that it does =3E make a difference on both Sun JDK 1=2E4=2E2 and Sun JDK 1=2E3=2E1=2E = I=27ve = =3E also tried =3E various GC configuration options - always the same effect=2E =3E = =3E Juergen =3E = =3E = =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F =3E = =3E Von=3A springframework-developer-admin=40lists=2Esourceforge=2Enet im= = =3E Auftrag von =3E Guillaume Poirier =3E Gesendet=3A Sa 29=2E05=2E2004 06=3A12 =3E An=3A springframework-developer=40lists=2Esourceforge=2Enet =3E Betreff=3A Re=3A =5BSpringframework-developer=5D Cleanup of context = =3E resources on =3E webapp reload =3E = =3E = =3E = =3E I experimented some more about this cleanup issue=2C and I was able = =3E to narrow =3E down the problem to the caching done by the = =3E java=2Ebeans=2EIntrospector=2E It =3E stores the BeanInfo instances in a WeakHashMap=2C but in that Map =3E implementation=2C only the keys uses WeakReference=2C the values are = =3E stored with =3E hard references since BeanInfo has an hard reference on the class = =3E it gives =3E info about (indirectly through BeanDescriptor and others)=2C any time= =3E Introspector=2EgetBeanInfo(Class) is used=2C that class and it=27s = =3E static members =3E will not ever be able to be garbage collected=2E I kind of remember = =3E someonementioning something related to this in the mailling list=2C = =3E but I cannot find =3E the mail=2E I wonder if there=27s other case where the java=5Bx=5D = =3E classes might =3E have an hard reference on a class or its instances=2E A fix for this= =3E particular problem is to have a ServletContextListener call =3E Introspector=2EflushCaches() when the context is destroyed=2E =3E = =3E It seems like a known issue at Sun =3A =3E = =3E http=3A//bugs=2Esun=2Ecom/bugdatabase/view=5Fbug=2Edo=3Fbug=5Fid=3D42= 91376 =3E http=3A//bugs=2Esun=2Ecom/bugdatabase/view=5Fbug=2Edo=3Fbug=5Fid=3D47= 30581 =3E http=3A//bugs=2Esun=2Ecom/bugdatabase/view=5Fbug=2Edo=3Fbug=5Fid=3D48= 09008 =3E = =3E So=2C unless I=27m missing something here=2C that means fixes like us= ing =3E synchronization and WeakReference on singleton probably won=27t help = =3E much if =3E at all=2E The only way that I can see for a class not to be gargage = =3E collectedwhen no more active thread use it=2C is if another = =3E ClassLoader has an hard =3E reference to the class instance=2C or an instance of that class=2E = =3E Having the =3E class itself have an hard reference on a its own singleton has no = =3E effect=2Cit=27s a circular reference that will not prevent the class = =3E or the instance to =3E be gargabe collected when neither is being refered to by something = =3E else=2E =3E Guillaume =3E = =3E = =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by=3A Oracle 10g =3E Get certified on the hottest thing ever to hit the market=2E=2E=2E = =3E Oracle 10g=2E =3E Take an Oracle 10g class now=2C and we=27ll give you the exam FREE=2E= =3E http=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid=3D3149=26alloc=5Fid=3D8166=26op=3D= click =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E = =3E = =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by=3A Oracle 10g =3E Get certified on the hottest thing ever to hit the market=2E=2E=2E = =3E Oracle 10g=2E =3E Take an Oracle 10g class now=2C and we=27ll give you the exam FREE=2E= =3E http=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid149=26alloc=5Fid=3F66=26op=3Dick =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E = =3E = =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by=3A Oracle 10g =3E Get certified on the hottest thing ever to hit the market=2E=2E=2E = =3E Oracle 10g=2E =3E Take an Oracle 10g class now=2C and we=27ll give you the exam FREE=2E= =3E http=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid=3D3149=26alloc=5Fid=3D8166=26op=3D= click =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E = =3E = =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by=3A Oracle 10g =3E Get certified on the hottest thing ever to hit the market=2E=2E=2E = =3E Oracle 10g=2E =3E Take an Oracle 10g class now=2C and we=27ll give you the exam FREE=2E= =3E http=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid149=26alloc=5Fid=3F66=26op=3Dick =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E = =3E = =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by=3A Oracle 10g =3E Get certified on the hottest thing ever to hit the market=2E=2E=2E = =3E Oracle 10g=2E =3E Take an Oracle 10g class now=2C and we=27ll give you the exam FREE=2E= =3E http=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid149=26alloc=5Fid=3F66=26op=3Dick =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E = =3E = =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by=3A Oracle 10g =3E Get certified on the hottest thing ever to hit the market=2E=2E=2E = =3E Oracle 10g=2E = =3E Take an Oracle 10g class now=2C and we=27ll give you the exam FREE=2E= =3E http=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid149=26alloc=5Fid=3F66=26op=D5ick =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E |
|
From: Bronwen C. <bro...@ya...> - 2004-05-31 23:20:20
|
Hi,
If I understand your question, OracleLobHandler works in a test case =
without
weblogics pool, only using the oracle.jdbc.pool.OracleDataSource =
datasource
bean defined as:
<bean id=3D"dataSource" class=3D"oracle.jdbc.pool.OracleDataSource">
<property
name=3D"driverType"><value>oracle.jdbc.OracleDriver</value></property>
<property
name=3D"URL"><value>jdbc:oracle:thin:@localhost:1521:ROBIN</value></prope=
rty>
<property name=3D"user"><value>talentstudio</value></property>
<property
name=3D"password"><value>talentstudio</value></property>
</bean>
In deployment I have set up a weblogic pool using oracle thin driver, =
not a
weblogic oracle driver.=20
So from what I can determine weblogic pool + oracle driver +
oracleLobHandler throws the exception and
Oracle jdbc pool + oracleLobHandler (as in test case) works.
The printouts:
template.getDataSource().getConnection()=3D
weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@=
112
connection.getMetaData().getConnection() =3D
weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@=
112
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
j=FCrgen h=F6ller [werk3AT]
Sent: 31 May 2004 22:52
To: spr...@li...
Subject: Re: [Springframework-developer] re: OracleLobCreator
Can you check what kind of wrappers the DataSource returns? Simply fetch =
the
DataSource, invoke getConnection() and see what kind of handle it =
returns
(System.out.println). Furthermore, invoke
getConnection().getMetaData().getConnection() and see whether this is =
the
native Connection (System.out.println again).=20
=20
However, if you have properly specified SimpleNativeJdbcExtractor for
OracleLobHandler's "nativeJdbcExtractor" property and still get that
exception, then I assume that Weblogic's own Oracle JDBC driver doesn't =
use
the OracleConnection class at all. This would mean that OracleLobHandler
cannot be used with it.
=20
Do I understand correctly that OracleLobHandler plus
SimpleNativeJdbcExtractor work properly with Oracle's original JDBC =
driver
plus Weblogic's connection pool?
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von
Bronwen Cassidy
Gesendet: Di 01.06.2004 00:24
An: spr...@li...
Betreff: RE: [Springframework-developer] re: OracleLobCreator
Hi,
OK the results when changing the driver for the pool from =
jdbc:oracle:thin
to: jdbc:weblogic:oracle using SimpleNativeJdbcExtractor
Error:
org.springframework.dao.DataAccessResourceFailureException: Could not =
create
Oracle LOB; nested exception is org.springframework.dao.In
validDataAccessApiUsageException: OracleLobHandler needs to work on
oracle.jdbc.OracleConnection - specify a proper NativeJdbcExtractor
org.springframework.dao.InvalidDataAccessApiUsageException: =
OracleLobHandler
needs to work on oracle.jdbc.OracleConnection - specify a
proper NativeJdbcExtractor
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.ge=
tOr
acleConnection(OracleLobHandler.java:366)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr=
eat
eLob(OracleLobHandler.java:336)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se=
tCl
obAsString(OracleLobHandler.java:264)
at
com.zynap.talentstudio.dao.jdbc.oracle.datamanipulation.PortfolioDataMani=
pul
ation$1.setValues(PortfolioDataManipulation.java
:50)
at
org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStatemen=
tCa
llback.doInPreparedStatement(AbstractLobCreating
PreparedStatementCallback.java:71)
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:292)=
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:308)=
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
tho...@tr...
Sent: 31 May 2004 21:47
To: spr...@li...
Subject: Re: [Springframework-developer] re: OracleLobCreator
I was finally able to reproduce the error in my own environment using =
Spring
1.0.1. I will try 1.0.2 (current CVS) and see what happens.
Thomas
Here is my stack trace:
org.springframework.dao.DataAccessResourceFailureException: Could not =
create
Oracle LOB; nested exception is java.lang.ClassCastException: null
java.lang.ClassCastException
at
oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.jav=
a:5
090)
at
oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnec=
tio
n.java:5141)
at oracle.sql.CLOB.createTemporary(CLOB.java:1009)
at oracle.sql.CLOB.createTemporary(CLOB.java:956)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java=
:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI=
mpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.pr=
epa
reLob(OracleLobHandler.java:375)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr=
eat
eLob(OracleLobHandler.java:327)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se=
tCl
obAsString(OracleLobHandler.java:255)
at org.buggybean.web.TestServlet.doGet(TestServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Ser=
vle
tStubImpl.java:971)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava
:402)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava
:305)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.ru=
n(W
ebAppServletContext.java:6350)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSub=
jec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)=
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServle=
tCo
ntext.java:3635)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.j=
ava
:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Quoting "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>:
> Changing the pool should just affect the NativeJdbcExtractor choice, =
=3D
> i.e. a different bean wired to OracleLobHandler's =
"nativeJdbcExtractor" =3D
> property.
> =3D20
> Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
=3D
> good chance that it will work, avoiding the need for a specific =
Weblogic =3D
> implementation of the NativeJdbcExtractor interface.
> =3D20
> As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =3D
> Commons DBCP too, avoiding the need for a different =
NativeJdbcExtractor =3D
> configuration when switching between Commons DBCP and another pool.
> =3D20
> Side note: The new version of SimpleNativeJdbcExtractor will also work =
=3D
> with C3P0. This allows the use of C3P0's ComboPooledDataSource as =
direct =3D
> replacement of Commons DBCP's BasicDataSource.
> =3D20
> Juergen
> =3D20
>
> ________________________________
>
> Von: spr...@li... im Auftrag =
=3D
> von Bronwen Cassidy
> Gesendet: Mo 31.05.2004 22:25
> An: spr...@li...
> Betreff: Re: [Springframework-developer] re: OracleLobCreator
>
>
>
> Hi
> I have no concern as to the pool i use, i am actually
> completely ignorant and have been blindly feeling my
> way using the spring test cases, samples, docs and
> some googling, until 4 months ago i had never used
> oracle and until a week ago i did not need to do more
> than work out db agnostic sql queries :-)
>
> so please i am more than happy to use weblogic pool,
> which i am using when the app is deployed, hence the
> test time passes and deploy time failures most
> likely!! I am guessing the changes are needed in the
> nativeJdbcExtractor class in the spring.xml needs to
> point to a weblogic equivalent??
>
> --- Thomas Risberg <tho...@tr...> wrote:
> > Since you are using the Commons DBCP rather than a
> > WebLogic pool the
> > issue is slightly different. We have to figure out
> > why the connection
> > returned from the DBCP pool is not unwrapped
> > properly.
> >
> > Thomas
> >
> >
> > Bronwen Cassidy wrote:
> >
> > >Thank-you Jurgen
> > >This was the approach i had come to conclude as the
> > >only difference between passing test case and
> > failing
> > >deployed app is the connection pool handled by
> > >weblogic , ahh well another trip into the unknown,
> > the
> > >best part of being a developer ;-)
> > >
> > >regards
> > >Bronwen
> > >
> > >--- j=3DFCrgen_h=3DF6ller_[werk3AT]
> > ><jue...@we...> wrote: >
> > >OracleLobHandler needs to work on a native
> > >=3D20
> > >
> > >>OracleConnection as it comes from the driver. The
> > >>usual problem in that respect is not the driver
> > but
> > >>the connection pool: Every connection pool needs
> > to
> > >>wrap native connections with pooled connections
> > that
> > >>at least have different closing behavior.
> > >>
> > >>To address this, OracleLobHandler has the
> > >>"nativeJdbcExtractor" property, taking an
> > >>implementation of Spring's NativeJdbcExtractor
> > >>interface. Spring includes out-of-the-box
> > >>implementations for Commons DBCP, XAPool, and
> > JBoss.
> > >>I guess what you need to do is write such an
> > >>extractor for Weblogic.
> > >>
> > >>What's odd about your exception is that
> > >>OracleLobCreator does not complain that it doesn't
> > >>receive an OracleConnection (there's an explicit
> > >>check in there). It seems to get a wrapped
> > >>connection that is still assignable to
> > >>OracleConnection, although it's not the native
> > >>OracleConnection from the driver...
> > >>
> > >>Maybe Weblogic uses some special way of pooling
> > >>connections for the Oracle driver, using poolable
> > >>OracleConnections? The getPhysicalConnection
> > method
> > >>will probably be in the OracleConnection class,
> > not
> > >>in the CLOB class. Try writing a
> > NativeJdbcExtractor
> > >>that unwraps an OracleConnection with that method.
> >
> > >>
> > >>Juergen
> > >>
> > >>
> > >>________________________________
> > >>
> > >>Von:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> > >>im Auftrag von Bronwen Cassidy
> > >>Gesendet: Mo 31.05.2004 04:27
> > >>An:
> > spr...@li...
> > >>Betreff: RE: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>
> > >>
> > >>Hi I have:
> > >>
> > >>Weblogic 8 service pack 2
> > >>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
> > >>Oracle9i
> > >>I have set up the connection pool using the
> > >>jdbc:oracle:thin (oracle thin
> > >>drivers (not weblogic ones)
> > >>
> > >>Actually I managed to find some information (very
> > >>little) one from a
> > >>hibernate mail, suggested using the
> > >>getPhysicalConnection() instead of
> > >>createTemporary, but this method does not seem to
> > >>available on the CLOB
> > >>class??
> > >>
> > >>-----Original Message-----
> > >>From:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> >
> >[mailto:spr...@li...]
> > >=3D20
> > >
> > >>On Behalf Of
> > >>Thomas Risberg
> > >>Sent: 31 May 2004 02:09
> > >>To:
> > spr...@li...
> > >>Subject: Re: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>Bronwen,
> > >>
> > >>In order to pinpoint the problem quicker - what
> > >>version of WebLogic,
> > >>Oracle and JDBC drivers are you using?
> > >>
> > >>Thomas
> > >>
> > >>Bronwen Cassidy wrote:
> > >>
> > >> =3D20
> > >>
> > >>>Hi I have a CLOB column in oracle and in the test
> > >>> =3D20
> > >>>
> > >>there are no
> > >> =3D20
> > >>
> > >>>problems, unfortunately deploying to weblogic I
> > >>> =3D20
> > >>>
> > >>get the exception
> > >> =3D20
> > >>
> > >>>below. We are using classes12.jar whereas
> > weblogic
> > >>> =3D20
> > >>>
> > >>uses ojdbc14.jar, I
> > >> =3D20
> > >>
> > >>>firstly replaced weblogics jars and classpath
> > >>> =3D20
> > >>>
> > >>settings to use the
> > >> =3D20
> > >>
> > >>>classes12.jar, but got the same error, so I
> > pulled
> > >>> =3D20
> > >>>
> > >>weblogic oracle jar
> > >> =3D20
> > >>
> > >>>into my test classpath to test if the problem was
> > >>> =3D20
> > >>>
> > >>with the jars but
> > >> =3D20
> > >>
> > >>>the test worked fine ?? I am really stuck as to
> > >>> =3D20
> > >>>
> > >>whom this should go to
> > >> =3D20
> > >>
> > >>>weblogic, oracle, or . I am hoping there is an
> > >>> =3D20
> > >>>
> > >>expert there who can
> > >> =3D20
> > >>
> > >>>shed some light. Google did not have a single
> > >>> =3D20
> > >>>
> > >>match for variations of
> > >> =3D20
> > >>
> > >>>the first 2 lines!!
> > >>>
> > >>>java.lang.ClassCastException
> > >>>
> > >>>at
> > >>>
> > >>> =3D20
> > >>>
> >
> =
>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
=3D
> va:5
> > >=3D20
> >
> =3D3D=3D3D=3D3D message truncated =3D3D=3D3D=3D3D
>
>
> =3D20
> =3D20
> =3D20
> ____________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3D3149&alloc_id=3D3D8166&op=3D3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. =
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Guillaume P. <gpo...@gl...> - 2004-05-31 22:59:04
|
Juergen=2C I=27m not sure I=27m following you on this one=2C as far I as can tell=2C= CachedIntrospectionResults=2EforClass(Class) is only called in BeanWrapperImpl=2C and the result is only kept in the BeanWrapper was ins= tance variable=2E So anytime a BeanWrapperImpl instance is collected=2C its CachedIntrospectionResults would get collected too=2E Both the factories= the web controllers hold references only on the class=2C not the CachedIntrospectionResults for that class=2C don=27t they=3F Holding a s= trong reference on the former won=27t prevent garbage collecting on the latter=2E= So that means=2C most of the time when the garbage collector runs=2C you wou= ld need to create the CachedIntrospectionResults again for any binding of command/form in a web controller=2C creation of prototype beans in the factory=2C use of BeanUtils=2EcopyProperties()=2C direct use of BeanWrapp= erImpl=2C etc=2E=2E I=27m mostly guessing here=2C but I would think the performanc= e hit could be potentially significant=2E But reading your post makes me think of something that I think would be t= he best solution for those kind of memory leaks=2C except it would need to b= e implemented within the JDK=2E The best would be to have kind of an equiv= alent of ThreadLocal but for class=2E Have a HashMap in java=2Elang=2EClass=2C= and e=2Eg=2E ClassReference (or a better name) holding a WeakReference on the target=2C= and placing the strong reference in the java=2Elang=2EClass=27s HashMap=2E M= ay be I=27ll take a look at sun=27s bug list and suggest it=2E It looks = like something that would work=2C doesn=27t it=3F Guillaume ---- Messages d=B4origine ---- De=3A j=FCrgen h=F6ller =5Bwerk3AT=5D =3Cjuergen=2Ehoeller=40werk3at=2Eco= m=3E Date=3A lundi=2C mai 31=2C 2004 7=3A08 am Objet=3A Re=3A =5BSpringframework-developer=5D Cleanup of context resourc= es on webapp reload =3E Guillaume=2C =3E = =3E As far as I see=2C the only benefit that we would gain with such a = =3E classloader check is that we avoid recaching introspection results = =3E during application runtime=2C for the case where the garbage = =3E collector has eagerly removed them=2E However=2C the latter can only = =3E happen when there are no other references to the given Class=3A This = =3E won=27t be the case with typical Spring usage=2C as both bean = =3E factories and web command controllers (i=2Ee=2E the main usages of = =3E BeanWrapper) hold a reference to the bean class respectively = =3E command class=2E =3E = =3E And if there are no other references to a specific Class=2C I = =3E suppose the garbage collector is free to remove the cached = =3E introspection results for it=3B this can be considered a desirable = =3E thing=2E So I guess it=27s better to leave CachedIntrospectionResults= = =3E as it is=2C as there=27s no noteworthy difference in all other = =3E respects=2E Do you see any negative impact on performance=2C given th= e = =3E scenario from above=3F Your earlier point comes to my mind here=3A = =3E It=27s also about a simple implementation that doesn=27t obscure the = =3E purpose of the code=2E =3E = =3E Juergen =3E = =3E = =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F =3E = =3E Von=3A springframework-developer-admin=40lists=2Esourceforge=2Enet im= = =3E Auftrag von Guillaume Poirier =3E Gesendet=3A Mo 31=2E05=2E2004 00=3A26 =3E An=3A springframework-developer=40lists=2Esourceforge=2Enet =3E Betreff=3A Re=3A =5BSpringframework-developer=5D Cleanup of context = =3E resources on webapp reload =3E = =3E = =3E = =3E Juergen=2C =3E = =3E I think that Introspector=2EflushCaches() on a = =3E ServletContextListener it still =3E the lesser of evils for that memory leak=2C the effect on other = =3E webapps would =3E not be that bad anyway=2C just slow a little bit the next few calls t= o =3E Introspector=2EgetBeanInfo()=2E However=2C I agree with you that thi= s = =3E shouldprobably be dealt with by the application rather than = =3E Spring=2E But may be it =3E could be an option with Spring=27s ContextLoaderListener (probably = =3E off by =3E default)=3F =3E = =3E Concerning your solution with CachedIntrospectionResults=2C I would = =3E have a =3E sugestion for performance=2E For the majority of the use cases=2C =3E CachedIntrospectionResults would be in the same ClassLoader as the = =3E targetclass=2E So I would suggest to first check the ClassLoader to = =3E know if it=27s =3E safe to cache the class without WeakReference=2E I=27ve attached a = =3E patch to the =3E E-Mail if you would like to include my suggestion=2E =3E = =3E Thanks=2C =3E Guillaume =3E = =3E ----- Original Message ----- =3E From=3A =22j=FCrgen h=F6ller =5Bwerk3AT=5D=22 =3Cjuergen=2Ehoeller=40= werk3at=2Ecom=3E =3E To=3A =3Cspringframework-developer=40lists=2Esourceforge=2Enet=3E =3E Sent=3A Sunday=2C May 30=2C 2004 11=3A09 AM =3E Subject=3A Re=3A =5BSpringframework-developer=5D Cleanup of context = =3E resources on =3E webapp reload =3E = =3E = =3E Guillaume=2C =3E = =3E I=27m using a profiler=2C explicitly running garbage collection after= =3E application shutdown and then seeing what remains on the heap=2E = =3E It=27s actually =3E my first really instance profiler work for about two years=3B = =3E haven=27t had any =3E need for it in the meantime=2E =3E = =3E Anyway=2C I did some further tests today=2C changing = =3E SQLErrorCodesFactory and =3E GlobalAdvisorAdapterRegistry to classic singletons again=2C with an =3E Introspector=2EflushCaches call on shutdown=2E While this didn=27t ha= ve = =3E any effect =3E with Petclinic=2C it did result in proper cleanup with Image Database= =2E =3E = =3E So the Introspector=2EflushCaches call *does* have some effect=2C = =3E contrary to my =3E assumption from yesterday=2C but not in all scenarios=2E After some = =3E furthertests=2C I found out that Hibernate (-=3E Petclinic) has its = =3E own leaks=2C thus =3E keeps the web app class loader around=2C thus no cleanup of Spring=27= s =3E singletons in that class loader=2E If Hibernate isn=27t used=2C = =3E everything gets =3E cleaned up properly=2E =3E = =3E This means that you=27re perfectly right=3A Coding singletons with =3E WeakReferences only cleans up that particular singleton object but = =3E of course =3E doesn=27t do anything about the class loader itself with its = =3E remaining leaks=2E =3E As the code *is* uglier with WeakReferences=2C I=27ve permanently cha= nged =3E SQLErrorCodesFactory and GlobalAdvisorAdapterRegistry back to classic= =3E singletons (like they were until a week ago)=2E =3E = =3E I=27d like to leave CachedIntrospectionResults as-is with a = =3E WeakHashMap and =3E WeakReferences=2C as this holds references to classes and might = =3E reside in a =3E parent classloader of the referenced classes=2E That=27s how the JDK=27= s =3E Introspector class should be coded too=2E=2E=2E =3E = =3E The remaining issue is=3A Where to invoke Introspector=2EflushCaches=3F= = =3E EveryApplicationContext shutdown=3F How to avoid cleaning all = =3E BeanInfos *of the =3E entire VM*=2C when all we want to do is clean up all BeanInfos of = =3E the current =3E app=3F =3E Sure=2C a general flushCaches call cleans up all BeanInfo leaks of = =3E the app =3E too=2C be it from Spring or Quartz or whatever=2C but all we want to = =3E provideout-of-the-box is proper cleanup of Spring itself=2E =3E = =3E So my solution for Spring is simple=3A CachedIntrospectionResults = =3E flushes the =3E Introspector cache for the given class (and its superclasses) = =3E right after it =3E fetched the BeanInfo for it (i=2Ee=2E right after it=27s been cached)= =2E = =3E As we cache =3E the introspection results ourselves anyway=2C we wouldn=27t benefit = =3E from the =3E Introspector cache in the first place=2E That shouldn=27t have any = =3E negativeimpact on performance=2E =3E = =3E I did quite a lot of tests with this new strategy=2C and everything g= ets =3E cleaned up nicely within Spring=2E Just if you add Hibernate or = =3E Quartz to the =3E mix=2C you=27ll get leaks from them that prevent the class loader fro= m = =3E gettinggarbage collected=2E With Quartz=2C a general flushCaches call= = =3E helps=3B with =3E Hibernate=2C even that doesn=27t=2E =3E = =3E So in certain scenarios=2C it might help to add a custom =3E ServletContextListener that does an Introspector=2EflushCaches call o= n =3E shutdown - but for Spring itself=2C this isn=27t necessary=2C as the = beans =3E infrastructure does not cause any leaks anymore=2E I=27m happy with = =3E the current =3E solution=3A classic singletons as before=2C just a flushFromCaches = =3E call for each =3E introspected class right when building the CachedIntrospectionResults= =3E object=2E =3E = =3E We should probably tell the Quartz guys to apply specific = =3E flushFromCachescalls after their Introspector usage=2E I=27ve also = =3E noticed that JDOM=2C as used =3E within iBATIS SQL Maps 1=2E3=2C has a resource leak too=2E I haven=27= t = =3E researchedwhere the Hibernate leaks come from in detail=2C but the = =3E root of the problem =3E seems to be CGLIB there=2E =3E = =3E Many thanks for pointing this out! =3A-) =3E = =3E Juergen =3E = =3E = =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F =3E = =3E Von=3A springframework-developer-admin=40lists=2Esourceforge=2Enet im= = =3E Auftrag von =3E Guillaume Poirier =3E Gesendet=3A So 30=2E05=2E2004 07=3A01 =3E An=3A springframework-developer=40lists=2Esourceforge=2Enet =3E Betreff=3A Re=3A =5BSpringframework-developer=5D Cleanup of context = =3E resources on =3E webapp reload =3E = =3E = =3E = =3E Juergen=2C I=27m curious about how exactly you assert what is leaking= =2C = =3E what is =3E not=2C and exactly what is it better with WeakReference=3F Are you = =3E using a =3E profiler that tells you the non-garbage collected objects in the = =3E JVM or do =3E you use other means=3F =3E = =3E Concerning SQLErrorCodesFactory=2C while the class=27 constructor doe= s = =3E cause a =3E leak (indirectly by the use of XmlBeanFactory)=2C it is not itself = =3E the leak=2C =3E it=27s the class instance of SQLErrorCodes that prevent the = =3E ClassLoader=27scollection=2E I did a test calling =3E SQLErrorCodesFactory=2EgetInstance()=2EgetErrorCodes(=22DB2=22) in a = child =3E ClassLoader=2C and it caused a leak when the ClassLoader is thrown = =3E away=2E Then =3E I tried to create my own SQLErrorCodesFactory implementation=2C and = =3E it kept =3E leaking until I stopped using the XmlBeanFactory to create the = =3E instances of =3E SQLErrorCodes=2E Then I tried to just use an Introspector directly = =3E to set the =3E properties on the SQLErrorCodes instances by reflection=2C and it = =3E leaked just =3E as the SQLErrorCodesFactory=2E You have to keep in mind that if e=2Eg= =2E =3E Introspector has an hard reference on SQLErrorCodes=2Eclass=2C then = =3E none of the =3E class loaded by its ClassLoader can be collected=2E So it would be = =3E the cause =3E of SQLErrorCodesFactory singleton to be kept alive=2C not because =3E SQLFactoryErrorCodes has an hard reference on it=2C but because the =3E ClassLoader does=2C and SQLErrorCodes=2Eclass has an hard reference o= n the =3E ClassLoader=2C and the Introspector has an hard reference on =3E SQLErrorCodes=2Eclass=2E So the singleton of SQLFactoryCodesFactory = =3E is really =3E kept alive because Introspector has an hard reference on the class = =3E instanceof SQLErrorCodes=2E =3E = =3E I might misunderstand the situation=2C but as I see it=2C you=27re = =3E working on the =3E symptom rather than the cause=2E If you allow the singleton to be = =3E garbagecollected when the class itself is retained=2C then you might = =3E save some =3E memory=2C but it=27s just like adding memory to the JVM to solve a = =3E leak=2C it will =3E only delay the OutOfMemoryError=2C it won=27t prevent it=2E However=2C= if = =3E you allow =3E the ClassLoader to be collected by removing any hard reference to its= =3E classes=2C that would prevent the leak to even take place at all=2E =3E = =3E That=27s why I=27m curious as to why you say it=27s better with = =3E WeakReference on =3E singleton and Introspector=2EflushCaches() does nothing=2C how do you= = =3E make that =3E assertion=3F I realize that if there=27s something else than = =3E Introspector that =3E has an hard reference on a class of the ClassLoader being thown away=2C= =3E flushing the Introspector=27s cache will have no effect on the leak=2C= = =3E it would =3E still leak as fast=2E But while the WeakReference on the singleton = =3E will delay =3E the OutOfMemoryError=2C does it really help that much=2C since anyway= = =3E all the =3E Class definitions and static members cannot be collected=3F You = =3E have to =3E consider that coding defensively on this might reduce performance = =3E because of =3E more object creation and use of synchronization=2C while also = =3E complicating the =3E code=2E Is it really worth it=2C did your tests really showed a = =3E significanteffect on a typical application=3F =3E = =3E Guillaume =3E = =3E = =3E ----- Original Message ----- =3E From=3A =22j=FCrgen h=F6ller =5Bwerk3AT=5D=22 =3Cjuergen=2Ehoeller=40= werk3at=2Ecom=3E =3E To=3A =3Cspringframework-developer=40lists=2Esourceforge=2Enet=3E =3E Sent=3A Saturday=2C May 29=2C 2004 2=3A28 PM =3E Subject=3A Re=3A =5BSpringframework-developer=5D Cleanup of context = =3E resources on =3E webapp reload =3E = =3E = =3E Guillaume=2C =3E = =3E I=27ve prototypically added an Introspector=2EflushCaches call to con= text =3E shutdown=3A I don=27t see any difference in the profiler=2E That=27s = not too =3E surprising=2C as the originally leaking classes are not managed by be= ans =3E facilities in the first place=3A for example=2C SQLErrorCodesFactory=2C= = =3E which is =3E just used internally by SQLErrorCodeSQLExceptionTranslator=2E =3E = =3E Of course=2C since my changes from a week ago=2C those classes don=27= t leak =3E anymore=2C as they hold their singleton instance in a WeakReference = =3E now=2E=2E=2E I =3E still don=27t understand why this is necessary=2C but I=27m 100=25 su= re = =3E that it does =3E make a difference on both Sun JDK 1=2E4=2E2 and Sun JDK 1=2E3=2E1=2E = I=27ve = =3E also tried =3E various GC configuration options - always the same effect=2E =3E = =3E Juergen =3E = =3E = =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F =3E = =3E Von=3A springframework-developer-admin=40lists=2Esourceforge=2Enet im= = =3E Auftrag von =3E Guillaume Poirier =3E Gesendet=3A Sa 29=2E05=2E2004 06=3A12 =3E An=3A springframework-developer=40lists=2Esourceforge=2Enet =3E Betreff=3A Re=3A =5BSpringframework-developer=5D Cleanup of context = =3E resources on =3E webapp reload =3E = =3E = =3E = =3E I experimented some more about this cleanup issue=2C and I was able = =3E to narrow =3E down the problem to the caching done by the = =3E java=2Ebeans=2EIntrospector=2E It =3E stores the BeanInfo instances in a WeakHashMap=2C but in that Map =3E implementation=2C only the keys uses WeakReference=2C the values are = =3E stored with =3E hard references since BeanInfo has an hard reference on the class = =3E it gives =3E info about (indirectly through BeanDescriptor and others)=2C any time= =3E Introspector=2EgetBeanInfo(Class) is used=2C that class and it=27s = =3E static members =3E will not ever be able to be garbage collected=2E I kind of remember = =3E someonementioning something related to this in the mailling list=2C = =3E but I cannot find =3E the mail=2E I wonder if there=27s other case where the java=5Bx=5D = =3E classes might =3E have an hard reference on a class or its instances=2E A fix for this= =3E particular problem is to have a ServletContextListener call =3E Introspector=2EflushCaches() when the context is destroyed=2E =3E = =3E It seems like a known issue at Sun =3A =3E = =3E http=3A//bugs=2Esun=2Ecom/bugdatabase/view=5Fbug=2Edo=3Fbug=5Fid=3D42= 91376 =3E http=3A//bugs=2Esun=2Ecom/bugdatabase/view=5Fbug=2Edo=3Fbug=5Fid=3D47= 30581 =3E http=3A//bugs=2Esun=2Ecom/bugdatabase/view=5Fbug=2Edo=3Fbug=5Fid=3D48= 09008 =3E = =3E So=2C unless I=27m missing something here=2C that means fixes like us= ing =3E synchronization and WeakReference on singleton probably won=27t help = =3E much if =3E at all=2E The only way that I can see for a class not to be gargage = =3E collectedwhen no more active thread use it=2C is if another = =3E ClassLoader has an hard =3E reference to the class instance=2C or an instance of that class=2E = =3E Having the =3E class itself have an hard reference on a its own singleton has no = =3E effect=2Cit=27s a circular reference that will not prevent the class = =3E or the instance to =3E be gargabe collected when neither is being refered to by something = =3E else=2E =3E Guillaume =3E = =3E = =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by=3A Oracle 10g =3E Get certified on the hottest thing ever to hit the market=2E=2E=2E = =3E Oracle 10g=2E =3E Take an Oracle 10g class now=2C and we=27ll give you the exam FREE=2E= =3E http=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid=3D3149=26alloc=5Fid=3D8166=26op=3D= click =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E = =3E = =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by=3A Oracle 10g =3E Get certified on the hottest thing ever to hit the market=2E=2E=2E = =3E Oracle 10g=2E =3E Take an Oracle 10g class now=2C and we=27ll give you the exam FREE=2E= =3E http=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid149=26alloc=5Fid=3F66=26op=3Dick =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E = =3E = =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by=3A Oracle 10g =3E Get certified on the hottest thing ever to hit the market=2E=2E=2E = =3E Oracle 10g=2E =3E Take an Oracle 10g class now=2C and we=27ll give you the exam FREE=2E= =3E http=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid=3D3149=26alloc=5Fid=3D8166=26op=3D= click =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E = =3E = =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by=3A Oracle 10g =3E Get certified on the hottest thing ever to hit the market=2E=2E=2E = =3E Oracle 10g=2E =3E Take an Oracle 10g class now=2C and we=27ll give you the exam FREE=2E= =3E http=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid149=26alloc=5Fid=3F66=26op=3Dick =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E = =3E = =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by=3A Oracle 10g =3E Get certified on the hottest thing ever to hit the market=2E=2E=2E = =3E Oracle 10g=2E = =3E Take an Oracle 10g class now=2C and we=27ll give you the exam FREE=2E= =3E http=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid149=26alloc=5Fid=3F66=26op=D5ick =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E |
|
From: <jue...@we...> - 2004-05-31 22:52:56
|
Can you check what kind of wrappers the DataSource returns? Simply fetch =
the DataSource, invoke getConnection() and see what kind of handle it =
returns (System.out.println). Furthermore, invoke =
getConnection().getMetaData().getConnection() and see whether this is =
the native Connection (System.out.println again).=20
=20
However, if you have properly specified SimpleNativeJdbcExtractor for =
OracleLobHandler's "nativeJdbcExtractor" property and still get that =
exception, then I assume that Weblogic's own Oracle JDBC driver doesn't =
use the OracleConnection class at all. This would mean that =
OracleLobHandler cannot be used with it.
=20
Do I understand correctly that OracleLobHandler plus =
SimpleNativeJdbcExtractor work properly with Oracle's original JDBC =
driver plus Weblogic's connection pool?
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Bronwen Cassidy
Gesendet: Di 01.06.2004 00:24
An: spr...@li...
Betreff: RE: [Springframework-developer] re: OracleLobCreator
Hi,
OK the results when changing the driver for the pool from =
jdbc:oracle:thin
to: jdbc:weblogic:oracle using SimpleNativeJdbcExtractor
Error:
org.springframework.dao.DataAccessResourceFailureException: Could not =
create
Oracle LOB; nested exception is org.springframework.dao.In
validDataAccessApiUsageException: OracleLobHandler needs to work on
oracle.jdbc.OracleConnection - specify a proper NativeJdbcExtractor
org.springframework.dao.InvalidDataAccessApiUsageException: =
OracleLobHandler
needs to work on oracle.jdbc.OracleConnection - specify a
proper NativeJdbcExtractor
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.ge=
tOr
acleConnection(OracleLobHandler.java:366)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr=
eat
eLob(OracleLobHandler.java:336)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se=
tCl
obAsString(OracleLobHandler.java:264)
at
com.zynap.talentstudio.dao.jdbc.oracle.datamanipulation.PortfolioDataMani=
pul
ation$1.setValues(PortfolioDataManipulation.java
:50)
at
org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStatemen=
tCa
llback.doInPreparedStatement(AbstractLobCreating
PreparedStatementCallback.java:71)
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:292)=
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:308)=
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
tho...@tr...
Sent: 31 May 2004 21:47
To: spr...@li...
Subject: Re: [Springframework-developer] re: OracleLobCreator
I was finally able to reproduce the error in my own environment using =
Spring
1.0.1. I will try 1.0.2 (current CVS) and see what happens.
Thomas
Here is my stack trace:
org.springframework.dao.DataAccessResourceFailureException: Could not =
create
Oracle LOB; nested exception is java.lang.ClassCastException: null
java.lang.ClassCastException
at
oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.jav=
a:5
090)
at
oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnec=
tio
n.java:5141)
at oracle.sql.CLOB.createTemporary(CLOB.java:1009)
at oracle.sql.CLOB.createTemporary(CLOB.java:956)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java=
:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI=
mpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.pr=
epa
reLob(OracleLobHandler.java:375)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr=
eat
eLob(OracleLobHandler.java:327)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se=
tCl
obAsString(OracleLobHandler.java:255)
at org.buggybean.web.TestServlet.doGet(TestServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Ser=
vle
tStubImpl.java:971)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava
:402)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava
:305)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.ru=
n(W
ebAppServletContext.java:6350)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSub=
jec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)=
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServle=
tCo
ntext.java:3635)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.j=
ava
:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Quoting "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>:
> Changing the pool should just affect the NativeJdbcExtractor choice, =
=3D
> i.e. a different bean wired to OracleLobHandler's =
"nativeJdbcExtractor" =3D
> property.
> =3D20
> Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
=3D
> good chance that it will work, avoiding the need for a specific =
Weblogic =3D
> implementation of the NativeJdbcExtractor interface.
> =3D20
> As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =3D
> Commons DBCP too, avoiding the need for a different =
NativeJdbcExtractor =3D
> configuration when switching between Commons DBCP and another pool.
> =3D20
> Side note: The new version of SimpleNativeJdbcExtractor will also work =
=3D
> with C3P0. This allows the use of C3P0's ComboPooledDataSource as =
direct =3D
> replacement of Commons DBCP's BasicDataSource.
> =3D20
> Juergen
> =3D20
>
> ________________________________
>
> Von: spr...@li... im Auftrag =
=3D
> von Bronwen Cassidy
> Gesendet: Mo 31.05.2004 22:25
> An: spr...@li...
> Betreff: Re: [Springframework-developer] re: OracleLobCreator
>
>
>
> Hi
> I have no concern as to the pool i use, i am actually
> completely ignorant and have been blindly feeling my
> way using the spring test cases, samples, docs and
> some googling, until 4 months ago i had never used
> oracle and until a week ago i did not need to do more
> than work out db agnostic sql queries :-)
>
> so please i am more than happy to use weblogic pool,
> which i am using when the app is deployed, hence the
> test time passes and deploy time failures most
> likely!! I am guessing the changes are needed in the
> nativeJdbcExtractor class in the spring.xml needs to
> point to a weblogic equivalent??
>
> --- Thomas Risberg <tho...@tr...> wrote:
> > Since you are using the Commons DBCP rather than a
> > WebLogic pool the
> > issue is slightly different. We have to figure out
> > why the connection
> > returned from the DBCP pool is not unwrapped
> > properly.
> >
> > Thomas
> >
> >
> > Bronwen Cassidy wrote:
> >
> > >Thank-you Jurgen
> > >This was the approach i had come to conclude as the
> > >only difference between passing test case and
> > failing
> > >deployed app is the connection pool handled by
> > >weblogic , ahh well another trip into the unknown,
> > the
> > >best part of being a developer ;-)
> > >
> > >regards
> > >Bronwen
> > >
> > >--- j=3DFCrgen_h=3DF6ller_[werk3AT]
> > ><jue...@we...> wrote: >
> > >OracleLobHandler needs to work on a native
> > >=3D20
> > >
> > >>OracleConnection as it comes from the driver. The
> > >>usual problem in that respect is not the driver
> > but
> > >>the connection pool: Every connection pool needs
> > to
> > >>wrap native connections with pooled connections
> > that
> > >>at least have different closing behavior.
> > >>
> > >>To address this, OracleLobHandler has the
> > >>"nativeJdbcExtractor" property, taking an
> > >>implementation of Spring's NativeJdbcExtractor
> > >>interface. Spring includes out-of-the-box
> > >>implementations for Commons DBCP, XAPool, and
> > JBoss.
> > >>I guess what you need to do is write such an
> > >>extractor for Weblogic.
> > >>
> > >>What's odd about your exception is that
> > >>OracleLobCreator does not complain that it doesn't
> > >>receive an OracleConnection (there's an explicit
> > >>check in there). It seems to get a wrapped
> > >>connection that is still assignable to
> > >>OracleConnection, although it's not the native
> > >>OracleConnection from the driver...
> > >>
> > >>Maybe Weblogic uses some special way of pooling
> > >>connections for the Oracle driver, using poolable
> > >>OracleConnections? The getPhysicalConnection
> > method
> > >>will probably be in the OracleConnection class,
> > not
> > >>in the CLOB class. Try writing a
> > NativeJdbcExtractor
> > >>that unwraps an OracleConnection with that method.
> >
> > >>
> > >>Juergen
> > >>
> > >>
> > >>________________________________
> > >>
> > >>Von:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> > >>im Auftrag von Bronwen Cassidy
> > >>Gesendet: Mo 31.05.2004 04:27
> > >>An:
> > spr...@li...
> > >>Betreff: RE: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>
> > >>
> > >>Hi I have:
> > >>
> > >>Weblogic 8 service pack 2
> > >>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
> > >>Oracle9i
> > >>I have set up the connection pool using the
> > >>jdbc:oracle:thin (oracle thin
> > >>drivers (not weblogic ones)
> > >>
> > >>Actually I managed to find some information (very
> > >>little) one from a
> > >>hibernate mail, suggested using the
> > >>getPhysicalConnection() instead of
> > >>createTemporary, but this method does not seem to
> > >>available on the CLOB
> > >>class??
> > >>
> > >>-----Original Message-----
> > >>From:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> >
> >[mailto:spr...@li...]
> > >=3D20
> > >
> > >>On Behalf Of
> > >>Thomas Risberg
> > >>Sent: 31 May 2004 02:09
> > >>To:
> > spr...@li...
> > >>Subject: Re: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>Bronwen,
> > >>
> > >>In order to pinpoint the problem quicker - what
> > >>version of WebLogic,
> > >>Oracle and JDBC drivers are you using?
> > >>
> > >>Thomas
> > >>
> > >>Bronwen Cassidy wrote:
> > >>
> > >> =3D20
> > >>
> > >>>Hi I have a CLOB column in oracle and in the test
> > >>> =3D20
> > >>>
> > >>there are no
> > >> =3D20
> > >>
> > >>>problems, unfortunately deploying to weblogic I
> > >>> =3D20
> > >>>
> > >>get the exception
> > >> =3D20
> > >>
> > >>>below. We are using classes12.jar whereas
> > weblogic
> > >>> =3D20
> > >>>
> > >>uses ojdbc14.jar, I
> > >> =3D20
> > >>
> > >>>firstly replaced weblogics jars and classpath
> > >>> =3D20
> > >>>
> > >>settings to use the
> > >> =3D20
> > >>
> > >>>classes12.jar, but got the same error, so I
> > pulled
> > >>> =3D20
> > >>>
> > >>weblogic oracle jar
> > >> =3D20
> > >>
> > >>>into my test classpath to test if the problem was
> > >>> =3D20
> > >>>
> > >>with the jars but
> > >> =3D20
> > >>
> > >>>the test worked fine ?? I am really stuck as to
> > >>> =3D20
> > >>>
> > >>whom this should go to
> > >> =3D20
> > >>
> > >>>weblogic, oracle, or . I am hoping there is an
> > >>> =3D20
> > >>>
> > >>expert there who can
> > >> =3D20
> > >>
> > >>>shed some light. Google did not have a single
> > >>> =3D20
> > >>>
> > >>match for variations of
> > >> =3D20
> > >>
> > >>>the first 2 lines!!
> > >>>
> > >>>java.lang.ClassCastException
> > >>>
> > >>>at
> > >>>
> > >>> =3D20
> > >>>
> >
> =
>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
=3D
> va:5
> > >=3D20
> >
> =3D3D=3D3D=3D3D message truncated =3D3D=3D3D=3D3D
>
>
> =3D20
> =3D20
> =3D20
> ____________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3D3149&alloc_id=3D3D8166&op=3D3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Bronwen C. <bro...@ya...> - 2004-05-31 22:24:46
|
Hi,
OK the results when changing the driver for the pool from =
jdbc:oracle:thin
to: jdbc:weblogic:oracle using SimpleNativeJdbcExtractor
Error:
org.springframework.dao.DataAccessResourceFailureException: Could not =
create
Oracle LOB; nested exception is org.springframework.dao.In
validDataAccessApiUsageException: OracleLobHandler needs to work on
oracle.jdbc.OracleConnection - specify a proper NativeJdbcExtractor
org.springframework.dao.InvalidDataAccessApiUsageException: =
OracleLobHandler
needs to work on oracle.jdbc.OracleConnection - specify a
proper NativeJdbcExtractor
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.ge=
tOr
acleConnection(OracleLobHandler.java:366)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr=
eat
eLob(OracleLobHandler.java:336)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se=
tCl
obAsString(OracleLobHandler.java:264)
at
com.zynap.talentstudio.dao.jdbc.oracle.datamanipulation.PortfolioDataMani=
pul
ation$1.setValues(PortfolioDataManipulation.java
:50)
at
org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStatemen=
tCa
llback.doInPreparedStatement(AbstractLobCreating
PreparedStatementCallback.java:71)
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:292)=
at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:308)=
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
tho...@tr...
Sent: 31 May 2004 21:47
To: spr...@li...
Subject: Re: [Springframework-developer] re: OracleLobCreator
I was finally able to reproduce the error in my own environment using =
Spring
1.0.1. I will try 1.0.2 (current CVS) and see what happens.
Thomas
Here is my stack trace:
org.springframework.dao.DataAccessResourceFailureException: Could not =
create
Oracle LOB; nested exception is java.lang.ClassCastException: null
java.lang.ClassCastException
at
oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.jav=
a:5
090)
at
oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnec=
tio
n.java:5141)
at oracle.sql.CLOB.createTemporary(CLOB.java:1009)
at oracle.sql.CLOB.createTemporary(CLOB.java:956)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java=
:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI=
mpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.pr=
epa
reLob(OracleLobHandler.java:375)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr=
eat
eLob(OracleLobHandler.java:327)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se=
tCl
obAsString(OracleLobHandler.java:255)
at org.buggybean.web.TestServlet.doGet(TestServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Ser=
vle
tStubImpl.java:971)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava
:402)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava
:305)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.ru=
n(W
ebAppServletContext.java:6350)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSub=
jec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)=
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServle=
tCo
ntext.java:3635)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.j=
ava
:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Quoting "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>:
> Changing the pool should just affect the NativeJdbcExtractor choice, =
=3D
> i.e. a different bean wired to OracleLobHandler's =
"nativeJdbcExtractor" =3D
> property.
> =3D20
> Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
=3D
> good chance that it will work, avoiding the need for a specific =
Weblogic =3D
> implementation of the NativeJdbcExtractor interface.
> =3D20
> As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =3D
> Commons DBCP too, avoiding the need for a different =
NativeJdbcExtractor =3D
> configuration when switching between Commons DBCP and another pool.
> =3D20
> Side note: The new version of SimpleNativeJdbcExtractor will also work =
=3D
> with C3P0. This allows the use of C3P0's ComboPooledDataSource as =
direct =3D
> replacement of Commons DBCP's BasicDataSource.
> =3D20
> Juergen
> =3D20
>
> ________________________________
>
> Von: spr...@li... im Auftrag =
=3D
> von Bronwen Cassidy
> Gesendet: Mo 31.05.2004 22:25
> An: spr...@li...
> Betreff: Re: [Springframework-developer] re: OracleLobCreator
>
>
>
> Hi
> I have no concern as to the pool i use, i am actually
> completely ignorant and have been blindly feeling my
> way using the spring test cases, samples, docs and
> some googling, until 4 months ago i had never used
> oracle and until a week ago i did not need to do more
> than work out db agnostic sql queries :-)
>
> so please i am more than happy to use weblogic pool,
> which i am using when the app is deployed, hence the
> test time passes and deploy time failures most
> likely!! I am guessing the changes are needed in the
> nativeJdbcExtractor class in the spring.xml needs to
> point to a weblogic equivalent??
>
> --- Thomas Risberg <tho...@tr...> wrote:
> > Since you are using the Commons DBCP rather than a
> > WebLogic pool the
> > issue is slightly different. We have to figure out
> > why the connection
> > returned from the DBCP pool is not unwrapped
> > properly.
> >
> > Thomas
> >
> >
> > Bronwen Cassidy wrote:
> >
> > >Thank-you Jurgen
> > >This was the approach i had come to conclude as the
> > >only difference between passing test case and
> > failing
> > >deployed app is the connection pool handled by
> > >weblogic , ahh well another trip into the unknown,
> > the
> > >best part of being a developer ;-)
> > >
> > >regards
> > >Bronwen
> > >
> > >--- j=3DFCrgen_h=3DF6ller_[werk3AT]
> > ><jue...@we...> wrote: >
> > >OracleLobHandler needs to work on a native
> > >=3D20
> > >
> > >>OracleConnection as it comes from the driver. The
> > >>usual problem in that respect is not the driver
> > but
> > >>the connection pool: Every connection pool needs
> > to
> > >>wrap native connections with pooled connections
> > that
> > >>at least have different closing behavior.
> > >>
> > >>To address this, OracleLobHandler has the
> > >>"nativeJdbcExtractor" property, taking an
> > >>implementation of Spring's NativeJdbcExtractor
> > >>interface. Spring includes out-of-the-box
> > >>implementations for Commons DBCP, XAPool, and
> > JBoss.
> > >>I guess what you need to do is write such an
> > >>extractor for Weblogic.
> > >>
> > >>What's odd about your exception is that
> > >>OracleLobCreator does not complain that it doesn't
> > >>receive an OracleConnection (there's an explicit
> > >>check in there). It seems to get a wrapped
> > >>connection that is still assignable to
> > >>OracleConnection, although it's not the native
> > >>OracleConnection from the driver...
> > >>
> > >>Maybe Weblogic uses some special way of pooling
> > >>connections for the Oracle driver, using poolable
> > >>OracleConnections? The getPhysicalConnection
> > method
> > >>will probably be in the OracleConnection class,
> > not
> > >>in the CLOB class. Try writing a
> > NativeJdbcExtractor
> > >>that unwraps an OracleConnection with that method.
> >
> > >>
> > >>Juergen
> > >>
> > >>
> > >>________________________________
> > >>
> > >>Von:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> > >>im Auftrag von Bronwen Cassidy
> > >>Gesendet: Mo 31.05.2004 04:27
> > >>An:
> > spr...@li...
> > >>Betreff: RE: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>
> > >>
> > >>Hi I have:
> > >>
> > >>Weblogic 8 service pack 2
> > >>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
> > >>Oracle9i
> > >>I have set up the connection pool using the
> > >>jdbc:oracle:thin (oracle thin
> > >>drivers (not weblogic ones)
> > >>
> > >>Actually I managed to find some information (very
> > >>little) one from a
> > >>hibernate mail, suggested using the
> > >>getPhysicalConnection() instead of
> > >>createTemporary, but this method does not seem to
> > >>available on the CLOB
> > >>class??
> > >>
> > >>-----Original Message-----
> > >>From:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> >
> >[mailto:spr...@li...]
> > >=3D20
> > >
> > >>On Behalf Of
> > >>Thomas Risberg
> > >>Sent: 31 May 2004 02:09
> > >>To:
> > spr...@li...
> > >>Subject: Re: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>Bronwen,
> > >>
> > >>In order to pinpoint the problem quicker - what
> > >>version of WebLogic,
> > >>Oracle and JDBC drivers are you using?
> > >>
> > >>Thomas
> > >>
> > >>Bronwen Cassidy wrote:
> > >>
> > >> =3D20
> > >>
> > >>>Hi I have a CLOB column in oracle and in the test
> > >>> =3D20
> > >>>
> > >>there are no
> > >> =3D20
> > >>
> > >>>problems, unfortunately deploying to weblogic I
> > >>> =3D20
> > >>>
> > >>get the exception
> > >> =3D20
> > >>
> > >>>below. We are using classes12.jar whereas
> > weblogic
> > >>> =3D20
> > >>>
> > >>uses ojdbc14.jar, I
> > >> =3D20
> > >>
> > >>>firstly replaced weblogics jars and classpath
> > >>> =3D20
> > >>>
> > >>settings to use the
> > >> =3D20
> > >>
> > >>>classes12.jar, but got the same error, so I
> > pulled
> > >>> =3D20
> > >>>
> > >>weblogic oracle jar
> > >> =3D20
> > >>
> > >>>into my test classpath to test if the problem was
> > >>> =3D20
> > >>>
> > >>with the jars but
> > >> =3D20
> > >>
> > >>>the test worked fine ?? I am really stuck as to
> > >>> =3D20
> > >>>
> > >>whom this should go to
> > >> =3D20
> > >>
> > >>>weblogic, oracle, or . I am hoping there is an
> > >>> =3D20
> > >>>
> > >>expert there who can
> > >> =3D20
> > >>
> > >>>shed some light. Google did not have a single
> > >>> =3D20
> > >>>
> > >>match for variations of
> > >> =3D20
> > >>
> > >>>the first 2 lines!!
> > >>>
> > >>>java.lang.ClassCastException
> > >>>
> > >>>at
> > >>>
> > >>> =3D20
> > >>>
> >
> =
>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
=3D
> va:5
> > >=3D20
> >
> =3D3D=3D3D=3D3D message truncated =3D3D=3D3D=3D3D
>
>
> =3D20
> =3D20
> =3D20
> ____________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3D3149&alloc_id=3D3D8166&op=3D3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. =
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: <jue...@we...> - 2004-05-31 22:03:26
|
Thomas,
=20
Good timing - I've just created the distribution zips and am running =
final sanity checks. Gonna upload them to SourceForge within the next =
hour.
=20
You won't see any different with 1.0.2's standard OracleLobHandler, but =
it would be great if you could still test it within the next few =
minutes. Please grab the very latest CVS contents; I've applied some =
fine-tuning in the last couple of hours. Try setting a =
SimpleNativeJdbcExtractor and see whether it works then.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von tho...@tr...
Gesendet: Mo 31.05.2004 23:46
An: spr...@li...
Betreff: Re: [Springframework-developer] re: OracleLobCreator
I was finally able to reproduce the error in my own environment using =
Spring
1.0.1. I will try 1.0.2 (current CVS) and see what happens.
Thomas
Here is my stack trace:
org.springframework.dao.DataAccessResourceFailureException: Could not =
create
Oracle LOB; nested exception is java.lang.ClassCastException: null
java.lang.ClassCastException
at
oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.jav=
a:5090)
at
oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnec=
tion.java:5141)
at oracle.sql.CLOB.createTemporary(CLOB.java:1009)
at oracle.sql.CLOB.createTemporary(CLOB.java:956)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java=
:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI=
mpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.pr=
epareLob(OracleLobHandler.java:375)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr=
eateLob(OracleLobHandler.java:327)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se=
tClobAsString(OracleLobHandler.java:255)
at org.buggybean.web.TestServlet.doGet(TestServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Ser=
vletStubImpl.java:971)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava:402)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava:305)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.ru=
n(WebAppServletContext.java:6350)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSub=
ject.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)=
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServle=
tContext.java:3635)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.j=
ava:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Quoting "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>:
> Changing the pool should just affect the NativeJdbcExtractor choice, =
=3D
> i.e. a different bean wired to OracleLobHandler's =
"nativeJdbcExtractor" =3D
> property.
> =3D20
> Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
=3D
> good chance that it will work, avoiding the need for a specific =
Weblogic =3D
> implementation of the NativeJdbcExtractor interface.
> =3D20
> As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =3D
> Commons DBCP too, avoiding the need for a different =
NativeJdbcExtractor =3D
> configuration when switching between Commons DBCP and another pool.
> =3D20
> Side note: The new version of SimpleNativeJdbcExtractor will also work =
=3D
> with C3P0. This allows the use of C3P0's ComboPooledDataSource as =
direct =3D
> replacement of Commons DBCP's BasicDataSource.
> =3D20
> Juergen
> =3D20
>
> ________________________________
>
> Von: spr...@li... im Auftrag =
=3D
> von Bronwen Cassidy
> Gesendet: Mo 31.05.2004 22:25
> An: spr...@li...
> Betreff: Re: [Springframework-developer] re: OracleLobCreator
>
>
>
> Hi
> I have no concern as to the pool i use, i am actually
> completely ignorant and have been blindly feeling my
> way using the spring test cases, samples, docs and
> some googling, until 4 months ago i had never used
> oracle and until a week ago i did not need to do more
> than work out db agnostic sql queries :-)
>
> so please i am more than happy to use weblogic pool,
> which i am using when the app is deployed, hence the
> test time passes and deploy time failures most
> likely!! I am guessing the changes are needed in the
> nativeJdbcExtractor class in the spring.xml needs to
> point to a weblogic equivalent??
>
> --- Thomas Risberg <tho...@tr...> wrote:
> > Since you are using the Commons DBCP rather than a
> > WebLogic pool the
> > issue is slightly different. We have to figure out
> > why the connection
> > returned from the DBCP pool is not unwrapped
> > properly.
> >
> > Thomas
> >
> >
> > Bronwen Cassidy wrote:
> >
> > >Thank-you Jurgen
> > >This was the approach i had come to conclude as the
> > >only difference between passing test case and
> > failing
> > >deployed app is the connection pool handled by
> > >weblogic , ahh well another trip into the unknown,
> > the
> > >best part of being a developer ;-)
> > >
> > >regards
> > >Bronwen
> > >
> > >--- j=3DFCrgen_h=3DF6ller_[werk3AT]
> > ><jue...@we...> wrote: >
> > >OracleLobHandler needs to work on a native
> > >=3D20
> > >
> > >>OracleConnection as it comes from the driver. The
> > >>usual problem in that respect is not the driver
> > but
> > >>the connection pool: Every connection pool needs
> > to
> > >>wrap native connections with pooled connections
> > that
> > >>at least have different closing behavior.
> > >>
> > >>To address this, OracleLobHandler has the
> > >>"nativeJdbcExtractor" property, taking an
> > >>implementation of Spring's NativeJdbcExtractor
> > >>interface. Spring includes out-of-the-box
> > >>implementations for Commons DBCP, XAPool, and
> > JBoss.
> > >>I guess what you need to do is write such an
> > >>extractor for Weblogic.
> > >>
> > >>What's odd about your exception is that
> > >>OracleLobCreator does not complain that it doesn't
> > >>receive an OracleConnection (there's an explicit
> > >>check in there). It seems to get a wrapped
> > >>connection that is still assignable to
> > >>OracleConnection, although it's not the native
> > >>OracleConnection from the driver...
> > >>
> > >>Maybe Weblogic uses some special way of pooling
> > >>connections for the Oracle driver, using poolable
> > >>OracleConnections? The getPhysicalConnection
> > method
> > >>will probably be in the OracleConnection class,
> > not
> > >>in the CLOB class. Try writing a
> > NativeJdbcExtractor
> > >>that unwraps an OracleConnection with that method.
> >
> > >>
> > >>Juergen
> > >>
> > >>
> > >>________________________________
> > >>
> > >>Von:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> > >>im Auftrag von Bronwen Cassidy
> > >>Gesendet: Mo 31.05.2004 04:27
> > >>An:
> > spr...@li...
> > >>Betreff: RE: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>
> > >>
> > >>Hi I have:
> > >>
> > >>Weblogic 8 service pack 2
> > >>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
> > >>Oracle9i
> > >>I have set up the connection pool using the
> > >>jdbc:oracle:thin (oracle thin
> > >>drivers (not weblogic ones)
> > >>
> > >>Actually I managed to find some information (very
> > >>little) one from a
> > >>hibernate mail, suggested using the
> > >>getPhysicalConnection() instead of
> > >>createTemporary, but this method does not seem to
> > >>available on the CLOB
> > >>class??
> > >>
> > >>-----Original Message-----
> > >>From:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> >
> >[mailto:spr...@li...]
> > >=3D20
> > >
> > >>On Behalf Of
> > >>Thomas Risberg
> > >>Sent: 31 May 2004 02:09
> > >>To:
> > spr...@li...
> > >>Subject: Re: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>Bronwen,
> > >>
> > >>In order to pinpoint the problem quicker - what
> > >>version of WebLogic,
> > >>Oracle and JDBC drivers are you using?
> > >>
> > >>Thomas
> > >>
> > >>Bronwen Cassidy wrote:
> > >>
> > >> =3D20
> > >>
> > >>>Hi I have a CLOB column in oracle and in the test
> > >>> =3D20
> > >>>
> > >>there are no
> > >> =3D20
> > >>
> > >>>problems, unfortunately deploying to weblogic I
> > >>> =3D20
> > >>>
> > >>get the exception
> > >> =3D20
> > >>
> > >>>below. We are using classes12.jar whereas
> > weblogic
> > >>> =3D20
> > >>>
> > >>uses ojdbc14.jar, I
> > >> =3D20
> > >>
> > >>>firstly replaced weblogics jars and classpath
> > >>> =3D20
> > >>>
> > >>settings to use the
> > >> =3D20
> > >>
> > >>>classes12.jar, but got the same error, so I
> > pulled
> > >>> =3D20
> > >>>
> > >>weblogic oracle jar
> > >> =3D20
> > >>
> > >>>into my test classpath to test if the problem was
> > >>> =3D20
> > >>>
> > >>with the jars but
> > >> =3D20
> > >>
> > >>>the test worked fine ?? I am really stuck as to
> > >>> =3D20
> > >>>
> > >>whom this should go to
> > >> =3D20
> > >>
> > >>>weblogic, oracle, or . I am hoping there is an
> > >>> =3D20
> > >>>
> > >>expert there who can
> > >> =3D20
> > >>
> > >>>shed some light. Google did not have a single
> > >>> =3D20
> > >>>
> > >>match for variations of
> > >> =3D20
> > >>
> > >>>the first 2 lines!!
> > >>>
> > >>>java.lang.ClassCastException
> > >>>
> > >>>at
> > >>>
> > >>> =3D20
> > >>>
> >
> =
>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
=3D
> va:5
> > >=3D20
> >
> =3D3D=3D3D=3D3D message truncated =3D3D=3D3D=3D3D
>
>
> =3D20
> =3D20
> =3D20
> ____________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3D3149&alloc_id=3D3D8166&op=3D3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Bronwen C. <bro...@ya...> - 2004-05-31 22:02:32
|
Hi,
My tests pass though using different datasource the config for a passing
test ...
<bean id=3D"nativeJdbcExtractor"
class=3D"org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtr=
acto"
lazy-init=3D"true"/>
<bean id=3D"oracleLobHandler"
class=3D"org.springframework.jdbc.support.lob.OracleLobHandler"
lazy-init=3D"true">
<property name=3D"nativeJdbcExtractor"><ref
local=3D"nativeJdbcExtractor"/></property>
</bean>
<bean id=3D"dataSource" class=3D"oracle.jdbc.pool.OracleDataSource">
<property
name=3D"driverType"><value>oracle.jdbc.OracleDriver</value></property>
<property
name=3D"URL"><value>jdbc:oracle:thin:@localhost:1521:ROBIN</value></prope=
rty>
<property name=3D"user"><value>talentstudio</value></property>
<property
name=3D"password"><value>talentstudio</value></property>
</bean>
<bean id=3D"template" =
class=3D"org.springframework.jdbc.core.JdbcTemplate">
<property name=3D"dataSource"><ref =
local=3D"dataSource"/></property>
</bean>
The only difference is the datasource is not looked up!! I will try the
weblogic one in the test and see if that works.
Thanx=20
Bronwen
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
tho...@tr...
Sent: 31 May 2004 21:47
To: spr...@li...
Subject: Re: [Springframework-developer] re: OracleLobCreator
I was finally able to reproduce the error in my own environment using =
Spring
1.0.1. I will try 1.0.2 (current CVS) and see what happens.
Thomas
Here is my stack trace:
org.springframework.dao.DataAccessResourceFailureException: Could not =
create
Oracle LOB; nested exception is java.lang.ClassCastException: null
java.lang.ClassCastException
at
oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.jav=
a:5
090)
at
oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnec=
tio
n.java:5141)
at oracle.sql.CLOB.createTemporary(CLOB.java:1009)
at oracle.sql.CLOB.createTemporary(CLOB.java:956)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java=
:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI=
mpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.pr=
epa
reLob(OracleLobHandler.java:375)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.cr=
eat
eLob(OracleLobHandler.java:327)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.se=
tCl
obAsString(OracleLobHandler.java:255)
at org.buggybean.web.TestServlet.doGet(TestServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Ser=
vle
tStubImpl.java:971)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava
:402)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.j=
ava
:305)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.ru=
n(W
ebAppServletContext.java:6350)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSub=
jec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)=
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServle=
tCo
ntext.java:3635)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.j=
ava
:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Quoting "j=FCrgen h=F6ller [werk3AT]" <jue...@we...>:
> Changing the pool should just affect the NativeJdbcExtractor choice, =
=3D
> i.e. a different bean wired to OracleLobHandler's =
"nativeJdbcExtractor" =3D
> property.
> =3D20
> Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
=3D
> good chance that it will work, avoiding the need for a specific =
Weblogic =3D
> implementation of the NativeJdbcExtractor interface.
> =3D20
> As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =3D
> Commons DBCP too, avoiding the need for a different =
NativeJdbcExtractor =3D
> configuration when switching between Commons DBCP and another pool.
> =3D20
> Side note: The new version of SimpleNativeJdbcExtractor will also work =
=3D
> with C3P0. This allows the use of C3P0's ComboPooledDataSource as =
direct =3D
> replacement of Commons DBCP's BasicDataSource.
> =3D20
> Juergen
> =3D20
>
> ________________________________
>
> Von: spr...@li... im Auftrag =
=3D
> von Bronwen Cassidy
> Gesendet: Mo 31.05.2004 22:25
> An: spr...@li...
> Betreff: Re: [Springframework-developer] re: OracleLobCreator
>
>
>
> Hi
> I have no concern as to the pool i use, i am actually
> completely ignorant and have been blindly feeling my
> way using the spring test cases, samples, docs and
> some googling, until 4 months ago i had never used
> oracle and until a week ago i did not need to do more
> than work out db agnostic sql queries :-)
>
> so please i am more than happy to use weblogic pool,
> which i am using when the app is deployed, hence the
> test time passes and deploy time failures most
> likely!! I am guessing the changes are needed in the
> nativeJdbcExtractor class in the spring.xml needs to
> point to a weblogic equivalent??
>
> --- Thomas Risberg <tho...@tr...> wrote:
> > Since you are using the Commons DBCP rather than a
> > WebLogic pool the
> > issue is slightly different. We have to figure out
> > why the connection
> > returned from the DBCP pool is not unwrapped
> > properly.
> >
> > Thomas
> >
> >
> > Bronwen Cassidy wrote:
> >
> > >Thank-you Jurgen
> > >This was the approach i had come to conclude as the
> > >only difference between passing test case and
> > failing
> > >deployed app is the connection pool handled by
> > >weblogic , ahh well another trip into the unknown,
> > the
> > >best part of being a developer ;-)
> > >
> > >regards
> > >Bronwen
> > >
> > >--- j=3DFCrgen_h=3DF6ller_[werk3AT]
> > ><jue...@we...> wrote: >
> > >OracleLobHandler needs to work on a native
> > >=3D20
> > >
> > >>OracleConnection as it comes from the driver. The
> > >>usual problem in that respect is not the driver
> > but
> > >>the connection pool: Every connection pool needs
> > to
> > >>wrap native connections with pooled connections
> > that
> > >>at least have different closing behavior.
> > >>
> > >>To address this, OracleLobHandler has the
> > >>"nativeJdbcExtractor" property, taking an
> > >>implementation of Spring's NativeJdbcExtractor
> > >>interface. Spring includes out-of-the-box
> > >>implementations for Commons DBCP, XAPool, and
> > JBoss.
> > >>I guess what you need to do is write such an
> > >>extractor for Weblogic.
> > >>
> > >>What's odd about your exception is that
> > >>OracleLobCreator does not complain that it doesn't
> > >>receive an OracleConnection (there's an explicit
> > >>check in there). It seems to get a wrapped
> > >>connection that is still assignable to
> > >>OracleConnection, although it's not the native
> > >>OracleConnection from the driver...
> > >>
> > >>Maybe Weblogic uses some special way of pooling
> > >>connections for the Oracle driver, using poolable
> > >>OracleConnections? The getPhysicalConnection
> > method
> > >>will probably be in the OracleConnection class,
> > not
> > >>in the CLOB class. Try writing a
> > NativeJdbcExtractor
> > >>that unwraps an OracleConnection with that method.
> >
> > >>
> > >>Juergen
> > >>
> > >>
> > >>________________________________
> > >>
> > >>Von:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> > >>im Auftrag von Bronwen Cassidy
> > >>Gesendet: Mo 31.05.2004 04:27
> > >>An:
> > spr...@li...
> > >>Betreff: RE: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>
> > >>
> > >>Hi I have:
> > >>
> > >>Weblogic 8 service pack 2
> > >>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
> > >>Oracle9i
> > >>I have set up the connection pool using the
> > >>jdbc:oracle:thin (oracle thin
> > >>drivers (not weblogic ones)
> > >>
> > >>Actually I managed to find some information (very
> > >>little) one from a
> > >>hibernate mail, suggested using the
> > >>getPhysicalConnection() instead of
> > >>createTemporary, but this method does not seem to
> > >>available on the CLOB
> > >>class??
> > >>
> > >>-----Original Message-----
> > >>From:
> > >>
> > >> =3D20
> > >>
> >
> >spr...@li...
> > >=3D20
> > >
> >
> >[mailto:spr...@li...]
> > >=3D20
> > >
> > >>On Behalf Of
> > >>Thomas Risberg
> > >>Sent: 31 May 2004 02:09
> > >>To:
> > spr...@li...
> > >>Subject: Re: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>Bronwen,
> > >>
> > >>In order to pinpoint the problem quicker - what
> > >>version of WebLogic,
> > >>Oracle and JDBC drivers are you using?
> > >>
> > >>Thomas
> > >>
> > >>Bronwen Cassidy wrote:
> > >>
> > >> =3D20
> > >>
> > >>>Hi I have a CLOB column in oracle and in the test
> > >>> =3D20
> > >>>
> > >>there are no
> > >> =3D20
> > >>
> > >>>problems, unfortunately deploying to weblogic I
> > >>> =3D20
> > >>>
> > >>get the exception
> > >> =3D20
> > >>
> > >>>below. We are using classes12.jar whereas
> > weblogic
> > >>> =3D20
> > >>>
> > >>uses ojdbc14.jar, I
> > >> =3D20
> > >>
> > >>>firstly replaced weblogics jars and classpath
> > >>> =3D20
> > >>>
> > >>settings to use the
> > >> =3D20
> > >>
> > >>>classes12.jar, but got the same error, so I
> > pulled
> > >>> =3D20
> > >>>
> > >>weblogic oracle jar
> > >> =3D20
> > >>
> > >>>into my test classpath to test if the problem was
> > >>> =3D20
> > >>>
> > >>with the jars but
> > >> =3D20
> > >>
> > >>>the test worked fine ?? I am really stuck as to
> > >>> =3D20
> > >>>
> > >>whom this should go to
> > >> =3D20
> > >>
> > >>>weblogic, oracle, or . I am hoping there is an
> > >>> =3D20
> > >>>
> > >>expert there who can
> > >> =3D20
> > >>
> > >>>shed some light. Google did not have a single
> > >>> =3D20
> > >>>
> > >>match for variations of
> > >> =3D20
> > >>
> > >>>the first 2 lines!!
> > >>>
> > >>>java.lang.ClassCastException
> > >>>
> > >>>at
> > >>>
> > >>> =3D20
> > >>>
> >
> =
>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
=3D
> va:5
> > >=3D20
> >
> =3D3D=3D3D=3D3D message truncated =3D3D=3D3D=3D3D
>
>
> =3D20
> =3D20
> =3D20
> ____________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3D3149&alloc_id=3D3D8166&op=3D3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle =
10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. =
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: <bro...@ya...> - 2004-05-31 21:58:39
|
Hi,
Just tried with SimpleNativeJdbcExtractor using the
latest spring.jar from cvs :-) I am including my
context-jdbc.xml, it may shed some light as to what i
am doing wrong..
<bean id="dataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property
name="jndiName"><value>jdbc/TSDS</value></property>
</bean>
<bean id="jdbcTemplate"
class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource"><ref
local="dataSource"/></property>
<property name="exceptionTranslator"><ref
bean="oracleSqlExceptionTranslator"/></property>
</bean>
<bean id="nativeJdbcExtractor"
class="org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor"
lazy-init="true"/>
<bean id="oracleLobHandler"
class="org.springframework.jdbc.support.lob.OracleLobHandler">
<property name="nativeJdbcExtractor"><ref
local="nativeJdbcExtractor"/></property>
</bean>
the error (after a complete clean, uninstall delete
all previous version)
org.springframework.dao.DataAccessResourceFailureException:
Could not create Oracle LOB; nested exception is
java.lang.ClassCastExcepti
on: null
java.lang.ClassCastException
at
oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.java:5090)
at
oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnection.java:5141)
at
oracle.sql.CLOB.createTemporary(CLOB.java:1009)
at
oracle.sql.CLOB.createTemporary(CLOB.java:956)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:324)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.prepareLob(OracleLobHandler.java:383)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.createLob(OracleLobHandler.java:336)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setClobAsString(OracleLobHandler.java:264)
Bronwen
--- tho...@tr... wrote: >
> I was finally able to reproduce the error in my own
> environment using Spring
> 1.0.1. I will try 1.0.2 (current CVS) and see what
> happens.
>
> Thomas
>
>
> Here is my stack trace:
>
>
org.springframework.dao.DataAccessResourceFailureException:
> Could not create
> Oracle LOB; nested exception is
> java.lang.ClassCastException: null
> java.lang.ClassCastException
> at
>
oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.java:5090)
> at
>
oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnection.java:5141)
> at
> oracle.sql.CLOB.createTemporary(CLOB.java:1009)
> at
> oracle.sql.CLOB.createTemporary(CLOB.java:956)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at
> java.lang.reflect.Method.invoke(Method.java:324)
> at
>
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.prepareLob(OracleLobHandler.java:375)
> at
>
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.createLob(OracleLobHandler.java:327)
> at
>
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setClobAsString(OracleLobHandler.java:255)
> at
>
org.buggybean.web.TestServlet.doGet(TestServlet.java:94)
> at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
> at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
> at
>
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
> at
>
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
> at
>
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
> at
>
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
> at
>
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
> at
>
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> at
>
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>
>
>
>
> Quoting "jürgen höller [werk3AT]"
> <jue...@we...>:
>
> > Changing the pool should just affect the
> NativeJdbcExtractor choice, =
> > i.e. a different bean wired to OracleLobHandler's
> "nativeJdbcExtractor" =
> > property.
> > =20
> > Give SimpleNativeJdbcExtractor a try with a
> Weblogic pool; there's a =
> > good chance that it will work, avoiding the need
> for a specific Weblogic =
> > implementation of the NativeJdbcExtractor
> interface.
> > =20
> > As of Spring 1.0.2, SimpleNativeJdbcExtractor will
> even work with =
> > Commons DBCP too, avoiding the need for a
> different NativeJdbcExtractor =
> > configuration when switching between Commons DBCP
> and another pool.
> > =20
> > Side note: The new version of
> SimpleNativeJdbcExtractor will also work =
> > with C3P0. This allows the use of C3P0's
> ComboPooledDataSource as direct =
> > replacement of Commons DBCP's BasicDataSource.
> > =20
> > Juergen
> > =20
> >
> > ________________________________
> >
> > Von:
>
spr...@li...
> im Auftrag =
> > von Bronwen Cassidy
> > Gesendet: Mo 31.05.2004 22:25
> > An:
> spr...@li...
> > Betreff: Re: [Springframework-developer] re:
> OracleLobCreator
> >
> >
> >
> > Hi
> > I have no concern as to the pool i use, i am
> actually
> > completely ignorant and have been blindly feeling
> my
> > way using the spring test cases, samples, docs and
> > some googling, until 4 months ago i had never used
> > oracle and until a week ago i did not need to do
> more
> > than work out db agnostic sql queries :-)
> >
> > so please i am more than happy to use weblogic
> pool,
> > which i am using when the app is deployed, hence
> the
> > test time passes and deploy time failures most
> > likely!! I am guessing the changes are needed in
> the
> > nativeJdbcExtractor class in the spring.xml needs
> to
> > point to a weblogic equivalent??
> >
> > --- Thomas Risberg <tho...@tr...>
> wrote:
> > > Since you are using the Commons DBCP rather than
> a
> > > WebLogic pool the
> > > issue is slightly different. We have to figure
> out
> > > why the connection
> > > returned from the DBCP pool is not unwrapped
> > > properly.
> > >
> > > Thomas
> > >
> > >
> > > Bronwen Cassidy wrote:
> > >
> > > >Thank-you Jurgen
> > > >This was the approach i had come to conclude as
> the
> > > >only difference between passing test case and
> > > failing
> > > >deployed app is the connection pool handled by
> > > >weblogic , ahh well another trip into the
> unknown,
> > > the
> > > >best part of being a developer ;-)
> > > >
> > > >regards
> > > >Bronwen
> > > >
> > > >--- j=FCrgen_h=F6ller_[werk3AT]
> > > ><jue...@we...> wrote: >
> > > >OracleLobHandler needs to work on a native
> > > >=20
> > > >
> > > >>OracleConnection as it comes from the driver.
> The
> > > >>usual problem in that respect is not the
> driver
> > > but
> > > >>the connection pool: Every connection pool
> needs
> > > to
> > > >>wrap native connections with pooled
> connections
> > > that
> > > >>at least have different closing behavior.
> > > >>
> > > >>To address this, OracleLobHandler has the
> > > >>"nativeJdbcExtractor" property, taking an
> > > >>implementation of Spring's NativeJdbcExtractor
> > > >>interface. Spring includes out-of-the-box
> > > >>implementations for Commons DBCP, XAPool, and
> > > JBoss.
> > > >>I guess what you need to do is write such an
> > > >>extractor for Weblogic.
> > > >>
> > > >>What's odd about your exception is that
> > > >>OracleLobCreator does not complain that it
> doesn't
> > > >>receive an OracleConnection (there's an
> explicit
> > > >>check in there). It seems to get a wrapped
> > > >>connection that is still assignable to
>
=== message truncated ===
____________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
|
|
From: <tho...@tr...> - 2004-05-31 21:46:51
|
I was finally able to reproduce the error in my own environment using Spring
1.0.1. I will try 1.0.2 (current CVS) and see what happens.
Thomas
Here is my stack trace:
org.springframework.dao.DataAccessResourceFailureException: Could not create
Oracle LOB; nested exception is java.lang.ClassCastException: null
java.lang.ClassCastException
at
oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.java:5090)
at
oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnection.java:5141)
at oracle.sql.CLOB.createTemporary(CLOB.java:1009)
at oracle.sql.CLOB.createTemporary(CLOB.java:956)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.prepareLob(OracleLobHandler.java:375)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.createLob(OracleLobHandler.java:327)
at
org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.setClobAsString(OracleLobHandler.java:255)
at org.buggybean.web.TestServlet.doGet(TestServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Quoting "jürgen höller [werk3AT]" <jue...@we...>:
> Changing the pool should just affect the NativeJdbcExtractor choice, =
> i.e. a different bean wired to OracleLobHandler's "nativeJdbcExtractor" =
> property.
> =20
> Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
> good chance that it will work, avoiding the need for a specific Weblogic =
> implementation of the NativeJdbcExtractor interface.
> =20
> As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =
> Commons DBCP too, avoiding the need for a different NativeJdbcExtractor =
> configuration when switching between Commons DBCP and another pool.
> =20
> Side note: The new version of SimpleNativeJdbcExtractor will also work =
> with C3P0. This allows the use of C3P0's ComboPooledDataSource as direct =
> replacement of Commons DBCP's BasicDataSource.
> =20
> Juergen
> =20
>
> ________________________________
>
> Von: spr...@li... im Auftrag =
> von Bronwen Cassidy
> Gesendet: Mo 31.05.2004 22:25
> An: spr...@li...
> Betreff: Re: [Springframework-developer] re: OracleLobCreator
>
>
>
> Hi
> I have no concern as to the pool i use, i am actually
> completely ignorant and have been blindly feeling my
> way using the spring test cases, samples, docs and
> some googling, until 4 months ago i had never used
> oracle and until a week ago i did not need to do more
> than work out db agnostic sql queries :-)
>
> so please i am more than happy to use weblogic pool,
> which i am using when the app is deployed, hence the
> test time passes and deploy time failures most
> likely!! I am guessing the changes are needed in the
> nativeJdbcExtractor class in the spring.xml needs to
> point to a weblogic equivalent??
>
> --- Thomas Risberg <tho...@tr...> wrote:
> > Since you are using the Commons DBCP rather than a
> > WebLogic pool the
> > issue is slightly different. We have to figure out
> > why the connection
> > returned from the DBCP pool is not unwrapped
> > properly.
> >
> > Thomas
> >
> >
> > Bronwen Cassidy wrote:
> >
> > >Thank-you Jurgen
> > >This was the approach i had come to conclude as the
> > >only difference between passing test case and
> > failing
> > >deployed app is the connection pool handled by
> > >weblogic , ahh well another trip into the unknown,
> > the
> > >best part of being a developer ;-)
> > >
> > >regards
> > >Bronwen
> > >
> > >--- j=FCrgen_h=F6ller_[werk3AT]
> > ><jue...@we...> wrote: >
> > >OracleLobHandler needs to work on a native
> > >=20
> > >
> > >>OracleConnection as it comes from the driver. The
> > >>usual problem in that respect is not the driver
> > but
> > >>the connection pool: Every connection pool needs
> > to
> > >>wrap native connections with pooled connections
> > that
> > >>at least have different closing behavior.
> > >>
> > >>To address this, OracleLobHandler has the
> > >>"nativeJdbcExtractor" property, taking an
> > >>implementation of Spring's NativeJdbcExtractor
> > >>interface. Spring includes out-of-the-box
> > >>implementations for Commons DBCP, XAPool, and
> > JBoss.
> > >>I guess what you need to do is write such an
> > >>extractor for Weblogic.
> > >>
> > >>What's odd about your exception is that
> > >>OracleLobCreator does not complain that it doesn't
> > >>receive an OracleConnection (there's an explicit
> > >>check in there). It seems to get a wrapped
> > >>connection that is still assignable to
> > >>OracleConnection, although it's not the native
> > >>OracleConnection from the driver...
> > >>
> > >>Maybe Weblogic uses some special way of pooling
> > >>connections for the Oracle driver, using poolable
> > >>OracleConnections? The getPhysicalConnection
> > method
> > >>will probably be in the OracleConnection class,
> > not
> > >>in the CLOB class. Try writing a
> > NativeJdbcExtractor
> > >>that unwraps an OracleConnection with that method.
> >
> > >>
> > >>Juergen
> > >>
> > >>
> > >>________________________________
> > >>
> > >>Von:
> > >>
> > >> =20
> > >>
> >
> >spr...@li...
> > >=20
> > >
> > >>im Auftrag von Bronwen Cassidy
> > >>Gesendet: Mo 31.05.2004 04:27
> > >>An:
> > spr...@li...
> > >>Betreff: RE: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>
> > >>
> > >>Hi I have:
> > >>
> > >>Weblogic 8 service pack 2
> > >>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
> > >>Oracle9i
> > >>I have set up the connection pool using the
> > >>jdbc:oracle:thin (oracle thin
> > >>drivers (not weblogic ones)
> > >>
> > >>Actually I managed to find some information (very
> > >>little) one from a
> > >>hibernate mail, suggested using the
> > >>getPhysicalConnection() instead of
> > >>createTemporary, but this method does not seem to
> > >>available on the CLOB
> > >>class??
> > >>
> > >>-----Original Message-----
> > >>From:
> > >>
> > >> =20
> > >>
> >
> >spr...@li...
> > >=20
> > >
> >
> >[mailto:spr...@li...]
> > >=20
> > >
> > >>On Behalf Of
> > >>Thomas Risberg
> > >>Sent: 31 May 2004 02:09
> > >>To:
> > spr...@li...
> > >>Subject: Re: [Springframework-developer] re:
> > >>OracleLobCreator
> > >>
> > >>Bronwen,
> > >>
> > >>In order to pinpoint the problem quicker - what
> > >>version of WebLogic,
> > >>Oracle and JDBC drivers are you using?
> > >>
> > >>Thomas
> > >>
> > >>Bronwen Cassidy wrote:
> > >>
> > >> =20
> > >>
> > >>>Hi I have a CLOB column in oracle and in the test
> > >>> =20
> > >>>
> > >>there are no
> > >> =20
> > >>
> > >>>problems, unfortunately deploying to weblogic I
> > >>> =20
> > >>>
> > >>get the exception
> > >> =20
> > >>
> > >>>below. We are using classes12.jar whereas
> > weblogic
> > >>> =20
> > >>>
> > >>uses ojdbc14.jar, I
> > >> =20
> > >>
> > >>>firstly replaced weblogics jars and classpath
> > >>> =20
> > >>>
> > >>settings to use the
> > >> =20
> > >>
> > >>>classes12.jar, but got the same error, so I
> > pulled
> > >>> =20
> > >>>
> > >>weblogic oracle jar
> > >> =20
> > >>
> > >>>into my test classpath to test if the problem was
> > >>> =20
> > >>>
> > >>with the jars but
> > >> =20
> > >>
> > >>>the test worked fine ?? I am really stuck as to
> > >>> =20
> > >>>
> > >>whom this should go to
> > >> =20
> > >>
> > >>>weblogic, oracle, or . I am hoping there is an
> > >>> =20
> > >>>
> > >>expert there who can
> > >> =20
> > >>
> > >>>shed some light. Google did not have a single
> > >>> =20
> > >>>
> > >>match for variations of
> > >> =20
> > >>
> > >>>the first 2 lines!!
> > >>>
> > >>>java.lang.ClassCastException
> > >>>
> > >>>at
> > >>>
> > >>> =20
> > >>>
> >
> >oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
> va:5
> > >=20
> >
> =3D=3D=3D message truncated =3D=3D=3D
>
>
> =20
> =20
> =20
> ____________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
|
|
From: <jue...@we...> - 2004-05-31 20:36:14
|
Changing the pool should just affect the NativeJdbcExtractor choice, =
i.e. a different bean wired to OracleLobHandler's "nativeJdbcExtractor" =
property.
=20
Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
good chance that it will work, avoiding the need for a specific Weblogic =
implementation of the NativeJdbcExtractor interface.
=20
As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =
Commons DBCP too, avoiding the need for a different NativeJdbcExtractor =
configuration when switching between Commons DBCP and another pool.
=20
Side note: The new version of SimpleNativeJdbcExtractor will also work =
with C3P0. This allows the use of C3P0's ComboPooledDataSource as direct =
replacement of Commons DBCP's BasicDataSource.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Bronwen Cassidy
Gesendet: Mo 31.05.2004 22:25
An: spr...@li...
Betreff: Re: [Springframework-developer] re: OracleLobCreator
Hi
I have no concern as to the pool i use, i am actually
completely ignorant and have been blindly feeling my
way using the spring test cases, samples, docs and
some googling, until 4 months ago i had never used
oracle and until a week ago i did not need to do more
than work out db agnostic sql queries :-)
so please i am more than happy to use weblogic pool,
which i am using when the app is deployed, hence the
test time passes and deploy time failures most
likely!! I am guessing the changes are needed in the
nativeJdbcExtractor class in the spring.xml needs to
point to a weblogic equivalent??
--- Thomas Risberg <tho...@tr...> wrote:
> Since you are using the Commons DBCP rather than a
> WebLogic pool the
> issue is slightly different. We have to figure out
> why the connection
> returned from the DBCP pool is not unwrapped
> properly.
>
> Thomas
>
>
> Bronwen Cassidy wrote:
>
> >Thank-you Jurgen
> >This was the approach i had come to conclude as the
> >only difference between passing test case and
> failing
> >deployed app is the connection pool handled by
> >weblogic , ahh well another trip into the unknown,
> the
> >best part of being a developer ;-)
> >
> >regards
> >Bronwen
> >
> >--- j=FCrgen_h=F6ller_[werk3AT]
> ><jue...@we...> wrote: >
> >OracleLobHandler needs to work on a native
> >=20
> >
> >>OracleConnection as it comes from the driver. The
> >>usual problem in that respect is not the driver
> but
> >>the connection pool: Every connection pool needs
> to
> >>wrap native connections with pooled connections
> that
> >>at least have different closing behavior.
> >>
> >>To address this, OracleLobHandler has the
> >>"nativeJdbcExtractor" property, taking an
> >>implementation of Spring's NativeJdbcExtractor
> >>interface. Spring includes out-of-the-box
> >>implementations for Commons DBCP, XAPool, and
> JBoss.
> >>I guess what you need to do is write such an
> >>extractor for Weblogic.
> >>
> >>What's odd about your exception is that
> >>OracleLobCreator does not complain that it doesn't
> >>receive an OracleConnection (there's an explicit
> >>check in there). It seems to get a wrapped
> >>connection that is still assignable to
> >>OracleConnection, although it's not the native
> >>OracleConnection from the driver...
> >>
> >>Maybe Weblogic uses some special way of pooling
> >>connections for the Oracle driver, using poolable
> >>OracleConnections? The getPhysicalConnection
> method
> >>will probably be in the OracleConnection class,
> not
> >>in the CLOB class. Try writing a
> NativeJdbcExtractor
> >>that unwraps an OracleConnection with that method.
>
> >>
> >>Juergen
> >>
> >>
> >>________________________________
> >>
> >>Von:
> >>
> >> =20
> >>
>
>spr...@li...
> >=20
> >
> >>im Auftrag von Bronwen Cassidy
> >>Gesendet: Mo 31.05.2004 04:27
> >>An:
> spr...@li...
> >>Betreff: RE: [Springframework-developer] re:
> >>OracleLobCreator
> >>
> >>
> >>
> >>Hi I have:
> >>
> >>Weblogic 8 service pack 2
> >>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
> >>Oracle9i
> >>I have set up the connection pool using the
> >>jdbc:oracle:thin (oracle thin
> >>drivers (not weblogic ones)
> >>
> >>Actually I managed to find some information (very
> >>little) one from a
> >>hibernate mail, suggested using the
> >>getPhysicalConnection() instead of
> >>createTemporary, but this method does not seem to
> >>available on the CLOB
> >>class??
> >>
> >>-----Original Message-----
> >>From:
> >>
> >> =20
> >>
>
>spr...@li...
> >=20
> >
>
>[mailto:spr...@li...]
> >=20
> >
> >>On Behalf Of
> >>Thomas Risberg
> >>Sent: 31 May 2004 02:09
> >>To:
> spr...@li...
> >>Subject: Re: [Springframework-developer] re:
> >>OracleLobCreator
> >>
> >>Bronwen,
> >>
> >>In order to pinpoint the problem quicker - what
> >>version of WebLogic,
> >>Oracle and JDBC drivers are you using?
> >>
> >>Thomas
> >>
> >>Bronwen Cassidy wrote:
> >>
> >> =20
> >>
> >>>Hi I have a CLOB column in oracle and in the test
> >>> =20
> >>>
> >>there are no
> >> =20
> >>
> >>>problems, unfortunately deploying to weblogic I
> >>> =20
> >>>
> >>get the exception
> >> =20
> >>
> >>>below. We are using classes12.jar whereas
> weblogic
> >>> =20
> >>>
> >>uses ojdbc14.jar, I
> >> =20
> >>
> >>>firstly replaced weblogics jars and classpath
> >>> =20
> >>>
> >>settings to use the
> >> =20
> >>
> >>>classes12.jar, but got the same error, so I
> pulled
> >>> =20
> >>>
> >>weblogic oracle jar
> >> =20
> >>
> >>>into my test classpath to test if the problem was
> >>> =20
> >>>
> >>with the jars but
> >> =20
> >>
> >>>the test worked fine ?? I am really stuck as to
> >>> =20
> >>>
> >>whom this should go to
> >> =20
> >>
> >>>weblogic, oracle, or . I am hoping there is an
> >>> =20
> >>>
> >>expert there who can
> >> =20
> >>
> >>>shed some light. Google did not have a single
> >>> =20
> >>>
> >>match for variations of
> >> =20
> >>
> >>>the first 2 lines!!
> >>>
> >>>java.lang.ClassCastException
> >>>
> >>>at
> >>>
> >>> =20
> >>>
>
>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
va:5
> >=20
>
=3D=3D=3D message truncated =3D=3D=3D
=20
=20
=20
____________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|