+ Reply to Thread
Results 1 to 22 of 22

Thread: Cannot create JDBC driver of class '' for connect URL 'null'

  1. #1
    sebastien george
    Join Date
    Apr 2011
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Cannot create JDBC driver of class '' for connect URL 'null'

    Hello,

    I installed GeoPortal but still having the problem when I connect me:

    Cannot create JDBC driver of class '' for connect URL 'null'

    How can I to do !?

  2. #2
    Clive Reece
    Join Date
    Mar 2010
    Posts
    128
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    Most likely there is a problem with your JNDI configuration file in the \Tomcat\conf\Catalina\localhost\geoportal.xml file. But there could be other issues.

    What Geoportal version are you using?
    What Tomcat are you using?
    Do you have the right JDBC connector installed?

    Please send a copy of the contents of your geoportal.xml file.

    -Clive

  3. #3
    sebastien george
    Join Date
    Apr 2011
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    I downloaded geoportal-1.1.zip, I use tomcat6 and Yes I have the rights.


    Code:
    <Context docBase="geocarto54" path="/geocarto54" debug="0" reloadable="true" crossContext="true">
        <Resource name="jdbc/gpt" auth="Container" type="javax.sql.DataSource"
                  driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
                  url="jdbc:sqlserver://CARTOSQL:1433;databaseName=carto54"
                  user="admin"
                  password="admin"
                  maxActive="20"
                  maxIdle="10"
                  maxWait="-1" />
    			  
    </Context>
    Z:\tomcat6\webapps\geocarto54

    My database is carto54, server is CARTOSQL
    I download sqljdbc4.jar, I copy the database jdbc driver whitin tomcat6\lib
    Last edited by shedorius; 04-22-2011 at 01:01 AM.

  4. #4
    Clive Reece
    Join Date
    Mar 2010
    Posts
    128
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    I don't see any obvious errors in the JDBC connection strings. It still seems like a jdbc connection issue. Can I ask you to
    1/ stop Tomcat
    2/ Clear out the Tomcat log file directory (tomcat6\logs) either deleting or backing up the old log files
    3/ Start Tomcat
    4/ Wait till the gpt log file stabilizes after start up.
    5/ Open the gpt log file and inspect the error messages

    We need to determine if geoportal is making the connection to your database and getting denied at login, or whether it is able to connect to the database at all (or other).

  5. #5
    sebastien george
    Join Date
    Apr 2011
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    ATTENTION: [SYNCHRONIZER] Error fetching next task
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host CARTOSQL, port 1433 has failed. Error: Connection refused: connect. Please verify the connection properties and check that a SQL Server instance is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    at com.esri.gpt.framework.sql.DatabaseReference.openJndiConnection(Unknown Source)
    at com.esri.gpt.framework.sql.DatabaseReference.openConnection(Unknown Source)
    at com.esri.gpt.framework.sql.ManagedConnection.<init>(Unknown Source)
    at com.esri.gpt.framework.sql.ManagedConnections.returnConnection(Unknown Source)
    at com.esri.gpt.framework.sql.ConnectionBroker.returnConnection(Unknown Source)
    at com.esri.gpt.framework.sql.BaseDao.returnConnection(Unknown Source)
    at com.esri.gpt.catalog.harvest.jobs.HjGetNextRequest.execute(Unknown Source)
    at com.esri.gpt.control.webharvest.engine.TaskQueue.next(Unknown Source)
    at com.esri.gpt.control.webharvest.engine.Worker.next(Unknown Source)
    at com.esri.gpt.control.webharvest.engine.Worker.execute(Unknown Source)
    at com.esri.gpt.control.webharvest.engine.WorkerBase.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host CARTOSQL, port 1433 has failed. Error: Connection refused: connect. Please verify the connection properties and check that a SQL Server instance is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:130)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1195)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(SQLServerConnection.java:1054)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:758)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
    at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
    at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
    ... 14 more

    I don't understand all, can you help me please with this errors ?
    thank you

  6. #6
    Clive Reece
    Join Date
    Mar 2010
    Posts
    128
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    The most important message is "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host CARTOSQL, port 1433 has failed. Error: Connection refused: connect. Please verify the connection properties and check that a SQL Server instance is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.)"

    The geoportal web app cannot communicate with your database on port 1433 ("The TCP/IP connection to the host CARTOSQL, port 1433 has failed. Error: Connection refused").

    Assuming you are not running the SQL Server as a named instance, it appears that port 1433 may not be active for database connections on your database machine. Check the SQL Server Configuration manager > SQL Server Network Configuration > Protocols for MSSQLSERVER (name of your database instance) > TCP/IP > Properties:
    check ... Protocol is Enabled (=Yes)?

    Or something (firewall?) is blocking the Tomcat communication with your database server.

  7. #7
    Clive Reece
    Join Date
    Mar 2010
    Posts
    128
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    Please post back for the group if you were able to correct the JDBC issue

  8. #8
    Cecilio Martinez
    Join Date
    Sep 2010
    Posts
    6
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    Quote Originally Posted by creece View Post
    Please post back for the group if you were able to correct the JDBC issue
    I used a dymanic port as listed by the IP Address for my SQL instance ... Not sure if this was the right thing to do long term but it worked for me...

    I clicked on Start then right clicked on My computer clicked on Manage expanded Services and Applications expanded SQL Server Configuration Manager clicked on SQL Server Network Configurations double clicked on my instance double clicked on TCP/IP ( Made sure it was enabled) clicked on the IP Addresses Tab used theIPALL TCP Dynamic Port listed ....

    -Cecilio

  9. #9
    sebastien george
    Join Date
    Apr 2011
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    I have to change the port (1431) in SQL Server and geoportal.xml but I always have the same error

    Code:
    2 mai 2011 16:19:39 com.esri.gpt.control.webharvest.engine.TaskQueue next
    ATTENTION: [SYNCHRONIZER] Error fetching next task
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host CARTOSQL, port 1431 has failed. Error: Connection refused: connect. Please verify the connection properties and check that a SQL Server instance is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.)
    	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
    	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
    	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    	at com.esri.gpt.framework.sql.DatabaseReference.openJndiConnection(Unknown Source)
    	at com.esri.gpt.framework.sql.DatabaseReference.openConnection(Unknown Source)
    	at com.esri.gpt.framework.sql.ManagedConnection.<init>(Unknown Source)
    	at com.esri.gpt.framework.sql.ManagedConnections.returnConnection(Unknown Source)
    	at com.esri.gpt.framework.sql.ConnectionBroker.returnConnection(Unknown Source)
    	at com.esri.gpt.framework.sql.BaseDao.returnConnection(Unknown Source)
    	at com.esri.gpt.catalog.harvest.jobs.HjGetNextRequest.execute(Unknown Source)
    	at com.esri.gpt.control.webharvest.engine.TaskQueue.next(Unknown Source)
    	at com.esri.gpt.control.webharvest.engine.Worker.next(Unknown Source)
    	at com.esri.gpt.control.webharvest.engine.Worker.execute(Unknown Source)
    	at com.esri.gpt.control.webharvest.engine.WorkerBase.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host CARTOSQL, port 1431 has failed. Error: Connection refused: connect. Please verify the connection properties and check that a SQL Server instance is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.
    	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:130)
    	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1195)
    	at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(SQLServerConnection.java:1054)
    	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:758)
    	at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
    	at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
    	at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
    	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
    	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
    	... 14 more
    My file geoportal.xml


    Code:
    <!-- Context configuration file for the Geoportal Web App -->
    <Context docBase="geocarto54" path="/geocarto54" debug="0" reloadable="true" crossContext="true">
        <Resource name="jdbc/gpt" auth="Container" type="javax.sql.DataSource"
                  driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
                  url="jdbc:sqlserver://CARTOSQL:1431;databaseName=carto54"
                  user="admincarto54"
                  password="xxxxxxxxx"
                  maxActive="20"
                  maxIdle="10"
                  maxWait="-1" />
    			  
    </Context>
    My database is carto54, server is cartosql
    Z:\tomcat6\webapps\geocarto54
    Last edited by shedorius; 05-02-2011 at 06:21 AM.

  10. #10
    Clive Reece
    Join Date
    Mar 2010
    Posts
    128
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    You are getting 'connection refused'. The error message is telling us that port 1433 is not set up on CARTOSQL to accept SQL Server connections from other machines.

  11. #11
    sebastien george
    Join Date
    Apr 2011
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    Thanks you, but now I have not the choice. I owe to use odbc connection.

    Code:
    <!-- Context configuration file for the Geoportal Web App -->
    <Context docBase="geoportal" path="/geoportal" debug="0" reloadable="true" crossContext="true">
        <Resource name="jdbc/gpt" auth="Container" type="javax.sql.DataSource"
                  driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
                  url="jdbc:odbc:geoportal"
                  user="admincarto54"
                  password="xxxxxxxxxx"
                  maxActive="20"
                  maxIdle="10"
                  maxWait="-1" />
    			  
    </Context>
    I created odbc system connection. His name is geoportal

    Now, I have this error :

    Cannot create PoolableConnectionFactory ([Microsoft][Gestionnaire de pilotes ODBC] Source de données introuvable et nom de pilote non spécifié)

  12. #12
    Clive Reece
    Join Date
    Mar 2010
    Posts
    128
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    You are swimming in uncharted waters trying to use ODBC. I would strongly recommend you stick to a JDBC driver and JDBC url connection. Another tool to try (with the goal of getting the JDBC driver/url combination correct for your system) is DbVisualizer. It would allow you to choose a driver and quickly test different connection strings. Still, I think the primary focus needs to be determining which TCP port your SQLServer database machine is configured to accept outside connections.

  13. #13
    sebastien george
    Join Date
    Apr 2011
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    The problem is that I can not have access firewall, nor cnfiguration sql server.
    The persons of this service are in vacancy. I can only to use ODBC

  14. #14
    sebastien george
    Join Date
    Apr 2011
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    I tryed Dbvizualizer and with this software, I can connect me with tcp port 1354.
    But with geoportal, this error appear :


    Cannot create PoolableConnectionFactory (Échec de l'ouverture de session de l'utilisateur ''. L'utilisateur n'est pas associé à une connexion SQL Server approuvée.)

    I use exactly the same user, password, database, driver ... I don't understand why it work with dbvizualizer but not SQL Server ...




    I would strongly recommend you stick to a JDBC driver and JDBC url connection. Another tool to try (with the goal of getting the JDBC driver/url combination correct for your system) is DbVisualizer. It would allow you to choose a driver and quickly test different connection strings. Still, I think the primary focus needs to be determining which TCP port your SQLServer database machine is configured to accept outside connections.

  15. #15
    Clive Reece
    Join Date
    Mar 2010
    Posts
    128
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    Quote Originally Posted by shedorius View Post
    I tryed Dbvizualizer and with this software, I can connect me with tcp port 1354.
    But with geoportal, this error appear :

    Cannot create PoolableConnectionFactory (Échec de l'ouverture de session de l'utilisateur ''. L'utilisateur n'est pas associé à une connexion SQL Server approuvée.)

    I use exactly the same user, password, database, driver ... I don't understand why it work with dbvizualizer but not SQL Server ...
    You are using dBVisualizer from the Tomcat machine?
    With dBVisualizer you are pointing to the same database driver that is in Tomcat/lib?
    Then I would next look through Tomcat/lib and Tomcat/webapps/geoportal/WEB-INF/lib and make sure you don't have a 2nd database driver that might be conflicting.

  16. #16
    Clive Reece
    Join Date
    Mar 2010
    Posts
    128
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    One more thing: I just translated the French error message to English: "The user logon failed ". The user is not associated with a trusted SQL Server connection."

    This would indicate that the username logon is not allowed/configured to remotely log in to your SQL Server.

  17. 05-09-2011 03:31 AM


  18. #17
    sebastien george
    Join Date
    Apr 2011
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    I use dbVisualizer from the tomcat machine and I point to the same database driver that is in Tomcat/lib. I don't now if I have a 2nd database driver that might be conflicting.





    This would indicate that the username logon is not allowed/configured to remotely log in to your SQL Server.
    With dbVisualizer, I use the same user and password. And It's OK.

  19. #18
    sebastien george
    Join Date
    Apr 2011
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    I noticed that SQL server receives no request when I connect me with the geoportal

  20. #19
    Clive Reece
    Join Date
    Mar 2010
    Posts
    128
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    Let's go back and check that your geoportal webapp context and the JNDI deployment descriptor file are the same.
    Your geoportal webapp context is geocarto54. Correct?
    Can you make sure that the JNDI deployment descriptor placed in config/Catalina/localhost is using the same name, namely geocarto54.xml?

  21. #20
    sebastien george
    Join Date
    Apr 2011
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    Thank you, It' OK

  22. #21
    Clive Reece
    Join Date
    Mar 2010
    Posts
    128
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    Quote Originally Posted by shedorius View Post
    Thank you, It' OK
    Does that mean it is working for you now?

  23. #22
    sebastien george
    Join Date
    Apr 2011
    Posts
    13
    Points
    0
    Answers Provided
    0


    0

    Default Re: Cannot create JDBC driver of class '' for connect URL 'null'

    It's working for me, thank you

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts