[Datasource Configuration] - Web -Services connection Handling
by gireesh g
gireesh g [https://community.jboss.org/people/ggireeshg] created the discussion
"Web -Services connection Handling"
To view the discussion, visit: https://community.jboss.org/message/787501#787501
--------------------------------------------------------------
Hi All,
1. I have implemented a *web service* with connection pooling(*oracle-ds.xml*) with *JBoss (http://www.coderanch.com/forums/f-63/JBoss)* server. In My business class, i am getting connection from pool and performing 4 to 5 DB operations, at last closing connection, statements and result set. It is working fine for one request.
2.If i tried for concurrent requests (Consider 5) only 1 or 2 processed, remaining failed with several reasons like (connection closed, statement closed, unusable connection, result set closed etc).
3.If i keep business class method as "synchronized" it is working fine. But it is serving only one request at a time (for concurrent request also). - This is slow downs my response time.
I came to know, This is connections problem, if one thread is doing DB operation, other thread is closing the connection or statement or result set.
Can any one help and tell me how to handle concurrent requests with out synchronized keyword.
Thanks in Advance.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/787501#787501]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - java.lang.String cannot be cast to org.jbpm.task.utils.MarshalledContentWrapper
by TC ONG
TC ONG [https://community.jboss.org/people/devilkazuya99] created the discussion
"java.lang.String cannot be cast to org.jbpm.task.utils.MarshalledContentWrapper"
To view the discussion, visit: https://community.jboss.org/message/740612#740612
--------------------------------------------------------------
String respond = "SOME_VALUE";
Map result = new HashMap();
result.put("answer", respond);
ContentData contentData = null;
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream out;
try {
out = new ObjectOutputStream(bos);
out.writeObject(result);
out.close();
contentData = new ContentData();
contentData.setContent(bos.toByteArray());
contentData.setAccessType(AccessType.Inline);
} catch (IOException ioe) {
ioe.printStackTrace();
}
localTaskService.complete(taskId, userName, contentData);
My process has a sequence of human tasks.
When I ran the code above, the first task executed fine, but the second task gives me:
java.lang.String cannot be cast to org.jbpm.task.utils.MarshalledContentWrapper
Any idea why it suddently doesn't work?
Full stack trace:
Application Message - java.lang.String cannot be cast to org.jbpm.task.utils.MarshalledContentWrapper
java.lang.ClassCastException: java.lang.String cannot be cast to org.jbpm.task.utils.MarshalledContentWrapper
at org.jbpm.task.utils.ContentMarshallerHelper.unmarshall(ContentMarshallerHelper.java:157)
at org.jbpm.process.workitem.wsht.SyncWSHumanTaskHandler$TaskCompletedHandler.handleCompletedTask(SyncWSHumanTaskHandler.java:354)
at org.jbpm.process.workitem.wsht.SyncWSHumanTaskHandler$TaskCompletedHandler.execute(SyncWSHumanTaskHandler.java:329)
at org.jbpm.task.service.local.LocalTaskService$SimpleEventTransport.trigger(LocalTaskService.java:307)
at org.jbpm.task.event.MessagingTaskEventListener.taskCompleted(MessagingTaskEventListener.java:73)
at org.jbpm.task.event.TaskEventSupport.fireTaskCompleted(TaskEventSupport.java:46)
at org.jbpm.task.service.TaskServiceSession.postTaskCompleteOperation(TaskServiceSession.java:502)
at org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:468)
at org.jbpm.task.service.local.LocalTaskService.complete(LocalTaskService.java:80)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/740612#740612]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - No String constructor found on type [org.drools.builder.ResourceType]
by Ashok Kuppuswamy
Ashok Kuppuswamy [https://community.jboss.org/people/akuppu] created the discussion
"No String constructor found on type [org.drools.builder.ResourceType]"
To view the discussion, visit: https://community.jboss.org/message/780083#780083
--------------------------------------------------------------
I am trying to integrate with spring and I am stuck on this error
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initializing new StandardEnvironment
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initializing new StandardEnvironment
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
2012-12-05 04:43:45 [main] DEBUG org.springframework.beans.BeanUtils - No property editor [org.drools.builder.ResourceTypeEditor] found for type org.drools.builder.ResourceType according to 'Editor' suffix convention
2012-12-05 04:43:45 [main] DEBUG org.springframework.beans.TypeConverterDelegate - No String constructor found on type [org.drools.builder.ResourceType]
java.lang.NoSuchMethodException: org.drools.builder.ResourceType.<init>(java.lang.String)
at java.lang.Class.getConstructor0(Class.java:2706)
at java.lang.Class.getConstructor(Class.java:1657)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:197)
at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:470)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:516)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:510)
This is the config I have
<jbpm:kbase id="kbase">
<jbpm:resources>
<jbpm:resource type="BPMN2" source="classpath:Evaluation.bpmn"/>
</jbpm:resources>
</jbpm:kbase>
Any help is greatly appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/780083#780083]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - How to properly use ContentMarshallerHelper for Human Task Output in JBPM5.3?
by Thomas Setiabudi
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion
"How to properly use ContentMarshallerHelper for Human Task Output in JBPM5.3?"
To view the discussion, visit: https://community.jboss.org/message/779236#779236
--------------------------------------------------------------
Hi,
I have one output on my human task, the output is of type String, and I map this output to one of the process variable.
The problem is, the mapped value becomes:
MarshalledContentWrapper{content=[B@342371e7, marshaller=org.drools.marshalling.impl.SerializablePlaceholderResolverStrategy, type=class java.lang.String}
how to make it resolve correctly to the String value?
here is my code
1. Map<String, Object> taskOutput = new HashMap<String, String>(1);
2. taskOutput.put("EvaluationResult",
3. "good");
4.
5. ContentData contentData = new ContentData();
6. contentData = ContentMarshallerHelper.marshal(taskOutput,
7. new ContentMarshallerContext(), null);
8.
9. taskClientHelper.completeTask(taskId.longValue(),
10. userId, contentData);
Any help is appreciated.
Best Regards,
Thomas Setiabudi
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/779236#779236]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - No current status match exception.
by Dsire krish
Dsire krish [https://community.jboss.org/people/arselv] created the discussion
"No current status match exception."
To view the discussion, visit: https://community.jboss.org/message/755934#755934
--------------------------------------------------------------
I need to get the tasks by status and then start them.
But at some times while retrieveing the tasks im getting the started process id as well and thats in where im getting this exception.
org.jbpm.task.service.PermissionDeniedException: Server-side Exception: User '[User:'admin']' was unable to execution operation 'Start' on task id 287271 due to a no 'current status' match
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
My mina task handler is running in jboss and the application uses its client to the task operations.
Retrieveing tasks by status:
BlockingTaskSummaryResponseHandler resHandler = new BlockingTaskSummaryResponseHandler();
List<Status>statusls=new ArrayList<Status>();
statusls.add(Status.Reserved);
client.getTasksAssignedAsPotentialOwnerByStatus("admin",statusls, "en-UK", resHandler);
Starting the task:
BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
client.start(taskId, userId, responseHandler);
*Is there any thing to do with hibernate or what should i take care to eliminate this replication.?*
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/755934#755934]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[Beginner's Corner] - Error initializing endpoint
by Govind Raju
Govind Raju [https://community.jboss.org/people/govindtis] created the discussion
"Error initializing endpoint"
To view the discussion, visit: https://community.jboss.org/message/754158#754158
--------------------------------------------------------------
Hi ,
This error on ubuntu 12.04 while starting JBOSS AS .
I stoped apache service on my mechine.
ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Error initializing endpoint: java.net.BindException: Address already in use /127.0.0.1:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:983) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:190) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Connector.init(Connector.java:983) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]
at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
11:00:09,862 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.web.connector.http: org.jboss.msc.service.StartException in service jboss.web.connector.http: JBAS018007: Error starting web connector
at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:271)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]
at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
Caused by: LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use /127.0.0.1:8080
at org.apache.catalina.connector.Connector.init(Connector.java:985)
at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267)
... 5 more
11:00:10,065 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory /opt/jboss-as-7.1.1.Final/standalone/deployments
11:00:10,078 INFO [org.jboss.as.remoting] (MSC service thread 1-6) JBAS017100: Listening on /127.0.0.1:9999
11:00:10,078 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.0.0.1:4447
11:00:10,248 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.web.connector.http: org.jboss.msc.service.StartException in service jboss.web.connector.http: JBAS018007: Error starting web connector
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/754158#754158]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years