Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1102347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:10:21+00:00 2026-05-17T01:10:21+00:00

I am trying to run an application developed on another machine where it was

  • 0

I am trying to run an application developed on another machine where it was perfectly running, so it should have something to do with the configurations on the machine I am trying to run it on now. I’m using netbeans 6.9, tomcat 6.0.26 and maven.

When I try to run it, it gives me the following error:

Sep 19, 2010 12:51:02 AM org.hibernate.cfg.SettingsFactory buildSettings
WARNING: Could not obtain connection metadata
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'http://maven.apache.org'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2073)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1298)
    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
    at AppConfiguration.loadConfig(AppConfiguration.java:164)
    at Listener.contextInitialized(Listener.java:40)
    at Org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:519)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getDriver(DriverManager.java:264)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)
    ... 32 more

I should mention that:

1 I have mysql-connector-java-5.1.13-bin.jar in Apache Tomcat 6.0.26\lib and in my pom.xml I have:

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <url>http://maven.apache.org</url>

and

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.1.13</version>
    <scope>provided</scope>
</dependency>

2 I have the jar in my local maven repository.

3 Netbeans seems to come now with ’embedded maven version 3.0′, which is a beta version. So I’ve configured it to use as External Maven Home: C:\Program Files\apache-maven-2.2.1. Running mvn –version gives the correct version, so maven 2.2.1 seems to be properly installed on my system. But for some reason, whenever I run the app, I also get this:

WARNING: You are running embedded Maven builds, some build may fail due to     incompatibilities with latest Maven release. To set Maven instance to use for building, click here.

The build does not fail, but the link that the above warning points me to, gets me to the same window where I’ve already configured ‘External Maven Home’, as mentioned above.

4 Adding DriverManager.registerDriver(new com.mysql.jdbc.Driver());
(as seen in another post here on stackoverflow) before anything related to the database did not help.

5 The same code was running on another machine.

I would appreciate any ideas as to why I am getting the jdbc driver error. And please keep in mind that the application was running on another machine.

context.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/app/test">
  <Resource auth="Container" defaultAutoCommit="false" description="dbcp" driverClassName="com.mysql.jdbc.Driver" initialSize="1" maxActive="10" maxIdle="5" maxWait="1000" minIdle="10" name="jdbc/Test" password="${database.password}" poolPreparedStatements="true" type="javax.sql.DataSource" url="${database.url}" username="${database.username}"/>
  <Realm className="org.apache.catalina.realm.DataSourceRealm" dataSourceName="jdbc/Test" localDataSource="true" roleNameCol="role" userCredCol="pass" userNameCol="user" userRoleTable="roles" userTable="users"/>
  <Valve className="org.apache.catalina.valves.AccessLogValve" fileDateFormat="yyyy-MM-dd" pattern="combined" prefix="test-access" resolveHosts="false" rotatable="true" suffix=".log"/>
</Context>

where database.url is
jdbc:mysql://127.0.0.1:3306/test?autoReconnect=true

hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
    <session-factory>
        <property name="connection.datasource">java:/comp/env/jdbc/Test</property>
        <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
        <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
        <property name="cache.use_query_cache">false</property>
        <property name="cache.use_minimal_puts">false</property>
        <property name="max_fetch_depth">3</property>
        <property name="show_sql">true</property>
        <property name="format_sql">true</property>
        <property name="generate_statistics">true</property>
        <property name="hbm2ddl.auto">validate</property>
        <property name="current_session_context_class">thread</property>
        <mapping class="Test.Users"/>
        <mapping class="Test.Roles"/>
        <!-- entity bean defs -->
    </session-factory>
</hibernate-configuration>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:10:22+00:00Added an answer on May 17, 2026 at 1:10 am

    Common causes for java.sql.SQLException: No suitable driver are

    • the URL is wrong
    • followed by the driver isn’t loaded.

    And indeed, the following line clearly indicates something wrong.

    Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'http://maven.apache.org'

    The JDBC connection string can’t be http://maven.apache.org.

    Check your build, something IS wrong (it looks like some unexpected filtering is occurring).

    But you’re not giving enough details for a more detailed answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run an ASP.NET 2.0 application on an XP machine. As far
I'm trying to develop my first web application using Web.Config transformations. Trying to run
I am trying to run an application that normally works when I install on
I am working on a UNIX box, and trying to run an application, which
I am trying to run some unit tests in a C# Windows Forms application
I'm trying to run down a memory leak in a windows forms application. I'm
I'm trying to run a batch file, as another user, from my web app.
I'm trying to port a PHP site developed by another coder (who is no
I've developed a web application using servlet and tomcat. When I try to use
I have developed one windows service through which I am trying to open an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.