I get "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".
You do not have a jndi.properties file in your classpath, or your jndi.properties lacks a java.naming.factory.initial property.
I am trying to specify a DataSource with org.osjava.jndi.datasource, but it no longer seems to work.
Simple-JNDI 0.9 removed this feature [deprecated in 0.8] in favour of the conversion system in which you have type=javax.sql.DataSource. It still uses a simple-jndi implementation of a DataSource as this is an interface.
I get an SQLException of 'No suitable driver'.
Your driver's jar is not in the classpath.
ClassNotFoundException: org.osjava.sj.SimpleContextFactory or ClassNotFoundException: org.osjava.sj.memory.MemoryContextFactory.
You don't have the simple-jndi jar in the classpath.
How do I use xml instead of .properties?
Each delimited option in the .properties simply becomes a tag in the xml. The last element may be a tag or may be an attribute.