Page 1 of 1

Configuring Broadleaf for MySQL

Posted: Tue Jun 23, 2015 5:38 pm
by blondeMatrix
Hello,

I have been unsuccessful in reconfiguring Broadleaf (demo site) to connect with MySQL via JNDI sources declared in Broadleaf's own context.xml. This despite carefully following the Broadleaf guide (webpage) on switching to MySQL.

First, I placed the JDBC driver in...

DemoSite/lib/mysql-connector-java-5.1.35-bin.jar Though normally Maven should download this dependency, right?

And, as per the Broadleaf MySQL guide, updated pom.xml with the following dependency...

Code: Select all

            <!-- Other dependencies -->
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>5.1.35</version>
            </dependency>


Yet, I get the following errors when attempting to run the application...

Code: Select all

23-Jun-2015 14:16:36.250 WARNING [RMI TCP Connection(2)-127.0.0.1] org.apache.naming.NamingContext.lookup Unexpected exception resolving reference
 java.sql.SQLException: ${database.driver}
   at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
...
Caused by: java.lang.ClassNotFoundException: ${database.driver}
...
23-Jun-2015 14:16:36.255 WARNING [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.NamingContextListener.addResource Failed to register in JMX: javax.naming.NamingException: ${database.driver}
23-Jun-2015 14:16:36.267 WARNING [RMI TCP Connection(2)-127.0.0.1] org.apache.naming.NamingContext.lookup Unexpected exception resolving reference
 java.sql.SQLException: ${database.driver}
   at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
...
Caused by: java.lang.ClassNotFoundException: ${database.driver}


Incidentally, this same MySQL JDBC driver is also contained in Tomcat's own 'lib' folder. Seems to make no difference. Odd.

Re: Configuring Broadleaf for MySQL

Posted: Thu Jun 25, 2015 3:05 pm
by phillipuniverse

Re: Configuring Broadleaf for MySQL

Posted: Thu Jun 25, 2015 7:38 pm
by blondeMatrix
Thank you Phillip. I appreciate your help, and look forward to having Broadleaf up and running soon (will report back).

Regards,

Chris.