You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Annapoorna Chandra <ap...@gmail.com> on 2009/07/08 18:59:13 UTC

Oracle issues with ODE 1.3.2 on glassfish appserver

Hi,
This is my first post . need help regarding the issue
   My system configuration is like this

   Appserver - Glassfish
   Database used for ODE - Oracle 10g
   Apache ODE version -1.3.2
  Java Version- 1.6.0_13

  I have a webapp which use Ode 1.3.2 and Oracle Database deployed on
Glassfish.

  1)I have recreated ode tables in oracle.
  2) added ojdbc14-10.2.0.jar to glasfish lib

  I have set up a JNDI resource from  glassfish admin console and tested the
connection . connection is successful.

deployed webapp that uses this JNDI specified in
ode-axis2.properties.(tested this with sample java app it worked fine and
also tested ode deployment with out specfying JNDI resource which throw me
an exception saying lookup failed)

also deployed workflow where deployment succeeded with out errors.

When I call operation in workflow from a client I see error.  Attaching
error to this Message.

* I have following configurations and works fine*

1) ODE 1.3.2 ,sqlserver ODE database on Glassfish
2) ODE 1.3.2 ,sqlserver ODE database on Tomcat 6.0.18(also tried on 5.x
versionS)
3) ODE 1.2 ,sqlserver ODE database on Glassfish
4) ODE 1.2 ,sqlserver ODE database on Tomcat
5) ODE 1.2 ,Oracle  ODE database on Glassfish
6) ODE 1.2 ,Oracle ODE database on Tomcat
7)ODE 1.3.2 ,Oracle ODE database on Tomcat
( Intially I saw same error on Tomcat with oracle ode1.3.2 , Then modified

Resource in Server.xml * from*

<Context path="/App" docBase="App" debug="5" reloadable="true"
crossContext="true">
        <Resource name="jdbc/ODEDB" auth="Container"
type="javax.sql.DataSource"
            maxActive="100" maxIdle="30" maxWait="10000" username="user"
password="password"
        driverClassName="oracle.jdbc.driver.OracleDriver"
        url="jdbc:oracle:thin:@hostname:port:SID"/>
    </Context>

 *to*

<Context path="/App" docBase="App" debug="5" reloadable="true"
crossContext="true">
            <Resource name="jdbc/ODEDB" auth="Container"
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory" maxActive="20"
maxIdle="30" maxWait="10000" user="user" password="password"
driverClassName="oracle.jdbc.OracleDriver"  url="jdbc:oracle:thin:@hostname
:port:SID""/>
        </Context>

and copied openjpa1.1.0.jar instead of openjpa1.3.0-SNAPSHOT.jar into
WEB-INF/lib.


)



*My connection pool settings on Glassfish*

 <jdbc-connection-pool allow-non-component-callers="false"
associate-with-thread="false" connection-creation-retry-attempts="0"
connection-creation-retry-interval-in-seconds="10"
connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0"
connection-validation-method="auto-commit"
datasource-classname="oracle.jdbc.pool.OracleDataSource"
fail-all-connections="false" idle-timeout-in-seconds="300"
is-connection-validation-required="false"
is-isolation-level-guaranteed="true" lazy-connection-association="false"
lazy-connection-enlistment="false" match-connections="false"
max-connection-usage-count="0" max-pool-size="32"
max-wait-time-in-millis="60000" name="oracle"
non-transactional-connections="false" pool-resize-quantity="2"
res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1"
steady-pool-size="8" transaction-isolation-level="read-committed"
validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
      <property name="URL" value="jdbc:oracle:thin:@hostname:port:SID"/>
      <property name="NetworkProtocol" value="tcp"/>
      <property name="PortNumber" value="portnum"/>
      <property name="Password" value="password"/>
      <property name="ServerName" value="hostname"/>
      <property name="DatabaseName" value="SID"/>
      <property name="User" value="user"/>
      <property name="DataSourceName" value="OracleDataSource"/>
    </jdbc-connection-pool>


same settings worked with ODE1.2+Oracle ODEDB on glassfish

One morething to add is If I don't use Database for ODE i.e if I write
everything to memory it works fine. I don't want to follow this approach
because I need to handle large  binary data .


I moved to ODE1.3.2 because of WS Security and My backend need to be Oracle.


Is there any alternative way to specify External DB for ODE besides the
approach I'm using?



-- 
Annapoorna

Re: Oracle issues with ODE 1.3.2 on glassfish appserver

Posted by Annapoorna Chandra <ap...@gmail.com>.
Some how my I'm unable to see attached error so I'm pasting it here.

This is the error I'm seeing


ERROR org.apache.ode.bpel.engine.BpelEngineImpl  - Scheduled job failed;
<openjpa-1.1.0-r422266:659716 nonfatal general error>
org.apache.openjpa.persistence.PersistenceException: ORA-01453: SET
TRANSACTION must be first statement of transaction

    at
org.apache.openjpa.jdbc.sql.SQLExceptions.narrow(SQLExceptions.java:146)
    at
org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4150)
    at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
    at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:88)
    at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:64)
    at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:762)
    at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.getConnection(JDBCStoreManager.java:215)
    at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:349)
    at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:328)
    at
org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:407)
    at
org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:218)
    at
org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:208)
    at
org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
    at
org.apache.openjpa.jdbc.kernel.PagingResultObjectProvider.open(PagingResultObjectProvider.java:192)
    at
org.apache.openjpa.lib.rop.WindowResultList.<init>(WindowResultList.java:57)
    at
org.apache.openjpa.jdbc.kernel.JDBCFetchConfigurationImpl.newResultList(JDBCFetchConfigurationImpl.java:222)
    at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1222)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:989)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:847)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:778)
    at
org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:525)
    at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:237)
    at
org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:277)
    at
org.apache.ode.dao.jpa.ProcessDAOImpl.getCorrelator(ProcessDAOImpl.java:95)
    at
org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.findRoute(PartnerLinkMyRoleImpl.java:112)
    at
org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:230)
    at
org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.java:408)
    at
org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:439)
    at
org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:441)
    at
org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:411)
    at
org.apache.ode.scheduler.simple.SimpleScheduler$4$1.call(SimpleScheduler.java:405)
    at
org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:218)
    at
org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:404)
    at
org.apache.ode.scheduler.simple.SimpleScheduler$4.call(SimpleScheduler.java:401)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: ORA-01453: SET TRANSACTION must be first
statement of transaction

    at
oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at
oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
    at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
    at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:936)
    at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
    at
oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1770)
    at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1739)
    at
oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:298)
    at
oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalConnection.java:3971)
    at
com.sun.gjc.spi.base.ConnectionHolder.setTransactionIsolation(ConnectionHolder.java:694)
    at
org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:257)
    at
org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:95)
    at
org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:100)
    at
org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:88)
    at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connectInternal(JDBCStoreManager.java:773)
    at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:758)
    ... 33 more




On Wed, Jul 8, 2009 at 12:59 PM, Annapoorna Chandra <
apurna.chandra@gmail.com> wrote:

> Hi,
> This is my first post . need help regarding the issue
>    My system configuration is like this
>
>    Appserver - Glassfish
>    Database used for ODE - Oracle 10g
>    Apache ODE version -1.3.2
>   Java Version- 1.6.0_13
>
>   I have a webapp which use Ode 1.3.2 and Oracle Database deployed on
> Glassfish.
>
>   1)I have recreated ode tables in oracle.
>   2) added ojdbc14-10.2.0.jar to glasfish lib
>
>   I have set up a JNDI resource from  glassfish admin console and tested
> the connection . connection is successful.
>
> deployed webapp that uses this JNDI specified in
> ode-axis2.properties.(tested this with sample java app it worked fine and
> also tested ode deployment with out specfying JNDI resource which throw me
> an exception saying lookup failed)
>
> also deployed workflow where deployment succeeded with out errors.
>
> When I call operation in workflow from a client I see error.  Attaching
> error to this Message.
>
> * I have following configurations and works fine*
>
> 1) ODE 1.3.2 ,sqlserver ODE database on Glassfish
> 2) ODE 1.3.2 ,sqlserver ODE database on Tomcat 6.0.18(also tried on 5.x
> versionS)
> 3) ODE 1.2 ,sqlserver ODE database on Glassfish
> 4) ODE 1.2 ,sqlserver ODE database on Tomcat
> 5) ODE 1.2 ,Oracle  ODE database on Glassfish
> 6) ODE 1.2 ,Oracle ODE database on Tomcat
> 7)ODE 1.3.2 ,Oracle ODE database on Tomcat
> ( Intially I saw same error on Tomcat with oracle ode1.3.2 , Then modified
>
> Resource in Server.xml * from*
>
> <Context path="/App" docBase="App" debug="5" reloadable="true"
> crossContext="true">
>         <Resource name="jdbc/ODEDB" auth="Container"
> type="javax.sql.DataSource"
>             maxActive="100" maxIdle="30" maxWait="10000" username="user"
> password="password"
>         driverClassName="oracle.jdbc.driver.OracleDriver"
>         url="jdbc:oracle:thin:@hostname:port:SID"/>
>     </Context>
>
>  *to*
>
> <Context path="/App" docBase="App" debug="5" reloadable="true"
> crossContext="true">
>             <Resource name="jdbc/ODEDB" auth="Container"
> type="oracle.jdbc.pool.OracleDataSource"
> factory="oracle.jdbc.pool.OracleDataSourceFactory" maxActive="20"
> maxIdle="30" maxWait="10000" user="user" password="password"
> driverClassName="oracle.jdbc.OracleDriver"  url="jdbc:oracle:thin:@hostname
> :port:SID""/>
>         </Context>
>
> and copied openjpa1.1.0.jar instead of openjpa1.3.0-SNAPSHOT.jar into
> WEB-INF/lib.
>
>
> )
>
>
>
> *My connection pool settings on Glassfish*
>
>  <jdbc-connection-pool allow-non-component-callers="false"
> associate-with-thread="false" connection-creation-retry-attempts="0"
> connection-creation-retry-interval-in-seconds="10"
> connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0"
> connection-validation-method="auto-commit"
> datasource-classname="oracle.jdbc.pool.OracleDataSource"
> fail-all-connections="false" idle-timeout-in-seconds="300"
> is-connection-validation-required="false"
> is-isolation-level-guaranteed="true" lazy-connection-association="false"
> lazy-connection-enlistment="false" match-connections="false"
> max-connection-usage-count="0" max-pool-size="32"
> max-wait-time-in-millis="60000" name="oracle"
> non-transactional-connections="false" pool-resize-quantity="2"
> res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1"
> steady-pool-size="8" transaction-isolation-level="read-committed"
> validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
>       <property name="URL" value="jdbc:oracle:thin:@hostname:port:SID"/>
>       <property name="NetworkProtocol" value="tcp"/>
>       <property name="PortNumber" value="portnum"/>
>       <property name="Password" value="password"/>
>       <property name="ServerName" value="hostname"/>
>       <property name="DatabaseName" value="SID"/>
>       <property name="User" value="user"/>
>       <property name="DataSourceName" value="OracleDataSource"/>
>     </jdbc-connection-pool>
>
>
> same settings worked with ODE1.2+Oracle ODEDB on glassfish
>
> One morething to add is If I don't use Database for ODE i.e if I write
> everything to memory it works fine. I don't want to follow this approach
> because I need to handle large  binary data .
>
>
> I moved to ODE1.3.2 because of WS Security and My backend need to be
> Oracle.
>
>
> Is there any alternative way to specify External DB for ODE besides the
> approach I'm using?
>
>
>
> --
> Annapoorna
>



-- 
Annapoorna