[jBPM] - some problems with jBpm5.3 using mysql
by dapeng king
dapeng king [https://community.jboss.org/people/dapengking] created the discussion
"some problems with jBpm5.3 using mysql"
To view the discussion, visit: https://community.jboss.org/message/810404#810404
--------------------------------------------------------------
Hi,everyone!
I am a new comer for jBpm5.And a few days ago, when I worked with my project,I found that it can help me with the Business Process in some way.So I began to study how to use jBpm5.4 with the "jbpm-5.4.0.Final-docs".But after a week's work,I got some problems here:
1)My project is a web project based on mysql and tomcat.So the first day I met jBpm5.4,I felt very glad that I found it can support mysql.Then I changed the configuration just like the docs said.But I found there are some difference between the docs and the jBPM5.4 project itself .I searched in the jBPM community,and found that the jBPM 5.4 doc is proved to be based on jbpm5.3 . So I changed to the jBPM5.3 , And do the same work as the jbpm5.3 docs said.But it still doesn't work!
so my question is : does anyone change the database to mysql successfully ? If so , could you help me with that? (My os is win7, mysql 5.1.51 , jdk 1.6.0_31 , jPBM5.3 )
2)Another problem is that when I install jBPM5.3 using ant command "ant install.demo",I also install some projects like *console , task server* and *juvnor*. I know they are helpful in a lot of ways.But if I only want to use the jBPM5.3 core api to help with my business process in my web project.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/810404#810404]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 12 months
[Beginner's Corner] - Too much logging in JBOSS Eap 6.0.1.GA
by akaw
akaw [https://community.jboss.org/people/akaw] created the discussion
"Too much logging in JBOSS Eap 6.0.1.GA"
To view the discussion, visit: https://community.jboss.org/message/810013#810013
--------------------------------------------------------------
My company recently migrated from ibatis to hibernate 4.2.0.Final. Everything seems to work fine, except that the statup logging to server.log has gone crazy. It looks like when jboss is starting up, it is setting all of our loggers to DEBUG and then wrapping them in INFO. Here is a quick sample:
15:17:39,606 INFO [stdout] (ServerService Thread Pool -- 58) 15:17:39.606 [ServerService Thread Pool -- 58] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.beans.factory.config.PropertyOverrideConfigurer#1'
15:17:39,606 INFO [stdout] (ServerService Thread Pool -- 58) 15:17:39.606 [ServerService Thread Pool -- 58] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Creating instance of bean 'org.springframework.beans.factory.config.PropertyOverrideConfigurer#1'
15:17:39,607 INFO [stdout] (ServerService Thread Pool -- 58) 15:17:39.607 [ServerService Thread Pool -- 58] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Eagerly caching bean 'org.springframework.beans.factory.config.PropertyOverrideConfigurer#1' to allow for resolving potential circular references
This is obviously generating a ton of noise in our log files and upsetting or sys admins. I can set the startup root-logger configuration to WARN, but then I'm losing some useful messages. The solution I want is to not let the DEBUG statements get wrapped in INFO.
Any thoughts on what is going on? Below is logging section of standalone.xml config file that I'm using, I don't believe there are any significant changes from the distributed version.
<subsystem xmlns="urn:jboss:domain:logging:1.1">
<console-handler name="CONSOLE">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler name="FILE">
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="false"/>
</periodic-rotating-file-handler>
<logger category="org.jboss.as.jpa">
<level name="DEBUG"/>
</logger>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="org.apache.tomcat.util.modeler">
<level name="WARN"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<logger category="jacorb">
<level name="WARN"/>
</logger>
<logger category="jacorb.config">
<level name="ERROR"/>
</logger>
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="CONSOLE"/>
<handler name="FILE"/>
</handlers>
</root-logger>
</subsystem>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/810013#810013]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 12 months
[jBPM] - XML error on process variable
by David Harris
David Harris [https://community.jboss.org/people/dmwpepper] created the discussion
"XML error on process variable"
To view the discussion, visit: https://community.jboss.org/message/810374#810374
--------------------------------------------------------------
I have a basic .java file that passes in a parameter:
package com.sample.quickstarts;
import java.util.HashMap;
import java.util.Map;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.process.ProcessInstance;
import org.jbpm.test.JbpmJUnitTestCase;
import org.junit.Test;
public class JavaServiceQuickstartTest extends JbpmJUnitTestCase{
@Test
public void testProcess () {
StatefulKnowledgeSession ksession = createKnowledgeSession("sample.bpmn2");
Map<String, Object> params = new HashMap<String, Object>();
params.put("person", new Person("krisv"));
ksession.startProcess("com.sample.bpmn2.hello", params);
}
}
In the .bpmn2 properties area, I added a Person object for the parameter I'm passing ('params.put("person", new Person("krisv"));')
When I execute the process, I get the following:
0 25/04 13:36:17,316[main] ERROR drools.xml.ExtensibleXmlParser.error - (null: 15, 54): cvc-datatype-valid.1.2.1: '' is not
a valid value for 'QName'.
0 25/04 13:36:17,316[main] ERROR drools.xml.ExtensibleXmlParser.error - (null: 15, 54): cvc-attribute.3: The value '' of
attribute 'structureRef' on element 'itemDefinition' is not valid with respect to its type, 'QName'.
person: krisv
I expected 'person:krisv'. Why is there a drools xml error and how can I get rid off it?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/810374#810374]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 12 months
[EJB3] - Cannot make my maven test client to speak with my EJB, missing jar?
by eildosa
eildosa [https://community.jboss.org/people/eildosa] created the discussion
"Cannot make my maven test client to speak with my EJB, missing jar?"
To view the discussion, visit: https://community.jboss.org/message/735377#735377
--------------------------------------------------------------
Hi, here is my problem, I made an EJB with maven and 2 test clients,
* a test client without maven, only added jnp-client and the EJB to it's class path, work like a charm
* a test client using MAVEN, added the EJB through the POM and jnp-client, does not work
this is my EJB :
[img] http://img11.hostingpics.net/pics/480421EJB1.png http://img11.hostingpics.net/pics/480421EJB1.png[/img]
it's POM :
[code]
<project xmlns=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.thongvan.mp</groupId>
<artifactId>MyFirstMavenEjb</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>ejb</packaging>
<name>MyFirstMavenEjb</name>
<url> http://maven.apache.org http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- setting default EJB2 to EJB3 -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.1</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
</plugins>
</build>
</project>
[/code]
this is my first test client, the one without maven wich has no problem whatsoever to speak with the EJB
[img] http://img11.hostingpics.net/pics/974963EJB0.png http://img11.hostingpics.net/pics/974963EJB0.png[/img]
this is my second test client, using maven, it cannot speak with the EJB, all I'm getting is :
[code]
Context lookup finished
Exception in thread "main" java.lang.ClassCastException: javax.naming.Reference cannot be cast to com.thongvan.mp.MyFirstMavenEjb.TestMavenEjb
at com.thongvan.mp.TestClientMavenEjb.App.main(App.java:27)
[/code]
[img] http://img11.hostingpics.net/pics/651692EJB2.png http://img11.hostingpics.net/pics/651692EJB2.png[/img]
It's POM :
[code]
<project xmlns=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.thongvan.mp</groupId>
<artifactId>TestClientMavenEjb</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>TestClientMavenEjb</name>
<url> http://maven.apache.org http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<!-- pour la dependance jnp-client, besoin de la version 5.0.3.GA -->
<repositories>
<repository>
<id>Jboss</id>
<url> https://repository.jboss.org/nexus/content/repositories/releases/ https://repository.jboss.org/nexus/content/repositories/releases/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jboss.naming</groupId>
<artifactId>jnp-client</artifactId>
<version>5.0.3.GA</version>
</dependency>
<dependency>
<groupId>com.thongvan.mp</groupId>
<artifactId>MyFirstMavenEjb</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
[/code]
Both clients have the same main :
[code]
public static void main( String args[] ) throws NamingException
{
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "localhost");
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" );
Context ctx = new InitialContext(env);
System.out.println("Context lookup finished");
TestMavenEjb proxy = (TestMavenEjb)(ctx.lookup("TestMavenEjbBean/remote-com.thongvan.mp.MyFirstMavenEjb.TestMavenEjb"));
System.out.println(proxy.getClass());
System.out.println("do something!");
proxy.doSomething();
}
[/code]
So, anybody has even the slightest idea about why the maven test client is not working?
Jboss 5.1.0.GA
Eclipse indigo
Maven 3.0.4
Also I did some poking around by printing a toString on both context lookup here is what I got :
[b]Maven project (not working)[/b]
Reference Class Name: Proxy for: com.thongvan.mp.MyFirstMavenEjb.TestMavenEjb
Type: ProxyFactoryKey
Content: ProxyFactory/MyFirstMavenEjb/TestMavenEjbBean/TestMavenEjbBean/remote
Type: EJB Container Name
Content: jboss.j2ee:jar=MyFirstMavenEjb.jar,name=TestMavenEjbBean,service=EJB3
Type: Proxy Factory is Local
Content: false
Type: Remote Business Interface
Content: com.thongvan.mp.MyFirstMavenEjb.TestMavenEjb
Type: Remoting Host URL
Content: socket://localhost:3873/
[b]regular project (working)[/b]
Proxy to jboss.j2ee:jar=MyFirstMavenEjb.jar,
name=TestMavenEjbBean,
service=EJB3 implementing [interface com.thongvan.mp.MyFirstMavenEjb.TestMavenEjb]
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/735377#735377]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 12 months
[jBPM] - Problems with Local Task Service
by Shobhit Tyagi
Shobhit Tyagi [https://community.jboss.org/people/roxy1987] created the discussion
"Problems with Local Task Service"
To view the discussion, visit: https://community.jboss.org/message/809857#809857
--------------------------------------------------------------
Guys,
I have a process with 2 tasks. I am using local task service. The process starts fine and completion of 1st task is also clean. but the 2nd task is not assigned. neither it is listed in the database. What could be the reason?
Following is my code for initiate process and complete task.
Initiate :
StatefulKnowledgeSession ksession;
long processInstanceId = -1;
try
{
ksession = BpmRepositoryConfig.createSession(processName);
KnowledgeRuntimeLogger logger1 = KnowledgeRuntimeLoggerFactory.newThreadedFileLogger(ksession, "testlog", 1000);
LocalHTWorkItemHandler handler = new LocalHTWorkItemHandler(ksession);
org.jbpm.task.service.TaskService service = BpmRepositoryConfig.getService();
TaskService taService = BpmRepositoryConfig.getTaskService(ksession, service);
handler.setClient(taService);
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", handler);
JPAWorkingMemoryDbLogger logger2 = new JPAWorkingMemoryDbLogger(ksession);
ProcessInstance prcInstance = ksession.startProcess(processDefId, mapParameters);
processInstanceId = prcInstance.getId();
}
catch (Exception e)
{
e.printStackTrace();
}
Complete :
StatefulKnowledgeSession ksession = BpmRepositoryConfig.createSession(processName);
org.jbpm.task.service.TaskService tservice = BpmRepositoryConfig.getService();
TaskService taskService = BpmRepositoryConfig.getTaskService(ksession,tservice);
try
{
for(long task : taskId)
{
taskService.start(task, userId);
taskService.complete(task, userId, null);
}
}
catch (Exception e)
{
e.printStackTrace();
}
Other methods :
public static org.jbpm.task.service.TaskService getService()
{
EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.task");
org.jbpm.task.service.TaskService tservice = new org.jbpm.task.service.TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
TaskServiceSession taskSession = tservice.createSession();
taskSession.addUser(new User("Administrator"));
taskSession.addUser(new User("krisv"));
taskSession.addUser(new User("john"));
taskSession.addUser(new User("mary"));
return tservice;
}
public static TaskService getTaskService(StatefulKnowledgeSession ksession,org.jbpm.task.service.TaskService taskService)
{
TaskService client = new LocalTaskService(taskService);
LocalHTWorkItemHandler localHTWorkItemHandler = new LocalHTWorkItemHandler(client, ksession);
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", localHTWorkItemHandler);
return client;
}
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/809857#809857]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 12 months