openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joachim Stein (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-941) Unable to write data into table
Date Wed, 25 Feb 2009 14:31:14 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12676660#action_12676660
] 

Joachim Stein commented on OPENJPA-941:
---------------------------------------

In a tutorial i've seen something about generating a primary key:

ID generation strategies and the Feature Pack for EJB 3.0
To generate a database primary key while a transaction is currently active, there
are fundamentally two main mechanisms:

    - Suspend the current transaction
    - Use a different connection (and thus a separate transaction)

Because WebSphere Application Server does not allow the suspension of a
transaction, you must specify a separate data source (specifically for key
generation) by specifying a <non-jta-data-source> in the persistence.xml file.
In this way, the generation of the primary key is obtained through a separate
JDBC connection (and therefore a local transaction).

Furthermore, you must explicitly specify in the administrative console that this
data source must not participate in JTA transactions, by specifying a custom
property nonTransactionalDataSource=true (Figure 2-17).
50 WebSphere Application Server Version 6.1 Feature Pack for EJB 3.0
Furthermore, you must explicitly specify in the administrative console that this
data source must not participate in JTA transactions, by specifying a custom
property nonTransactionalDataSource=true (Figure 2-17).



After doing that i get the message: 

Trace: 2009/02/25 13:59:47.933 01 t=8C0768 c=UNK key=P8 (0000000A)                       
                                      
  Description: Log Java Message                                                          
                                      
  Message: BBOO0221W: J2CA0144W: No mappingConfigAlias found for connection factory or datasource
ejb/SstDbManagerImpl.         
Trace: 2009/02/25 13:59:47.965 01 t=8C0768 c=UNK key=P8 (13007002)                       
                                      
  ThreadId: 00000050                                                                     
                                      
  FunctionName: com.ibm.ejs.j2c.J2CXAResourceFactory                                     
                                      
  SourceId: com.ibm.ejs.j2c.J2CXAResourceFactory                                         
                                      
  Category: WARNING                                                                      
                                      
  ExtendedMessage: BBOO0221W: J2CA0061W: Error creating XA Connection and Resource com.ibm.ws.exception.WsException:
DSRA8100E: Unable to get a XAConnection from the DataSource. with SQL State : 42815 SQL Code
: -4461                                               
 at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.setLinkedException(DataStoreAdapterException.java:464)
               
 at com.ibm.ws.rsadapter.AdapterUtil.mapException(AdapterUtil.java:2196)                 
                                          
 at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:1461)
                                        
 at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1092)
      
 at com.ibm.ejs.j2c.J2CXAResourceFactory$1.run(J2CXAResourceFactory.java:280)            
                                          
 at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)    
                                          
 at com.ibm.ejs.j2c.J2CXAResourceFactory.getXAResource(J2CXAResourceFactory.java:129)    
                                          
 at com.ibm.ws.Transaction.JTA.XARecoveryData.getXARminst(XARecoveryData.java:529)       
                                          
 at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:644)           
                                          
 at com.ibm.ws390.tx.XARecoveryAgentImpl.rollbackUnknownTransactions(XARecoveryAgentImpl.java:716)
                                 
 at com.ibm.ws390.tx.XARecoveryAgentImpl$XARecoveryAgentThread.run(XARecoveryAgentImpl.java:351)
                                   
Caused by: java.sql.SQLException: [jcc][t4][10205][11234][3.53.81] Null userid is not supported.
ERRORCODE=-4461, SQLSTATE=42815DSRA
0010E: SQL State = 42815, Error Code = -4,461                                            
                                          
 at com.ibm.db2.jcc.a.bd.a(bd.java:676)           
 at com.ibm.db2.jcc.a.bd.a(bd.java:60)                                                   
                                          
 at com.ibm.db2.jcc.a.bd.a(bd.java:103)                                                  
                                          
 at com.ibm.db2.jcc.t4.b.y(b.java:1905)                                                  
                                          
 at com.ibm.db2.jcc.t4.b.g(b.java:1912)                                                  
                                          
 at com.ibm.db2.jcc.t4.b.c(b.java:704)                                                   
                                          
 at com.ibm.db2.jcc.t4.b.b(b.java:691)                                                   
                                          
 at com.ibm.db2.jcc.t4.b.a(b.java:374)                                                   
                                          
 at com.ibm.db2.jcc.t4.b.<init>(b.java:310)                                        
                                                
 at com.ibm.db2.jcc.t4.c.<init>(c.java:32)                                         
                                                
 at com.ibm.db2.jcc.DB2PooledConnection.<init>(DB2PooledConnection.java:193)       
                                                
 at com.ibm.db2.jcc.DB2XAConnection.<init>(DB2XAConnection.java:56)                
                                                
 at com.ibm.db2.jcc.DB2XADataSource.getXAConnection(DB2XADataSource.java:166)            
                                          
 at com.ibm.db2.jcc.DB2XADataSource.getXAConnection(DB2XADataSource.java:135)            
                                          
 at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper$1.run(InternalGenericDataStoreHelper.java:918)
                         
 at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)    
                                          
 at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper.getPooledConnection(InternalGenericDataStoreHelper.java:955)
           
 at com.ibm.ws.rsadapter.spi.InternalDB2UniversalDataStoreHelper.getPooledConnection(InternalDB2UniversalDataStoreHelper.java:1408)

 at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:1457)
                                        
 ... 8 more



How can i forgive a correct mappingConfigAlias?                                          
                                                                                         
                                                       

> Unable to write data into table
> -------------------------------
>
>                 Key: OPENJPA-941
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-941
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: z/OS
>            Reporter: Joachim Stein
>
> My Application is running on WAS 6.1.0.18 which runs on a z/OS system. I'm working with
EJB 3.0. I can read data from database but everytime i call persist() to insert a row into
the table i get the following error message:
>   ExtendedMessage: BBOO0220E: WTRN0074E: Exception caught from before_completion synchronization
operation: <openjpa-1.0.1-r420667:592145 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
null                                             
>  at org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.getConnection(AbstractJDBCSeq.java:162)
                                         
>  at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.allocateSequence(TableJDBCSeq.java:366)
                                            
>  at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.nextInternal(TableJDBCSeq.java:266) 
                                               
>  at org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.next(AbstractJDBCSeq.java:60)    
                                               
>  at org.apache.openjpa.util.ImplHelper.generateValue(ImplHelper.java:160)           
                                               
>  at org.apache.openjpa.util.ImplHelper.generateFieldValue(ImplHelper.java:144)      
                                               
>  at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignField(JDBCStoreManager.java:557)
                                         
>  at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:450)          
                                               
>  at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:426)          
                                               
>  at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:541)
                                      
>  at org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134)
                               
>  at org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:501)
                                           
>  at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2770) 
                                               
>  at org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39)              
                                               
>  at org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:940)
                                              
>  at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1892)                
                                               
>  at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)            
                                               
>  at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)     
                                               
>  at com.ibm.ws.uow.ComponentContextSynchronizationWrapper.beforeCompletion(ComponentContextSynchronizationWrapper.java:66)
>  at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:242)
                                          
>  at com.ibm.ws.Transaction.JTA.TransactionImpl.prePrepare(TransactionImpl.java:2404)
                                               
>  at com.ibm.ws.Transaction.JTA.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:1637)
                                   
>  at com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1608)
                                            
>  at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1543)    
                                               
>  at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:240)     
                                               
>  at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:164)       
                                               
>  at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:782)                      
                                               
>  at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:206)                  
                                               
>  at com.ibm.ejs.csi.RequiresNew.postInvoke(RequiresNew.java:93)                     
                                               
>  at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:581)
                                             
>  at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4311)           
                                               
>  at interfaces.EJSLocal0SLOmegamonMasterManagerImpl_22398363.createOmegamonMaster(EJSLocal0SLOmegamonMasterManagerImpl_22398363.java
> )                                                                                   
                                               
>  at management.SstDbManagerImpl.createServer(SstDbManagerImpl.java:109)             
                                               
>  at interfaces.EJSRemote0SLSstDbManagerImpl_9a8f969a.createServer(EJSRemote0SLSstDbManagerImpl_9a8f969a.java)
                      
>  at interfaces._SstDbManager_Stub.createServer(_SstDbManager_Stub.java)             
                                               
>  at com.ibm.db2pm.sst.SstController.doGet(SstController.java:435)                   
                                               
>  at com.ibm.db2pm.sst.SstController.doPost(SstController.java:653)                  
                                               
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)                    
                                               
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)                    
                                               
>  at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1076)
                                               
>  at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:550)
                                          
>  at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:486)
                                        
>  at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
>  at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)  
>  at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)    
                      
>  at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:115)     
                      
>  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
   
>  at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInf               
                 
> furthermore:
>    Message: BBOO0220E: SRVE0068E: Uncaught exception thrown in one of the service methods
of the servlet: SstController. Exception thrown : javax.ejb.EJBTransactionRolledbackException:
                                                                               
>   at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:795)    
>   at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:206)                 
                         
>   at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:581)
                      
>   at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:4311)          
                         
>   at interfaces.EJSRemote0SLSstDbManagerImpl_9a8f969a.createServer(EJSRemote0SLSstDbManagerImpl_9a8f969a.java)
>   at interfaces._SstDbManager_Stub.createServer(_SstDbManager_Stub.java)            
                         
>   at com.ibm.db2pm.sst.SstController.doGet(SstController.java:436)                  
                         
>   at com.ibm.db2pm.sst.SstController.doPost(SstController.java:654)                 
                         
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)                   
                         
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)                   
                         
>   at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1076)
                        
>   at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:550)
                   
>   at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:486)
                 
>   at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
          
>   at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)      
                         
>   at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)   
                         
>   at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:115)    
                         
>   at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
     
>   at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
     
>   at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
                    
>   at com.ibm.ws390.channel.xmem.XMemConnLink.ready(XMemConnLink.java:762)           
                         
>   at com.ibm.ws390.xmem.XMemSRBridgeImpl.httpinvoke(XMemSRBridgeImpl.java:230)      
                         
>   at com.ibm.ws390.xmem.XMemSRCppUtilities.httpinvoke(XMemSRCppUtilities.java:74)   
                         
>   at com.ibm.ws390.orb.ServerRegionBridge.httpinvoke(Unknown Source)                
                         
>   at com.ibm.ws390.orb.ORBEJSBridge.httpinvoke(Unknown Source)                      
                         
>   at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)                   
                                                                                         
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      
>  at java.lang.reflect.Method.invoke(Method.java:618)                                
           
>  at com.ibm.ws390.orb.parameters.HTTPInvoke.HTTPInvokeParmSetter(HTTPInvoke.java:105)
          
>  at com.ibm.ws390.orb.CommonBridge.nativeRunApplicationThread(Native Method)        
           
>  at com.ibm.ws390.orb.CommonBridge.runApplicationThread(Unknown Source)             
           
>  at com.ibm.ws.util.ThreadPool$ZOSWorker.run(ThreadPool.java:1670)                  
           
>  com.ibm.ws.webcontainer.servlet.ServletWrapper com.ibm.ws.webcontainer.servlet.ServletWrapper
 
> What do you think does this exactly means? I've tried to fix the problem after looking
similarly problems in the internet but nothing helps.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message