Hi Armin, It always occurs on same sql, and be reproduceable. It seems a code error, even I doubt the prepared sql statement. However, it works fine in Resin+Oracle.
Is some neccessary configurations missing? Before occurs the ORA-01008 error, there're some doubtful info in JBosss+Oracle. But there're not this kind of info in Resin+Oracle. FYI: - INFO [ObjectCacheDefaultImpl] Setup cache: [EMAIL PROTECTED],useSoftReferences=true,cachingKeyType=0,useAutoSync=true] - INFO [ObjectCacheDefaultImpl] tx was aborted, remove 7 traced (potentially modified) objects from cache - INFO [ConnectionManagerImpl] Rollback was called, do rollback on current connection [EMAIL PROTECTED] - INFO [ObjectCacheDefaultImpl] tx was aborted, remove 7 traced (potentially modified) objects from cache - INFO [ConnectionManagerImpl] Rollback was called, do rollback on current connection [EMAIL PROTECTED] - INFO [ObjectCacheDefaultImpl] tx was aborted, remove 176 traced (potentially modified) objects from cache - INFO [ConnectionManagerImpl] Rollback was called, do rollback on current connection [EMAIL PROTECTED] - ERROR [JdbcAccessImpl] SQLException during the execution of the SQL query: SELECT xxx FROM xxx WHERE xxx, message is: ORA-01008: not all variables bound thanks, Neil -----Original Message----- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 26, 2005 4:29 PM To: OJB Users List Subject: Re: OJB configuration problem on jboss Hi Neil, this is a really strange error, seems that Oracle detect an objectionable number of bound variables in a prepared statement. You said that this error message doesn't arise in Resin+Oracle, thus it can't be a problem of OJB's sql generator. Does always the same error occur (same sql statement) or does it occur for different sql statements? Is the error reproduceable or does it occur random? If the error occur for different statements and arise radom, then the issue can be a concurrency problem - e.g. different threads using the same PB instance at the same time. regards, Armin Neil Jianguo Zhou wrote: > Hi there, > > I use pure Servlet/JSP based code, not including any EJB based code, under > JBoss app server. Use non-managed environment configuration same as other > pure servlet container, such as Resin, but accessing database became > unstable. It will sometimes throw exception: > > - ERROR [JdbcAccessImpl] SQLException during the execution of the SQL query: > SELECT xxx FROM xxx WHERE xxx, message is: ORA-01008: not all variables bound > > However, everything is ok under other servlet container, like Resin. > > The non-managed environment configuration is following: > > 1. In OJB.properties: > - > PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl > - > ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl > - > JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.JBossTransactionManagerFactory > > 2. In repository_database.xml: > <jdbc-connection-descriptor > jcd-alias="default" > default-connection="true" > platform="Oracle9i" > jdbc-level="2.0" > driver="oracle.jdbc.driver.OracleDriver" > protocol="jdbc" > subprotocol="oracle" > dbalias="thin:@localhost:1521:orains1" > username="scott" > password="tiger" > eager-release="false" > batch-mode="true" > useAutoCommit="0" > ignoreAutoCommitExceptions="false"> > > <object-cache class="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"> > <attribute attribute-name="timeout" attribute-value="900"/> > <attribute attribute-name="autoSync" attribute-value="true"/> > </object-cache> > > <connection-pool maxActive="21" validationQuery=""/> > > <sequence-manager > className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl"> > <attribute attribute-name="grabSize" attribute-value="20"/> > <attribute attribute-name="autoNaming" attribute-value="true"/> > <attribute attribute-name="globalSequenceId" attribute-value="false"/> > <attribute attribute-name="globalSequenceStart" > attribute-value="10000"/> > </sequence-manager> > > </jdbc-connection-descriptor> > > > When I change to managed environment configuration, and run again. It throws > another different exception: > > - ERROR [TranslationUtil] Cannot pre-load translation cache > java.lang.UnsupportedOperationException: In managed environments only JTA > transaction demarcation allowed > > This kind of error *always* occurs, not as *sometimes*, mentioned above. > > The managed environment configuration is following: > > 1. In OJB.properties: > - > PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl > - > ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl > - > JTATransactionManagerClass=org.apache.ojb.broker.transaction.tm.JBossTransactionManagerFactory > > 2. In repository_database.xml: > (Same as above non-managed environment configuration) > > > Not changing any code is preferred, I want to just modify some configuration > to go. Can anyone tell me how to deal with? Any comments would be very > welcome. > > Thanks, > Neil > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]