You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Anil Gangolli <an...@busybuddha.org> on 2006/01/02 17:08:43 UTC

Re: roller 2.0 initialization problem

This one looks like a problem with the version of the mysql jdbc driver 
you are using.  Some versions of the drivers have problems with certain 
versions of the server, particularly with server-side prepared 
statements.  Try using the 3.0.16 Connector/J drivers; another 
workaround involves disabling server-prepared statements.

See also:

http://www.rollerweblogger.org/wiki/Wiki.jsp?page=InstallationFAQs#ref-InstallationFAQs-13

--a

Bert Heymans wrote:

> Hi -
>
> I installed Roller 2.0 like the installation guide describes. After 
> restarting Tomcat I noticed there was no registration link on the 
> roller page. I checked the mailinglist archives and restarted Tomcat a 
> few times like Anil Gangolli suggested for someone experiencing a 
> similar problem.
>
> The dstest.jsp tells me "SUCCESS: Got datasource and connection, class 
> is org.apache.commons.dbcp.BasicDataSource" but nothing gets written 
> to the db at startup, all tables are empty (The errors I get in the 
> roller.log file are at the bottom of this mail) I googled on the 
> exception messages and I wish I could solve this by myself but I'm not 
> familiar with Hibernate. Any help or a direction in wich I could 
> search would be greatly appreciated.
>
> These are my system details:
> - Ubuntu Breezy
> - Tomcat 5.0.28
> - Sun java version 1.5.0_06
> - MySQL Distrib 4.1.12, for pc-linux-gnu on i486
>
> If can provide any other information that can help, just say so, these 
> are the errormessage snippets from the roller.log file:
>
> ERROR 2005-12-26 16:14:11,328 JDBCExceptionReporter:logExceptions - 
> Duplicate entry '?' for key 1
> ERROR 2005-12-26 16:14:11,336 
> AbstractFlushingEventListener:performExecutions - Could not 
> synchronize database state with session
> org.hibernate.exception.ConstraintViolationException: could not 
> insert: [org.roller.pojos.RollerPropertyData]
>       at 
> org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:74) 
>
>       at 
> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) 
>
>       at 
> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869) 
>
>       at 
> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200) 
>
>       at 
> org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46) 
>
>       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
>       at 
> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
>       at 
> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
>       at 
> org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274) 
>
>       at 
> org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) 
>
>       at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
>       at 
> org.roller.business.hibernate.HibernateStrategy.commit(HibernateStrategy.java:428) 
>
>       at 
> org.roller.business.hibernate.HibernateRollerImpl.commit(HibernateRollerImpl.java:115) 
>
>       at 
> org.roller.presentation.RollerContext.contextInitialized(RollerContext.java:192) 
>
> ...
> ...
> Caused by: java.sql.BatchUpdateException: Duplicate entry '?' for key 1
>       at 
> com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647) 
>
>       at 
> org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) 
>
>       at 
> org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57) 
>
>       at 
> org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:33)
>       at 
> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1853) 
>
>       ... 26 more
> FATAL 2005-12-26 16:14:11,349 RollerContext:contextInitialized - 
> RollerContext initialization failed
> org.roller.RollerException
>       at 
> org.roller.business.hibernate.HibernateStrategy.commit(HibernateStrategy.java:440) 
>
>       at 
> org.roller.business.hibernate.HibernateRollerImpl.commit(HibernateRollerImpl.java:115) 
>
>       at 
> org.roller.presentation.RollerContext.contextInitialized(RollerContext.java:192) 
>
>       at 
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) 
>
>       at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
>       at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>       at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
>       at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>       at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
>       at 
> org.apache.catalina.core.StandardService.start(StandardService.java:480)
>       at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
>       at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
>       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:585)
>       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
> --- ROOT CAUSE ---
> org.hibernate.exception.ConstraintViolationException: could not 
> insert: [org.roller.pojos.RollerPropertyData]
>       at 
> org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:74) 
>
>       at 
> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) 
>
>       at 
> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869) 
>
> ...
> ...
> Caused by: java.sql.BatchUpdateException: Duplicate entry '?' for key 1
>       at 
> com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647) 
>
>       at 
> org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) 
>
>       at 
> org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57) 
>
> ...
> ...
> ...
> ...
> ...
> WARN  2005-12-26 16:14:35,477 RollerRuntimeConfig:getProperty - 
> Trouble accessing property: users.registration.enabled
> java.lang.NullPointerException
>       at 
> org.roller.config.RollerRuntimeConfig.getProperty(RollerRuntimeConfig.java:51) 
>
> ...
> WARN  2005-12-26 16:14:38,286 RollerRuntimeConfig:getProperty - 
> Trouble accessing property: site.name
> java.lang.NullPointerException
>        at 
> org.roller.config.RollerRuntimeConfig.getProperty(RollerRuntimeConfig.java:51) 
>
>        at 
> org.apache.jsp.theme.tiles_002dfrontpage_jsp._jspService(tiles_002dfrontpage_jsp.java:141) 
>
> ...
> WARN  2005-12-26 16:14:38,294 RollerRuntimeConfig:getProperty - 
> Trouble accessing property: site.description
> java.lang.NullPointerException
>        at 
> org.roller.config.RollerRuntimeConfig.getProperty(RollerRuntimeConfig.java:51) 
>
>        at 
> org.apache.jsp.theme.tiles_002dfrontpage_jsp._jspService(tiles_002dfrontpage_jsp.java:144) 
>
> ...
>
> ... etc etc for every property from the rollerconfig table.
>
>
> Thank you very much for taking a look at this.
>
> - Bert
>
>


Re: roller 2.0 initialization problem

Posted by Bert Heymans <be...@heymans.org>.
Anil -

Thanks a lot, greate product!

Starting over with the 3.0.17 Connector/J jdbc driver solved the 
problem. It certainly brought a smile to my face when I saw the 
"Register" link.

Cheers, best wishes for the new year :o)

- Bert

Anil Gangolli wrote:

>
> Judging from the messages, the bad drivers may also have resulted in 
> actually inserting at least one property with the key '?' literally.  
> So once your sub in the 3.0.x drivers, you probably want to start with 
> a freshly created database.   --a.
>
> Bert Heymans wrote:
>
>> Anil, thanks!
>>
>> I was trying to set up Roller with 3.1.12 Connector/J. On the mysql 
>> website I found version 3.0.17, couldn't find the 3.0.16 version 
>> anymore but they should have the same effect. I'll try and let you 
>> know if it does the trick.
>>
>> - Bert
>>
>> Anil Gangolli wrote:
>>
>>>
>>> This one looks like a problem with the version of the mysql jdbc 
>>> driver you are using.  Some versions of the drivers have problems 
>>> with certain versions of the server, particularly with server-side 
>>> prepared statements.  Try using the 3.0.16 Connector/J drivers; 
>>> another workaround involves disabling server-prepared statements.
>>>
>>> See also:
>>>
>>> http://www.rollerweblogger.org/wiki/Wiki.jsp?page=InstallationFAQs#ref-InstallationFAQs-13 
>>>
>>>
>>> --a
>>>
>>> Bert Heymans wrote:
>>>
>>>> Hi -
>>>>
>>>> I installed Roller 2.0 like the installation guide describes. After 
>>>> restarting Tomcat I noticed there was no registration link on the 
>>>> roller page. I checked the mailinglist archives and restarted 
>>>> Tomcat a few times like Anil Gangolli suggested for someone 
>>>> experiencing a similar problem.
>>>>
>>>> The dstest.jsp tells me "SUCCESS: Got datasource and connection, 
>>>> class is org.apache.commons.dbcp.BasicDataSource" but nothing gets 
>>>> written to the db at startup, all tables are empty (The errors I 
>>>> get in the roller.log file are at the bottom of this mail) I 
>>>> googled on the exception messages and I wish I could solve this by 
>>>> myself but I'm not familiar with Hibernate. Any help or a direction 
>>>> in wich I could search would be greatly appreciated.
>>>>
>>>> These are my system details:
>>>> - Ubuntu Breezy
>>>> - Tomcat 5.0.28
>>>> - Sun java version 1.5.0_06
>>>> - MySQL Distrib 4.1.12, for pc-linux-gnu on i486
>>>>
>>>> If can provide any other information that can help, just say so, 
>>>> these are the errormessage snippets from the roller.log file:
>>>>
>>>> ERROR 2005-12-26 16:14:11,328 JDBCExceptionReporter:logExceptions - 
>>>> Duplicate entry '?' for key 1
>>>> ERROR 2005-12-26 16:14:11,336 
>>>> AbstractFlushingEventListener:performExecutions - Could not 
>>>> synchronize database state with session
>>>> org.hibernate.exception.ConstraintViolationException: could not 
>>>> insert: [org.roller.pojos.RollerPropertyData]
>>>>       at 
>>>> org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:74) 
>>>>
>>>>       at 
>>>> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) 
>>>>
>>>>       at 
>>>> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869) 
>>>>
>>>>       at 
>>>> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200) 
>>>>
>>>>       at 
>>>> org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46) 
>>>>
>>>>       at 
>>>> org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
>>>>       at 
>>>> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
>>>>       at 
>>>> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
>>>>       at 
>>>> org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274) 
>>>>
>>>>       at 
>>>> org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) 
>>>>
>>>>       at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
>>>>       at 
>>>> org.roller.business.hibernate.HibernateStrategy.commit(HibernateStrategy.java:428) 
>>>>
>>>>       at 
>>>> org.roller.business.hibernate.HibernateRollerImpl.commit(HibernateRollerImpl.java:115) 
>>>>
>>>>       at 
>>>> org.roller.presentation.RollerContext.contextInitialized(RollerContext.java:192) 
>>>>
>>>> ...
>>>> ...
>>>> Caused by: java.sql.BatchUpdateException: Duplicate entry '?' for 
>>>> key 1
>>>>       at 
>>>> com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647) 
>>>>
>>>>       at 
>>>> org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) 
>>>>
>>>>       at 
>>>> org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57) 
>>>>
>>>>       at 
>>>> org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:33)
>>>>       at 
>>>> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1853) 
>>>>
>>>>       ... 26 more
>>>> FATAL 2005-12-26 16:14:11,349 RollerContext:contextInitialized - 
>>>> RollerContext initialization failed
>>>> org.roller.RollerException
>>>>       at 
>>>> org.roller.business.hibernate.HibernateStrategy.commit(HibernateStrategy.java:440) 
>>>>
>>>>       at 
>>>> org.roller.business.hibernate.HibernateRollerImpl.commit(HibernateRollerImpl.java:115) 
>>>>
>>>>       at 
>>>> org.roller.presentation.RollerContext.contextInitialized(RollerContext.java:192) 
>>>>
>>>>       at 
>>>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) 
>>>>
>>>>       at 
>>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4343) 
>>>>
>>>>       at 
>>>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>>>>       at 
>>>> org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
>>>>       at 
>>>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>>>>       at 
>>>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
>>>>       at 
>>>> org.apache.catalina.core.StandardService.start(StandardService.java:480) 
>>>>
>>>>       at 
>>>> org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) 
>>>>
>>>>       at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
>>>>       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:585)
>>>>       at 
>>>> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
>>>>       at 
>>>> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
>>>> --- ROOT CAUSE ---
>>>> org.hibernate.exception.ConstraintViolationException: could not 
>>>> insert: [org.roller.pojos.RollerPropertyData]
>>>>       at 
>>>> org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:74) 
>>>>
>>>>       at 
>>>> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) 
>>>>
>>>>       at 
>>>> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869) 
>>>>
>>>> ...
>>>> ...
>>>> Caused by: java.sql.BatchUpdateException: Duplicate entry '?' for 
>>>> key 1
>>>>       at 
>>>> com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647) 
>>>>
>>>>       at 
>>>> org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) 
>>>>
>>>>       at 
>>>> org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57) 
>>>>
>>>> ...
>>>> ...
>>>> ...
>>>> ...
>>>> ...
>>>> WARN  2005-12-26 16:14:35,477 RollerRuntimeConfig:getProperty - 
>>>> Trouble accessing property: users.registration.enabled
>>>> java.lang.NullPointerException
>>>>       at 
>>>> org.roller.config.RollerRuntimeConfig.getProperty(RollerRuntimeConfig.java:51) 
>>>>
>>>> ...
>>>> WARN  2005-12-26 16:14:38,286 RollerRuntimeConfig:getProperty - 
>>>> Trouble accessing property: site.name
>>>> java.lang.NullPointerException
>>>>        at 
>>>> org.roller.config.RollerRuntimeConfig.getProperty(RollerRuntimeConfig.java:51) 
>>>>
>>>>        at 
>>>> org.apache.jsp.theme.tiles_002dfrontpage_jsp._jspService(tiles_002dfrontpage_jsp.java:141) 
>>>>
>>>> ...
>>>> WARN  2005-12-26 16:14:38,294 RollerRuntimeConfig:getProperty - 
>>>> Trouble accessing property: site.description
>>>> java.lang.NullPointerException
>>>>        at 
>>>> org.roller.config.RollerRuntimeConfig.getProperty(RollerRuntimeConfig.java:51) 
>>>>
>>>>        at 
>>>> org.apache.jsp.theme.tiles_002dfrontpage_jsp._jspService(tiles_002dfrontpage_jsp.java:144) 
>>>>
>>>> ...
>>>>
>>>> ... etc etc for every property from the rollerconfig table.
>>>>
>>>>
>>>> Thank you very much for taking a look at this.
>>>>
>>>> - Bert
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> !DSPAM:43b96457314626946214340!



Re: roller 2.0 initialization problem

Posted by Anil Gangolli <an...@busybuddha.org>.
Judging from the messages, the bad drivers may also have resulted in 
actually inserting at least one property with the key '?' literally.  So 
once your sub in the 3.0.x drivers, you probably want to start with a 
freshly created database.   --a.

Bert Heymans wrote:

> Anil, thanks!
>
> I was trying to set up Roller with 3.1.12 Connector/J. On the mysql 
> website I found version 3.0.17, couldn't find the 3.0.16 version 
> anymore but they should have the same effect. I'll try and let you 
> know if it does the trick.
>
> - Bert
>
> Anil Gangolli wrote:
>
>>
>> This one looks like a problem with the version of the mysql jdbc 
>> driver you are using.  Some versions of the drivers have problems 
>> with certain versions of the server, particularly with server-side 
>> prepared statements.  Try using the 3.0.16 Connector/J drivers; 
>> another workaround involves disabling server-prepared statements.
>>
>> See also:
>>
>> http://www.rollerweblogger.org/wiki/Wiki.jsp?page=InstallationFAQs#ref-InstallationFAQs-13 
>>
>>
>> --a
>>
>> Bert Heymans wrote:
>>
>>> Hi -
>>>
>>> I installed Roller 2.0 like the installation guide describes. After 
>>> restarting Tomcat I noticed there was no registration link on the 
>>> roller page. I checked the mailinglist archives and restarted Tomcat 
>>> a few times like Anil Gangolli suggested for someone experiencing a 
>>> similar problem.
>>>
>>> The dstest.jsp tells me "SUCCESS: Got datasource and connection, 
>>> class is org.apache.commons.dbcp.BasicDataSource" but nothing gets 
>>> written to the db at startup, all tables are empty (The errors I get 
>>> in the roller.log file are at the bottom of this mail) I googled on 
>>> the exception messages and I wish I could solve this by myself but 
>>> I'm not familiar with Hibernate. Any help or a direction in wich I 
>>> could search would be greatly appreciated.
>>>
>>> These are my system details:
>>> - Ubuntu Breezy
>>> - Tomcat 5.0.28
>>> - Sun java version 1.5.0_06
>>> - MySQL Distrib 4.1.12, for pc-linux-gnu on i486
>>>
>>> If can provide any other information that can help, just say so, 
>>> these are the errormessage snippets from the roller.log file:
>>>
>>> ERROR 2005-12-26 16:14:11,328 JDBCExceptionReporter:logExceptions - 
>>> Duplicate entry '?' for key 1
>>> ERROR 2005-12-26 16:14:11,336 
>>> AbstractFlushingEventListener:performExecutions - Could not 
>>> synchronize database state with session
>>> org.hibernate.exception.ConstraintViolationException: could not 
>>> insert: [org.roller.pojos.RollerPropertyData]
>>>       at 
>>> org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:74) 
>>>
>>>       at 
>>> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) 
>>>
>>>       at 
>>> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869) 
>>>
>>>       at 
>>> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200) 
>>>
>>>       at 
>>> org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46) 
>>>
>>>       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
>>>       at 
>>> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
>>>       at 
>>> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
>>>       at 
>>> org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274) 
>>>
>>>       at 
>>> org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) 
>>>
>>>       at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
>>>       at 
>>> org.roller.business.hibernate.HibernateStrategy.commit(HibernateStrategy.java:428) 
>>>
>>>       at 
>>> org.roller.business.hibernate.HibernateRollerImpl.commit(HibernateRollerImpl.java:115) 
>>>
>>>       at 
>>> org.roller.presentation.RollerContext.contextInitialized(RollerContext.java:192) 
>>>
>>> ...
>>> ...
>>> Caused by: java.sql.BatchUpdateException: Duplicate entry '?' for key 1
>>>       at 
>>> com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647) 
>>>
>>>       at 
>>> org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) 
>>>
>>>       at 
>>> org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57) 
>>>
>>>       at 
>>> org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:33)
>>>       at 
>>> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1853) 
>>>
>>>       ... 26 more
>>> FATAL 2005-12-26 16:14:11,349 RollerContext:contextInitialized - 
>>> RollerContext initialization failed
>>> org.roller.RollerException
>>>       at 
>>> org.roller.business.hibernate.HibernateStrategy.commit(HibernateStrategy.java:440) 
>>>
>>>       at 
>>> org.roller.business.hibernate.HibernateRollerImpl.commit(HibernateRollerImpl.java:115) 
>>>
>>>       at 
>>> org.roller.presentation.RollerContext.contextInitialized(RollerContext.java:192) 
>>>
>>>       at 
>>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) 
>>>
>>>       at 
>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4343) 
>>>
>>>       at 
>>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>>>       at 
>>> org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
>>>       at 
>>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>>>       at 
>>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
>>>       at 
>>> org.apache.catalina.core.StandardService.start(StandardService.java:480) 
>>>
>>>       at 
>>> org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
>>>       at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
>>>       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:585)
>>>       at 
>>> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
>>>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
>>> --- ROOT CAUSE ---
>>> org.hibernate.exception.ConstraintViolationException: could not 
>>> insert: [org.roller.pojos.RollerPropertyData]
>>>       at 
>>> org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:74) 
>>>
>>>       at 
>>> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) 
>>>
>>>       at 
>>> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869) 
>>>
>>> ...
>>> ...
>>> Caused by: java.sql.BatchUpdateException: Duplicate entry '?' for key 1
>>>       at 
>>> com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647) 
>>>
>>>       at 
>>> org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) 
>>>
>>>       at 
>>> org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57) 
>>>
>>> ...
>>> ...
>>> ...
>>> ...
>>> ...
>>> WARN  2005-12-26 16:14:35,477 RollerRuntimeConfig:getProperty - 
>>> Trouble accessing property: users.registration.enabled
>>> java.lang.NullPointerException
>>>       at 
>>> org.roller.config.RollerRuntimeConfig.getProperty(RollerRuntimeConfig.java:51) 
>>>
>>> ...
>>> WARN  2005-12-26 16:14:38,286 RollerRuntimeConfig:getProperty - 
>>> Trouble accessing property: site.name
>>> java.lang.NullPointerException
>>>        at 
>>> org.roller.config.RollerRuntimeConfig.getProperty(RollerRuntimeConfig.java:51) 
>>>
>>>        at 
>>> org.apache.jsp.theme.tiles_002dfrontpage_jsp._jspService(tiles_002dfrontpage_jsp.java:141) 
>>>
>>> ...
>>> WARN  2005-12-26 16:14:38,294 RollerRuntimeConfig:getProperty - 
>>> Trouble accessing property: site.description
>>> java.lang.NullPointerException
>>>        at 
>>> org.roller.config.RollerRuntimeConfig.getProperty(RollerRuntimeConfig.java:51) 
>>>
>>>        at 
>>> org.apache.jsp.theme.tiles_002dfrontpage_jsp._jspService(tiles_002dfrontpage_jsp.java:144) 
>>>
>>> ...
>>>
>>> ... etc etc for every property from the rollerconfig table.
>>>
>>>
>>> Thank you very much for taking a look at this.
>>>
>>> - Bert
>>>
>>>
>>
>>
>> !DSPAM:43b95008309632128190681!
>
>
>
>


Re: roller 2.0 initialization problem

Posted by Bert Heymans <be...@heymans.org>.
Anil, thanks!

I was trying to set up Roller with 3.1.12 Connector/J. On the mysql 
website I found version 3.0.17, couldn't find the 3.0.16 version anymore 
but they should have the same effect. I'll try and let you know if it 
does the trick.

- Bert

Anil Gangolli wrote:

>
> This one looks like a problem with the version of the mysql jdbc 
> driver you are using.  Some versions of the drivers have problems with 
> certain versions of the server, particularly with server-side prepared 
> statements.  Try using the 3.0.16 Connector/J drivers; another 
> workaround involves disabling server-prepared statements.
>
> See also:
>
> http://www.rollerweblogger.org/wiki/Wiki.jsp?page=InstallationFAQs#ref-InstallationFAQs-13 
>
>
> --a
>
> Bert Heymans wrote:
>
>> Hi -
>>
>> I installed Roller 2.0 like the installation guide describes. After 
>> restarting Tomcat I noticed there was no registration link on the 
>> roller page. I checked the mailinglist archives and restarted Tomcat 
>> a few times like Anil Gangolli suggested for someone experiencing a 
>> similar problem.
>>
>> The dstest.jsp tells me "SUCCESS: Got datasource and connection, 
>> class is org.apache.commons.dbcp.BasicDataSource" but nothing gets 
>> written to the db at startup, all tables are empty (The errors I get 
>> in the roller.log file are at the bottom of this mail) I googled on 
>> the exception messages and I wish I could solve this by myself but 
>> I'm not familiar with Hibernate. Any help or a direction in wich I 
>> could search would be greatly appreciated.
>>
>> These are my system details:
>> - Ubuntu Breezy
>> - Tomcat 5.0.28
>> - Sun java version 1.5.0_06
>> - MySQL Distrib 4.1.12, for pc-linux-gnu on i486
>>
>> If can provide any other information that can help, just say so, 
>> these are the errormessage snippets from the roller.log file:
>>
>> ERROR 2005-12-26 16:14:11,328 JDBCExceptionReporter:logExceptions - 
>> Duplicate entry '?' for key 1
>> ERROR 2005-12-26 16:14:11,336 
>> AbstractFlushingEventListener:performExecutions - Could not 
>> synchronize database state with session
>> org.hibernate.exception.ConstraintViolationException: could not 
>> insert: [org.roller.pojos.RollerPropertyData]
>>       at 
>> org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:74) 
>>
>>       at 
>> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) 
>>
>>       at 
>> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869) 
>>
>>       at 
>> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200) 
>>
>>       at 
>> org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46) 
>>
>>       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
>>       at 
>> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
>>       at 
>> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
>>       at 
>> org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274) 
>>
>>       at 
>> org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) 
>>
>>       at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
>>       at 
>> org.roller.business.hibernate.HibernateStrategy.commit(HibernateStrategy.java:428) 
>>
>>       at 
>> org.roller.business.hibernate.HibernateRollerImpl.commit(HibernateRollerImpl.java:115) 
>>
>>       at 
>> org.roller.presentation.RollerContext.contextInitialized(RollerContext.java:192) 
>>
>> ...
>> ...
>> Caused by: java.sql.BatchUpdateException: Duplicate entry '?' for key 1
>>       at 
>> com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647) 
>>
>>       at 
>> org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) 
>>
>>       at 
>> org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57) 
>>
>>       at 
>> org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:33)
>>       at 
>> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1853) 
>>
>>       ... 26 more
>> FATAL 2005-12-26 16:14:11,349 RollerContext:contextInitialized - 
>> RollerContext initialization failed
>> org.roller.RollerException
>>       at 
>> org.roller.business.hibernate.HibernateStrategy.commit(HibernateStrategy.java:440) 
>>
>>       at 
>> org.roller.business.hibernate.HibernateRollerImpl.commit(HibernateRollerImpl.java:115) 
>>
>>       at 
>> org.roller.presentation.RollerContext.contextInitialized(RollerContext.java:192) 
>>
>>       at 
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) 
>>
>>       at 
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4343) 
>>
>>       at 
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>>       at 
>> org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
>>       at 
>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>>       at 
>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
>>       at 
>> org.apache.catalina.core.StandardService.start(StandardService.java:480)
>>       at 
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
>>       at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
>>       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:585)
>>       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
>>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
>> --- ROOT CAUSE ---
>> org.hibernate.exception.ConstraintViolationException: could not 
>> insert: [org.roller.pojos.RollerPropertyData]
>>       at 
>> org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:74) 
>>
>>       at 
>> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) 
>>
>>       at 
>> org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869) 
>>
>> ...
>> ...
>> Caused by: java.sql.BatchUpdateException: Duplicate entry '?' for key 1
>>       at 
>> com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647) 
>>
>>       at 
>> org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) 
>>
>>       at 
>> org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57) 
>>
>> ...
>> ...
>> ...
>> ...
>> ...
>> WARN  2005-12-26 16:14:35,477 RollerRuntimeConfig:getProperty - 
>> Trouble accessing property: users.registration.enabled
>> java.lang.NullPointerException
>>       at 
>> org.roller.config.RollerRuntimeConfig.getProperty(RollerRuntimeConfig.java:51) 
>>
>> ...
>> WARN  2005-12-26 16:14:38,286 RollerRuntimeConfig:getProperty - 
>> Trouble accessing property: site.name
>> java.lang.NullPointerException
>>        at 
>> org.roller.config.RollerRuntimeConfig.getProperty(RollerRuntimeConfig.java:51) 
>>
>>        at 
>> org.apache.jsp.theme.tiles_002dfrontpage_jsp._jspService(tiles_002dfrontpage_jsp.java:141) 
>>
>> ...
>> WARN  2005-12-26 16:14:38,294 RollerRuntimeConfig:getProperty - 
>> Trouble accessing property: site.description
>> java.lang.NullPointerException
>>        at 
>> org.roller.config.RollerRuntimeConfig.getProperty(RollerRuntimeConfig.java:51) 
>>
>>        at 
>> org.apache.jsp.theme.tiles_002dfrontpage_jsp._jspService(tiles_002dfrontpage_jsp.java:144) 
>>
>> ...
>>
>> ... etc etc for every property from the rollerconfig table.
>>
>>
>> Thank you very much for taking a look at this.
>>
>> - Bert
>>
>>
>
>
> !DSPAM:43b95008309632128190681!