Re: Roller 5 + Tomcat 7 + JNDI Datasource

Jürgen Weber <[email protected]>
Newsgroups gmane.comp.java.roller.user
Message-ID <CAFNKvH3wDaTioO+xUEdnZOFZD+UsTsU+JQFxnxdtCmDDrjjwYQ@mail.gmail.com>
Dave,

thank you, I had overlooked this, there should be a link to this in
the start of 7 Tomcat chapter. (BTW, the line numbers in toc of
roller-install-guide.pdf seem to be wrong)
But anyway, the database configuration is the same as I had taken from
Tomcat 7's docs.
(12.2 deploys a context.xml with a war, this will not work
https://issues.apache.org/jira/browse/ROL-1948)

I added the parameters from 12.2 to roller-custom.properties but this
does not change the result:

INFO  2012-11-16 13:33:44,192 DatabaseProvider:successMessage -
SUCCESS: Got parameters. Using configuration type JNDI_NAME
INFO  2012-11-16 13:33:44,195 DatabaseProvider:successMessage - --
Using JNDI datasource name: java:comp/env/jdbc/rollerdb
INFO  2012-11-16 13:33:44,195 DatabaseProvider:successMessage -
SUCCESS: located JNDI DataSource [java:comp/env/jdbc/rollerdb]
INFO  2012-11-16 13:33:45,071 WebloggerFactory:bootstrap -
Bootstrapping Roller Weblogger business tier
INFO  2012-11-16 13:33:45,072 WebloggerFactory:bootstrap - Weblogger
Provider = org.apache.roller.weblogger.business.GuiceWebloggerProvider
INFO  2012-11-16 13:33:45,073 DatabaseProvider:successMessage -
SUCCESS: Got parameters. Using configuration type JNDI_NAME
INFO  2012-11-16 13:33:45,074 DatabaseProvider:successMessage - --
Using JNDI datasource name: java:comp/env/jdbc/rollerdb
INFO  2012-11-16 13:33:45,074 DatabaseProvider:successMessage -
SUCCESS: located JNDI DataSource [java:comp/env/jdbc/rollerdb]
INFO  2012-11-16 13:33:45,078 JPAPersistenceStrategy:<init> -
hibernate.transaction.manager_lookup_class:
org.hibernate.transaction.JBossTransactionManagerLookup
INFO  2012-11-16 13:33:45,078 JPAPersistenceStrategy:<init> -
hibernate.transaction.factory_class:
org.hibernate.transaction.JTATransactionFactory
INFO  2012-11-16 13:33:45,078 JPAPersistenceStrategy:<init> -
openjpa.Log: commons
INFO  2012-11-16 13:33:45,291 IndexManagerImpl:<init> - search enabled: true
INFO  2012-11-16 13:33:45,291 IndexManagerImpl:<init> - index dir:
/home/wikitest/roller_data/search-index
INFO  2012-11-16 13:33:45,297 ReferrerQueueManagerImpl:<init> -
Instantiating Referrer Queue Manager
INFO  2012-11-16 13:33:45,298 ReferrerQueueManagerImpl:<init> -
Asynchronous referrer processing = false
INFO  2012-11-16 13:33:45,299 ThreadManagerImpl:<init> - Instantiating
Thread Manager
INFO  2012-11-16 13:33:45,303 WebloggerFactory:bootstrap - Roller
Weblogger business tier successfully bootstrapped
INFO  2012-11-16 13:33:45,303 WebloggerFactory:bootstrap -    Version: 5.0.1
INFO  2012-11-16 13:33:45,303 WebloggerFactory:bootstrap -    Revision: r1338948
INFO  2012-11-16 13:33:45,303 WebloggerImpl:initialize - Initializing
Roller Weblogger business tier
FATAL 2012-11-16 13:33:45,363 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.
        at org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:76)
        at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:839)
        at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:597)
        at org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration(MappingRepository.java:1489)
        at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:507)
        at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:432)
        at org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:104)
        at org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate(MetaDataRepositoryValue.java:68)
        at org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:83)
        at org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:939)
        at org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:930)
        at org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:639)
        at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:206)
        at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
        at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
        at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
        at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
        at org.apache.roller.weblogger.business.jpa.JPAPersistenceStrategy.getThreadLocalEntityManager(JPAPersistenceStrategy.java:238)
        at org.apache.roller.weblogger.business.jpa.JPAPersistenceStrategy.getEntityManager(JPAPersistenceStrategy.java:225)
        at org.apache.roller.weblogger.business.jpa.JPAPersistenceStrategy.getNamedQuery(JPAPersistenceStrategy.java:258)
        at org.apache.roller.weblogger.business.jpa.JPAPropertiesManagerImpl.getProperties(JPAPropertiesManagerImpl.java:117)
        at org.apache.roller.weblogger.business.jpa.JPAPropertiesManagerImpl.initialize(JPAPropertiesManagerImpl.java:77)
        at org.apache.roller.weblogger.business.WebloggerImpl.initialize(WebloggerImpl.java:338)
        at org.apache.roller.weblogger.ui.core.RollerContext.contextInitialized(RollerContext.java:161)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)


2012/11/15 Dave <[email protected]>:
> This is covered in the Roller Install Guide section 12.2. Please check the
> example configs there and let us know if that does not solve this problem.
>
> Thanks,
> Dave
>
>
> On Thu, Nov 15, 2012 at 7:36 AM, Jürgen Weber <[email protected]> wrote:
>
>> Hi,
>>
>> I'd like to set up Roller 5.0.1 to use a Tomcat 7 JNDI Datasource
>> (this is not in roller-install-guide.pdf)
>>
>> Looks like Roller has accepted the datasource:
>>
>> INFO  2012-11-15 15:19:02,555 DatabaseProvider:successMessage -
>> SUCCESS: located JNDI DataSource [java:comp/env/jdbc/rollerdb]
>>
>> but then there is
>>
>> FATAL 2012-11-15 15:33:05,155 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.
>>         at
>> org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:76)
>>
>> How and where is this configurable?
>>
>> Why does the JPA driver need to know the class name? this should be
>> only of concern to the datasource ..
>>
>> Thanks,
>> Juergen
>>
>
>
>
> --
> Dave M. Johnson
> Apache Roller PMC Chair
> http://rollerweblogger.org/roller
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.