Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001722 [Resin] minor always 04-30-07 19:51 05-25-07 15:51
Reporter gzhu View Status public  
Assigned To westrupp
Priority normal Resolution fixed  
Status closed   Product Version 3.1.1
Summary 0001722: EntityManager binding error
Description I have a method traversing JNDI tree, and failed at node EntityManager.

Here is the method to print JNDI tree:
=======================================================
public static String listContext (Context ctx, String indent)
{
    StringBuffer retBuf = new StringBuffer();
    try {
    NamingEnumeration list = ctx.listBindings("");
    while (list.hasMore()) {
        try
        {
        Binding item = (Binding) list.next();
        String className = item.getClassName();
        String name = item.getName();
        retBuf.append(indent + name + " (" + className + ")\n");
        Object o = item.getObject();
        if (o instanceof javax.naming.Context)
            retBuf.append(listContext((Context) o, indent + "+ "));
        }
        catch (NamingException nex)
        {
        LogEvent.error(nex, "Invalid binding:");
        retBuf.append(indent + "***** Invalid Binding ******\n");
        }
    }
    } catch (NamingException ex) {
    LogEvent.error(ex, "List errors ");
    }
    return retBuf.toString();
}
===============================================

Here is the exception:
--------------------------
localhost 2007/04/30 19:36:19.824 ERROR [5]listContext(JNDIManager.java:98) Invalid binding:
localhost ===> exception message: EntityManager
localhost 2007/04/30 19:36:19.824 DEBUG [5]>>> javax.naming.NameNotFoundException: EntityManager
localhost 2007/04/30 19:36:19.824 DEBUG [5]>>> at com.caucho.naming.ContextImpl.lookup(ContextImpl.java:163)
localhost 2007/04/30 19:36:19.824 DEBUG [5]>>> at com.caucho.naming.QBindingEnumeration.next(QBindingEnumeration.java:68)
localhost 2007/04/30 19:36:19.824 DEBUG [5]>>> at com.caucho.naming.QBindingEnumeration.next(QBindingEnumeration.java:44)
localhost 2007/04/30 19:36:19.824 DEBUG [5]>>> at com.ironplanet.util.JNDIManager.listContext(JNDIManager.java:88)
localhost 2007/04/30 19:36:19.824 DEBUG [5]>>> at com.ironplanet.util.JNDIManager.listContext(JNDIManager.java:94)

---------------------------------------------------

the output JNDI string is like this (look for Invalid Binding):

localhost java: (com.caucho.naming.ContextImpl)
localhost java:comp (com.caucho.naming.ContextImpl)
localhost + env (com.caucho.naming.ContextImpl)
localhost + + jmx (com.caucho.naming.ContextImpl)
localhost + + + GlobalMBeanServer (com.caucho.jmx.GlobalMBeanServer)
localhost + + + MBeanServer (com.caucho.jmx.EnvironmentMBeanServer)
localhost + + cmp (com.caucho.naming.ContextImpl)
.......... a lot of my EJBs ...........
localhost + + persistence (com.caucho.naming.ContextImpl)
localhost + + + resin-ejb (com.caucho.amber.manager.EntityManagerProxy)
localhost + + + _amber_PersistenceUnit (com.caucho.naming.ContextImpl)
localhost + + + + resin-ejb (com.caucho.amber.manager.AmberEntityManagerFactory)
localhost + + OracleDS (com.caucho.sql.DBPool)
localhost + ***** Invalid Binding ******
localhost + ThreadPool (com.caucho.util.ResinThreadPoolExecutor)
localhost + UserTransaction (com.caucho.jca.UserTransactionProxy)
localhost + TransactionManager (com.caucho.transaction.TransactionManagerImpl)
localhost + ORB (com.caucho.iiop.orb.ORBImpl)
localhost
Additional Information
Attached Files

- Relationships

- Notes
(0001884)
gzhu
04-30-07 19:57

The failed node is

java:comp/EntityManager
 
(0001956)
ferg
05-25-07 15:51

The java:comp/EntityManager binding has been removed, since it does not match the JPA spec.
 

- Issue History
Date Modified Username Field Change
04-30-07 19:51 gzhu New Issue
04-30-07 19:54 gzhu Issue Monitored: gzhu
04-30-07 19:57 gzhu Note Added: 0001884
05-25-07 15:51 ferg Note Added: 0001956
05-25-07 15:51 ferg Assigned To  => westrupp
05-25-07 15:51 ferg Status new => closed
05-25-07 15:51 ferg Resolution open => fixed
05-25-07 15:51 ferg Fixed in Version  => 3.1.1


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker