These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate and commons-deamon procrun problem, help!
PostPosted: Tue Mar 04, 2008 2:56 pm 
Newbie

Joined: Mon Jan 28, 2008 1:50 pm
Posts: 9
Location: EMC
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.