Hello,
I would like to load an embedded h2 database dynamically from a singleton startup EJB. The location of the h2 database (lets say: ~/temp) is provided via a JNDI binding.
I have it working in an unmanaged environment (i.e. POJO) and I have tried the same strategy in the EJB in JBoss 7.2.0.Final:
However, this method fails when creating the EntityManagerFactory with a "java.sql.SQLException: No suitable driver found for jdbc:h2:~/temp". The full exception can be found in the attached dynamic-h2-database-load-jboss.log excerpt in which I have renamed company specific packages/classes by XXX.
Despite the by JBoss provided h2database module on the classpath, it still cannot find a suitable driver. Any idea what else I can try or is there a better approach to dynamically load a h2 database from an EJB?
Thanks in advance,
Barry