roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus <m.blackh...@upcmail.nl>
Subject Re: Error Upgrade Roller 4.0 to 5.0 with Oracle DB
Date Sun, 15 Jan 2012 12:58:57 GMT
On 12-1-2012 21:14, Daniel Ruan wrote:
> A follow-up question.  After I got it to work with the openjpa, I commented
> out database.jndi.name then Roller refused to start.
>
> I am just curious why Roller still requires a JDNI data source now that the
> JPA connection is set.  Is it because the connection check is hard coded in
> the startup code?
>
> Regards,
> Daniel
>
> On Wed, Jan 11, 2012 at 10:53 PM, Daniel Ruan<danielruan@gmail.com>  wrote:
>
>> Hi Folks,
>>
>> I had Roller 4.0.1 with Tomcat 6 and Oracle 10g XE as the backend.  I
>> followed the upgrade steps in the install guide, and when I first started
>> Tomcat, I got the following error in .log file:
>>
>> ... ...
>> INFO  2012-01-11 22:06:25,820 WebloggerImpl:initialize - Initializing
>> Roller Weblogger business tier
>> FATAL 2012-01-11 22:06:26,120 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:3934)
>>   at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
>> at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>>   at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
>>   at
>> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
>> at
>> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
>>   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
>> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
>>   at
>> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
>> at
>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>> at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
>>   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>>   at
>> org.apache.catalina.core.StandardService.start(StandardService.java:516)
>> at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>>   at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>   at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>   at java.lang.reflect.Method.invoke(Method.java:597)
>> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>>   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>> INFO  2012-01-11 22:26:27,281 DatabaseProvider:successMessage - SUCCESS:
>> Got parameters. Using configuration type JNDI_NAME
>> INFO  2012-01-11 22:26:27,287 DatabaseProvider:successMessage - -- Using
>> JNDI datasource name: java:comp/env/jdbc/rollerdb
>> INFO  2012-01-11 22:26:27,290 DatabaseProvider:successMessage - SUCCESS:
>> located JNDI DataSource [java:comp/env/jdbc/rollerdb]
>> ... ...
>>
>> After reading OpenJPA's online documentation, I went to add the following
>> in roller-customer.properties:
>>
>> openjpa.ConnectionDriverName=oracle.jdbc.OracleDriver
>> openjpa.ConnectionURL=jdbc:oracle:thin:@localhost:1521:XE
>> openjpa.ConnectionUserName=rollerusername
>> openjpa.ConnectionPassword=****
>>
>> On my next try, the error went away.
>>
>> I am just curious because adding those openjpa properties is not
>> documented  anywhere in Roller.  Did I miss anything?
>>
>> Thanks,
>> Daniel
>>
>>
>>
>
>
> -----
> Geen virus gevonden in dit bericht.
> Gecontroleerd door AVG - www.avg.com
> Versie: 2012.0.1901 / Virusdatabase: 2109/4738 - datum van uitgifte: 01/12/12
Hi Daniel,
I had another look at this and I have seen that if  you define your 
context datasource prefixed with the jndi namespace then it works.
ie use java:comp/env/jdbc/rollerdb instead of just jdbc/rollerdb. That 
will then be all you need,

cheers
Marcus

Mime
View raw message