i am working on a project using Hibernate 3.3.SP1 + Spring 1.2.6 on Weblogic 10.3.1 with Oracle DB 10g. Recently, we migrated Hibernate from v3.0.5 to 3.3.SP1.A strange error occurs (that did not happen before) when trying to insert LOB (BLOB or CLOB). I get the following error :
189202 [[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: null
189202 [[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR org.hibernate.util.JDBCExceptionReporter - Pool connect failed : weblogic.common.ResourceException:
Could not connect to 'oracle.jdbc.OracleDriver'.
The returned message is: ORA-01017: invalid username/password; logon denied
It is likely that the login or password is not valid.
It is also possible that something else is invalid in
the configuration or that the database is not available.
After that, the datasource gets "corrupted" and after 10 consecutive false connection attempts Oracle locks the account.
I must notice that the application **HAS ABSOLUTELY NO CODE for connecting to the database, other than the pre-configured datasource in Weblogic**. Since **the application works just fine until a LOB is inserted in the DB it is safe to assume that the datasource is properly configured**.
A sample mapping (i cannot post the exact hbm.xml) is :
The code tries to persist some lob values in 3 tables. The error appears when trying to save to the 1st. If i remove the code for saving to the 1st, the error appears on the 2nd and so on.
The only solution i have found up to now, is to set the Initial Capacity of the datasource connections to the max connections (15). In this case, the system seems stable. However this solution is not acceptable since we do not understand the nature of the problem.
I have tried this in 4 different environments (Weblogic + Oracle). The error does not appear always with the same frequency (in some systems it works for a while before failing to insert a lob). Also, while debugging i noticed that if i increase the log output (i simply added more debug messages in log4j) the error stop appearing. This made me think it could be a sync problem between WLS and DB.
Do you have any ideas? Please let me know if you need more clarifications.