openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hm (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2445) argument type mismatch error randomly occured
Date Tue, 29 Oct 2013 14:54:32 GMT

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

hm commented on OPENJPA-2445:
-----------------------------

this is part of my persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    version="1.0">    
    <persistence-unit name="pu-core" transaction-type="JTA">
		
		<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
		<jta-data-source>jdbc/coreDS</jta-data-source>
	 		 	
		<class>com.core.da.RequestLogDA</class>
		<class>com.core.da.RequestLogIdDA</class>            
				
        	<properties>
        	
 			<property name="openjpa.DataCache" value="false"/>
 			<property name="openjpa.IgnoreChanges" value="true" />
         	
	         </properties>
    </persistence-unit>       
</persistence>

Our application worked with this configuration more than three years in high transactional
environment.
This error has been occurred without any changes in application or environment.
Application successfully started and works fine. This error was happened randomly and after
restarting application server, all things is OK for some hours!  

Before this error, we have another class cast exception and I post another issue for that.



> argument type mismatch error randomly occured
> ---------------------------------------------
>
>                 Key: OPENJPA-2445
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2445
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: Enhance, jdbc, kernel
>    Affects Versions: 1.2.2, 1.2.3
>         Environment: SLES 10
> JRE 6 U15
> Glassfish 2.1.1
>            Reporter: hm
>            Priority: Critical
>
> We are using an embedded class as Id :
> @Entity
> @Table(name = "GC5REQUESTLOG")
> @DataCache(enabled = false)
> public class RequestLogDA implements java.io.Serializable {
> 	// Fields
> 	@EmbeddedId
> 	@AttributeOverrides({
> 			@AttributeOverride(name = "srvcLogID", column = @Column(name = "G5005ID")),
> 			@AttributeOverride(name = "srvcLogDate", column = @Column(name = "G5005DATE")),
> 			@AttributeOverride(name = "requestID", column = @Column(name = "G5008ID")) })
> 	private RequestLogIdDA id;
> ....
> }
> @Embeddable
> // @SequenceGenerator(name="REQUEST_SEQUENCE",sequenceName="REQUESTID_SEQ1")
> public class RequestLogIdDA implements java.io.Serializable {
> 	// Fields
> 	@Column(name = "G5005ID")
> 	private Long srvcLogID;
> 	@Column(name = "G5005DATE")
> 	private Date srvcLogDate;
> 	@Column(name = "G5008ID")
> 	private Integer requestID;
>     .....
> }
> sometimes we see following error in log files.
> Caused by: java.lang.IllegalArgumentException: argument type mismatch
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.openjpa.enhance.Reflection.set(Reflection.java:696)
> 	at org.apache.openjpa.kernel.ObjectIdStateManager.setValue(ObjectIdStateManager.java:736)
> 	at org.apache.openjpa.kernel.ObjectIdStateManager.store(ObjectIdStateManager.java:507)
> 	at org.apache.openjpa.jdbc.meta.strats.EmbedValueHandler.toObjectValue(EmbedValueHandler.java:168)
> 	at org.apache.openjpa.jdbc.meta.strats.ObjectIdValueHandler.toObjectValue(ObjectIdValueHandler.java:77)
> 	at org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.getPrimaryKeyValue(HandlerFieldStrategy.java:330)
> 	at org.apache.openjpa.jdbc.meta.ClassMapping.getObjectId(ClassMapping.java:188)
> 	at org.apache.openjpa.jdbc.meta.ClassMapping.getObjectId(ClassMapping.java:147)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:976)
> 	at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
> 	at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2415)
> 	at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:272)
> 	at org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.getResultObject(InstanceResultObjectProvider.java:59)
> 	at org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:36)
> 	at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1228)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:990)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:848)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message