[jBPM] - NullPointerException when try to getProcessInstance
by liliana.iovanovici
liliana.iovanovici [https://community.jboss.org/people/liliana.iovanovici] created the discussion
"NullPointerException when try to getProcessInstance"
To view the discussion, visit: https://community.jboss.org/message/735403#735403
--------------------------------------------------------------
Hello,
I am trying to start a process and after a while to send a signal to process.
I got the an exception:
java.lang.NullPointerException
at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)
at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:128)
at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.getProcessInstance(JPAProcessInstanceManager.java:82)
at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstance(ProcessRuntimeImpl.java:204)
at org.drools.common.AbstractWorkingMemory.getProcessInstance(AbstractWorkingMemory.java:1097)
at org.drools.impl.StatefulKnowledgeSessionImpl.getProcessInstance(StatefulKnowledgeSessionImpl.java:283)
at org.drools.command.runtime.process.SignalEventCommand.execute(SignalEventCommand.java:93)
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:345)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.signalEvent(CommandBasedStatefulKnowledgeSession.java:210)
at com.aciworldwide.aps.adf.core.adapter.orchestration.jbpm5.JbpmApiHelperLocalImpl.signalProcess(JbpmApiHelperLocalImpl.java:86)
at com.aciworldwide.aps.adf.core.adapter.orchestration.jbpm5.OrchestrationAdapterJbpmImpl.completeTask(OrchestrationAdapterJbpmImpl.java:203)
at com.aciworldwide.aps.adf.core.service.orchestration.HumanTaskServiceImpl.completeTask(HumanTaskServiceImpl.java:103)
at com.aciworldwide.aps.adf.core.service.orchestration.OrchestrationServiceImpl.completeTask(OrchestrationServiceImpl.java:170)
at com.dev.test.biz.payment.PaymentServiceImpl.completeSubmitPaymentTask(PaymentServiceImpl.java:259)
at com.dev.test.biz.payment.PaymentServiceImpl.submitPaymentTask(PaymentServiceImpl.java:232)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy41.submitPaymentTask(Unknown Source)
at com.dev.test.web.impl.delegate.payment.PaymentServiceDelegateImpl.submitPayment(PaymentServiceDelegateImpl.java:215)
at com.dev.test.web.impl.controller.payment.PaymentActionControllerImpl.handleSubmitPayment(PaymentActionControllerImpl.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
I saw that when try to get process instances in ProcessInstanceInfo class, processInstanceByteArray is null.
This is happening only when I send the signal after a while, not immediatly.
Note: I am using openjpa for persistence.
Thanks for help,
Liliana
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/735403#735403]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[jBPM] - Claim Task - why we have 2 methods?
by a_nat
a_nat [https://community.jboss.org/people/a_nat] created the discussion
"Claim Task - why we have 2 methods?"
To view the discussion, visit: https://community.jboss.org/message/735384#735384
--------------------------------------------------------------
Hi,
We have 2 claim task methods.
claim(long taskId, String userId, TaskOperationResponseHandler responseHandler)
claim(long taskId, String userId, List<String> groupIds, TaskOperationResponseHandler responseHandler)
I don't see a need for 2 methods here and the follwing are my reasons:
* If a task is allocated to a group, it's the task Service's responsibility to find whether the user claiming the task is a part of the group to which the task is allocated.
* We don't pass in the group id param to release a task, so why send it for claiming a task allocated to the group?
Does anyone have any reasons as to why we must have the 2 methods?
Regards,
Aparna
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/735384#735384]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[Datasource Configuration] - Accessing MS SQL 2008 from JBoss 6.1 - Server major version:8 is not supported by this driver.
by Roger Lee
Roger Lee [https://community.jboss.org/people/NOTiFY] created the discussion
"Accessing MS SQL 2008 from JBoss 6.1 - Server major version:8 is not supported by this driver."
To view the discussion, visit: https://community.jboss.org/message/735357#735357
--------------------------------------------------------------
I using JBoss AS 6.1.0 Final and running using the JRE 6 included with jdk1.6.0_32.
I need to connect to a MS SQL 2008 database and have downloaded the latest Microsoft JDBC drivers contained in sqljdbc_4.0.2206.100_enu.exe.
I have copied sqljdbc4.jar to the default\lib folder and configure my DS etc.
When my App tries to connect to the MS SQL database I get;
12:32:53,064 WARNING [SQLServerConnection] ConnectionID:1 ClientConnectionId: a0955e8d-226a-44e6-b8f8-b0217cd3cf47 Server major version:8 is not supported by this driver.
12:32:53,080 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.microsoft.sqlserver.jdbc.SQLServerException: SQL Server version 8 is not supported by this driver. ClientConnectionId:a0955e8d-226a-44e6-b8f8-b0217cd3cf47)
A couple of posts said it was due to a bug in a previous JRE and upgrading to 32 woul resolve it.
Any ideas?
TIA.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/735357#735357]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[jBPM] - KnowledgeSession issues and best practice
by David Boyd
David Boyd [https://community.jboss.org/people/dboyd68] created the discussion
"KnowledgeSession issues and best practice"
To view the discussion, visit: https://community.jboss.org/message/735356#735356
--------------------------------------------------------------
Hey All,
I have an interesting scenario that I would like to advice on.
I am new to JBPM so appoligies if this is a silly question.
*
*
My Scenario is this
I have a number of knowledge sessions in Stateless sessions beans. (So not one knolwedge session per request and not a singleton knowledgesession either... understand this is a bad design but stick with me)
The last step in this "fails"
signal event (workflow 1)
within server task execute inner step
Inner Step
start new process (workflow 2)
raise seam event
catch seam event (somewhere else)
siginal event to move workflow 2 along.
My problem is in the last step. Workflow 2 is started but it is never moved i.e. singal event seems to have no effect. Debugging the code it appears that the internal process instance has the wrong nodes and doesn't actually fire execute anything (no excpetions are raised though)
Attempted solutions.
1) I attempted to add a flush() on the entity manager associated with JBPM at ever step. Figured it might be multiple knowledge sessions who haven't flushed data yet. However this didn't help.
2) Make one knowledge session shared by every stateless session bean. This seems to solve the issue but I don't understand why this would work and flush wouldn't.
I am using CMP within a J2EE environment on JBPM 5.1 on JBoss 4.2
Can anyone shed some light on why this might occur? Or if a singleton knowledge session is a valid design?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/735356#735356]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[EJB3] - EJB3 over HTTP/HTTPS in AS6
by Wen Cheng
Wen Cheng [https://community.jboss.org/people/chengwen] created the discussion
"EJB3 over HTTP/HTTPS in AS6"
To view the discussion, visit: https://community.jboss.org/message/735297#735297
--------------------------------------------------------------
Hello.
These days I was trying to configure the ejb3 over http/https in AS 6.0.
I followed the artical: https://community.jboss.org/docs/DOC-13276 https://community.jboss.org/wiki/EJB3OverHTTPHTTPSInJBossAS-5
The server and the client is not on the same machine.
My server IP is 10.26.13.206, and my client IP is 10.26.13.202.
the server code:
@Stateless
@Remote(UserManager.class)
@RemoteBindings({
@RemoteBinding(clientBindUrl = "https://0.0.0.0:8443/servlet-invoker/SSLServerInvokerServlet",jndiBinding="EJBviahttps"),
@RemoteBinding(clientBindUrl = "http://0.0.0.0:8080/servlet-invoker/ServerInvokerServlet",jndiBinding="EJBviahttp"),
@RemoteBinding(clientBindUrl = "sslsocket://0.0.0.0:3843", jndiBinding="StatelessSSL"),
@RemoteBinding(jndiBinding = "StatelessNormal")
})
public class UserManagerBean implements UserManager{
public void addUser(String user){
System.out.println("User name: " + user);
}
}
the client code :
System.setProperty("javax.net.ssl.trustStore", "D:/console.truststore");
System.setProperty("javax.net.ssl.trustStorePassword", "mypassword");
System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
Properties props = new Properties();
props.put("java.naming.factory.initial", "org.jboss.naming.HttpNamingContextFactory");
props.put("java.naming.provider.url", "http://10.26.13.206:8080/invoker/JNDIFactory");
props.put("java.naming.factory.url.pkgs", "org.jboss.naming");
Properties propsHttps = new Properties();
propsHttps.put("java.naming.factory.initial", "org.jboss.naming.HttpNamingContextFactory");
propsHttps.put("java.naming.provider.url", "https://10.26.13.206:8443/invoker/JNDIFactory");
propsHttps.put("java.naming.factory.url.pkgs", "org.jboss.naming");
try{
InitialContext ctxhttp = new InitialContext(props);
long t001=System.currentTimeMillis();
UserManager umhttp = (UserManager)ctxhttp.lookup("EJBviahttp");
umhttp.addUser("abc");
InitialContext ctxhttps = new InitialContext(propsHttps);
UserManager umhttps = (UserManager)ctxhttps.lookup("EJBviahttps");
umhttps.addUser("abc");
} catch (Exception e) {
e.printStackTrace();
}
When I run jboss with -b 10.26.13.206, the test code on the client works fine.
But if I run jboss with -b 0.0.0.0, I got the following exception:
javax.naming.CommunicationException: Operation failed [Root exception is java.rmi.ServerException: IOE; nested exception is:
java.net.ConnectException: Connection refused: connect]
at org.jboss.naming.interceptors.ExceptionInterceptor.invoke(ExceptionInterceptor.java:65)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)
at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
at $Proxy0.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.pnft.test.UserManagerRemoteClient.main(UserManagerRemoteClient.java:37)
Caused by: java.rmi.ServerException: IOE; nested exception is:
java.net.ConnectException: Connection refused: connect
at org.jboss.invocation.http.interfaces.HttpInvokerProxy.invoke(HttpInvokerProxy.java:133)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
at org.jboss.naming.interceptors.ExceptionInterceptor.invoke(ExceptionInterceptor.java:57)
... 8 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:193)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:975)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1019)
at org.jboss.invocation.http.interfaces.Util.invoke(Util.java:163)
at org.jboss.invocation.http.interfaces.HttpInvokerProxy.invoke(HttpInvokerProxy.java:118)
... 11 more
I dont know why, What happened? Is it means that "-b 0.0.0.0" cannot be used here?
I really need to start jboss with "-b 0.0.0.0" because the real ip and "127.0.0.1" are both very useful in my project.
Many thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/735297#735297]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[jBPM] - Re: Questions about knowledge session and memory resource issues
by Maciej Swiderski
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion
"Re: Questions about knowledge session and memory resource issues"
To view the discussion, visit: https://community.jboss.org/message/734640#734640
--------------------------------------------------------------
> pmukundan wrote:
>
> *Questions*
> 1. Does JBPM keep all process instance information in memory at all times ?
Process instance is kept in session (working memory) one when it is active, meaning under execution. Once done with the processing it is persisted into db.
> pmukundan wrote:
>
> *Questions*
> 2. Does JBPM keep all the knowledge base in memory at all times ?
Yes, knowledge base is kept there all the time to secure all sessions will have access to all artifacts stored in it.
> pmukundan wrote:
>
> 3. For approach b to work, the internal handling of JBPM should enable me to load/unload session at will. Does that work well? any firsthand experience ?
>
As far as I can tell it works well. If you keep session small you should get quite good performance.
> pmukundan wrote:
>
> 4. For approach b, if session dispose is called, do all process instances associated with that session go dormant ? In other words, if a session dispose is executed, are the process instances started by that session still in memory ?
Once the process instance execution is completed (by completed I mean that it reached a safe point like human task or catch events that makes process be in a sort of wait state) it is persisted into db and will now longer be active/managed object. It still resides in memory as object but it is disconnected from the session so it is safe to dispose the session.
> pmukundan wrote:
> 5. My JVM crashes or needs to be restarted. Would all process instance information be loaded into memory automatically or would that be done programatically ?
No, they won't be, as mentioned earlier process instances are persisted in db and retrieved only when requested. Just make sure you load knowledge base and session on startup and register all work item handlers that are required.
NOTE: all my comments assume session persistence is used.
HTH
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/734640#734640]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months