Hi Jim,
> I tried to accesss Glassfish Java DB use JNDI, as below code:
>
> / InitialContext ic = new InitialContext();
> DataSource ds = (DataSource)ic.lookup("jdbc/demo_ds");
> connection = ds.getConnection();
> /
> The JDBC Resource "/jdbc/demo_ds/" was created in advance, and
> binding with default pool 'DerbyPool'.
> I deployed my app as custom mbean by admin console, and invoked its
> method for setup connection via *jconsole*, I got following error message:
>
> /[#|2007-02-24T18:27:44.422+0800|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=21;_ThreadName=RMI
> TCP
> Connection(29)-192.168.0.100;_RequestID=e21fa16f-592c-4e82-abf7-a5fc28003602;|
> com.sun.enterprise.InvocationException
> at
> com.sun.enterprise.resource.ResourceManagerImpl.getTransaction(ResourceManagerImpl.java:59)
> at
> com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:171)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:312)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:176)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:152)
> at
> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:145)
> at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:93)
> at demo.glassfish.SampleDB.setupConnection(SampleDB.java:85)
> at demo.glassfish.SampleDB.getUsers(SampleDB.java:112)
> at demo.glassfish.SampleDB.getLatestUserInfo(SampleDB.java:49)
> .....
> /
> Any hint or idea?
Since you are trying to access the resource from a non-javaee component
like custom mbean,
you are hitting this issue. Please use Allow-NonComponent-Callers flag
(modify the pool from admin GUI)
to solve this issue.
http://www.glassfishwiki.org/gfwiki/Wiki.jsp?page=NonComponentCallers
thanks,
Binod.
>
> Thanks,
> jim
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net For
> additional commands, e-mail: dev-help_at_glassfish.dev.java.net