[jboss-user] [JNDI/Naming/Network] - Datasource is null

badam571 do-not-reply at jboss.com
Tue Aug 5 10:48:47 EDT 2008

Hi there, I have the following problem, I am trying to connect to database via Jndi but I get datasource is null, here is my codes:
try {
ic = new InitialContext();
ds = (DataSource)ic.lookup("java:/SybaseDS");
conn = ds.getConnection();
catch(NamingException ne)
 logger.debug("Naming Exception thrown: " +ne.getMessage());
catch(Exception e){
logger.error("Other connection Exception thrown: " +e.getMessage());
return conn;

the jndi name on sybase-ds.xml is (I am using Sybase)


the database url:

and the mapping is:


other config files uses java:/SybaseDS as data-source name
here jbobssjaws.xml:


here is standardjbosscmp-jdbc.xml:


is there anything I making wrong

Best Regards

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168780#4168780

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4168780

More information about the jboss-user mailing list