Re: [jboss-user] [JCA] - MDB - JCA Transaction issue
by Adrian Brock
Adrian Brock [http://community.jboss.org/people/adrian%40jboss.org] replied to the discussion
"MDB - JCA Transaction issue"
To view the discussion, visit: http://community.jboss.org/message/533899#533899
--------------------------------------------------------------
The error message says it can't enlist the connection in the transaction because
something has set the transaction to rollback only.
10:07:42,812 ERROR [HornetQRASessionFactoryImpl] Could not create session
javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53edf53a:5e0:4ba99350:a3 status: ActionStatus.ABORT_ONLY
>
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:370)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
at org.hornetq.ra.HornetQRASessionFactoryImpl.allocateConnection(HornetQRASessionFactoryImpl.java:837)
at org.hornetq.ra.HornetQRASessionFactoryImpl.createSession(HornetQRASessionFactoryImpl.java:470)
at wipo.csc.jms.cluster.ejb.ClusteredQueueEJBListener.sendMessage(ClusteredQueueEJBListener.java:135)
So you need to find out what is doing setRollbackOnly() on the transaction.
e.g. invoking a CMT EJB in the same transaction that throws a RuntimeException would do that.
Nothing in JCA ever sets the status of the transaction to rollback only.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/533899#533899]
Start a new discussion in JCA at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years, 3 months
[Datasource Configuration] - Connection problem to mySQL database
by sebastien ferrand
sebastien ferrand [http://community.jboss.org/people/microbe] created the discussion
"Connection problem to mySQL database"
To view the discussion, visit: http://community.jboss.org/message/533898#533898
--------------------------------------------------------------
Hi everyone,
Like you all, i'm using JBoss and i'm trying to connect it to a database, which is mySQL.
So I'm using JDBC to set a connection, like I did with a local application, but it doesn't work, even if i've done all requiered configurations.
The problem come from the connection, which is established by this line :
con = DriverManager.getConnection("databaseName", "user", "password");
==> con is null when i run the portlet
Because I succed in getting a connection with a local app, I think the problem come from the configuration of JBoss because this time, It's J2EE.
So here are exact steps I followed :
- Putting mysql-connector-java-5.1.12-bin.jar in /home/myName/Bureau/jboss-portal-2.7.2/server/default/lib
- Moving mysql-ds.xml from I don't remember where to /home/myName/Bureau/jboss-portal-2.7.2/server/default/deploy
- Overwritted mysql-ds.xml with :
<?xml version="1.0" encoding="UTF-8"?
<datasources>
<local-tx-datasource>
<jndi-name>MySQLDB</jndi-name>
<connection-url>jdbc:mysql://localhost/databaseName</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>user</user-name>
<password>password</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
<exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
<valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name>
</local-tx-datasource>
</datasources>
That's all i've done, maybe should I say that I use the plugin JBoss tools in eclipse.
Thank you for your future help.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/533898#533898]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years, 3 months
[jBPM] - jBPM get outgoing Transition names
by Sebastian Herbst
Sebastian Herbst [http://community.jboss.org/people/Herbst] created the discussion
"jBPM get outgoing Transition names"
To view the discussion, visit: http://community.jboss.org/message/533890#533890
--------------------------------------------------------------
Hello,
I'm new to jBPM and still fooling around with some examples. The goal is to integrate jBPM in an existing framework, but until now I'm not able to get the outgoing Transitions of a state.
public class Workflow { public Workflow(String jpdl_file) { // Setup Workflow-Engine ProcessEngine processEngine = new Configuration().buildProcessEngine(); RepositoryService repositoryService = processEngine.getRepositoryService(); ExecutionService executionService = processEngine.getExecutionService(); // Deploy Workflows/Prozessdiagramm NewDeployment newDeployment = repositoryService.createDeployment().addResourceFromClasspath(jpdl_file); String deploymentDbid = newDeployment.deploy(); //Set Rights Map<String, Object> variables = new HashMap<String, Object>(); variables.put("user", new User()); variables.put("group", new Group()); // Start Workflow // TODO executionsService nicht über den Namen aufrufen ProcessInstance processInstance = executionService.startProcessInstanceByKey("testTask", variables); Execution execution = executionService.findProcessInstanceById(processInstance.getId()); }}
So far I'm just starting a new ProcessEngine, deploy a given workflow, setup some variables and start an new Instance of the given Workflow.
So for now the Workflow itself isn't so important. At least I just have to know how to get the active node(s) of this wf and its transitions.
Thanks and Greetings
Herbst
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/533890#533890]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years, 3 months
[jBPM] - Error when log in jbpm-console
by nablas kalibans
nablas kalibans [http://community.jboss.org/people/nablas] created the discussion
"Error when log in jbpm-console"
To view the discussion, visit: http://community.jboss.org/message/533882#533882
--------------------------------------------------------------
I installed jbpm 4.3 on jboss 5.0.0.GA. When I log in with example user "alex", I get a popup with the following error:
* URL: ' http://electra:8088/gwt-console-server/rs/tasks/alex/participation http://electra:8088/gwt-console-server/rs/tasks/alex/participation'
* Action: 'org.jboss.bpm.console.client.task.LoadTasksParticipationAction'
* Exception: 'class com.google.gwt.http.client.RequestException'
Trace from JBoss log is:
2010-03-25 08:42:35,376 ERROR [STDERR] (http-10.1.125.249-8088-6) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider bsh.engine.BshScriptEngineFactory not found
2010-03-25 08:42:35,392 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/gwt-console-server].[Resteasy]] (http-10.1.125.249-8088-6) Servlet.service() para servlet Resteasy lanzó excepción
org.jboss.resteasy.spi.UnhandledException: java.lang.ClassCastException: org.jbpm.pvm.internal.processengine.ProcessEngineImpl cannot be cast to org.jbpm.pvm.internal.processengine.ProcessEngineImpl
at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)
at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)
at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
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)
at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:905)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:592)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2036)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassCastException: org.jbpm.pvm.internal.processengine.ProcessEngineImpl cannot be cast to org.jbpm.pvm.internal.processengine.ProcessEngineImpl
at org.jbpm.pvm.internal.cfg.ConfigurationImpl.buildProcessEngine(ConfigurationImpl.java:81)
at org.jbpm.api.Configuration.getProcessEngine(Configuration.java:121)
at org.jbpm.integration.console.ProcessEngineUtil.retrieveProcessEngine(ProcessEngineUtil.java:30)
at org.jbpm.integration.console.JBPMIntegration.initializeProcessEngine(JBPMIntegration.java:55)
at org.jbpm.integration.console.JBPMIntegration.<init>(JBPMIntegration.java:51)
at org.jbpm.integration.console.TaskManagementImpl.<init>(TaskManagementImpl.java:41)
at org.jbpm.integration.console.ManagementFactoryImpl.createTaskManagement(ManagementFactoryImpl.java:40)
at org.jboss.bpm.console.server.TaskListFacade.getTaskManagement(TaskListFacade.java:70)
at org.jboss.bpm.console.server.TaskListFacade.getTasksForIdRef(TaskListFacade.java:99)
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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
... 28 more
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/533882#533882]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years, 3 months