The root cause is java.util.NoSuchElementException as you can see in the stack.

 

From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Anstis, Michael (M.)
Sent: Monday, March 30, 2009 6:07 PM
To: Rules Users List
Subject: RE: [rules-users] Facing severe issues while using Persistence

 

This looks like a JPA issue; have you configured your PersistenceUnit?

 

I haven't used EclipseLink but in other IDE's you can create a PU graphically. There's always persistence.xml to fall back to as well.

 

Looks like EclipseLink can't find a PU definition.

 


From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Umesh Wankhede
Sent: 30 March 2009 13:10
To: Rules Users List
Subject: RE: [rules-users] Facing severe issues while using Persistence

Hi Kris

 

Thanks for the clues. But I have bigger problems when I try to use the persistence with Oracle and EclipseLink(because of project requirements).

I have mentioned in the below mail about the problems faced while migrating from H2 to Oracle. After fixing these (Oracle with Hibernate) issues, now I am facing quite a few issues while using EclipseLink (in place of Hibernate), like use of temporal types for dates, etc. I tried fixing these issues one by one, but got stuck with this exception[1] and no clue how to fix it. Any help would be appreciated.

Local Exception Stack:

Exception [EclipseLink-30005] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException

Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@133056f

Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.EntityManagerSetupException

Exception Description: Predeployment of PersistenceUnit [org.drools.task] failed.

Internal Exception: java.util.NoSuchElementException

      at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:121)

      at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:117)

      at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:64)

      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)

      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)

      at com.sample.RuleFlowTest.main(RuleFlowTest.java:51)

Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.EntityManagerSetupException

Exception Description: Predeployment of PersistenceUnit [org.drools.task] failed.

 

-Umesh

 

From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Thursday, March 26, 2009 8:32 PM
To: Rules Users List
Subject: Re: [rules-users] Facing severe issues while using Persistence

 

Umesh,

 

Based on the error in the H2 log, it seems like you are trying to assign tasks to a user that is not in your users database.  The task component contains a list of possible users and methods to add new users.  When creating a new task, possible actors must be in the user list, otherwise the foreign key constraint cannot be satisfied.  By default, there should always be an "Administrator" user, as all tasks are by default assigned to this users.  On top of that, you also need to add all possible users that you use in your processes.

 

It might be better to check for the existing users when trying to create a task and give an appropriate error message if the user cannot be found ... I would gladly apply a patch if you could find the time.  Tasks are created in WSHumanTaskHandler, so that would be the location to do these modifications.

 

Kris

 

----- Original Message -----

From: Umesh Wankhede

To: Rules Users List

Sent: Tuesday, March 24, 2009 2:07 PM

Subject: [rules-users] Facing severe issues while using Persistence

 

Hi

 

While using workflow persistence feature (with human task component), I am having quite a few problems. When I use default db (H2), I get ConstraintViolationException [1]. Since I have to ultimately integrate with Oracle, I modify the config files to point to Oracle. But with that I started getting lot of other issues, like invalid column names (size, date), invalid table name (Comment), SQLGrammarException, etc[2] (This is serious problem, if you use Oracle!)

I am struggling for quite a few days to get this work, but no success, any help would be greatly appreciated.

I am attaching the source code also[3].

 

[1]db-h2-errors.log

[2] db-oracle-errors.log

[3] RuleFlowTest.java, ruleflow.rf

 

Regds

Umesh

 

 

 Legal Notice: This transmission, including any attachments, is confidential, proprietary, and may be privileged. It is intended solely for the intended recipient. If you are not the intended recipient, you have  received this transmission in error and you are hereby advised that any review, disclosure, copying, distribution, or use of this transmission, or any of the information included therein, is unauthorized and strictly prohibited. If you have received this transmission in error, please immediately notify the sender by reply and permanently delete all copies of this transmission and its attachments

 


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

 Legal Notice: This transmission, including any attachments, is confidential, proprietary, and may be privileged. It is intended solely for the intended recipient. If you are not the intended recipient, you have  received this transmission in error and you are hereby advised that any review, disclosure, copying, distribution, or use of this transmission, or any of the information included therein, is unauthorized and strictly prohibited. If you have received this transmission in error, please immediately notify the sender by reply and permanently delete all copies of this transmission and its attachments

 

 Legal Notice: This transmission, including any attachments, is confidential, proprietary, and may be privileged. It is intended solely for the intended recipient. If you are not the intended recipient, you have  received this transmission in error and you are hereby advised that any review, disclosure, copying, distribution, or use of this transmission, or any of the information included therein, is unauthorized and strictly prohibited. If you have received this transmission in error, please immediately notify the sender by reply and permanently delete all copies of this transmission and its attachments