You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Yanhua Li <ya...@gmail.com> on 2006/05/21 05:57:15 UTC
I also got the exception while start tomcat server
I use mysql to build the jetspeed-2.0-src, everything works fine until I
start the tomcat server.
The error is as below. I checked the mail archive and found that chandra
sekhar reported the similiar issue in his May 1st post.
The difference is he used hsqldb at that time, and finally he had it started
successfully when he change his database to mysql.
--------------------------------------------------------------------------------------------------------------------------------------------
org.springframework.beans.factory.BeanCreationException: Error creating bean
wit
h name 'JetspeedDS' defined in ServletContext resource
[/WEB-INF/assembly/boot/d
atasource.xml]: Initialization of bean failed; nested exception is
org.apache.oj
b.broker.metadata.MetadataException: Could not get the metadata from the
given d
atasource
org.apache.ojb.broker.metadata.MetadataException: Could not get the metadata
fro
m the given datasource
at
org.apache.ojb.broker.metadata.JdbcMetadataUtils.fillJCDFromDataSourc
e(JdbcMetadataUtils.java:277)
at
org.apache.jetspeed.components.rdbms.ojb.ConnectionRepositoryEntry.af
terPropertiesSet(ConnectionRepositoryEntry.java:283)
.......
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource
(BasicDat
aSource.java:773)
... 40 more
--------------------------------------------------------------------------------------------------------------------------------------------
I checked the database settings in my build.properties, they look fine.
Actually I run "maven j2:quickStart" task successfully, can this prove that
my build.properties file correct?
-------------------------------------------------------------------------------------------------------------------------------
org.apache.jetspeed.production.database.url =
jdbc:mysql://127.0.0.1:3306/jtspd
org.apache.jetspeed.production.database.driver = com.mysql.jdbc.Driver
org.apache.jetspeed.production.database.user = hilda
org.apache.jetspeed.production.database.password = hilda
org.apache.jetspeed.production.jdbc.drivers.path=/javatech/lib/mm.mysql3.jar
org.apache.jetspeed.production.database.default.name=mysql
--------------------------------------------------------------------------------------------------------------------------------------------
And also I add the "mm.mysql3.jar" to my tomcat's /share/lib folder. I
can't understand why there's "No Suitable driver" error occurs.
Thanks,
hilda
Re: I also got the exception while start tomcat server
Posted by Aaron Evans <aa...@gmail.com>.
Yes, it is the tomcat version. You probably did not specify your
tomcat version properly in your build.properties (you should have
specified 5.5).
On 5/21/06, Yanhua Li <ya...@gmail.com> wrote:
> It works!!! Though it's very strange.
>
> I changed the file \conf\Catalina\localhost\jetspeed.xml:
>
> The original (error) (auto-generated) version has the section:
>
> --------------------------------------------------------------------------------------------
>
> <ResourceParams name="jdbc/jetspeed">
> <parameter>
> <name>factory</name>
> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> </parameter>
>
> <!-- Maximum number of dB connections in pool. Make sure you
> configure your mysqld max_connections large enough to handle
> all of your db connections. Set to 0 for no limit.
> -->
> <parameter>
> <name>maxActive</name>
> <value>100</value>
> </parameter>
>
> <!-- Maximum number of idle dB connections to retain in pool.
> Set to 0 for no limit.
> -->
> <parameter>
> <name>maxIdle</name>
> <value>30</value>
> </parameter>
>
> <!-- Maximum time to wait for a dB connection to become available
> in ms, in this example 10 seconds. An Exception is thrown if
> this timeout is exceeded. Set to -1 to wait indefinitely.
> -->
> <parameter>
> <name>maxWait</name>
> <value>10000</value>
> </parameter>
>
> <!-- HSQL dB username and password for dB connections -->
> <parameter>
> <name>username</name>
> <value>hilda</value>
> </parameter>
> <parameter>
> <name>password</name>
> <value>hilda</value>
> </parameter>
>
> <!-- Class name for HSQL JDBC driver -->
> <parameter>
> <name>driverClassName</name>
> <value>com.mysql.jdbc.Driver</value>
> </parameter>
>
> <!-- The JDBC connection url for connecting to your HSQL dB. -->
> <parameter>
> <name>url</name>
> <value>jdbc:mysql://127.0.0.1:3306/jtspd</value>
> </parameter>
> </ResourceParams>
> --------------------------------------------------------------------------------------------
>
> And when I change them to the following format, the tomcat can startup
> successfully. Is this related to the tomcat version? I'm using tomcat 5.5.15
> .
>
> --------------------------------------------------------------------------------------------
> <Resource name="jdbc/jetspeed" auth="Container"
> factory="org.apache.commons.dbcp.BasicDataSourceFactory"
> type="javax.sql.DataSource" username="hilda" password="hilda"
> driverClassName="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost:3306/jtspd"
> maxActive="100" maxIdle="30" maxWait="10000"/>
> --------------------------------------------------------------------------------------------
>
> -hilda
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
Re: I also got the exception while start tomcat server
Posted by Yanhua Li <ya...@gmail.com>.
It works!!! Though it's very strange.
I changed the file \conf\Catalina\localhost\jetspeed.xml:
The original (error) (auto-generated) version has the section:
--------------------------------------------------------------------------------------------
<ResourceParams name="jdbc/jetspeed">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<!-- Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to 0 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>
<!-- Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<!-- HSQL dB username and password for dB connections -->
<parameter>
<name>username</name>
<value>hilda</value>
</parameter>
<parameter>
<name>password</name>
<value>hilda</value>
</parameter>
<!-- Class name for HSQL JDBC driver -->
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<!-- The JDBC connection url for connecting to your HSQL dB. -->
<parameter>
<name>url</name>
<value>jdbc:mysql://127.0.0.1:3306/jtspd</value>
</parameter>
</ResourceParams>
--------------------------------------------------------------------------------------------
And when I change them to the following format, the tomcat can startup
successfully. Is this related to the tomcat version? I'm using tomcat 5.5.15
.
--------------------------------------------------------------------------------------------
<Resource name="jdbc/jetspeed" auth="Container"
factory="org.apache.commons.dbcp.BasicDataSourceFactory"
type="javax.sql.DataSource" username="hilda" password="hilda"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/jtspd"
maxActive="100" maxIdle="30" maxWait="10000"/>
--------------------------------------------------------------------------------------------
-hilda