Hi,
I am trying to run an application as an NT service with Procrun (tomcat5). The application runs just fine in Eclipse and as a standalone app, but when I put it into procrun as a service I get null pointer error from Persistence.findAllProviders(Persistence.java:65).
Here is the stack trace:
java.lang.NullPointerException
at javax.persistence.Persistence.findAllProviders(Persistence.java:65)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:48)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
at securitylogger.SecurityLoggerService.<init>(SecurityLoggerService.java:109)
at securitylogger.TestSecurityLogger.initService(TestSecurityLogger.java:86)
at securitylogger.TestSecurityLogger.main(TestSecurityLogger.java:120)
Here is the persistence.xml:
<?xml version="1.0" encoding="UTF-8" ?>
- <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/ ... ce_1_0.xsd">
- <persistence-unit name="imf-securitylog">
- <properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect" />
<property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="hibernate.connection.username" value="" />
<property name="hibernate.connection.password" value="" />
<property name="hibernate.connection.url" value="jdbc:derby:C:\DerbyDatabases\SecurityLog;create=true" />
<property name="hibernate.max_fetch_depth" value="3" />
<property name="hibernate.connection.pool_size" value="4" />
</properties>
</persistence-unit>
</persistence>
Any help or pointers would be greatly appreciated!!!
Thanks,
Shannon