[jBPM] - jBpm 5.2 persistence problem - Oracle - Unknown entity: org.drools.persistence.info.SessionInfo
by Samrat Roy
Samrat Roy [https://community.jboss.org/people/whizkid.samrat] created the discussion
"jBpm 5.2 persistence problem - Oracle - Unknown entity: org.drools.persistence.info.SessionInfo"
To view the discussion, visit: https://community.jboss.org/message/717687#717687
--------------------------------------------------------------
Hi , I am setting up jBpm 5.2 with persistence for the first time and facing a LoT of issues. I am using jpm 5.2 with Spring 3.0 and Hibernate 3.5.6 on jBoss AS 7 server.
We all know that jBoss AS 7 comes with Hibernate 4 as the default hibernate , but I need to use the Hibernate 3 in my project so I installed hibernate 3 as a module in as7 and that is working as expected . I excluded Hibernate 4 with jboss-deployment-structure.xml and added org.jboss.as.jpa.hibernate:3 as a dependency in manifest.mf [refer http://badr-elhouari.blogspot.in/2011/10/how-to-use-hibernate-3-as-jpa-pr... here how I added hibernate:3 as a module in AS7]
That said , I have configured the entire knowledge base and knowledge session in spring so that I dont have to write code for that - Taking tips from drools - integration module and by using drools-grid-impl jar and drools-spring jar.
Drools-grid jar contains a persistence.xml which used in memory DB [h2] so I modified the xml to use oracle and hibernate 3 instead.
Here is my *application context*:
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" p:dataSource-ref="datasource">
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" p:database="${jpa.database}" p:showSql="${jpa.showSql}"/>
</property>
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml"/>
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<!-- First: declare JBPM JPA Session with a process definition -->
<jbpm:kbase id="kbase">
<jbpm:resources>
<jbpm:resource type="BPMN2" source="classpath:LeaveFlow.bpmn" />
</jbpm:resources>
</jbpm:kbase>
<jbpm:ksession id="ksession" type="stateful" kbase="kbase">
<jbpm:configuration>
<jbpm:jpa-persistence>
<jbpm:entity-manager-factory ref="entityManagerFactory"/>
<jbpm:transaction-manager ref="transactionManager"/>
</jbpm:jpa-persistence>
</jbpm:configuration>
</jbpm:ksession>
<!-- Declare a TaskServer -->
<bean class="org.jbpm.task.service.TaskService" id="taskService">
<constructor-arg ref="entityManagerFactory"/>
<constructor-arg>
<bean class="org.drools.SystemEventListenerFactory" factory-method="getSystemEventListener"/>
</constructor-arg>
</bean>
<bean class="org.jbpm.task.service.mina.MinaTaskServer" id="taskServer">
<constructor-arg ref="taskService"/>
<constructor-arg><value>${jbpm.task.server.port}</value></constructor-arg>
</bean>
<!-- And start TaskServer on the configured port -->
<bean class="java.lang.Thread" id="taskServerThread" init-method="start">
<constructor-arg ref="taskServer"/>
</bean>
<!-- Declare a TaskClient -->
<bean class="org.jbpm.task.service.mina.MinaTaskClientConnector" id="taskClientConnector">
<constructor-arg value="taskClient"/>
<constructor-arg>
<bean class="org.jbpm.task.service.mina.MinaTaskClientHandler">
<constructor-arg>
<bean class="org.drools.SystemEventListenerFactory" factory-method="getSystemEventListener"/>
</constructor-arg>
</bean>
</constructor-arg>
</bean>
<bean class="org.jbpm.task.service.TaskClient" id="taskClient">
<constructor-arg ref="taskClientConnector"/>
</bean>
<!-- Declare a HumanTaskHandler -->
<bean class="org.jbpm.task.service.AsyncTaskServiceWrapper"
id="humanTaskClient">
<constructor-arg ref="taskClient"/>
</bean>
<!-- It uses previously created TaskClient -->
<bean class="org.jbpm.process.workitem.wsht.SyncWSHumanTaskHandler" id="humanTaskHandler">
<constructor-arg ref="humanTaskClient"/>
<constructor-arg ref="ksession"/>
</bean>
<!-- Configure its connection to the local server -->
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" depends-on="humanTaskHandler" id="setConnection">
<property name="targetObject" ref="humanTaskHandler"/>
<property name="targetMethod" value="setConnection"/>
<property name="arguments">
<list>
<value>${jbpm.task.client.address}</value>
<value>${jbpm.task.client.port}</value>
</list>
</property>
</bean>
<!-- And connect HumanTaskHandler (implicit TaskClient connection) -->
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" depends-on="setConnection">
<property name="targetObject" ref="humanTaskHandler"/>
<property name="targetMethod" value="connect"/>
</bean>
<!-- Finnaly, register HumanTaskHandler in the session -->
<bean factory-bean="ksession" factory-method="getWorkItemManager" id="workItemManager"/>
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" ref="workItemManager"/>
<property name="targetMethod" value="registerWorkItemHandler"/>
<property name="arguments">
<list>
<value>Human Task</value>
<ref bean="humanTaskHandler"/>
</list>
</property>
</bean>
The Exception I am getting while server startup is :
20:07:26,443 ERROR [org.drools.persistence.SingleSessionCommandService] (MSC service thread 1-3) Could not commit session: java.lang.IllegalArgumentException: *Unknown entity: org.drools.persistence.info.SessionInfo*
at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:671) [hibernate-entitymanager-3.5.6-Final.jar:3.5.6-Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365) [org.springframework.orm-3.0.5.RELEASE.jar:]
at $Proxy32.persist(Unknown Source) at org.drools.persistence.jpa.JpaPersistenceContext.persist(JpaPersistenceContext.java:17) [drools-persistence-jpa-5.3.1.Final.jar:]
at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:152) [drools-persistence-jpa-5.3.1.Final.jar:]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_23]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_23]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_23]
at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_23]
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:129) [drools-persistence-jpa-5.3.1.Final.jar:]
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:67) [drools-persistence-jpa-5.3.1.Final.jar:]
at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122) [knowledge-api-5.3.1.Final.jar:]
at org.drools.container.spring.beans.StatefulKnowledgeSessionBeanFactory.internalAfterPropertiesSet(StatefulKnowledgeSessionBeanFactory.java:85) [drools-spring-5.3.0.Final.jar:]
at org.drools.container.spring.beans.AbstractKnowledgeSessionBeanFactory.afterPropertiesSet(AbstractKnowledgeSessionBeanFactory.java:123) [drools-spring-5.3.0.Final.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) [org.springframework.beans-3.0.5.RELEASE.jar:]
.......
This is driving me nuts as I have all the required jars in my classPath. Please help !!!
I am attaching important config files :
Application Ctxt of my application , MANIFEST.MF of my application , persistence.xml from my application and the persistence.xml which I modified in drools-grid jar
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/717687#717687]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month
[jBPM] - signal event doesn't work from REST API
by Rudi Fisher
Rudi Fisher [https://community.jboss.org/people/rudi_fisher] created the discussion
"signal event doesn't work from REST API"
To view the discussion, visit: https://community.jboss.org/message/649256#649256
--------------------------------------------------------------
I want to use REST API to call signal. There is some implementation in ProcessMgmtFacade of gwt-console-server for this. I see the source code and I finelly found this in CommandDelegate of jbpm-gwt-core:
public void signalExecution(String executionId, String signal) {
ksession.getProcessInstance(new Long(executionId)).signalEvent("signal", signal);
}
This doesn't fulfil my requirements so I made changes to this class recompile and redeploy. This step is OK, because I made some other changes about this REST API (start process with params) and everythings work fins, so I think the problem is not in this my changed implementation of CommandDelegate. New implementation is:
public void signalExecution(String executionId, String eventType, String eventValue) {
ksession.getProcessInstance(new Long(executionId)).signalEvent(eventType, eventValue);
}
I took example of signal event from original examples to be sure that process is designed OK. I took BPMN2-EventBasedSplit.bpmn2. I tested in Eclipse and works fine - after signal call, process cointinued and finally finished. I deployed this process into my Guvnor repo and started by GWT console. Process stopped and waits at signal nodes (see attached picture).
https://community.jboss.org/servlet/JiveServlet/showImage/2-649256-17846/... https://community.jboss.org/servlet/JiveServlet/downloadImage/2-649256-17...
At this point I wanted to push process by send signal event by REST API with new implementation. Method signalExecution in CommandDelegate is called OK and this method take correct process instance (I have log line there to see process instance). But it seems signalEvent on process instance doesn't work. I'm using the same parameters for signal event in Eclipse and in CommandDelegate. I'm confused about what is different between execution in unit test in Eclipse and at server. I made many tests and examples but my probem has no solution to this day. I found some discussion about similar issues but this not solve this problem.
Working unit test in Eclipse
public static final void main(String[] args) throws Exception {
// load up the knowledge base
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
ProcessInstance processInstance = ksession.startProcess("com.sample.test");
System.out.println("process instance:" + processInstance.getState());
ksession.signalEvent("Yes", "YesValue", processInstance.getId());
System.out.println("process instance:" + ksession.getProcessInstance(processInstance.getId()));
// NO
processInstance = ksession.startProcess("com.sample.test");
System.out.println("process instance:" + processInstance.getState());
//ksession = restoreSession(ksession, true);
ksession.signalEvent("No", "NoValue", processInstance.getId());
System.out.println("process instance:" + ksession.getProcessInstance(processInstance.getId()));
}
private static KnowledgeBase readKnowledgeBase() throws Exception {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("BPMN2-EventBasedSplit.bpmn2"), ResourceType.BPMN2);
return kbuilder.newKnowledgeBase();
}
Not working code in CommandDelegate and calling at GWT server
ksession.getProcessInstance(new Long(executionId)).signalEvent("Yes", "YesValue");
For BPMN2-EventBasedSplit.bpmn2 see official examples in version 5.2.0 Final
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/649256#649256]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month
[JBoss Tools] - Debugger Stopped Working
by Stephen Seltzer
Stephen Seltzer [https://community.jboss.org/people/steve_np] created the discussion
"Debugger Stopped Working"
To view the discussion, visit: https://community.jboss.org/message/722161#722161
--------------------------------------------------------------
To start, my system is:
Windows 7 (64bit)
Eclipse Indigo (Build id: 20110916-0149)
JBossASTools (Version: 2.3.0.v20111213-1423-H61-M5)
JBoss AS 7.1
I have had this configuration up and running for over a month. Suddenly starting yesterday I have been unable to start up my system in debug. I have made no significant changes to my system (save for the installation of TOAD but it was still working for a while after that was installed). It will start fine in run mode and it starts in < 10 seconds. When I start using the debugger, it takes > 1:30 and then fails in the end. The last couple of lines from server.log are:
10:11:11,188 INFO [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /speed2
10:11:11,207 DEBUG [org.apache.jasper.servlet.JspServlet] (MSC service thread 1-3) JspServlet.destroy()
10:11:11,214 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/speed2]] (MSC service thread 1-3) Stopping filters
10:11:11,220 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/speed2]] (MSC service thread 1-3) Stopping filter 'com.newpig.speed2.filters.NoCacheFilter'
10:11:11,227 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/speed2]] (MSC service thread 1-3) Stopping filter 'MyFacesExtensionsFilter'
10:11:11,238 DEBUG [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/speed2]] (MSC service thread 1-3) Stopping filter 'noCacheFilter'
10:11:11,244 DEBUG [org.apache.catalina.session.ManagerBase] (MSC service thread 1-3) Unloading persisted sessions
10:11:11,250 DEBUG [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Sending application stop events
10:11:11,255 FINE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-3) ConfigureListener.contextDestroyed(null)
10:11:11,271 DEBUG [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Processing standard container shutdown
10:11:11,277 DEBUG [org.apache.catalina.startup.ContextConfig] (MSC service thread 1-3) ContextConfig: Processing STOP
10:11:11,291 DEBUG [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) resetContext null
10:11:11,296 DEBUG [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Stopping complete
10:11:13,150 ERROR [org.jboss.as] (MSC service thread 1-7) JBAS015875: JBoss AS 7.1.0.Final "Thunder" started (with errors) in 93195ms - Started 407 of 481 services (1 services failed or missing dependencies, 72 services are passive or on-demand)
10:11:16,251 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment speed2.war in 34435ms
I have attached a zip containing server.log files from starting with a plain run and starting in debug to show the success/failure. Also, I bumped my logging up to DEBUG to give a little more information.
Any assistance getting my debugging back on line sure would be appreciated!
Steve
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/722161#722161]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[jBPM] - JBPM-Console Error org.jbpm.task.service.mina.MinaTaskClientConnector.write(MinaTaskClientConnector.java:118) when opening task form on external port.
by renez
renez [https://community.jboss.org/people/renez] created the discussion
"JBPM-Console Error org.jbpm.task.service.mina.MinaTaskClientConnector.write(MinaTaskClientConnector.java:118) when opening task form on external port."
To view the discussion, visit: https://community.jboss.org/message/725743#725743
--------------------------------------------------------------
Hi,
I create for my process a task form by guvnor/ designer. When I run my process using the local port http://localhost:8080/jbpm-console/ http://localhost:8080/jbpm-console/ everything works fine:
https://community.jboss.org/servlet/JiveServlet/showImage/2-725743-18261/... https://community.jboss.org/servlet/JiveServlet/downloadImage/2-725743-18...
But when I try to run the process on my external test server I got a strange behaviour:
* I get asked for credentials again
* When I enter them, I receive an error
org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345)
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321)
org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
root cause
java.lang.NullPointerException
org.jbpm.task.service.mina.MinaTaskClientConnector.write(MinaTaskClientConnector.java:118)
org.jbpm.task.service.TaskClient.getTask(TaskClient.java:83)
org.jbpm.integration.console.forms.TaskFormDispatcher.provideForm(TaskFormDispatcher.java:73)
org.jbpm.integration.console.forms.FormDispatcherComposite.provideForm(FormDispatcherComposite.java:50)
org.jboss.bpm.console.server.FormProcessingFacade.provideForm(FormProcessingFacade.java:205)
org.jboss.bpm.console.server.FormProcessingFacade.renderTaskUI(FormProcessingFacade.java:127)
sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
https://community.jboss.org/servlet/JiveServlet/showImage/2-725743-18263/... https://community.jboss.org/servlet/JiveServlet/downloadImage/2-725743-18...
I read this posts: https://community.jboss.org/message/643297#643297 https://community.jboss.org/message/643297#643297 but I don't have whitespaces in the task name.
Any suggestions?
Thank you,
René
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/725743#725743]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[Javassist] - How to manage instrumentation in application deployed on JBoss?
by adesanctis
adesanctis [https://community.jboss.org/people/adesanctis] created the discussion
"How to manage instrumentation in application deployed on JBoss?"
To view the discussion, visit: https://community.jboss.org/message/715422#715422
--------------------------------------------------------------
Hello everybody,
I'm trying to instrument classes in JBoss Enterprise application on JBoss EA5.0
Using this code:
| | public byte[] transform(ClassLoader loader, |
| | String className, |
| | Class classBeingRedefined, |
| | ProtectionDomain protectionDomain, |
| | byte[] classfileBuffer) throws IllegalClassFormatException { |
| | // The class name contains slashes instead of periods, so use transform those to |
| | // dots for readability within the trace |
| | String dotClassName = className.replace('/', '.'); |
| | if (className.startsWith("$")) { |
| | return null; |
| | } |
| | // Only instrument a class once |
| | if (instrumentedClasses.contains(className)) { |
| | return null; |
| | } |
| | instrumentedClasses.add(className); |
| | // Skip in the list of class prefixes to skip |
| | for (MethodSelector classToSkip : classesToSkip) { |
| | if (dotClassName.startsWith(classToSkip.getPackageName())) { |
| | return null; |
| | } |
| | } |
| | if (logger.isInfoEnabled()) { |
| | logger.info("Checking class: " + className); |
| | } |
| | |
| | try { |
| | classPool.insertClassPath(new ByteArrayClassPath(className, classfileBuffer)); |
| // | classPool.insertClassPath(new ClassClassPath(this.getClass())); |
| | |
| // | classPool.insertClassPath(new ClassClassPath(classBeingRedefined.getClass())); |
| | *CtClass cc = classPool.get(dotClassName);* |
| // | CtClass cc = classPool.makeClass(new ByteArrayInputStream(classfileBuffer)); | |
//
In bold line where exception is raised.
I suppose that arror is related to specific class loader used for load class.
The question is: how to manage classes independently from class loader used? Is there a way to manage all possible case when working on JBoss?
Thank you
Alessandro
09:37:59,040 ERROR [STDERR] javassist.NotFoundException: com.arjuna.ats.internal.jta.recovery.arjunacore.RecoveryXids
09:37:59,040 ERROR [STDERR] at javassist.ClassPool.get(ClassPool.java:436)
09:37:59,040 ERROR [STDERR] at by.concept.applicationtracer.AdvancedTransformer.transform(AdvancedTransformer.java:163)
09:37:59,040 ERROR [STDERR] at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
09:37:59,040 ERROR [STDERR] at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
09:37:59,040 ERROR [STDERR] at java.lang.ClassLoader.defineClass1(Native Method)
09:37:59,040 ERROR [STDERR] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
09:37:59,040 ERROR [STDERR] at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:67)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:633)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:592)
09:37:59,040 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:591)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:568)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:135)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:455)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:267)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:166)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:276)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1138)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:862)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:502)
09:37:59,040 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:447)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/715422#715422]
Start a new discussion in Javassist at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[jBPM] - How to define result mapping or exit action that saves task owner
by jemmerling
jemmerling [https://community.jboss.org/people/jemmerling] created the discussion
"How to define result mapping or exit action that saves task owner"
To view the discussion, visit: https://community.jboss.org/message/648536#648536
--------------------------------------------------------------
Hi,
This should be simple for any non-novice, it was suggested before however without an example.
So I have a process variable and I want a particular task to store its owner into that variable (say its name is "task2owner"). Is there an expression for that, for example:
task2owner=#{taskOwner}
So if there is a standard expression for the task owner (the above is just a guess at what it might be) then this result mapping would allow subsequent tasks to determine who owned (and completed) task2.
Failing that, I could try defining an on exit action, using kcontext I can get the node instance which I think has a one-to-one correspondence to the task, however the node instance does not seem to have an attribute that explicitly identifies the owner. Perhaps the owner is a variable?
Any suggestion would be greatly appreciated.
Thanks!
--JE
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/648536#648536]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[JBoss Messaging] - How to list or monitor messages in a Queue which is already under use
by Aneesh Sebastian
Aneesh Sebastian [https://community.jboss.org/people/aneeshsebastian] created the discussion
"How to list or monitor messages in a Queue which is already under use"
To view the discussion, visit: https://community.jboss.org/message/720125#720125
--------------------------------------------------------------
I have a requirement to monitor a JBoss messaging queue, where users should be able to delete posted messages dynamically. The application has a MDPOJO registered and is up and running at server start up.
My requirement is, users should be able to delete a posted message any time he wishes. I tried below proto codes :
*Option1*
public void listAllJMS_Messages()
{
try {
ObjectName objectName=new ObjectName("jboss.messaging.destination:name=XXX,service=Queue");
List ls = (List) server.invoke(objectName, "listMessages" , null, null);
List<javax.jms.Message> messages=(List<javax.jms.Message>)server.invoke(objectName, "listAllMessages" , null, null);
int count=0;
for(javax.jms.Message msg : messages) {
System.out.println((++count)+"t"+msg.getJMSMessageID());
if(msg.getJMSType() != null && msg.getJMSType().equalsIgnoreCase("Text")) {
TextMessage text = (TextMessage)msg;
System.out.println(text.getText());
}
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// System.out.println((++count)+"t"+msg.getText());
}
*Option2*
public void listMsg() {
String destinationName = "queue/XXX";
Context ic = null;
ConnectionFactory cf = null;
Connection connection = null;
try {
ic = getInitialContext();
cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
Queue queue = (Queue)ic.lookup(destinationName);
connection = cf.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
QueueBrowser qbrowser = session.createBrowser(queue);
Enumeration<?> qamsgs = qbrowser.getEnumeration();
while (qamsgs.hasMoreElements()){
Message msg = (Message)qamsgs.nextElement();
}
connection.start();
}
catch(Exception e)
{
System.out.println(e);
}
finally
{
if(ic != null)
{
try
{
ic.close();
}
catch(Exception e1)
{
System.out.println(e1);
}
}
}
}
In both the options,messages are getting listed in case of no message consumers at present.If have a live message consumer MDB, then list is returned as null.
I defintely need MDB consumer up and running.But still need to monitor messages.I should be able to do below :
1. List messages]
2. Delete a particular message
3. Change priority
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/720125#720125]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months