[jBPM] - NullPointerException when instantiating TaskService to start MinaTaskServer
by gvallangca
gvallangca [https://community.jboss.org/people/gvallangca] created the discussion
"NullPointerException when instantiating TaskService to start MinaTaskServer"
To view the discussion, visit: https://community.jboss.org/message/750944#750944
--------------------------------------------------------------
Hi,
I'm having a problem running my code to start my MinaTaskServer. I'm encountering a NullPointerException to the highlighted red line.
@PersistenceContext(unitName = "org.jbpm.persistence.jpa")
private EntityManager em;
public void startMinaServer() throws Exception {
System.out.println("********** Initializing MinaTask Server **********");
System.out.println("em.getEntityManagerFactory(): " + em.getEntityManagerFactory());
System.out.println("SystemEventListenerFactory.getSystemEventListener(): " + SystemEventListenerFactory.getSystemEventListener());
TaskService taskService = new TaskService(em.getEntityManagerFactory(), SystemEventListenerFactory.getSystemEventListener());
TaskServiceSession taskSession = taskService.createSession();
taskSession.addUser(new User("gvallangca"));
minaServer = new MinaTaskServer(taskService);
minaThread = new Thread(minaServer);
minaThread.start();
}
This is what is written in my *persistence.xml*:
<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jdbc/jbpm</jta-data-source>
<class>org.jbpm.task.Attachment</class>
<class>org.jbpm.task.Content</class>
<class>org.jbpm.task.BooleanExpression</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Delegation</class>
<class>org.jbpm.task.Escalation</class>
<class>org.jbpm.task.Group</class>
<class>org.jbpm.task.I18NText</class>
<class>org.jbpm.task.Notification</class>
<class>org.jbpm.task.EmailNotification</class>
<class>org.jbpm.task.EmailNotificationHeader</class>
<class>org.jbpm.task.PeopleAssignments</class>
<class>org.jbpm.task.Reassignment</class>
<class>org.jbpm.task.Status</class>
<class>org.jbpm.task.Task</class>
<class>org.jbpm.task.TaskData</class>
<class>org.jbpm.task.SubTasksStrategy</class>
<class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
<class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
<class>org.jbpm.task.User</class>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceEventInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
</properties>
</persistence-unit>
Can anybody help me to determine what wrong or missing?
Thank you so much.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/750944#750944]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[jBPM] - jbpm5.3 on postgreSQL 9.1
by hiroro
hiroro [https://community.jboss.org/people/hiroro] created the discussion
"jbpm5.3 on postgreSQL 9.1"
To view the discussion, visit: https://community.jboss.org/message/750680#750680
--------------------------------------------------------------
I try jbpm5.3 Sample(Evaluation) on postgreSQL 9.1.
But, following Error is Occured.
--------------------------------------------------------------------------------------------------------------
org.postgresql.util.PSQLException: ERROR: relation "task" does not exist.
--------------------------------------------------------------------------------------------------------------
But on my db for task-service(the name is task), table "task" exists.
Why is this Error occured.
Enviroment:
-------------------------------
Jboss AS 7.02
PostgreSQL 9.1.3
------------------------------
Tried Procedure
Frist,
I edit db/persitance.xml. for PostgreSQL
I edit standalone.xml for PostgreSQL.
I edit task-service/META-INF/persistance.xml for PostgreSQL
Second
Type "ant install.demo.db". --- OK
Type "and start.demo.db" ---- Table is created. But "org.postgresql.util.PSQLException: ERROR: relation "task" does not exist." is shown in server.log.
Please tell me why this error is occured.
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/750680#750680]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[JBoss Tools] - JBoss Developer Studio or Eclipse JUNO - SEAM 3 projects??
by Jonathan Fuentes
Jonathan Fuentes [https://community.jboss.org/people/jonathanfuentes] created the discussion
"JBoss Developer Studio or Eclipse JUNO - SEAM 3 projects??"
To view the discussion, visit: https://community.jboss.org/message/744831#744831
--------------------------------------------------------------
Hi to all, this is my first post. Currently i work with Eclipse Indigo, Jboss 4.2.3 and Seam 2.2, but i want to migrate to Seam 3 because i want to use newer versions of JSF and RichFaces, and also use Jboss 7, but the documentation about Seam 3 in a IDE like Eclipse doesn't exist, about how to create and configure a Seam 3 project. So, when i saw that JBoss Developer Studio 5 was released, i tought that it will have default support to create new Seam 3 projects, but only has to create projects with Seam 2.3, so i wanna ask you if you have a tutorial or some resource to work with a Seam 3 project in Jboss Developer Studio or in Eclipse Juno? Because i really want to work in the new version but i don't have so much knowledgment about how to create that kind of project in a IDE.
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/744831#744831]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[JBoss Tools] - Eclipse works, Run doesn't?
by Matt Stockbridge
Matt Stockbridge [https://community.jboss.org/people/mstockbr] created the discussion
"Eclipse works, Run doesn't?"
To view the discussion, visit: https://community.jboss.org/message/744399#744399
--------------------------------------------------------------
I've run into an interesting (read: "agrivating") problem: I can run an instance of JBoss with my .ear just fine from Eclipse using the JBoss tools, but if I try to deploy it by throwing what's in the deploy folder in the Eclipse project into the default/deploy folder in JBoss and running using run.conf.bat I run into some rather nasty JMS problems with one of four queues:
10:50:51,750 ERROR [org.hornetq.ra.HornetQRASessionFactoryImpl] Could not create session: javax.jms.IllegalStateException: Only allowed one session per connection. See the J2EE spec, e.g. J2EE1.4 Section 6.6
at org.hornetq.ra.HornetQRASessionFactoryImpl.allocateConnection(HornetQRASessionFactoryImpl.java:816) [:6.1.0.Final]
This, of course, doesn't happen in Eclipse using the JBoss tools. There is literally nothing else (as far as applications not provided by JBoss) on the server. This has worked in the past, but due to the fact that the project in question is being developed quickly and without much support for infrastructure (read: There's one person on it and no supporting resources) determining what's gone wrong is less about rolling back (which might work, but, since I haven't identified the actual problem, might not) and more about process of elimination.
So, why would launching from Eclipse using the tools prevent the above error? Why would that error happen in the first place if the only things referencing the queue are one bean that sends messages in and one that takes them out (a paradigm that works for the other three queues without producing the error)? And, possibly the most unanswerable, why would it previously have worked and not be working now?
I know the typical response is to post everything. I can't do that. But I can post parts. I'm using vanilla JBoss 6.1.0 Final, Eclipse Java EE IDE Indigo SR1, JBoss Seam Tools for Eclipse 3.3.0.v20120302-2019-H81-Beta1, and Java 7.
I've got four queues, in addition to DLQ and ExpiryQueue:
components.xml
<component class="org.jboss.seam.jms.ManagedQueueSender" name="dispatchQueueSender">
<property name="queueJndiName">/queue/RnD/dispatch</property>
</component>
<component class="org.jboss.seam.jms.ManagedQueueSender" name="scheduleQueueSender">
<property name="queueJndiName">/queue/RnD/schedule</property>
</component>
<component class="org.jboss.seam.jms.ManagedQueueSender" name="registerQueueSender">
<property name="queueJndiName">/queue/RnD/register</property>
</component>
<component class="org.jboss.seam.jms.ManagedQueueSender" name="resultsQueueSender">
<property name="queueJndiName">/queue/RnD/results</property>
</component>
hornetq-jms.xml
<queue name="DnR Dispatch">
<entry name="/queue/RnD/dispatch"/>
</queue>
<queue name="DnR Scheduling">
<entry name="/queue/RnD/schedule"/>
</queue>
<queue name="DnR Registration">
<entry name="/queue/RnD/register"/>
</queue>
<queue name="DnR Results">
<entry name="/queue/RnD/results"/>
</queue>
I'm using hibernate in my project with MySQL, and everything is configured as an .ear (with ejb's and a .war inside).
Any thoughts?
-M.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/744399#744399]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months