ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric VanWieren" <evanwie...@gmail.com>
Subject Re: mysql and jboss support
Date Tue, 08 Aug 2006 15:56:45 GMT
Thanks for all of the quick responses.  Here is the information that was
asked for.

I have the mysql-connector-java-5.0.3-bin.jar installed into the
server/default/lib directory.

I am using iBatis directly without spring. My config files look as such.

sqlMap-Config.xml
<properties resource="PATH_TO_PROPFILE/SqlMapConfig.properties" />

<transactionManager type="JDBC">
    <dataSource type="SIMPLE">
        <property name="JDBC.Driver" value="${driver}" />
        <property name="JDBC.ConnectionURL" value="${url}" />
        <property name="JDBC.Username" value="${username}" />
        <property name="JDBC.Password" value="${password}" />
    </dataSource>
</transactionManager>


SqlMapConfig.properties


driver=com.mysql.jdbc.Driver;
url=jdbc:mysql://localhost:3306/database
username=USERNAME
password=PASSWORD

When I attempt to create a SqlMapClient I get the following Error:

2006-08-08 11:53:50,561 ERROR [com.ibatis.common.jdbc.SimpleDataSource]
SimpleDataSource: Error while loading properties. Cause:
java.lang.ClassNotFoundException: com/mysql/jdbc/Driver;
java.lang.ClassNotFoundException: com/mysql/jdbc/Driver;
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at com.ibatis.common.resources.Resources.classForName(Resources.java
:244)
        at com.ibatis.common.resources.Resources.instantiate(Resources.java
:260)
        at com.ibatis.common.jdbc.SimpleDataSource.initialize(
SimpleDataSource.java:196)
        at com.ibatis.common.jdbc.SimpleDataSource.<init>(
SimpleDataSource.java:116)
        at
com.ibatis.sqlmap.engine.datasource.SimpleDataSourceFactory.initialize(
SimpleDataSourceFactory.java:31)
        at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$9.process
(SqlMapConfigParser.java:301)
        at com.ibatis.common.xml.NodeletParser.processNodelet(
NodeletParser.java:112)......
....

2006-08-08 11:53:50,564 ERROR [STDERR]
com.ibatis.common.exception.NestedRuntimeException: Error occurred.  Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath
'/sqlMapConfig/transactionManager/dataSource/end()'.  Cause:
com.ibatis.sqlmap.client.SqlMapException: Error initializing DataSource.
Could not instantiate DataSourceFactory.  Cause:
com.ibatis.common.exception.NestedRuntimeException: SimpleDataSource: Error
while loading properties. Cause: java.lang.ClassNotFoundException:
com/mysql/jdbc/Driver;
Caused by: java.lang.ClassNotFoundException: com/mysql/jdbc/Driver;




Thanks in advance. I am sure I am missing something silly, but for the life
of me, I am at a loss.

Eric

Mime
View raw message