openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sravan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2497) Unable to persist a new instance
Date Tue, 06 May 2014 12:28:15 GMT

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

sravan commented on OPENJPA-2497:
---------------------------------

2. contents of persistence.xml


<persistence version="1.0"
	xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">

	<persistence-unit name="ACSTR" transaction-type="JTA">

		<jta-data-source>jdbc/ACSTR</jta-data-source>

		<!-- Entities -->
		<class>com.setmr.acstr.domain.BusinessUnit</class>
		<class>com.setmr.acstr.domain.ScreeningItem</class>
		<class>com.setmr.acstr.domain.BusinessCustomerEntity</class>
		<class>com.setmr.acstr.domain.BusinessCustomerIndividual</class>
		<class>com.setmr.acstr.domain.PersonalCustomerIndividual</class>
		<class>com.setmr.acstr.domain.ManualPaymentEntity</class>
		<class>com.setmr.acstr.domain.ManualPaymentIndividual</class>
		<class>com.setmr.acstr.domain.EmployeeIndividual</class>
		<class>com.setmr.acstr.domain.SupplierEntity</class>
		<class>com.setmr.acstr.domain.SupplierIndividual</class>
		<class>com.setmr.acstr.domain.Case</class>
		<class>com.setmr.acstr.domain.Country</class>
		<class>com.setmr.acstr.domain.Currency</class>
		<class>com.setmr.acstr.domain.Address</class>
		<class>com.setmr.acstr.domain.ApplicationContent</class>
		<class>com.setmr.acstr.domain.Nationality</class>
		<class>com.setmr.acstr.domain.Permission</class>
		<class>com.setmr.acstr.domain.Role</class>
		<class>com.setmr.acstr.domain.Group</class>
		<class>com.setmr.acstr.domain.User</class>
		<class>com.setmr.acstr.domain.WsDetails</class>
		<class>com.setmr.acstr.domain.Notification</class>
		<class>com.setmr.acstr.domain.Comment</class>
		<class>com.setmr.acstr.domain.audit.AuditRecord</class>
		<class>com.setmr.acstr.domain.Reports</class>
		<class>com.setmr.acstr.domain.LoggedUser</class>

		<exclude-unlisted-classes>true</exclude-unlisted-classes>

		<properties>
			<!-- <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(SchemaAction='add')"/>
-->
			<property name="openjpa.jdbc.SynchronizeMappings" value="validate" />
			<property name="openjpa.jdbc.DBDictionary"
				value="oracle(StoreCharsAsNumbers=false,useSchemaName=false)" />
			<!-- Delegate logging to Log4j -->
			<!-- <property name="openjpa.Log" value="log4j"/> -->
			<property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/>
			<property name="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)"/> 
			<property name="openjpa.ConnectionDriverName" value="oracle.jdbc.driver.OracleDriver"/>
			<property name="openjpa.DataCache"  value="true(CacheSize=5000, SoftReferenceSize=0)"/>
			<property name="openjpa.QueryCache" value="false"/>
			<property name="openjpa.jdbc.QuerySQLCache" value="false"/>
			<property name="openjpa.RemoteCommitProvider" value="sjvm"/>
				
		</properties>
	</persistence-unit>

</persistence>

> Unable to persist a new instance
> --------------------------------
>
>                 Key: OPENJPA-2497
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2497
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: sravan
>
> My application is working fine with Websphere 7.0.0.9 since last two years. Now Websphere
is upgraded to version 7.0.0.31. After this upgrade, application is throwing below error while
trying to persist a new instance. Please advise. 
> (Note: In another environment , where I use openjpa-1.2.2 jar with jboss application
server, application is working fine.)
> The below error shows the application is using openjpa-1.2.4-SNAPSHOT. So is there any
such issue in this release that does not exist in openjpa-1.2.2 ? How to remediate it in the
version openjpa-1.2.4-SNAPSHOT ? 
> Will be looking forward for your advise.  
> [12/03/14 08:09:42:885 GMT] 00000038 BusinessExcep E   CNTR0020E: EJB threw an unexpected
(non-declared) exception d
> uring invocation of method "create" on bean "BeanId(acstr01-acstr#acstr-ejb-1.0.jar#CRUDServiceBean,
null)". Excepti
> on data: <openjpa-1.2.4-SNAPSHOT-r422266:1517039 nonfatal store error> org.apache.openjpa.persistence.EntityExistsEx
> ception: Attempt to persist detached object "com.setmar.acstr.domain.Case@4aba4aba".
 If this is a new instance, m
> ake sure any version and/or auto-generated primary key fields are null/default when persisting.
> FailedObject: com.setmar.acstr.domain.Case@4aba4aba
>         at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2453)
>         at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2312)
>         at org.apache.openjpa.kernel.DelegatingBroker.persist(DelegatingBroker.java:1021)
>         at org.apache.openjpa.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:651)
>         at com.ibm.ws.jpa.management.JPAExEmInvocation.persist(JPAExEmInvocation.java:339)
>         at com.ibm.ws.jpa.management.JPAEntityManager.persist(JPAEntityManager.java:133)
>         at com.setmar.acstr.service.CRUDServiceBean.create(CRUDServiceBean.java:34)
>         at com.setmar.acstr.service.EJSLocal0SLCRUDServiceBean_a178a2d2.create(EJSLocal0SLCRUDServiceBean_a178a2d2
> .java)
>         at com.setmar.acstr.casemgmt.service.CaseServiceBean.save(CaseServiceBean.java:42)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>         at java.lang.reflect.Method.invoke(Method.java:611)
>         at com.ibm.ejs.container.EJSContainer.invokeProceed(EJSContainer.java:5874)
>         at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:586)
>         at com.setmar.acstr.domain.audit.AuditServiceInterceptor.process(AuditServiceInterceptor.java:36)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>         at java.lang.reflect.Method.invoke(Method.java:611)
>         at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:227)
>         at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:566)
>         at com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInvoke(InvocationContextImpl.java:217)
>         at com.ibm.ejs.container.EJSContainer.invoke(EJSContainer.java:5766)
>         at com.setmar.acstr.casemgmt.service.EJSLocal0SLCaseServiceBean_78acc083.save(EJSLocal0SLCaseServiceBean_7
> 8acc083.java)
>         at com.setmar.acstr.casemgmt.facade.CaseFacadeBean.submitCase(CaseFacadeBean.java:102)
>         at com.setmar.acstr.casemgmt.facade.EJSLocal0SLCaseFacadeBean_28e75513.submitCase(EJSLocal0SLCaseFacadeBea
> n_28e75513.java)
>         at com.setmar.acstr.managed.AbstractCaseBean.submitCase(AbstractCaseBean.java:232)
>         at com.setmar.acstr.managed.AbstractCaseBean.submitCase(AbstractCaseBean.java:150)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message