[JBoss jBPM] - Re: Problem configuring jBPM4 with Spring
by ziglee
My case is a little diferent. I'm using JPA (hibernate implementation) so I would like to know how can I stop depending on jbpm.hibernate.cfg.xml.
I tried to expose my sessionFactory through this bean:
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
| p:dataSource-ref="dataSource">
| <property name="jpaVendorAdapter">
| <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
| <property name="showSql" value="true" />
| <property name="generateDdl" value="true" />
| <property name="databasePlatform" value="${hibernate.dialect}" />
| </bean>
| </property>
| </bean>
|
| <bean id="sessionFactory" factory-bean="entityManagerFactory" factory-method="getSessionFactory"/>
and used
<process-engine-context>
| <command-service>
| <retry-interceptor />
| <environment-interceptor />
| <spring-transaction-interceptor />
| </command-service>
| </process-engine-context>
|
| <transaction-context>
| <transaction />
| <hibernate-session current="true" />
| </transaction-context>
|
but all I got was:
Caused by: org.hibernate.HibernateException: No CurrentSessionContext configured!
Can somebody help me?
Thanks in advance!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247845#4247845
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247845
16 years, 8 months
[Remoting] - Problem running with Maven
by eric.rotick
I've been playing around with remoting and developed some tests. These all run fine in the same environment as delivered by the 2.5.1 download.
I now need to integrate this work into the main project which uses Maven but I cannot get this to run. I've also ported the simple tests over to Maven and this also does not run.
It seems to me that the Maven dependencies are at fault but I cannot find anything that documents this. By the way, the search facility in this forum results in an exception.
I'm using the repository at http://repository.jboss.org/maven2 and jdk 1.6.
The symptoms are that the client server connection is made, as determined via netstat but nothing get invoked. The client is bocked forever. If I kill the server the client also fails.
When I started the Mavenizing process I read in Ch4 of the Remoting Guide that jboss-remoting.jar was the only jar required so that is all I added. Everything compiles but when I run it I get an error that org.jboss.logging.Logger is missing.
I realize with so many logging implementations I have to make a choice at runtime so I added jboss-logging-log4j as I'm also using log4j.
This solves the logging problem but now at runtime I get an error that org.jboss.util.threadpool.ThreadPool is missing. I fgrep'ed in the download and found it in jboss-common.jar. Now I tried to find this in the jboss maven repository and this is where, I think, it started to go wrong!
I could not find jboss-common in the groupId of org.jboss but I did find it in the groupId of jboss. I added this and now I get an error that EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap is missing. I found
<groupId>oswego-concurrent</groupId>
| <artifactId>concurrent</artifactId>
| <version>1.3.4-jboss-update1</version>
on the jboss repository.
I added this dependency and everything runs without an error but it doesn't work. When I killed the server I noticed that the client reported that org.jboss.mx.util.ObjectNameFactory was missing.
I thought I must be doing something wrong so I re-read the section in the Remoting Guide on dependencies and decided that Ch4.1 regarding the third party libraries really does mean to supplement jboss-remoting.jar despite the statement to the contrary in Ch4. This also documented the additional dependencies I had added so now we're getting somewhere.
The guide says jboss-jmx is not needed since I'm using JDK 1.6 but I still get the exception and the test fails. I added
<groupId>jboss</groupId>
| <artifactId>jboss-jmx</artifactId>
| <version>4.2.3.GA</version>
from the jboss repository.
Now if I run the test it just blocks as before but when I kill the server the client fails with
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socke
| t://localhost:2468/]
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:776)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
| at org.jboss.remoting.Client.invoke(Client.java:1724)
| at org.jboss.remoting.Client.invoke(Client.java:629)
| at org.jboss.remoting.Client.invoke(Client.java:617)
| at org.jboss.remoting.transporter.TransporterClient.invoke(TransporterClient.java:321)
| at $Proxy0.getOne(Unknown Source)
| <snip>
|
which is called from my call to the TransporterClient proxy.
Now I do not have any more ideas what to do. Can anyone shed some light on this as I must be down to the Maven dependencies.
Thanks,
Eric.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247841#4247841
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247841
16 years, 8 months
[JBoss jBPM] - Re: How to design a Task Node with two Transition?
by prajatna
"kukeltje" wrote : Sorry, pressed submit instead of preview.... and this link does not belong here
|
| You cannot leave a task-node on a node-enter. You can only do this on generic nodes. The usage of a tasknode is completely superfluous here.
Thanks for your comments...
Then, what we should use in my scenario, where we have two transition with a Task node.
I also tried with task assignment like....
| <task-node name="PM_Approval" >
| <task>
| <assignment class="com.sample.nodeAction.PMAssignAction"></assignment>
| </task>
| <transition to="HOD_Approval" name="Accepted"></transition>
| <transition to="end" name="Denied"></transition>
| </task-node>
|
and from inside my PMAssignAction class i am trying to switch to required transition as follows.
| public class PMAssignAction implements AssignmentHandler {
|
|
| private static final long serialVersionUID = 1L;
|
| public void assign(Assignable assignable, ExecutionContext executionContext)
| throws Exception {
|
| System.out.println("--------PMAssignAction------------1-------");
| System.out.println("This Node is---"+executionContext.getNode().getName());
|
| System.out.print("Enter your decission: ");
| BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
| String decision = null;
|
| try {
| decision = br.readLine();
| } catch (IOException ioe) {
| System.out.println("IO error trying to read your decission!");
| }
|
| System.out.println("Thanks for the desission, " + decision);
| System.out.println("---------PMAssignAction------------2-------");
|
| if(decision != null && decision.equalsIgnoreCase("a")){
|
| executionContext.getContextInstance().setVariable("decision", decision);
| System.out.println("---------PMAssignAction----a--------3---");
| executionContext.getProcessInstance().signal("Accepted");
| //leaveNode("Accepted");
| }
| else if(decision != null && decision.equalsIgnoreCase("d")){
|
| executionContext.getContextInstance().setVariable("decision", decision);
| System.out.println("---------PMAssignAction-----d-------3----");
| executionContext.getProcessInstance().signal("Denied");
|
| }
| else{
| System.out.println("Error trying to read your decission!..Enter only a/d ");
| }
| }
| }
But unfortunately , this is also not working..... The problem is that once flow reaches the end state by giving denied decision.... it is again coming back to the previous node....
Please find the log below and help me out resolving this.....Thanks..
|
| 16:49:51,530 [main] DEBUG Converters : adding converter 'R', 'org.jbpm.context.exe.converter.SerializableToByteArrayConverter'
| 16:49:51,530 [main] DEBUG Converters : adding converter 'I', 'org.jbpm.context.exe.converter.IntegerToLongConverter'
| 16:49:51,530 [main] DEBUG Converters : adding converter 'H', 'org.jbpm.context.exe.converter.ShortToLongConverter'
| 16:49:51,530 [main] DEBUG Converters : adding converter 'G', 'org.jbpm.context.exe.converter.FloatToDoubleConverter'
| 16:49:51,540 [main] DEBUG Converters : adding converter 'F', 'org.jbpm.context.exe.converter.FloatToStringConverter'
| 16:49:51,540 [main] DEBUG Converters : adding converter 'E', 'org.jbpm.context.exe.converter.ByteToLongConverter'
| Hi............
| ---------------------1-----------------
| You are now in node: start
| ---------------------2-----------------
| 16:49:51,570 [main] DEBUG GraphElement : event 'before-signal' on 'StartState(start)' for 'Token(/)'
| 16:49:51,570 [main] DEBUG GraphElement : event 'node-leave' on 'StartState(start)' for 'Token(/)'
| 16:49:51,570 [main] DEBUG GraphElement : event 'transition' on 'Transition(Test)' for 'Token(/)'
| 16:49:51,570 [main] DEBUG GraphElement : event 'node-enter' on 'TaskNode(PM_Approval)' for 'Token(/)'
| 16:49:51,580 [main] DEBUG GraphElement : event 'task-create' on 'Task(PM_Approval)' for 'Token(/)'
| --------PMAssignAction------------1-------
| This Node is---PM_Approval
| Enter your decission: d
| Thanks for the desission, d
| ---------PMAssignAction------------2-------
| 16:49:55,435 [main] DEBUG VariableContainer : update variable 'decision' in 'TokenVariableMap1193779' to value 'd'
| ---------PMAssignAction-----d-------3----
| 16:49:55,445 [main] DEBUG GraphElement : event 'before-signal' on 'TaskNode(PM_Approval)' for 'Token(/)'
| 16:49:55,445 [main] DEBUG GraphElement : event 'node-leave' on 'TaskNode(PM_Approval)' for 'Token(/)'
| 16:49:55,445 [main] DEBUG GraphElement : event 'transition' on 'Transition(Denied)' for 'Token(/)'
| 16:49:55,445 [main] DEBUG GraphElement : event 'node-enter' on 'EndState(end)' for 'Token(/)'
| 16:49:55,445 [main] DEBUG GraphElement : event 'process-end' on 'ProcessDefinition(processdefinition)' for 'Token(/)'
| 16:49:55,465 [main] DEBUG GraphElement : event 'after-signal' on 'TaskNode(PM_Approval)' for 'Token(/)'
| 16:49:55,465 [main] DEBUG GraphElement : event 'node-leave' on 'TaskNode(PM_Approval)' for 'Token(/)'
| 16:49:55,465 [main] DEBUG GraphElement : event 'transition' on 'Transition(Accepted)' for 'Token(/)'
| 16:49:55,465 [main] DEBUG GraphElement : event 'node-enter' on 'TaskNode(HOD_Approval)' for 'Token(/)'
| 16:49:55,465 [main] DEBUG GraphElement : event 'task-create' on 'Task(HOD_Approval)' for 'Token(/)'
| --------HODAssignAction------------1-------
| This Node is---HOD_Approval
| Enter your decission:
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247835#4247835
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247835
16 years, 8 months
[Beginners Corner] - Unable to parse WSDL with wsconsume
by rohit.macherla
Hi,
I am working on JBoss-4.2.2 server. I have a WSDL given by external system and I want to create java artifacts using wsconsume. When I try the command "wsconsume -k Prov_OMITStatusUpdates.wsdl", I get the following error :anonymous wrote :
| [ERROR] Failed to read the WSDL document: file:/C:/TEMP/Test/Gateway%20OMITs/SID0003041/SID0003041,264/Prov_OMITStatusUpdates.xsd, beca
| use 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>.
| unknown location
The problem here is that the WSDL has the schemas as :<types>
| <schema xmlns="http://www.w3.org/2001/XMLSchema">
| <import namespace="http://xmlns.oracle.com/Prov_OMITStatusUpdates" schemaLocation="SID0003041/SID0003041,264/Prov_OMITStatusUpdates.xsd"/>
| </schema>
| <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
| <xsd:import namespace="http://www.provision.com/ns/OMITUpdate" schemaLocation="SID0003041/SID0003041,265/OMITUpdates.xsd"/>
| </xsd:schema>
| </types>
|
The part "264" in the schema location "SID0003041,264" is a counter which will be updated everytime the WSDL is refreshed. Hence, the schema location changes everytime the WSDL is fetched. It was informed (by the external system developers) that this change in the schema location was required by their system.
When I tried creating a webservice client using NetBeans 6, I found that it was fetching the xsd into the location : ../SID0003041/SID0003041_264/Prov_OMITStatusUpdates.xsd (It converts the comma to an underscore !!) Hence, when it later tries to access the wsdl, it wont find the folder name with SID0003041,264. Hence, the "no document found" error.
In Netbeans, I have edited the imported wsdl and replaced the comma with an underscore. Now this code is deployed and it works for a while. However, JBoss refreshes the WSDL on its own and it starts failing again.
I am not sure as to how to handle this situation. When wsconsume itself fails, its difficult to think how an IDE alone would fix the issue.
Please suggest any alternatives.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247834#4247834
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247834
16 years, 8 months
[JCA/JBoss] - Re: xa-datasource configuraton problem
by rajika
hi,
I removed one data source definition to isolate the problem. Now my *-xa-ds.xml looks like follows.
| <datasources>
| <xa-datasource>
| <jndi-name>XADerbyDS</jndi-name>
|
| <!-- uncomment to enable interleaving <interleaving/> -->
|
| <isSameRM-override-value>false</isSameRM-override-value>
| <user-name>esb</user-name>
| <password>esb</password>
|
| <!-- path to the database. (${jboss.server.data.dir}${/}derby${/}default didn't work on win) -->
| <xa-datasource-property name="DatabaseName">derby/esbdb</xa-datasource-property>
| <xa-datasource-property name="User">esb</xa-datasource-property>
| <xa-datasource-property name="Port">1527</xa-datasource-property>
| <xa-datasource-property name="Password">esb</xa-datasource-property>
| <xa-datasource-property name="CreateDatabase">create</xa-datasource-property>
| <xa-datasource-class>org.apache.derby.jdbc.EmbeddedXADataSource</xa-datasource-class>
|
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
| <metadata>
| <type-mapping>Derby</type-mapping>
| </metadata>
| </xa-datasource>
| <mbean code="org.jboss.jdbc.DerbyDatabase" name="jboss:service=Derby"/>
|
|
|
| </datasources>
|
|
Now I am having the following exception
| org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
| at org.apache.synapse.mediators.db.AbstractDBMediator.getPreparedStatement(AbstractDBMediator.java:177)
| at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:40)
| at org.apache.synapse.mediators.db.AbstractDBMediator.mediate(AbstractDBMediator.java:102)
| at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
| at org.apache.synapse.mediators.filters.OutMediator.mediate(OutMediator.java:55)
| at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
| at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
| at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:131)
| at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:339)
| at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:135)
| at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
| at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:230)
| at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:487)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
| ... 16 more
| 17:10:00,067 INFO [STDOUT] 17:10:00,067 ERROR [SERVICE_LOGGER] Error execuring insert statement : update company set price=? where name =? against DataSource : localhost:1099
| org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
| at org.apache.synapse.mediators.db.AbstractDBMediator.getPreparedStatement(AbstractDBMediator.java:177)
| at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:40)
| at org.apache.synapse.mediators.db.AbstractDBMediator.mediate(AbstractDBMediator.java:102)
| at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
| at org.apache.synapse.mediators.filters.OutMediator.mediate(OutMediator.java:55)
| at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
| at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
| at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:131)
| at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:339)
| at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:135)
| at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
| at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:230)
| at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:487)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
| ... 16 more
| 17:10:00,067 INFO [STDOUT] 17:10:00,067 WARN [FaultHandler] ERROR_CODE : 0
| 17:10:00,067 INFO [STDOUT] 17:10:00,067 WARN [FaultHandler] ERROR_MESSAGE : Error execuring insert statement : update company set price=? where name =? against DataSource : localhost:1099
| 17:10:00,067 INFO [STDOUT] 17:10:00,067 WARN [FaultHandler] ERROR_DETAIL : org.apache.synapse.SynapseException: Error execuring insert statement : update company set price=? where name =? against DataSource : localhost:1099
| at org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:275)
| at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:61)
| at org.apache.synapse.mediators.db.AbstractDBMediator.mediate(AbstractDBMediator.java:102)
| at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
| at org.apache.synapse.mediators.filters.OutMediator.mediate(OutMediator.java:55)
| at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
| at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115)
| at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:131)
| at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:339)
| at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:135)
| at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178)
| at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:230)
| at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
| at org.apache.synapse.mediators.db.AbstractDBMediator.getPreparedStatement(AbstractDBMediator.java:177)
| at org.apache.synapse.mediators.db.DBReportMediator.processStatement(DBReportMediator.java:40)
| ... 14 more
| Caused by: javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:487)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247831#4247831
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247831
16 years, 8 months