roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harihara Vinayakaram" <hvr...@gmail.com>
Subject Error creating entity manager -- Roller on Postgres
Date Mon, 10 Mar 2008 15:30:58 GMT
Hi
   I searched the archives and could not find an entry for the above. My
apologies if this has already been answered .

   I am trying to deploy roller 4. on jboss-4.2.1 using Postgres 8.2  . I
managed to do the following :
    a) Get jboss to load the roller-custom.properties  which I confirmed
from the following logs

The roller.log file says :
INFO  2008-03-10 20:28:44,868 WebloggerFactory:bootstrap - Weblogger
Provider = org.apache.roller.weblogger.business.GuiceWebloggerProvider
INFO  2008-03-10 20:28:44,877 DatabaseProvider:successMessage - SUCCESS: Got
parameters. Using configuration type JDBC_PROPERTIES
INFO  2008-03-10 20:28:44,877 DatabaseProvider:successMessage - -- Using
JDBC driver class: org.postgresql.Driver
INFO  2008-03-10 20:28:44,878 DatabaseProvider:successMessage - -- Using
JDBC connection URL: jdbc:postgresql://192.168.1.12:5432/rollerdatabase
INFO  2008-03-10 20:28:44,878 DatabaseProvider:successMessage - -- Using
JDBC username: postgres
INFO  2008-03-10 20:28:44,878 DatabaseProvider:successMessage - -- Using
JDBC password: [hidden]
INFO  2008-03-10 20:28:44,878 DatabaseProvider:successMessage - SUCCESS:
loaded JDBC driver class [org.postgresql.Driver]

But immesdiately I get an error that says  :

ERROR 2008-03-10 20:28:44,895 JPAPersistenceStrategy:<init> - ERROR:
creating entity manager
javax.persistence.PersistenceException: Provider error. Provider:
org.hibernate.ejb.HibernatePersistence
        at javax.persistence.Persistence.createFactory(Persistence.java:175)
        at javax.persistence.Persistence.createEntityManagerFactory(
Persistence.java:111)
        at org.apache.roller.weblogger.business.jpa.JPAPersistenceStrategy
.<init>(JPAPersistenceStrategy.java:123)

I searched the JBOSS forums for the above and found this link :
JBoss.com - Forums - Problem creating
EntityManagerFactory<http://jboss.com/?module=bb&op=viewtopic&t=70288>(
http://jboss.com/?module=bb&op=viewtopic&t=70288 ) which indicates that this
API cannot be used but a different look up needs to be done.
""
Yes, this API doesn't work inside JBoss AS. Use the J2EE way of doing
things: aka @PersistenceContext or you can look up the EM/EMF in JNDI:

java:/EntityManagers/your-unit-name
java:/EntityManagerFactories/your-unit-name
""

Is this the only way to do this or is there a different solution .




Thanks for the help
Regards
Hari

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message