forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: Apache Forrest and MySQL
Date Fri, 06 Feb 2009 03:17:54 GMT
syddel wrote:
> 
> Hi,
> 
> I'm an Apache Forrest newbie. I'm trying to setup forrest so I can perform
> queries against a MySQL database. I have searched for a "how-to", found
> various bits and pieces, but nothing seems to work.

Sorry that no-one answered.

There is the Forrest Plugin "org.apache.forrest.plugin.Database".
I have not used it and am not sure of its status.

However that is in the "whiteboard" and you are using the in-development
version of Forrest, so it needs to be discussed on the "dev"
mail list. Your assistance there would be appreciated.

-David

> I am running Apache Forrest 0.9-dev on Ubuntu 8.10. I read:
> 
> http://wiki.apache.org/cocoon/MySQL http://wiki.apache.org/cocoon/MySQL  
> 
> and
> 
> http://cocoon.apache.org/2.1/developing/datasources.html
> http://cocoon.apache.org/2.1/developing/datasources.html .
> 
> I attempted to apply what I read from the above links to my Apache Forrest
> install. These are the steps I performed:
> 
> 1. Installed JDBC driver: sudo apt-get install libmysql-java.
> 2. Copied the JDBC driver to the lib directory: cp
> /usr/share/java/mysql-connector-java-5.1.6.jar $FORREST_HOME/lib/ (I do not
> have a $COCOON_LIB/WEB-INF/lib directory as mentioned in the Cocoon Wiki
> doc).
> 3. Modified my $FORREST_HOME/main/webapp/WEB-INF/web.xml file as follows:
> 
>      <init-param>
>        <param-name>load-class</param-name>
>        <param-value>
>          com.mysql.jdbc.Driver
>        </param-value>
>      </init-param>
> 
> 4. Created a MySQL user for testing purposes.
> 5. Added the following to $FORREST_HOME/main/webapp/WEB-INF/cocoon.xconf:
> 
>    <datasources>
>      <jdbc name="TestConnectionPool">
>        <pool-controller min="5" max="10"/>
>        <dburl>jdbc:mysql://localhost:3306/test?autoReconnect=true</dburl>
>        <user>TestUser</user>
>        <password>TestPassword</password>
>      </jdbc>
>    </datasources>
> 
> >From here I saved everything and tried to run forrest to build the included
> forrest seed example. I get this error:
> 
> ------------------------------------------------------------------------ 
> cocoon 2.1.12-dev
> Copyright (c) 1999-2007 Apache Software Foundation. All rights reserved.
> ------------------------------------------------------------------------ 
> 
> 
> Exception in thread "main"
> org.apache.avalon.framework.configuration.ConfigurationException: Could not
> load class
> org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource for
> component named 'TestConnectionPool' at
> file:/home/syd/kcdocs/forrest/main/webapp/WEB-INF/cocoon.xconf:1070:37
> 	at
> org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedComponentSelector.java:236)
> 	at
> org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:201)
> 	at
> org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:289)
> 	at
> org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)
> 	at
> org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:524)
> 	at
> org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:583)
> 	at
> org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
> 	at org.apache.cocoon.Cocoon.initialize(Cocoon.java:345)
> 	at
> org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
> 	at org.apache.cocoon.bean.CocoonWrapper.initialize(CocoonWrapper.java:177)
> 	at org.apache.cocoon.bean.CocoonBean.initialize(CocoonBean.java:102)
> 	at org.apache.cocoon.Main.main(Main.java:320)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> 	at
> org.apache.cocoon.components.ExtendedComponentSelector.configure(ExtendedComponentSelector.java:228)
> 	... 11 more
> 
> Do I need to install an "excalibur" package of some sort? I tried to install
> some Java connection pooling libraries, but this did not solve my problem.
> 
> Is there a simple easy to follow "how-to" somewhere? Any help would be
> really appreciated.
> 
> Thanks,
> Syd
> 
> 
> 
> -- 
> View this message in context: http://www.nabble.com/Apache-Forrest-and-MySQL-tp21687540p21687540.html
> Sent from the Apache Forrest - Users mailing list archive at Nabble.com.
> 
> 

Mime
View raw message