Hey Edd,
1. Change database.jndi.name value to java:comp/env/jdbc/rollerdb The persistence.xml file is in roller-weblogger-business-5.0.3.jar Let me know if that helps. On Wed, Feb 19, 2014 at 11:28 AM, Edd Grant <[email protected]> wrote: > Hi All, > > I'm performing a fresh install of Roller 5.0.3 on Tomcat 7. I want to use a > container managed JNDI Datasource but am struggling to get this working. > > Upon first deployment everything looks fine, Roller correctly detects that > the MySQL Database is empty and creates the tables (I have verified this by > logging in to MySQL and checking that the tables exist afterwards). However > when I click the "complete installation" button I get the following error > in the logs: > > FATAL 2014-02-19 17:14:17,474 JPAPropertiesManagerImpl:initialize - Failed > to initialize runtime configuration properties.Please check that the > database has been upgraded! > <openjpa-2.0.1-r422266:989424 fatal user error> > org.apache.openjpa.persistence.ArgumentException: A JDBC Driver or > DataSource class name must be specified in the ConnectionDriverName > property. > > I notice that Matt Raible also came across this issue and documented it in > his blog: > http://raibledesigns.com/rd/entry/upgraded_to_apache_roller_5however > his fix was to work around the issue by reverting to a non-JNDI > datasource which I'd rather not have to do. > > Here is my configuration: > > I have followed the instructions in section 12.2 of the > roller-install-guide and my roller-custom.properties now looks like this: > > installation.type=auto > database.configurationType=jndi > database.jndi.name=jdbc/rollerdb > > My Tomcat context XML file looks this: > > <Context docBase="../non-appBase-webapps/roller.war"> > <Resource name="jdbc/rollerdb" auth="Container" > type="javax.sql.DataSource" > driverClassName="com.mysql.jdbc.Driver" > > > url="jdbc:mysql://localhost:3306/rollerdb?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8" > username="roller" > password="rollerpass" > maxActive="20" maxIdle="3" removeAbandoned="true" maxWait="3000" /> > > </Context> > > I don't know if it's a red-herring or not but I started looking for a > persistence.xml in order to set OpenJPA's logging to trace so I could debug > this. On doing this I discovered that it doesn't exist in the tomcat war. > > I have just discovered some persistence related initialisation code in > JPAPersistenceStrategy and JPAPropertiesManagerImpl so will have a look at > those but woudl be grateful for any pointers in the meantime. > > Cheers, > > Edd > > -- > Web: http://www.eddgrant.com > Email: [email protected] > Mobile: +44 (0) 7861 394 543 > -- Thanks, Osagie Uwaifo
