*
The moose likes JBoss/WildFly and the fly likes TransactionSynchronizationRegistry lookup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "TransactionSynchronizationRegistry lookup" Watch "TransactionSynchronizationRegistry lookup" New topic
Author

TransactionSynchronizationRegistry lookup

Melquiades Fagundez
Greenhorn

Joined: Sep 23, 2010
Posts: 2
Hi,

When I lookup TransactionSynchronizationRegistry using the following code:

try {
Context ctx = new InitialContext(props);
transactionRegistry = (TransactionSynchronizationRegistry) ctx.lookup("java:TransactionSynchronizationRegistry");
} catch (Exception e) { .. }

I am getting the following exception

Caused by: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassCastException: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple cannot be cast to javax.naming.spi.ObjectFactory]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1508) [:5.0.5.Final]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:824) [:5.0.5.Final]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688) [:5.0.5.Final]
at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_21]
.....

As long as I understand the lookup "succeeds" and it finds object of type com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple but this object cannot be cast to expected type.

Can anybody help me??

Thanks in advance,
Melquiades

 
 
subject: TransactionSynchronizationRegistry lookup
 
Similar Threads
EJB 2.1 with JBOSS - EJB lookup from JNDI failing with NameNotFoundException bean name not bound
First Session Bean failing in JBOSS
Problem when accessing JMX (RMI Adaptor) from JNDI namespace
Problem when accessing JMX (RMI Adaptor) from JNDI namespace
javax.naming.NamingException: Invalid reference. Error: invalid field type for server in class org.