Hi guys, osagie - addingjava:comp/env to the datasource jndi name in roller-custom.properties fixed the issue, thanks for pointing that out.
Glen, thanks for the pointer to the latest trunk doc, I thought it might be worth noting that this document doesn't mention putting java:comp/env in the Datasource JNDI name in roller-custom.properties. I wonder if it might be worth updating it to reflect this if it stops people running in to the same issue as I have done here? Thanks for both your replies, I'm now off to play with Roller 5 for the first time! :-) Edd On 20 February 2014 03:09, Glen Mazza <glen.ma...@gmail.com> wrote: > Hi Edd, I would look in Chapter 6 of the *latest* (trunk, not 5.0.3) > Roller install guide http://svn.apache.org/viewvc/roller/trunk/docs/ It > has a sample roller-custom.properties and context.xml file you might be > able to leverage. > > Regards, > Glen > > > On 02/19/2014 07:17 PM, osagie uwaifo wrote: > >> 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 <e...@eddgrant.com> 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: e...@eddgrant.com >>> Mobile: +44 (0) 7861 394 543 >>> >>> >> >> > -- Mobile: +44 (0) 7861 394 543 Web: http://www.eddgrant.com