[Datasource Configuration] - [JBoss-7.1.1.Final] xa-datasource-property bug?
by Rudolf S
Rudolf S [https://community.jboss.org/people/Diamantregen] created the discussion
"[JBoss-7.1.1.Final] xa-datasource-property bug?"
To view the discussion, visit: https://community.jboss.org/message/732603#732603
--------------------------------------------------------------
Hello,
I found that when the following is set in the standalone.xml of JBoss-7.1.1.Final, it will have a fatal error:
<xa-datasource....>
....
*<xa-datasource-property name="ConnectionProperties">SetBigStringTryClob=true</xa-datasource-property>*
....
</xa-datasource>
The error is:
Caused by: javax.resource.ResourceException: No property editor found for type: class java.util.Properties
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:601)
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:430)
When I don't define the SetBigStringTryClob setting, all is fine. However, the SetBigStringTryClob is really important for the application to work correctly.
Maybe this a bug? It worked without problems in JBoss 4.2.3. Is there any workaround? Please help, thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/732603#732603]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[jBPM] - Problem with jbpm 5.3, jboss 6.1 and BTMTransactionManagerLookup
by Pablo Umaña
Pablo Umaña [https://community.jboss.org/people/pumanar] created the discussion
"Problem with jbpm 5.3, jboss 6.1 and BTMTransactionManagerLookup"
To view the discussion, visit: https://community.jboss.org/message/739753#739753
--------------------------------------------------------------
Hi everyone
I'm having some problems with my JBPM app. My technology stack is: JBoss AS 6.1, jBPM 5.3 and a PostgreSQL 9.0 database.
My problem occurs when I try to start a new process..
persistence.xml
props.put("hibernate.transaction.manager_lookup_class", "org.hibernate.transaction.BTMTransactionManagerLookup");
Ejb3Configuration cfg = new Ejb3Configuration();
PersistenceMetadata p = new PersistenceMetadata();
p.setTransactionType(PersistenceUnitTransactionType.JTA);
p.setName("org.jbpm.persistence.jpa");
p.setMappingFiles(mappingFiles);
cfg.configure(p, null);
cfg.addAnnotatedClass(org.jbpm.task.Attachment.class);
cfg.addAnnotatedClass(org.jbpm.task.Content.class);
cfg.addAnnotatedClass(org.jbpm.task.BooleanExpression.class);
cfg.addAnnotatedClass(org.jbpm.task.Comment.class);
cfg.addAnnotatedClass(org.jbpm.task.Deadline.class);
cfg.addAnnotatedClass(org.jbpm.task.Comment.class);
cfg.addAnnotatedClass(org.jbpm.task.Deadline.class);
cfg.addAnnotatedClass(org.jbpm.task.Delegation.class);
cfg.addAnnotatedClass(org.jbpm.task.Escalation.class);
cfg.addAnnotatedClass(org.jbpm.task.Group.class);
cfg.addAnnotatedClass(org.jbpm.task.I18NText.class);
cfg.addAnnotatedClass(org.jbpm.task.Notification.class);
cfg.addAnnotatedClass(org.jbpm.task.EmailNotification.class);
cfg.addAnnotatedClass(org.jbpm.task.EmailNotificationHeader.class);
cfg.addAnnotatedClass(org.jbpm.task.PeopleAssignments.class);
cfg.addAnnotatedClass(org.jbpm.task.Reassignment.class);
cfg.addAnnotatedClass(org.jbpm.task.Status.class);
cfg.addAnnotatedClass(org.jbpm.task.Task.class);
cfg.addAnnotatedClass(org.jbpm.task.TaskData.class);
cfg.addAnnotatedClass(org.jbpm.task.SubTasksStrategy.class);
cfg.addAnnotatedClass(org.jbpm.task.OnParentAbortAllSubTasksEndStrategy.class);
cfg.addAnnotatedClass(org.jbpm.task.OnAllSubTasksEndParentEndStrategy.class);
cfg.addAnnotatedClass(org.jbpm.task.User.class);
cfg.addAnnotatedClass(org.jbpm.persistence.processinstance.ProcessInstanceInfo.class);
cfg.addAnnotatedClass(org.jbpm.persistence.processinstance.ProcessInstanceEventInfo.class);
cfg.addAnnotatedClass(org.drools.persistence.info.WorkItemInfo.class);
cfg.addAnnotatedClass(org.drools.persistence.info.SessionInfo.class);
cfg.addProperties(props);
entityManagerFactory = cfg.buildEntityManagerFactory();
when I try to create a new StatefulKnowledgeSession
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, taskServer.getEntityManagerFactory());
env.set(EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager());
KnowledgeBase kbase = readKnowledgeBase(process);
ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);
int sessionId = ksession.getId();
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new CommandBasedWSHumanTaskHandler(ksession));
this returns the following error
INFO [bitronix.tm.BitronixTransactionManager] Bitronix Transaction Manager version 2.1.2
WARN [bitronix.tm.Configuration] cannot get this JVM unique ID. Make sure it is configured and you only use ASCII characters. Will use IP address instead (unsafe for production usage!).
INFO [bitronix.tm.Configuration] JVM unique ID: <192.168.1.142>
ERROR [STDERR] bitronix.tm.utils.InitializationException: initialization failed, cannot safely start the transaction manager
ERROR [STDERR] at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:79)
ERROR [STDERR] at bitronix.tm.TransactionManagerServices.getTransactionManager(TransactionManagerServices.java:62)
ERROR [STDERR] at cl.exe.monoTarea.process.Proceso.iniciarProcesos(Proceso.java:65)
ERROR [STDERR] at cl.exe.fonasa.fiscalizacion.app.ProcesoApp.iniciarProceso(ProcesoApp.java:59)
ERROR [STDERR] at cl.exe.fonasa.fiscalizacion.estructuras.Inicializador.create(Inicializador.java:99)
ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
ERROR [STDERR] at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
ERROR [STDERR] at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
ERROR [STDERR] at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
ERROR [STDERR] at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
ERROR [STDERR] at org.jboss.weld.introspector.jlr.WeldMethodImpl.invoke(WeldMethodImpl.java:193)
ERROR [STDERR] at org.jboss.weld.injection.MethodInjectionPoint.invoke(MethodInjectionPoint.java:127)
ERROR [STDERR] at org.jboss.weld.util.Beans.callInitializers(Beans.java:901)
ERROR [STDERR] at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:888)
ERROR [STDERR] at org.jboss.weld.bean.SessionBean$1$1.proceed(SessionBean.java:194)
ERROR [STDERR] at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:54)
ERROR [STDERR] at org.jboss.weld.bean.SessionBean$1.inject(SessionBean.java:189)
ERROR [STDERR] at org.jboss.weld.integration.ejb.SessionBeanInterceptor.postConstruct(SessionBeanInterceptor.java:97)
ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
ERROR [STDERR] at org.jboss.ejb3.interceptors.aop.LifecycleCallbackInterceptorMethodLazyInterceptor.invoke(LifecycleCallbackInterceptorMethodLazyInterceptor.java:109)
ERROR [STDERR] at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)
ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
ERROR [STDERR] at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)
ERROR [STDERR] at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
ERROR [STDERR] at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)
ERROR [STDERR] at org.jboss.ejb3.singleton.aop.impl.ConstructionInvocationContextAdapter.proceed(ConstructionInvocationContextAdapter.java:106)
ERROR [STDERR] at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:247)
ERROR [STDERR] at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:392)
ERROR [STDERR] at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:211)
ERROR [STDERR] at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52)
ERROR [STDERR] at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)
ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
ERROR [STDERR] at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)
ERROR [STDERR] at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)
ERROR [STDERR] at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)
ERROR [STDERR] at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90)
ERROR [STDERR] at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_962065316.invoke(InvocationContextInterceptor_z_setup_962065316.java)
ERROR [STDERR] at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)
ERROR [STDERR] at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
ERROR [STDERR] at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)
ERROR [STDERR] at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.invokeCallback(AOPBasedSingletonContainer.java:1061)
ERROR [STDERR] at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:1396)
ERROR [STDERR] at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.postConstruct(AOPBasedSingletonContainer.java:762)
ERROR [STDERR] at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.create(SingletonEJBInstanceManagerImpl.java:133)
ERROR [STDERR] at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.get(SingletonEJBInstanceManagerImpl.java:152)
ERROR [STDERR] at org.jboss.ejb3.singleton.deployer.StartupSingletonInitiator.start(StartupSingletonInitiator.java:84)
ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
ERROR [STDERR] at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60)
ERROR [STDERR] at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168)
ERROR [STDERR] at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
ERROR [STDERR] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257)
ERROR [STDERR] at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
ERROR [STDERR] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125)
ERROR [STDERR] at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72)
ERROR [STDERR] at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202)
ERROR [STDERR] at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
ERROR [STDERR] at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
ERROR [STDERR] at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
ERROR [STDERR] at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)
ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983)
ERROR [STDERR] at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076)
ERROR [STDERR] at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)
ERROR [STDERR] at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106)
ERROR [STDERR] at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143)
ERROR [STDERR] at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151)
ERROR [STDERR] at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94)
ERROR [STDERR] at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
ERROR [STDERR] at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
ERROR [STDERR] at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
ERROR [STDERR] at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)
ERROR [STDERR] at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)
ERROR [STDERR] at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190)
ERROR [STDERR] at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87)
ERROR [STDERR] at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215)
ERROR [STDERR] at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159)
ERROR [STDERR] at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112)
ERROR [STDERR] at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87)
ERROR [STDERR] at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91)
ERROR [STDERR] at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132)
ERROR [STDERR] at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56)
ERROR [STDERR] at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827)
ERROR [STDERR] at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417)
ERROR [STDERR] at java.lang.Thread.run(Thread.java:680)
ERROR [STDERR] Caused by: java.nio.channels.OverlappingFileLockException
ERROR [STDERR] at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelImpl.java:1166)
ERROR [STDERR] at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:1068)
ERROR [STDERR] at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:868)
ERROR [STDERR] at bitronix.tm.journal.TransactionLogAppender.<init>(TransactionLogAppender.java:70)
ERROR [STDERR] at bitronix.tm.journal.DiskJournal.open(DiskJournal.java:151)
ERROR [STDERR] at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:62)
ERROR [STDERR] ... 108 more
Thanks in advance for any help.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/739753#739753]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[jBPM] - Pass the result of a workitem to the next workitem with a workitemhandler
by hansi007
hansi007 [https://community.jboss.org/people/hansi007] created the discussion
"Pass the result of a workitem to the next workitem with a workitemhandler"
To view the discussion, visit: https://community.jboss.org/message/738803#738803
--------------------------------------------------------------
Is it possible to pass the results of a workitem to the next workitem with a workitemhandler:
public class MyHandlerWorkItemTypeA implements WorkItemHandler{
@Override
public final void executeWorkItem(WorkItem wItem, WorkItemManager wItemManager) {
Map<String,Object> objectToPassToTheNextWorkItem = ...
wItemManager.completeWorkItem(wItem.getId(), objectToPassToTheNextWorkItem ); //That doesnt work
}
@Override
public final void abortWorkItem(WorkItem wItem, WorkItemManager wItemManager) {
}
}
public class MyHandlerWorkItemTypeB implements WorkItemHandler{
@Override
public final void executeWorkItem(WorkItem wItem, WorkItemManager wItemManager) {
Map<String,Object> objectToGetFromThePreviousWorkItem = wItem.getResults(); //That doesnt work
}
@Override
public final void abortWorkItem(WorkItem wItem, WorkItemManager wItemManager) {
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/738803#738803]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[jBPM] - Re: Session and thread safety
by Sebastian Calbaza
Sebastian Calbaza [https://community.jboss.org/people/calbazasebastian] created the discussion
"Re: Session and thread safety"
To view the discussion, visit: https://community.jboss.org/message/760010#760010
--------------------------------------------------------------
Here is my thread safe ProcessPersistenceContextManager if someone needs it.
It needs to be set on the Environment param (env.set(EnvironmentName.PERSISTENCE_CONTEXT_MANAGER, persistenceContextManager);) before you pass it to JPAKnowledgeService.newStatefulKnowledgeSession(kbase,null, env)
-----------------------------------------
public class MyJpaProcessPersistenceContextManager implements
ProcessPersistenceContextManager, PersistenceContextManager {
private EntityManagerFactory emf;
private ThreadLocal<EntityManager> appScopedEntityManager=new ThreadLocal<EntityManager>();
protected ThreadLocal<EntityManager> cmdScopedEntityManager=new ThreadLocal<EntityManager>();
public ProcessPersistenceContext getProcessPersistenceContext() {
return new JpaProcessPersistenceContext(cmdScopedEntityManager.get());
}
public MyJpaProcessPersistenceContextManager(Environment env) {
this.emf = (EntityManagerFactory) env.get(EnvironmentName.ENTITY_MANAGER_FACTORY);
}
public PersistenceContext getApplicationScopedPersistenceContext() {
if (this.appScopedEntityManager.get() == null) {
this.appScopedEntityManager.set(this.emf.createEntityManager());
}
return new JpaPersistenceContext(appScopedEntityManager.get());
}
public PersistenceContext getCommandScopedPersistenceContext() {
return new JpaPersistenceContext(this.cmdScopedEntityManager.get());
}
public void beginCommandScopedEntityManager() {
if (cmdScopedEntityManager.get() == null ||
(this.cmdScopedEntityManager.get() != null && !this.cmdScopedEntityManager.get().isOpen())) {
this.cmdScopedEntityManager.set( this.emf.createEntityManager());
}
cmdScopedEntityManager.get().joinTransaction();
appScopedEntityManager.get().joinTransaction();
}
public void endCommandScopedEntityManager() {
if (this.cmdScopedEntityManager.get()!=null){
this.cmdScopedEntityManager.get().flush();
this.cmdScopedEntityManager.get().close();
}
}
public ThreadLocal<EntityManager> getCmdScopedEntityManager() {
return cmdScopedEntityManager;
}
public ThreadLocal<EntityManager> getAppScopedEntityManager() {
return appScopedEntityManager;
}
public void dispose() {
if (this.appScopedEntityManager.get() != null && this.appScopedEntityManager.get().isOpen()) {
this.appScopedEntityManager.get().flush();
this.appScopedEntityManager.get().close();
}
this.appScopedEntityManager.set(null);
if (this.cmdScopedEntityManager.get() != null && this.cmdScopedEntityManager.get().isOpen()) {
this.cmdScopedEntityManager.get().flush();
this.cmdScopedEntityManager.get().close();
}
this.cmdScopedEntityManager.set(null);
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/760010#760010]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[jBPM] - BPM5Processor - JBossESB
by Vu Kien Pham
Vu Kien Pham [https://community.jboss.org/people/vukien] created the discussion
"BPM5Processor - JBossESB"
To view the discussion, visit: https://community.jboss.org/message/751974#751974
--------------------------------------------------------------
Dear Community,
I've successfully deployed a process on JBPM console. This process consists of different Task forms, Java and JBossESB work items (imported from public Service Repository)
It would be ok if I only have to trigger it in console.
But now I've got problem regarding triggering this process externally.
My question is if it is possible to trigger this process by using BPM5Processor from JBossESB and how? The idea is that a message is sent to ESB to trigger this JBPM process
As I read in the Service Guide, ESB can start a process that has been deployed to jBPM but all I can do is to start a simple process with script tasks within Eclipse. I got no idea how to make the BPM5Processor aware of a already deployed process.
Would appreciate if anyone can give me some suggestions.
I'm using:
JBPM 5.2
JBoss 5.1.0 GA
JBoss ESB 4.11
Java 7
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/751974#751974]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[EJB3] - Cannot make my maven test client to speak with my EJB, missing jar?
by eildosa
eildosa [https://community.jboss.org/people/eildosa] created the discussion
"Cannot make my maven test client to speak with my EJB, missing jar?"
To view the discussion, visit: https://community.jboss.org/message/735377#735377
--------------------------------------------------------------
Hi, here is my problem, I made an EJB with maven and 2 test clients,
* a test client without maven, only added jnp-client and the EJB to it's class path, work like a charm
* a test client using MAVEN, added the EJB through the POM and jnp-client, does not work
this is my EJB :
[img] http://img11.hostingpics.net/pics/480421EJB1.png http://img11.hostingpics.net/pics/480421EJB1.png[/img]
it's POM :
[code]
<project xmlns=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.thongvan.mp</groupId>
<artifactId>MyFirstMavenEjb</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>ejb</packaging>
<name>MyFirstMavenEjb</name>
<url> http://maven.apache.org http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- setting default EJB2 to EJB3 -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.1</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
</plugins>
</build>
</project>
[/code]
this is my first test client, the one without maven wich has no problem whatsoever to speak with the EJB
[img] http://img11.hostingpics.net/pics/974963EJB0.png http://img11.hostingpics.net/pics/974963EJB0.png[/img]
this is my second test client, using maven, it cannot speak with the EJB, all I'm getting is :
[code]
Context lookup finished
Exception in thread "main" java.lang.ClassCastException: javax.naming.Reference cannot be cast to com.thongvan.mp.MyFirstMavenEjb.TestMavenEjb
at com.thongvan.mp.TestClientMavenEjb.App.main(App.java:27)
[/code]
[img] http://img11.hostingpics.net/pics/651692EJB2.png http://img11.hostingpics.net/pics/651692EJB2.png[/img]
It's POM :
[code]
<project xmlns=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.thongvan.mp</groupId>
<artifactId>TestClientMavenEjb</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>TestClientMavenEjb</name>
<url> http://maven.apache.org http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<!-- pour la dependance jnp-client, besoin de la version 5.0.3.GA -->
<repositories>
<repository>
<id>Jboss</id>
<url> https://repository.jboss.org/nexus/content/repositories/releases/ https://repository.jboss.org/nexus/content/repositories/releases/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jboss.naming</groupId>
<artifactId>jnp-client</artifactId>
<version>5.0.3.GA</version>
</dependency>
<dependency>
<groupId>com.thongvan.mp</groupId>
<artifactId>MyFirstMavenEjb</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
[/code]
Both clients have the same main :
[code]
public static void main( String args[] ) throws NamingException
{
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "localhost");
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" );
Context ctx = new InitialContext(env);
System.out.println("Context lookup finished");
TestMavenEjb proxy = (TestMavenEjb)(ctx.lookup("TestMavenEjbBean/remote-com.thongvan.mp.MyFirstMavenEjb.TestMavenEjb"));
System.out.println(proxy.getClass());
System.out.println("do something!");
proxy.doSomething();
}
[/code]
So, anybody has even the slightest idea about why the maven test client is not working?
Jboss 5.1.0.GA
Eclipse indigo
Maven 3.0.4
Also I did some poking around by printing a toString on both context lookup here is what I got :
[b]Maven project (not working)[/b]
Reference Class Name: Proxy for: com.thongvan.mp.MyFirstMavenEjb.TestMavenEjb
Type: ProxyFactoryKey
Content: ProxyFactory/MyFirstMavenEjb/TestMavenEjbBean/TestMavenEjbBean/remote
Type: EJB Container Name
Content: jboss.j2ee:jar=MyFirstMavenEjb.jar,name=TestMavenEjbBean,service=EJB3
Type: Proxy Factory is Local
Content: false
Type: Remote Business Interface
Content: com.thongvan.mp.MyFirstMavenEjb.TestMavenEjb
Type: Remoting Host URL
Content: socket://localhost:3873/
[b]regular project (working)[/b]
Proxy to jboss.j2ee:jar=MyFirstMavenEjb.jar,
name=TestMavenEjbBean,
service=EJB3 implementing [interface com.thongvan.mp.MyFirstMavenEjb.TestMavenEjb]
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/735377#735377]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 7 months
[jBPM] - Intermittently pending human task come across a missing jbpm parent process in jBPM 5.2
by Dev S
Dev S [https://community.jboss.org/people/devinderpal] created the discussion
"Intermittently pending human task come across a missing jbpm parent process in jBPM 5.2"
To view the discussion, visit: https://community.jboss.org/message/752342#752342
--------------------------------------------------------------
Env: Jboss 7.1.0, mysql DB, Redhat 5.5, jBPM 5.2
When I thought I'm getting pretty good with jBPM and our application is about to be released, i came across this tough bug during extensive testing.
Intermittently we're facing that pending human task has missing parent process instance and it results in nullpointerexception while completing that human task.
I ran below SQL query to confirm this:
select t.id, t.processInstanceId from Task t where t.processInstanceId not in (select distinct(InstanceId) from ProcessInstanceInfo);
+----+-------------------+
| id | processInstanceId |
+----+-------------------+
| 33 | 20 |
| 43 | 20 |
| 47 | 20 |
| 53 | 20 |
| 57 | 20 |
+----+-------------------+
Same code works fine most of the time. So I think it's not problem with our code but some bug in jBPM. MinaTaskServer is being used for our implementation.
Also we use JTA persistence for jBPM core engine and RESOURCE_LOCAL for human task. We have to use RESOURCE_LOCAL for human task because JTA can't be used due to another jBPM bug.
If I reinitialize the database, then everything works fine for a while but again I run into this problem.
Please let us know how we can fix it, if anyone knows solution. I was about to create a blocker JIRA issue but thought let's first get community opinion on this.
Exception stack trace is attached.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/752342#752342]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 7 months