You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Lance Goodship <la...@netsynergies.biz> on 2004/10/18 11:41:42 UTC

MySQL database setup issues

Hi,

 

I've just started using Lenya and I'm having difficulty setting up Lenya to
use MySQL as I am not seeing any tables being created. I am not sure whether
this is because

1)     My configuration is incorrect

2)     Tables don't get created until new content is created

3)     There is a database set-up wizard I should have run.

 

The steps I have taken so far are

 

1)Download source version of cocoon and lenya

2)Constructed a new publication as per "NewPublicationHowTo" on the wiki

3)Built cocoon and then lenya as per installation instructions on the lenya
web site but run "ant webapp" at the end to deploy to the embedded jetty
installation

4)Started up Jetty with "lenya.bat", new publication was working fine and
could log in etc.

5) Put MySQL JDBC drivers into the
"\incubating-lenya-1.2-src\build\lenya\webapp\WEB-INF\lib" directory

6) Modified web.xml in
"\incubating-lenya-1.2-src\build\lenya\webapp\WEB-INF\" and modified
load-class section to

 

<init-param>

      <param-name>load-class</param-name>

      <param-value>

      <!-- For Database Driver: -->

      com.mysql.jdbc.Driver

      </param-value>

    </init-param>

 

7) Modified cocoon.xconf in
"\incubating-lenya-1.2-src\build\lenya\webapp\WEB-INF\" and added 

 

<jdbc name="MYSQL_DB_POOL">

            <pool-controller min="5" max="10"/>

 
<dburl>jdbc:mysql://localhost:3306/lenya?autoReconnect=true</dburl>

            <user>lenya</user>

            <password>lenya</password>

      </jdbc>

 

Inside of 

<datasources> section

 

8) Then commented out 

      <component-instance
class="org.apache.cocoon.components.modules.database.HsqlIdentityAutoIncreme
ntModule" logger="core.modules.auto" name="auto"/> 

And uncommented 

 

      <component-instance logger="core.modules.auto" name="auto"
class="org.apache.cocoon.components.modules.database.MysqlAutoIncrementModul
e"/>

 

And then commented out

 

<!--

<hsqldb-server class="org.apache.cocoon.components.hsqldb.ServerImpl"
logger="core.hsqldb-server" pool-max="1" pool-min="1">

     <parameter value="9002" name="port"/>

     <parameter name="silent" value="true"/>

     <parameter name="trace" value="false"/>

  </hsqldb-server>

-->

 Section 

 

8) Created lenya database instance in mysql and create lenya user with all
privileges and a password of lenya

 

9) Lastly stopped and started embedded Jetty instance again.

 

 

Application and new publication is working but there are no tables inside of
my lenya database instance. Is this correct? Or is Lenya still using the
Hypersonic SQL database instance?

 

 

Any help would be really appreciated.

 

 

Thanks.

 

Lance