roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <glen.ma...@gmail.com>
Subject Re: unable to deploy on Openshift platform
Date Thu, 13 Nov 2014 03:05:00 GMT
Well, in your example below, it appears to be the web application (and 
not Tomcat) loading the JDBC driver.  With Roller, if you use JNDI, it 
will be Tomcat loading it, not the Roller webapp, so the JARs need to be 
located where Tomcat can find them.  If you have questions on the Tomcat 
classloading mechanism I'm not the one to ask, the Tomcat user's mailing 
list might help.

Glen

On 11/12/2014 11:45 AM, user wrote:
>
> Thank you very much! I have fixed this error by adding 
> "unpackWARs="true"" attribute to 'Host' element of 'server.xml'.
> I didn't understand about MySQL JAR. It looks like it is really 
> needed, because of ClassNotFoundException when tried to establish JDBC 
> (not JNDI) connection.
> But when I created dummy app, added there foo.jsp with the following 
> content:
> <%
>  String className = "com.mysql.jdbc.Driver";
>  try {
>    Class.forName(className);
> %>
>  <%= className %>  &nbsploaded!
> <%
>  } catch (ClassNotFoundException e) {
> %>
>  <%= className %>  <&nbsp> NOT loaded!
> <%
>  }
> %>
>
> It showed me 'loaded' which means the class was found. So why it still 
> need the jar if the class is loaded?
> I want to understand.
>
>> 12.11.2014, 10:02:52 пользователь Glen Mazza (glen.mazza@gmail.com) 
>> написал:
>>
>> The error message means that the WAR is not exploding, i.e., opening 
>> up/expanding into a directory in the Tomcat webapps folder.    When 
>> you solve that problem -- the OpenShift forum might help, as it is a 
>> problem that could happen for any WAR file -- Roller should hopefully 
>> work as expected.
>>
>> The MySQL JAR needs to move into the Tomcat lib directory because 
>> with JNDI configuration, it is Tomcat that needs the MySQL JAR (as 
>> Tomcat and not Roller manages the DB connections), and Tomcat looks 
>> into its lib folder for the JARs that it needs.
>>
>> Glen
>>
>> On 11/11/2014 11:35 AM, user wrote:
>> >
>> > 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 
>> (glen.mazza@gmail.com) >> написал:
>> >>
>> >> 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.
>> >>
>> >>
>>
>>


Mime
View raw message