Thank you very much for your comprehensive article!
I learned from it about possibility of extending Tomcat's lib path.
I have not known about this possibility before. Therefor I have assigned
'roller-custom.propertes'
by setting 'roller.config.file' JVM property by means of 'JAVA_OPTS_EXT'
environment variable.
You also write about necessity of copying MySQL Driver jar to 'rollerdata/lib'.
But why is it necessary? I have checked the presence there of the class
'com.mysql.jdbc.Driver'
in my test dummy application (using 'Class.forName(className)') and it showed
me that this class was loaded.
Yes, I use version 5.1.1 compiled from sources by 'mvn compile'.
Then I uploaded WAR by commiting it to 'webapps/roller.war' in my working copy.
Unfortunetly, I could not to deploy WAR by ssh. Namely, I don't know how to
activate deployment routine after uploading file to server.
Your advice about editing 'log4j.properties' in WAR has helped me to obtain the
following error:
'FATAL: RollerContext:contextInitialized - Roller requires an exploded WAR file
to run.'
What does it means?
11.11.2014, 15:14:04 пользователь Glen Mazza ([email protected]) написал:
What version of Roller are you running -- hopefully 5.1.1? Have you
seen my blog article: https://web-gmazza.rhcloud.com/blog/date/20131216
for pointers? I would stick with getting the JNDI method to work, it's
connection pooling is probably better.
Also, you may wish to activate the roller-startup logging file in the
WAR's log4j.properties file
(https://svn.apache.org/repos/asf/roller/trunk/app/src/main/resources/log4j.properties)
-- it's located probably under the WEB-INF/classes folder; it sometimes
will output more informative error messages prior to Roller starting
up. (Doing this config in your roller-custom.properties may not work as
well as some startup system errors occur prior to that properties file
getting read.)
HTH,
Glen
On 11/10/2014 4:24 PM, user wrote:
>
> Have choosen MySQL DB, have tryed both Tomcat's JNDI resource and jdbc
> type of connection.
> The following error occurs in log:
> java.lang.IllegalStateException: Roller Weblogger has not been
> prepared yet
> at
> org.apache.roller.weblogger.business.startup.WebloggerStartup.getDatabaseProvider(WebloggerStartup.java:64)
> at
> org.apache.roller.weblogger.business.startup.WebloggerStartup.getDatabaseInstaller(WebloggerStartup.java:155)
> at
> org.apache.roller.weblogger.business.startup.WebloggerStartup.isDatabaseCreationRequired(WebloggerStartup.java:95)
> at
> org.apache.roller.weblogger.ui.struts2.core.Install.execute(Install.java:85)
>
> As I understand from 'Install.java' class, the error expected to
> occure several lines earlier, namely in 'Install.java:71':
> if (WebloggerStartup.getDatabaseProviderException() != null) {
> where presence of exception checked. But if doesn't occur, hence,
> there is no exception.
> The exception expected to be assigned at
> 'org.apache.roller.weblogger.business.startup.WebloggerStartup#prepare' method.
>
> So I conclude this method was never called.