[jBPM] New message: "Re: jbpm 4.3 - org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update"
by Martin Porter
User development,
A new message was posted in the thread "jbpm 4.3 - org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update":
http://community.jboss.org/message/522457#522457
Author : Martin Porter
Profile : http://community.jboss.org/people/jedizippy
Message:
--------------------------------------------------------------
Hi ZT,
Well the current status is that we still do not know what is causing the issue. There is without any doubt a bug in the id generation somewhere but we have not been able to nail down where the root cause is. We get integrity constraint violations in random places throughout the workflow and its not reproducable. Also our workflow is quite complex but it is just a sequence of calls to a generic subprocess that handles retry and manual error handling processing and these subprocesses all have continue="async" on.
We found that removing continue=async on our custom and task nodes in that subprocess caused the Constraint Violation to be reproducable every time. Adding continue=async solved the issue so presumably forcing the subprocess state to persist to the DB somehow prevents the duplicate ID generation. But its flaky.
However just this morning for example l ran our test and it failed at the very start with this same Constraint violation again. The process is started and the first step is a <java> with continue="async". We had to add this so the caller will get immediate return and not wait for the process. We tried adding continue="async" on the <start> but we get NullPointerException then (its been like that since 4.1) so we have this Java activity which just logs a message and then moves onto the first subprocess call. At this first java activity we got our Constraint Violation so it happened when jbpm attempted to persist the main process (not subprocess). We invoke (create) our processes using MDB's and in this case the second time the MDB was fired and tried to create the process it worked.......
We are using out of the box job executor with no changes so according to the docs that is 3 threads (but I have not had time to verify that). We are running on WLS 11g but I am unable at the moment to verify which JTA configuration we should be using. As soon as you mention transactions on this forum it all goes quiet. All the questions remain unanswered. I added a previous (unanswered) post about this a few days ago.
We are due to deliver into end to end testing next Friday but to be honest given the current status that seems increasingly unlikey as that environment is clustered etc etc and we cant even get this to run properly on a single WLS instance at the moment.
Will update with any further findings !.
One option might be to write our own ID Generator and use an Oracle sequence but not sure how much effort that will be. But it might be an option we have to consider.
Cheers
MP
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522457#522457
16 years, 2 months
[EJB 3.0] New message: "Re: EJB 3.0 - Injection via annotation into a servlet"
by Riccardo Blumenthal
User development,
A new message was posted in the thread "EJB 3.0 - Injection via annotation into a servlet":
http://community.jboss.org/message/522455#522455
Author : Riccardo Blumenthal
Profile : http://community.jboss.org/people/neron17
Message:
--------------------------------------------------------------
I have checked the EAR and I think it isn't packed correctly. Let me try to show the structure:
tutorialEAR.ear: + META-INF
| |
| --- MANIFEST.MF
|
+ tutorial.WAR
|
+ META-INF
| |
| --- MANIFEST.MF
| --- persitence.xml
|
+ WEB-INF
| |
| + classes
| + lib
| --- web.xml
|
--- *.jsp
That's my EAR as it is created by Eclipse. Actually I assumed Eclipse would perform the right file regarding the the fact that it optimizes for JBoss as runtim. But from what I learned the JAR is missing in the root directory right? So i created a tutorial.JAR manually from eclipse and put it into the EAR but still that didn't help. I am getting the following error message:
09:20:08,656 INFO [JBossASKernel] Created KernelDeployment for: tutorial.jar
09:20:08,656 INFO [JBossASKernel] installing bean: jboss.j2ee:jar=tutorial.jar,name=tutorial,service=EJB3
09:20:08,656 INFO [JBossASKernel] with dependencies:
09:20:08,656 INFO [JBossASKernel] and demands:
09:20:08,656 INFO [JBossASKernel] and supplies:
09:20:08,656 INFO [JBossASKernel] Added bean(jboss.j2ee:jar=tutorial.jar,name=tutorial,service=EJB3) to KernelDeployment of: tutorial.jar
09:20:08,671 INFO [ClientENCInjectionContainer] STARTED CLIENT ENC CONTAINER: tutorial
09:20:08,828 INFO [TomcatDeployment] deploy, ctxPath=/admin-console
09:20:09,109 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/admin-console'
09:20:13,562 INFO [TomcatDeployment] deploy, ctxPath=/
09:20:13,734 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console
09:20:14,203 INFO [TomcatDeployment] deploy, ctxPath=/tutorial
09:20:14,265 ERROR [Ejb3ClientDeployer] Could not deploy vfszip:/C:/Programme/jboss-5.1.0.GA/server/default/deploy/tutorialEAR.ear/tutorial.jar/
javax.naming.NameAlreadyBoundException: classPathEntries
at org.jnp.server.NamingServer.bind(NamingServer.java:209)
at org.jnp.server.NamingServer.bind(NamingServer.java:167)
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:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at org.jnp.server.NamingServer_Stub.bind(Unknown Source)
at org.jnp.interfaces.NamingContext.bind(NamingContext.java:650)
at org.jnp.interfaces.NamingContext.bind(NamingContext.java:611)
at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:150)
at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:61)
Not sure if the WAR and the JAR must be named differently?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522455#522455
16 years, 2 months
[jBPM] New message: "Re: Async continuation in decision activity"
by Johan Kumps
User development,
A new message was posted in the thread "Async continuation in decision activity":
http://community.jboss.org/message/522447#522447
Author : Johan Kumps
Profile : http://community.jboss.org/people/johan.kumps
Message:
--------------------------------------------------------------
Hi,
This is a piece of my process definition :
...
<start g="10,162,80,40">
<transition to="ChooseWorker"/>
</start>
<decision g="132,161,80,40" name="ChooseWorker" *continuation="async"*>
<handler class="be.myorganisation.myapp.WorkerDecisionHandler" />
<transition g="-6,-18" name="groupOne" to="inTreatmentByGroupOne"/>
<transition g="-42,-17" name="groupTwo" to="inTreatmentByGroupTwo"/>
</decision>
...
Thanks for helping,
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522447#522447
16 years, 2 months
[JBoss Microcontainer] New message: "Re: Lookup up a POJO service without injecting it inside -beans.xml?"
by Martin N
User development,
A new message was posted in the thread "Lookup up a POJO service without injecting it inside -beans.xml?":
http://community.jboss.org/message/522436#522436
Author : Martin N
Profile : http://community.jboss.org/people/MartinN
Message:
--------------------------------------------------------------
Zdravo Ales...
I tried to inject the service as you suggested (which also lets me preserve the interface) by implementing KernelControllerContextAware as such:
public class ServiceA implements KernelControllerContextAware {
private KernelControllerContext controllerContext;
private Logger log;
private String val;
private ServiceB svcB;
public ServiceA() {
log = Logger.getLogger(getClass().getName());
}
public String getValue() {
return val;
}
public void setValue(String val) {
this.val = val;
}
public ServiceB getServiceB() {
return this.svcB;
}
public void setServiceB(ServiceB val) {
this.svcB = val;
}
public void init() {
try {
log.info("lookup = " + controllerContext.getController().getInstalledContext("SvcB"));
} catch (Throwable e) {
e.printStackTrace();
}
log.info("init-ed");
}
public void create() {
log.info("created");
}
public void start() {
log.info("started");
}
public void stop() {
log.info("stopped");
}
public void destroy() {
log.info("destroyed");
}
@Override
public void setKernelControllerContext(KernelControllerContext arg0)
throws Exception {
this.controllerContext = arg0;
}
@Override
public void unsetKernelControllerContext(KernelControllerContext arg0)
throws Exception {
this.controllerContext = null;
}
and ServiceB.java is:
package com.raf.test;
import org.jboss.logging.Logger;
public class ServiceB {
private Logger log; private String val;
public ServiceB() { log = Logger.getLogger(getClass().getName()); } public String getValue() { return val; }
public void setValue(String val) { this.val = val; }
public void init() { log.info("init-ed"); } public void create() { log.info("created"); } public void start() { log.info("started"); } public void stop() { log.info("stopped"); } public void destroy() { log.info("destroyed"); }}
and here's the deployment descriptor:
The problem is 'getInstalledContext("SvcB")' doesn't work. It returns a null. For "SvcA" it returns the pojo instance - which leads me to believe there's some scoping at play and that I need to probably search in the 'root' scope of the <deployment> file for my bean, but I'm not familiar how to do that, and I couldn't find some simple example to show me how to do that....
My original point is - I don't want to inject the service via the descriptor - I know I can do <inject bean="SvcB"/> in SvcA, but I don't want to do that - this is why I asked, is it possible to somehow locate "SvcB" from inside "SvcA"?
Thanks!
Martin
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522436#522436
16 years, 2 months
[jBPM] New message: "Re: [jBPM 4.3] Cancel Job/Timer"
by Ronald van Kuijk
User development,
A new message was posted in the thread "[jBPM 4.3] Cancel Job/Timer":
http://community.jboss.org/message/522430#522430
Author : Ronald van Kuijk
Profile : http://community.jboss.org/people/kukeltje
Message:
--------------------------------------------------------------
Ahh... ok... I looked into this a little, and with some small changes, the timer can be deleted. Still, the state is still wrong and just setting it to something more appropriate looks easy but has a lot of consequences. parent executions, scoping etc...
Look e.g. in the destroyScope method in ExecutionImpl. Best is to file a jira issue for this. But formulate it generic so the implementation could e.g. be that signalling an execution with a timer becomes possible and the timer is deleted or that the timer can be deleted separately and after that the execution can be signalled. I prefer the latter so it could be used more generically.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522430#522430
16 years, 2 months
[JBoss Portal Development] New message: "The server is spending near of 15-20 minutes to boot!!! Why?"
by Javier Alperte
User development,
A new message was posted in the thread "The server is spending near of 15-20 minutes to boot!!! Why?":
http://community.jboss.org/message/522424#522424
Author : Javier Alperte
Profile : http://community.jboss.org/people/xalperte
Message:
--------------------------------------------------------------
Hi,
Is the portal cms preloading (cache) all the repository content at startup?
I don't know if I'm the only one with the following problem but in my case I have a cms with near 60Mb of content (images, files, etc.) and the server is spending near of 15-20 minutes to boot. As you can imagine is really painfull trying to develope in this scenario.
Looking the startup I saw that the problem is in the *org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager*, exactly in the *loadProperties(...)* method. Looking inside this class you can see that the CMS Service is trying to load the entire repository content from database and caching them. What a crazy!!!
Is there any way to disable this behaviour or to improve the boot time? what will be the consequences of non caching all the repository content at startup?
Thanks
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522424#522424
16 years, 2 months