Hello,

Are there any jndi.properties file examples available? 

For example code 
(http://www.h2database.com/javadoc/org/h2/jdbcx/JdbcDataSource.htm) doesn' 
work.

 import org.h2.jdbcx.JdbcDataSource;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 JdbcDataSource ds = new JdbcDataSource();
 ds.setURL("jdbc:h2:˜/test");
 ds.setUser("sa");
 ds.setPassword("sa");
 Context ctx = new InitialContext();
 ctx.bind("jdbc/dsName", ds);



line: ctx.bind(...) throws exception: 

javax.naming.NoInitialContextException: Need to specify class name in 
environment or system property, or as an applet parameter, or in an 
application resource file:  java.naming.factory.initial


Thanks,

Patrick




-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to