[dbcp] ClassNamingManager can not access a member of class InstanceKeyObjectFactory with modifiers ""

Dongsheng Song <[email protected]>
Newsgroups gmane.comp.jakarta.commons.user,gmane.text.xml.commons.devel
Message-ID <[email protected]>
I use jnpserver pulish SharedPoolDataSource from jndi,  

ctx.rebind("/falcon",  SharedPoolDataSource);

but 

DataSource ds = (DataSource) ctx.lookup("falcon");

throws exception:

javax.naming.NamingException: Could not dereference object [Root
exception is java.lang.IllegalAccessException: Class
javax.naming.spi.NamingManager can not access a member of class
org.apache.commons.dbcp.datasources.InstanceKeyObjectFactory with
modifiers ""]
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:633)
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)
	at javax.naming.InitialContext.lookup(InitialContext.java:347)
	at org.matrix.ds.RemoteDataSource.main(RemoteDataSource.java:80)
Caused by: java.lang.IllegalAccessException: Class
javax.naming.spi.NamingManager can not access a member of class
org.apache.commons.dbcp.datasources.InstanceKeyObjectFactory with
modifiers ""
	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57)
	at java.lang.Class.newInstance0(Class.java:302)
	at java.lang.Class.newInstance(Class.java:261)
	at javax.naming.spi.NamingManager.getObjectFactoryFromReference(NamingManager.java:146)
	at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:299)
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:622)
	... 3 more
Exception in thread "main" 


Thanks fro some help

Dongsheng Song
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.