Hello,
I am trying to set up my first programm, but I always run in a
no-suitable-driver-exception.
I can guarantee that the micrsoft-jdbc-sql-driver is present.

I have the following database.xml:
  <database name="testdb" engine="sql-server">
    <driver driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
            url="jdbc:microsoft:sqlserver://159.51.178.17:1433">
      <param name="user" value="username"/>
      <param name="password" value="password"/>
    </driver>
    <mapping href="mapping.xml"/>
  </database>

The code in my program looks the following way:
    JDO jdo = new JDO("testdb");
    jdo.setConfiguration("database.xml");
    jdo.setClassLoader(getClass().getClassLoader());
    Database db;
    try {
      db= jdo.getDatabase();
    } catch (DatabaseNotFoundException dnfe)   {
    } catch (PersistenceException pe)  { }

The stacktrace:
java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getDriver(DriverManager.java:243)
        at
org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(Unknown Source)
        at org.exolab.castor.jdo.JDO.getDatabase(Unknown Source)
        at de.ina.web.CastorTest.doIt(CastorTest.java:24)
        at de.coi.xml.sax.SAX1FromProcedure.run(SAX1FromProcedure.java:196)
        at de.coi.xml.sax2.SAX1toSAX2.run(SAX1toSAX2.java:203)
        at de.coi.xml.sax2.XMLCreator.parse(XMLCreator.java:98)
        at
com.icl.saxon.IdentityTransformer.transform(IdentityTransformer.java:90)
        at de.coi.servlet.XMLServlet.doGet(XMLServlet.java:390)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:162)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
        at com.caucho.server.http.Invocation.service(Invocation.java:325)
        at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:121)
        at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:239)
        at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:157)
        at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
        at java.lang.Thread.run(Thread.java:536)

I hope you can help me.

best regard

Thorsten

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to