"java.sql.SQLException: No suitable driver" when using Sql.newInstance
----------------------------------------------------------------------

                 Key: MGROOVY-166
                 URL: http://jira.codehaus.org/browse/MGROOVY-166
             Project: GMaven
          Issue Type: Bug
    Affects Versions: 1.0-rc-3
         Environment: Groovy tests, Console
            Reporter: Stig Lau
            Assignee: Jason Dillon
            Priority: Minor
         Attachments: sqlproblem.zip

I have a problem which I mainly ran into when using "mvn groovy:console" to 
create a database connection with Sql.newInstance.
It manifested itself with the sentence 
    java.sql.SQLException: No suitable driver
    ClassNotFoundException

After much digging around, I believe the problem is related to the classloader 
and possibly how groovy.sql.Sql loads the driver. The similar call 
this.class.classLoader.loadClass("org.hsqldb.jdbcDriver").newInstance() works.
The problem also manifests itself when running "mvn test" with GMaven 
precompiling.
Running the exact same test in intelliJ, with project files generated by mvn 
idea:idea works fine.

Is this a problem related to GMaven, or should the issue be moved to core 
Groovy due to groovy.sql.Sql?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to