[jBPM] - unable to find a bound object at name 'java:comp/TransactionManager'
by tntzht tnt
tntzht tnt [https://community.jboss.org/people/zht] created the discussion
"unable to find a bound object at name 'java:comp/TransactionManager'"
To view the discussion, visit: https://community.jboss.org/message/746047#746047
--------------------------------------------------------------
hi,
I have config and run the jbpm-human-task-5.2.1.Final in j2se, and got the exception. can somebody encounter the same problom?
here is the exceptions:
2012-07-04 19:12:14.296 DEBUG [JtaTransactionManager:106] {main} No JTA TransactionManager found at fallback JNDI location [java:comp/TransactionManager]
javax.naming.NameNotFoundException: unable to find a bound object at name 'java:comp/TransactionManager'
at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:83)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.drools.persistence.jta.JtaTransactionManager.findTransactionManager(JtaTransactionManager.java:101)
at org.drools.persistence.jta.JtaTransactionManager.<init>(JtaTransactionManager.java:75)
at org.jbpm.task.service.persistence.TaskJTATransactionManager.<init>(TaskJTATransactionManager.java:28)
at org.jbpm.task.service.persistence.TaskSessionFactoryImpl.createTaskServiceSession(TaskSessionFactoryImpl.java:75)
at org.jbpm.task.service.TaskService.createSession(TaskService.java:164)
at org.jbpm.task.service.TaskService.initialize(TaskService.java:115)
at org.jbpm.task.service.TaskService.initialize(TaskService.java:101)
at org.jbpm.task.service.TaskService.<init>(TaskService.java:79)
at com.eastcom.emergency.task.TaskManage.init(TaskManage.java:58)
at com.eastcom.emergency.task.TaskManage.main(TaskManage.java:70)
2012-07-04 19:12:14.296 DEBUG [BitronixContext:72] {main} looking up 'java:appserver/TransactionManager'
2012-07-04 19:12:14.296 DEBUG [JtaTransactionManager:106] {main} No JTA TransactionManager found at fallback JNDI location [java:appserver/TransactionManager]
javax.naming.NameNotFoundException: unable to find a bound object at name 'java:appserver/TransactionManager'
at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:83)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.drools.persistence.jta.JtaTransactionManager.findTransactionManager(JtaTransactionManager.java:101)
at org.drools.persistence.jta.JtaTransactionManager.<init>(JtaTransactionManager.java:75)
at org.jbpm.task.service.persistence.TaskJTATransactionManager.<init>(TaskJTATransactionManager.java:28)
at org.jbpm.task.service.persistence.TaskSessionFactoryImpl.createTaskServiceSession(TaskSessionFactoryImpl.java:75)
at org.jbpm.task.service.TaskService.createSession(TaskService.java:164)
at org.jbpm.task.service.TaskService.initialize(TaskService.java:115)
at org.jbpm.task.service.TaskService.initialize(TaskService.java:101)
at org.jbpm.task.service.TaskService.<init>(TaskService.java:79)
at com.eastcom.emergency.task.TaskManage.init(TaskManage.java:58)
at com.eastcom.emergency.task.TaskManage.main(TaskManage.java:70)
2012-07-04 19:12:14.296 DEBUG [BitronixContext:72] {main} looking up 'java:pm/TransactionManager'
2012-07-04 19:12:14.296 DEBUG [JtaTransactionManager:106] {main} No JTA TransactionManager found at fallback JNDI location [java:pm/TransactionManager]
javax.naming.NameNotFoundException: unable to find a bound object at name 'java:pm/TransactionManager'
at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:83)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.drools.persistence.jta.JtaTransactionManager.findTransactionManager(JtaTransactionManager.java:101)
at org.drools.persistence.jta.JtaTransactionManager.<init>(JtaTransactionManager.java:75)
at org.jbpm.task.service.persistence.TaskJTATransactionManager.<init>(TaskJTATransactionManager.java:28)
at org.jbpm.task.service.persistence.TaskSessionFactoryImpl.createTaskServiceSession(TaskSessionFactoryImpl.java:75)
at org.jbpm.task.service.TaskService.createSession(TaskService.java:164)
at org.jbpm.task.service.TaskService.initialize(TaskService.java:115)
at org.jbpm.task.service.TaskService.initialize(TaskService.java:101)
at org.jbpm.task.service.TaskService.<init>(TaskService.java:79)
at com.eastcom.emergency.task.TaskManage.init(TaskManage.java:58)
at com.eastcom.emergency.task.TaskManage.main(TaskManage.java:70)
2012-07-04 19:12:14.296 DEBUG [BitronixContext:72] {main} looking up 'java:/TransactionManager'
2012-07-04 19:12:14.296 DEBUG [JtaTransactionManager:106] {main} No JTA TransactionManager found at fallback JNDI location [java:/TransactionManager]
javax.naming.NameNotFoundException: unable to find a bound object at name 'java:/TransactionManager'
at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:83)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.drools.persistence.jta.JtaTransactionManager.findTransactionManager(JtaTransactionManager.java:101)
at org.drools.persistence.jta.JtaTransactionManager.<init>(JtaTransactionManager.java:75)
at org.jbpm.task.service.persistence.TaskJTATransactionManager.<init>(TaskJTATransactionManager.java:28)
at org.jbpm.task.service.persistence.TaskSessionFactoryImpl.createTaskServiceSession(TaskSessionFactoryImpl.java:75)
at org.jbpm.task.service.TaskService.createSession(TaskService.java:164)
at org.jbpm.task.service.TaskService.initialize(TaskService.java:115)
at org.jbpm.task.service.TaskService.initialize(TaskService.java:101)
at org.jbpm.task.service.TaskService.<init>(TaskService.java:79)
at com.eastcom.emergency.task.TaskManage.init(TaskManage.java:58)
at com.eastcom.emergency.task.TaskManage.main(TaskManage.java:70)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/746047#746047]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 10 months
[EJB3] - Unable to catch RuntimeException in client EJB
by Bibhu Jena
Bibhu Jena [https://community.jboss.org/people/bibhu] created the discussion
"Unable to catch RuntimeException in client EJB"
To view the discussion, visit: https://community.jboss.org/message/760639#760639
--------------------------------------------------------------
Hi,
I want to throw a runtime exception from my dao layer ,and catch it in service layer to parse the exception and show a meaningful message to user.
But, when I do this , EJB wraps this exception with RolledBackException and the client EJB is not able to catch it as it expects a SecurityBreakException which extends RuntimeException.
I can't throw a checked exception from the class as it implements HibernateListenrs.
Adding sample code snippet for more clarity:
// after every save/update/delete the follwing class get triggered
public class DataChangeListener implements PostDeleteEventListener, PostUpdateEventListener, PostInsertEventListener, Initializable {
public void onPostInsert(final PostInsertEvent event) {
//check if the user is not allowed to do so ,throw a SecurityBreakException
// else do nothing and let the transaction commit.
}
public void onPostUpdate(PostUpdateEvent event) {
//same as onPostInsert
}
public void onPostDelete(PostDeleteEvent event) {
//same as onPostInsert
}
@Local public interface SaveUserDataService{
public void save(Person person);
}
//client EJB which expects a SecurityBreakException
@Stateful SaveUserDataServiceBean implements SaveUserDataService{
public void save(Person person){
try{ //code to call dao layer to save a person
} catch (SecurityBreakException e) {
// parse the exception and show a meaningful message to user
}
}
}
//The exception class
public class SecurityBreakException extends RuntimeException {
private static final long serialVersionUID = 1L;
String message;
public SecurityBreakException(String message) {
super(message); this.message = message;
}
}
Please guide.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/760639#760639]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 10 months
[Beginner's Corner] - Deploying JDBC drivers and Datasources via jboss-cli.sh
by Willem Noorduin
Willem Noorduin [https://community.jboss.org/people/willemnoorduin] created the discussion
"Deploying JDBC drivers and Datasources via jboss-cli.sh"
To view the discussion, visit: https://community.jboss.org/message/779071#779071
--------------------------------------------------------------
In JBoss 7 / JBoss-EAP-6 I have made a domain-master (running on server1) and a slave (running on server2, and has server1 as its master. I have made a server-group and a server-config like this:
[domain@server1:9999 server-group] /server-group=one-server-group/:add(profile=full-ha,socket-binding-group=full-ha-sockets,jvm=default)
[domain@server1:9999 /] /host=server2/server-config=slave:add(auto-start=true, group=one-server-group, socket-binding-group=full-ha-sockets, socket-binding-port-offset=0)
[domain@server1:9999 /] /host=server2/server-config=slave:start
I would like deploy / add JDBC drivers and datasources via the cli, but:
[domain@server1:9999 subsystem=datasources] /host=server2/server=slave/subsystem=datasources/jdbc-driver=mysql:add(driver-name="mysql",driver-module-name="com.mysql.jdbc",driver-xa-datasource-class-name="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource")
Failed to get the list of the operation properties: "JBAS014753: There is no operation add registered at address [
("subsystem" => "datasources"),
("jdbc-driver" => "mysql")
]"
What do I do wrong. I can't reach the datasource subsystem of the master too, so I can't add it there either (of course, I can edit it manually to the domain.xml of the slave,, but then it still don't show up in my installed-drivers-list command.
Or do you have to define all drivers and datasources on the master ?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/779071#779071]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 10 months