RuntimeException: UT factory lookup failed in remote JBoss EAP 4 / 5 client
Issue
- I'm looking up the UserTransaction from a standalone remote client using the code below, but it is failing with the RuntimeException: UT factory lookup failed shown below:
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
properties.put("jnp.socket.Factory", "org.jnp.interfaces.TimedSocketFactory");
properties.setProperty("java.naming.provider.url", "jnp://"+ host +":1100");
Context ctx = new InitialContext(properties);
UserTransaction tx = (UserTransaction)ctx.lookup("UserTransaction");
tx.begin();
javax.transaction.SystemException: java.lang.RuntimeException: UT factory lookup failed
[java] at org.jboss.tm.usertx.client.ClientUserTransaction.begin(ClientUserTransaction.java:147)
[java] at com.example.clustered.client.ClusteredTest.test(ClusteredTest.java:37)
[java] at com.example.clustered.client.ClusteredTest.main(ClusteredTest.java:16)
[java] javax.transaction.SystemException: java.lang.RuntimeException: UT factory lookup failed
Environment
- JBoss Enterprise Application Platform (EAP)
- 5.x
- 4.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.