[JBoss JIRA] Closed: (JBPM-1046) JobExecutorServlet cannot use local JNDI name to access datasource
by Alejandro Guizar (JIRA)
[ https://jira.jboss.org/jira/browse/JBPM-1046?page=com.atlassian.jira.plug... ]
Alejandro Guizar closed JBPM-1046.
----------------------------------
Closing issues that I resolved in already released versions.
> JobExecutorServlet cannot use local JNDI name to access datasource
> ------------------------------------------------------------------
>
> Key: JBPM-1046
> URL: https://jira.jboss.org/jira/browse/JBPM-1046
> Project: JBoss jBPM
> Issue Type: Bug
> Components: Core Engine
> Affects Versions: jBPM 3.2.1
> Environment: Windows 2000
> IBM Websphere Application Server 6.1 (also reproduced on Websphere Test Environment 5.1)
> Oracle 9i database (with ojdbc14.jar release 9.2.0.8)
> Reporter: Jacques Desmazi?res
> Assignee: Alejandro Guizar
> Fix For: jBPM 3.2.3
>
>
> When configuraing jBPM / Hibernate with a datasource in an Enterprise application, using a local JNDI reference (java:comp/env/...) the web application works properly, accessing the database without any problem.
> But if you declare the JobExecutorServlet in the web application's web.xml, each time the this servlet JobExecutorThread fires, it generates exceptions:
> [22/08/07 18:33:03:175 CEST] 0000005e SystemOut O 18:33:03 DEBUG org.jbpm.job.executor.JobExecutorThread : acquiring jobs for execution...
> [22/08/07 18:33:03:315 CEST] 0000005f javaURLContex E NMSV0310E: Une opération JNDI sur un nom "java:" ne peut pas aboutir car le contexte d'exécution du serveur ne peut pas associer l'unité d'exécution de l'opération à un composant d'application J2EE. Cette condition peut se produire lorsque le client JNDI utilisant le nom "java:" n'est pas exécuté sur l'unité d'exécution d'une demande d'application du serveur. Assurez-vous qu'une application J2EE n'exécute pas d'opérations JNDI sur des noms "java:" dans des blocs de code statiques ou dans des unités d'exécution créées par cette application J2EE. Un code de ce type ne s'exécute pas nécessairement sur l'unité d'exécution d'une demande d'application du serveur et n'est donc pas pris en charge par les opérations JNDI sur les noms "java:". Trace de pile d'exceptions :
> javax.naming.ConfigurationException [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".]
> at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:411)
> at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:388)
> at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204)
> at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144)
> at javax.naming.InitialContext.lookup(InitialContext.java:363)
> at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
> at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
> at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
> at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:410)
> at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
> at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
> at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
> at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94)
> at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98)
> at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:354)
> at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563)
> at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109)
> at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56)
> Caused by: javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".
> at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1767)
> at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1083)
> at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:991)
> at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263)
> at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384)
> ... 17 more
>
> [22/08/07 18:33:03:347 CEST] 0000005e SystemOut O 18:33:03 FATAL org.hibernate.connection.DatasourceConnectionProvider : Could not find datasource: java:comp/env/jdbc/dsJBPM
> javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the serverruntime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE application. Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on "java:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".]
> at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:416)
> at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:388)
> at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204)
> at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144)
> at javax.naming.InitialContext.lookup(InitialContext.java:363)
> at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
> at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
> at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
> at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:410)
> at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
> at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
> at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
> at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94)
> at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98)
> at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:354)
> at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563)
> at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109)
> at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56)
> Caused by:
> javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".
> at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1767)
> at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1083)
> at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:991)
> at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263)
> at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384)
> ... 17 more
> [22/08/07 18:33:03:347 CEST] 0000005e SystemOut O 18:33:03 ERROR org.jbpm.job.executor.JobExecutorThread : exception in job executor thread. waiting 10000 milliseconds
> org.hibernate.HibernateException: Could not find datasource
> at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
> at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
> at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
> at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:410)
> at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
> at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
> at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
> at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94)
> at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98)
> at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:354)
> at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563)
> at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109)
> at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56)
> Caused by:
> javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the serverruntime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE application. Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on "java:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".]
> at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:416)
> at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:388)
> at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204)
> at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144)
> at javax.naming.InitialContext.lookup(InitialContext.java:363)
> at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
> ... 13 more
> Caused by:
> javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".
> at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1767)
> at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1083)
> at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:991)
> at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263)
> at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384)
> ... 17 more
> The exception is raised even if there is no timer in the process definition.
> If I replace the local JNDI reference (java:comp/env/jdbc/datasource) with the global JNDI name (jdbc/dsOracle) the JobExecutorThread works fine (even if Websphere logs warning due to direct use of the global JNDI reference). The JobExecutorThread also works if I replace the datasource with the database access parameters (driver, url, ...).
> (sample ear is available to reproduce the bug if necessary)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months
[JBoss JIRA] Closed: (JBPM-1058) Remove useless null checks from JbpmContext methods
by Alejandro Guizar (JIRA)
[ https://jira.jboss.org/jira/browse/JBPM-1058?page=com.atlassian.jira.plug... ]
Alejandro Guizar closed JBPM-1058.
----------------------------------
Closing issues that I resolved in already released versions.
> Remove useless null checks from JbpmContext methods
> ---------------------------------------------------
>
> Key: JBPM-1058
> URL: https://jira.jboss.org/jira/browse/JBPM-1058
> Project: JBoss jBPM
> Issue Type: Task
> Components: Core Engine
> Affects Versions: jBPM 3.2.3
> Reporter: Johan Parent
> Assignee: Alejandro Guizar
> Fix For: jBPM 3.3.0 GA
>
>
> Remove useless null checks from often used methods to obtain:
> /**
> * more logging related database access.
> */
> public LoggingSession getLoggingSession() {
> PersistenceService persistenceService = getPersistenceService();
> return (persistenceService!=null ? persistenceService.getLoggingSession() : null);
> }
> /**
> * more messaging related database access.
> */
> public MessagingSession getMessagingSession() {
> PersistenceService persistenceService = getPersistenceService();
> return (persistenceService!=null ? persistenceService.getMessagingSession() : null);
> }
> /**
> * more scheduling related database access.
> */
> public SchedulerSession getSchedulerSession() {
> PersistenceService persistenceService = getPersistenceService();
> return (persistenceService!=null ? persistenceService.getSchedulerSession() : null);
> }
> /**
> * more graph (process) related database access.
> */
> public GraphSession getGraphSession() {
> PersistenceService persistenceService = getPersistenceService();
> return (persistenceService!=null ? persistenceService.getGraphSession() : null);
> }
> /**
> * more task related database access.
> */
> public TaskMgmtSession getTaskMgmtSession() {
> PersistenceService persistenceService = getPersistenceService();
> return (persistenceService!=null ? persistenceService.getTaskMgmtSession() : null);
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months
[JBoss JIRA] Closed: (JBPM-1072) Concurrent JobExecutors can process the same job in parallel
by Alejandro Guizar (JIRA)
[ https://jira.jboss.org/jira/browse/JBPM-1072?page=com.atlassian.jira.plug... ]
Alejandro Guizar closed JBPM-1072.
----------------------------------
Closing issues that I resolved in already released versions.
> Concurrent JobExecutors can process the same job in parallel
> ------------------------------------------------------------
>
> Key: JBPM-1072
> URL: https://jira.jboss.org/jira/browse/JBPM-1072
> Project: JBoss jBPM
> Issue Type: Bug
> Components: Core Engine
> Affects Versions: jBPM 3.2.2
> Environment: Linux 2.6.21-1.3228.fc7 #1 SMP Tue Jun 12 14:56:37 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
> MySQL 5.0.22
> Reporter: Jiri Pechanec
> Assignee: Alejandro Guizar
> Fix For: jBPM 3.2.3
>
> Attachments: expl.tar.gz
>
>
> Attached is a simple test case that
> 1) Deploys process definition with two nodes
> 2) Starts 20 executor threads
> 2) Starts the process instance that will asynchronously execute action on the second node
> 4) The second node writes a record to the database
> The test case needs to be executed multiple times to see the incorrect behaviour.
> This is an example of run output
> Isol 8
> Action 1
> Success 0
> Failure 0
> Action 2
> Action 2 1
> Action 2
> Action 2 1
> Action 2
> Action 2 1
> Action 2
> Action 2 1
> Action 2
> Action 2 1
> Action 2
> Action 2 1
> Action 2
> Action 2
> Action 2 1
> Action 2 1
> Action 2
> Action 2 1
> Explanation of the outcome
> 9 job executors successfully executed the node action (same job) including database operation. All database operations were comitted (9 new records were created)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months
[JBoss JIRA] Created: (JBPM-1092) EjbSchedulerService does not delete executed timer from DB
by Britt Miner (JIRA)
EjbSchedulerService does not delete executed timer from DB
----------------------------------------------------------
Key: JBPM-1092
URL: http://jira.jboss.com/jira/browse/JBPM-1092
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM jPDL 3.2.2
Reporter: Britt Miner
Assigned To: Tom Baeyens
When using the EjbSchedulerService, I've been having a problem with non-repeating timers not being removed from the database after they are executed.
Of course, they won't be executed again because there is no longer an EJB timer to call them; however, if the EjbSchedulerService is ever replaced on the same installation with a DbSchedulerService, then all of these timers would likely be re-executed.
I was unable to find any code in the implementation that should have deleted a non-repeating timer from the database after execution, so I modified org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand to take advantage of the boolean already being returned from Timer.execute():
//original line
//timer.execute(jbpmContext);
// BRITT-- if we're done with this timer, let's get rid of it...
boolean deleteJob = timer.execute(jbpmContext);
if(deleteJob) {
jbpmContext.getJobSession().deleteJob(timer);
}
// --BRITT
Note:
While I doubt that it has any effect on this issue, I'll note that to get the EjbSchedulerService working in the first place, I implemented the EJB reference changes proposed here http://jira.jboss.com/jira/browse/JBPM-836.
-Britt
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 3 months