You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by sl...@rightclick.ca on 2005/10/18 02:15:42 UTC

newbie: problem starting tomcat with roller

Hi all,

Installed Roller 1.2 with Tomcat 5.5 and MySQL 4.1.

Following the Installation Guide
(http://www.rollerweblogger.org/wiki/Wiki.jsp?page=InstallationGuide), got
to the part about editing Tomcat's server.xml

Step 5 says (for Tomcat 5.5) to add this (below) to the server.xml and
replace scott / tiger with my own username password.  Did this.

Problem is, with this section, Tomcat service won't start; Windows
complains "The Apache Tomcat service on Local Computer started and then
stopped.  Some services stop automatically if they have no work to do, for
example, the Performance Logs and Alerts service."

Remove everything between <context> and </context> and Tomcat starts fine.

Any help is *greatly* appreciated!

Stephen

>>>

<Context path="/roller" docBase="roller" debug="0">

<Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="com.mysql.jdbc.Driver"
    connectionURL=
        "jdbc:mysql://localhost:3306/roller?autoReconnect=true&
        useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8"
    connectionName="scott"
    connectionPassword="tiger"
    userTable="rolleruser"
    userNameCol="username"
    userCredCol="passphrase"
    userRoleTable="userrole"
    roleNameCol="rolename" debug="0" />

<Resource name="jdbc/rollerdb" auth="Container" type="javax.sql.DataSource"
  driverClassName="com.mysql.jdbc.Driver"
  url="jdbc:mysql://localhost:3306/roller?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8"
  username="scott"
  password="tiger"
  maxActive="20"
  maxIdle="3"
  removeAbandoned="true"
  maxWait="3000" />

<!--
To enable email notification of comments: uncomment the resouce below,
set your mailhost, and make sure you have mail.jar and activation.jar
in <tomcat>/common/lib.
-->
<!--
    <Resource name="mail/Session" auth="Container" type="javax.mail.Session"
       mail.smtp.host="mailhost.example.com" />
-->

</Context>

Re: newbie: problem starting tomcat with roller

Posted by Anil Gangolli <an...@busybuddha.org>.
You should really be using the roller-user mailing list for these questions.

I'd recommend putting the context definition in a separate context file 
in conf/Catalina/localhost/roller.xml (assuming the context name in the 
contents you indicated below).   If you put it in server.xml, it has to 
be at just the right spot within the server.xml (in the correct 
containing Host element).

The wording of the installation guide has gotten a bit muddy around that 
area.  I'll try to clarify it.

--a.

slegge@rightclick.ca wrote:

>Hi all,
>
>Installed Roller 1.2 with Tomcat 5.5 and MySQL 4.1.
>
>Following the Installation Guide
>(http://www.rollerweblogger.org/wiki/Wiki.jsp?page=InstallationGuide), got
>to the part about editing Tomcat's server.xml
>
>Step 5 says (for Tomcat 5.5) to add this (below) to the server.xml and
>replace scott / tiger with my own username password.  Did this.
>
>Problem is, with this section, Tomcat service won't start; Windows
>complains "The Apache Tomcat service on Local Computer started and then
>stopped.  Some services stop automatically if they have no work to do, for
>example, the Performance Logs and Alerts service."
>
>Remove everything between <context> and </context> and Tomcat starts fine.
>
>Any help is *greatly* appreciated!
>
>Stephen
>
>  
>
>
><Context path="/roller" docBase="roller" debug="0">
>
><Realm className="org.apache.catalina.realm.JDBCRealm"
>    driverName="com.mysql.jdbc.Driver"
>    connectionURL=
>        "jdbc:mysql://localhost:3306/roller?autoReconnect=true&
>        useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8"
>    connectionName="scott"
>    connectionPassword="tiger"
>    userTable="rolleruser"
>    userNameCol="username"
>    userCredCol="passphrase"
>    userRoleTable="userrole"
>    roleNameCol="rolename" debug="0" />
>
><Resource name="jdbc/rollerdb" auth="Container" type="javax.sql.DataSource"
>  driverClassName="com.mysql.jdbc.Driver"
>  url="jdbc:mysql://localhost:3306/roller?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8"
>  username="scott"
>  password="tiger"
>  maxActive="20"
>  maxIdle="3"
>  removeAbandoned="true"
>  maxWait="3000" />
>
><!--
>To enable email notification of comments: uncomment the resouce below,
>set your mailhost, and make sure you have mail.jar and activation.jar
>in <tomcat>/common/lib.
>-->
><!--
>    <Resource name="mail/Session" auth="Container" type="javax.mail.Session"
>       mail.smtp.host="mailhost.example.com" />
>-->
>
></Context>
>
>
>  
>


Re: newbie: problem starting tomcat with roller

Posted by Matt Raible <mr...@gmail.com>.
You need to change the context.xml syntax to use something like the following:

<Context path="/roller" docBase="roller" debug="99" reloadable="false"
    antiJARLocking="true" antiResourceLocking="false">

    <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
          driverName="org.postgresql.Driver"
       connectionURL="jdbc:postgresql://localhost/roller"
      connectionName="postgres" connectionPassword="postgres"
           userTable="rolleruser" userNameCol="username"
userCredCol="passphrase"
       userRoleTable="userrole" roleNameCol="rolename" />

    <Resource name="jdbc/rollerdb" auth="Container" type="javax.sql.DataSource"
              maxActive="20" maxIdle="10" maxWait="100"
              driverClassName="org.postgresql.Driver"
              username="postgres" password="postgres"
              url="jdbc:postgresql://localhost/roller"/>

    <Resource name="mail/Session" auth="Container" type="javax.mail.Session"
              mail.smtp.host="localhost" />
</Context>

On 10/17/05, slegge@rightclick.ca <sl...@rightclick.ca> wrote:
> Hi all,
>
> Installed Roller 1.2 with Tomcat 5.5 and MySQL 4.1.
>
> Following the Installation Guide
> (http://www.rollerweblogger.org/wiki/Wiki.jsp?page=InstallationGuide), got
> to the part about editing Tomcat's server.xml
>
> Step 5 says (for Tomcat 5.5) to add this (below) to the server.xml and
> replace scott / tiger with my own username password.  Did this.
>
> Problem is, with this section, Tomcat service won't start; Windows
> complains "The Apache Tomcat service on Local Computer started and then
> stopped.  Some services stop automatically if they have no work to do, for
> example, the Performance Logs and Alerts service."
>
> Remove everything between <context> and </context> and Tomcat starts fine.
>
> Any help is *greatly* appreciated!
>
> Stephen
>
> >>>
>
> <Context path="/roller" docBase="roller" debug="0">
>
> <Realm className="org.apache.catalina.realm.JDBCRealm"
>     driverName="com.mysql.jdbc.Driver"
>     connectionURL=
>         "jdbc:mysql://localhost:3306/roller?autoReconnect=true&
>         useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8"
>     connectionName="scott"
>     connectionPassword="tiger"
>     userTable="rolleruser"
>     userNameCol="username"
>     userCredCol="passphrase"
>     userRoleTable="userrole"
>     roleNameCol="rolename" debug="0" />
>
> <Resource name="jdbc/rollerdb" auth="Container" type="javax.sql.DataSource"
>   driverClassName="com.mysql.jdbc.Driver"
>   url="jdbc:mysql://localhost:3306/roller?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8"
>   username="scott"
>   password="tiger"
>   maxActive="20"
>   maxIdle="3"
>   removeAbandoned="true"
>   maxWait="3000" />
>
> <!--
> To enable email notification of comments: uncomment the resouce below,
> set your mailhost, and make sure you have mail.jar and activation.jar
> in <tomcat>/common/lib.
> -->
> <!--
>     <Resource name="mail/Session" auth="Container" type="javax.mail.Session"
>        mail.smtp.host="mailhost.example.com" />
> -->
>
> </Context>
>