[Persistence, JBoss/CMP, Hibernate, Database] - JBPM Process Instance - Could not enlist in transaction on e
by mailinator
Hi,
i'm using jbpm to work with workflows.
Here is my problem :
i'm deploying my process definition fine with the plugin. I check in the database and everything is fine.
But when trying to acces that process definition from my webapp, i encounter some issues.
I believe that this is because of misconfiguration of either datasources or transaction manager.
Sadly i dont know enough to find some solution to that.
Here is my jbpm code :
JbpmConfiguration jbpmConfiguration=JbpmConfiguration.getInstance();
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
try {
String processName = "Acces";
ProcessInstance processInstance = jbpmContext.newProcessInstance(processName);
} finally {
jbpmContext.close();
}
In my jbpm-ds.xml :
<local-tx-datasource>
<jndi-name>JbpmDS</jndi-name>
<connection-url>jdbc:oracle:thin:@srvsa.ne:1521:dbp</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>bbbbb</user-name>
bbbbb
<min-pool-size>1</min-pool-size>
<max-pool-size>5</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
</local-tx-datasource>
In the logs of JBOSS, i have this :
11:43:19,872 INFO [TransactionFactoryFactory] Using default transaction strateg
y (direct JDBC transactions)
11:43:19,887 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup
configured (in JTA environment, use of read-write or transactional second-level
cache is not recommended)
11:43:19,887 INFO [SettingsFactory] Automatic flush during beforeCompletion():
disabled
I believe there is a link between this and my exception :
org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a623635:94c:46adb26e:56 status: ActionStatus.ABORT_ONLY >)
org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:518)
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:399)
Does anyone know about this ?
Regards,
O.M.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068652#4068652
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068652
18Â years, 8Â months
[JBoss Seam] - Is there a JBossWS client example for invoking a Seam ws?
by lowecg2004
I've successfully setup a Seam web service, generated the proxies using wsconsume and installed the Seam conversation SOAP handler.
I'm having real difficulty finding out how to add/read the conversationId SOAP header. Without it I just get this exception:
Caused by: java.lang.NullPointerException
| at org.jboss.seam.webservice.SOAPRequestHandler.extractConversationId(SOAPRequestHandler.java:137)
| at org.jboss.seam.webservice.SOAPRequestHandler.handleInbound(SOAPRequestHandler.java:75)
| at org.jboss.seam.webservice.SOAPRequestHandler.handleMessage(SOAPRequestHandler.java:56)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
| at org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
| ... 27 more
Could anyone point me to the right documentation/example/anything that might help?
Shouldn't the lack of conversationId header just be ignored since that implies all my Seam web services must be conversational? I may wish to have a mix of web services where some may be stateless or just work at the session context?
I tried implementing a web service without the SOAP handler (because of the aforementioned NPE) using a similar example to a simple stateful web service example suggested by Rama Pulavarthi:
http://weblogs.java.net/blog/ramapulavarthi/archive/2006/06/maintaining_s...
The web service is invoked just fine, however anything I save to HttpSession using setAttribute() does not survive beyond the request. So, on a subsequent request to a servlet using the JSESSIONID obtained from the WS call, the corresponding getAttribute call returns null.
I tried to have a go at debugging this and thought that SessionContext.flush() might be a good place to start digging around (my web service also placed some values into SessionContext) but this was never called. I suppose that makes sense given that I commented out the handler responsible for managing contexts ;) However, could the lack of SOAP handler also cause the values I saved to a regular HttpSession to not be saved?
Cheers,
Chris
Here is my WS code:
@Name("developmentService")
| @Stateless
| @WebService(name = "DevelopmentService", serviceName = "DevelopmentService" )
| public class DevelopmentAuthenticator implements DevelopmentServiceRemote
| {
| @Logger Log log;
|
| @Resource
| private WebServiceContext wsContext;
|
| @WebMethod
| public boolean login(final String username,
| final String password) {
|
| final MessageContext mc = wsContext.getMessageContext();
|
| // This would be called during an AppletViewer session before any server calls. Therefore,
| // create a HttpSession so the HTTP response has a JSESSIONID cookie which can be used
| // by all other server requests.
| final HttpSession session =
| ((HttpServletRequest)mc.get(MessageContext.SERVLET_REQUEST)).getSession();
|
| if (session == null) {
| throw new WebServiceException("No session in WebServiceContext");
| }
|
| // do authentication
| Identity.instance().setUsername(username);
| Identity.instance().setPassword(password);
|
| Identity.instance().login();
|
| final boolean isLoggedIn = Identity.instance().isLoggedIn();
|
| if (isLoggedIn) {
| // Authenticator stores the userId on the SessionContext
| final Integer userId = (Integer) Contexts.getSessionContext().get("userId");
|
| // verify that userId is set
| if (userId == null) {
| log.warn("User ID not set after successful login in web service call.");
| }
|
| // transfer the user id to the HttpSession to allow access from all JEE entities,
| // not just Seam components.
| session.setAttribute("userId", userId);
|
| log.info("adding userId: {0} to session {1}", session.getAttribute("userId"), session.getId());
| }
|
| return isLoggedIn;
| }
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068650#4068650
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068650
18Â years, 8Â months