You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Mark Struberg <st...@yahoo.de> on 2013/08/10 13:11:06 UTC

possible issue in parallel webapp start

Hi folks!

I had a weird issue the last days in a clustered WAS environment. Going through the sources I fear this might affect plain OpenJPA as well.

What happens is the following Exception: 


[8/7/13 8:40:16:162 CEST] 000000a2 BusinessExcep E
 CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method 
"holeStammdaten" on bean "BeanId(some-ear-1.0.1#some-service.jar#KundendatenImpl, null)". 
Exception data: <openjpa-2.1.2-SNAPSHOT-r422266:1436521 nonfatal user error> 
org.apache.openjpa.persistence.ArgumentException: 
Could not map discriminator value "SUBARTPER" to any known subclasses of the requested 
class "at.sozvers.zepta.beauskunftung.entities.Partner" (known discriminator values: [Partner]).
FailedObject: 660902 [org.apache.openjpa.util.LongId] [java.lang.String]
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:336)
Person (discriminator 'SUBARTPER') extends Partner (which in turn extends AuditedEntity)


The situation is as following:

We have an EAR with 2 WARs inside.
They share a non-jta-managed DataSource by using some entities (+ services) which are packaged in a jar in the EARs /lib folder (shared across all webapps)

If all nodes of the app server gets stopped and then both start up again, all is fine.

The issue above happens if a single node goes down and then starts again (second cluster node with mem2mem is running). From looking at the logs it looks like requests get queued for this node before it's fully running. But once it accepts requests again, it will get 50 in exact parallel (same ms).

What happens in the class is that the _subs variable is empty, thus only the query entity itself gets added ('Partner'). Under normal load conditions (logging and also in debugger), _subs contains 'SUBARTPER, 'Partner' and AuditedEntity.


Did anyone experience such a situation already?
If you have some gut feeling then I will tinker on a unit test for it.


LieGrue,
strub