ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Tim" <Tim.C...@NielsenMedia.com>
Subject RE: mysql and jboss support
Date Tue, 08 Aug 2006 17:12:07 GMT
Is there a reason that you put it into server/default/lib and not your
ear?

________________________________

From: Eric VanWieren [mailto:evanwieren@gmail.com] 
Sent: Tuesday, August 08, 2006 11:57 AM
To: user-java@ibatis.apache.org
Subject: Re: mysql and jboss support


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(S
impleDataSourceFactory.java:31)
        at
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$9.process(SqlMap
ConfigParser.java:301)
        at
com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:11
2)......
....

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