Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recurring messages about database connection in gpt log file #201

Closed
rajk1 opened this issue Feb 24, 2016 · 5 comments
Closed

Recurring messages about database connection in gpt log file #201

rajk1 opened this issue Feb 24, 2016 · 5 comments
Assignees
Milestone

Comments

@rajk1
Copy link

rajk1 commented Feb 24, 2016

Hi,

I keep seeing a lot of recurring messages in the gpt log file like the following. I know the database connection works since I can upload metadata records. Any ideas how to fix/troubleshoot the underlying cause of those messages as they 'grow' the log file very quickly.

I'm on Windows 2008 R2 server; GeoPortal 1.2.6; Apache Tomcat 6.0.32; SQL Server 2008

Thanks.
Raj

Feb 24, 2016 1:14:47 PM com.esri.gpt.control.webharvest.engine.TaskQueue next
WARNING: [SYNCHRONIZER] Error fetching next task
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
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.(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: java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Unknown Source)
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
... 14 more
Feb 24, 2016 1:14:47 PM com.esri.gpt.control.webharvest.engine.WatchDog run
SEVERE: [SYNCHRONIZER] Error loading tasks for Watch-dog.
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
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.(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.HjLoadAllRequest.execute(Unknown Source)
at com.esri.gpt.control.webharvest.engine.WatchDog.selectAll(Unknown Source)
at com.esri.gpt.control.webharvest.engine.WatchDog.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Unknown Source)
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
... 12 more

@mhogeweg
Copy link
Member

hi, this typically happens when there is a problem with the JNDI configuration. please check gpt.xml for

    <databaseReference name="gpt" jndiName="jdbc/gpt"/>

(also make sure gpt.xml is valid XML!) and then also check ...Tomcat\conf\Catalina\localhost\geoportal.xml (assuming your website is named 'geoportal' and make sure the database connection is correct.

finally, make sure the database jdbc jar file is present (in Tomcat or in the Geoportal web app).

@rajk1
Copy link
Author

rajk1 commented Feb 26, 2016

I've checked the gpt.xml file and everything looks good. Database connection in geoportal.xml file also looks good. The GeoPortal app itself works as I can log in and import metadata records. But I still keep seeing those messages.

Here is the confusing part. Just after complaining about not being able to create JDBC driver it indicates that "Connection opened for gpt, jndiName ...". Please see gpt logs below near the bottom. So this clearly indicates that some parts that need to connect to the database are working but other parts like the webharvester is not. Any ideas?

Feb 26, 2016 11:11:58 AM com.esri.gpt.control.webharvest.engine.TaskQueue next
WARNING: [SYNCHRONIZER] Error fetching next task
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
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.(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: java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Unknown Source)
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
... 14 more
Feb 26, 2016 11:11:58 AM com.esri.gpt.framework.sql.DatabaseReference openConnection
FINE: Connection opened for gpt, jndiName: jdbc/gpt, productName: Microsoft SQL Server, driver: Microsoft JDBC Driver 4.0 for SQL Server 4.0.2206.100
Feb 26, 2016 11:11:58 AM com.esri.gpt.framework.sql.DatabaseReference openConnection
FINE: Connection opened for gpt, jndiName: jdbc/gpt, productName: Microsoft SQL Server, driver: Microsoft JDBC Driver 4.0 for SQL Server 4.0.2206.100
Feb 26, 2016 11:11:58 AM com.esri.gpt.framework.sql.DatabaseReference closeConnection
FINE: Closing connection for gpt, jndiName: jdbc/gpt
Feb 26, 2016 11:11:58 AM com.esri.gpt.framework.sql.DatabaseReference closeConnection
FINE: Closing connection for gpt, jndiName: jdbc/gpt
Feb 26, 2016 11:11:58 AM com.esri.gpt.framework.sql.DatabaseReference openConnection
FINE: Connection opened for gpt, jndiName: jdbc/gpt, productName: Microsoft SQL Server, driver: Microsoft JDBC Driver 4.0 for SQL Server 4.0.2206.100
Feb 26, 2016 11:11:58 AM com.esri.gpt.framework.sql.DatabaseReference closeConnection
FINE: Closing connection for gpt, jndiName: jdbc/gpt

@rajk1
Copy link
Author

rajk1 commented Feb 26, 2016

The following is from the start of the gpt log file after the Tomcat service was stopped and log files deleted and tomcat service restarted. It indicates that database connectivity is working fine. So it's a mystery to me why further down the log file there are messages about issues with the database connection.

Feb 26, 2016 1:10:46 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.0.3 (FCS b03) for context '/geoportal'
Feb 26, 2016 1:10:48 PM org.apache.struts.action.ActionServlet initChain
INFO: Loading chain catalog from jar:file:/C:/GeoPortal/Apache%20Software%20Foundation/Tomcat%206.0/webapps/geoportal/WEB-INF/lib/struts-tiles-1.3.10.jar!/org/apache/struts/tiles/chain-config.xml
Feb 26, 2016 1:10:48 PM org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
Feb 26, 2016 1:10:48 PM com.esri.gpt.framework.context.InitializationServlet init
INFO: Initializing ApplicationContext...
Feb 26, 2016 1:10:48 PM com.esri.gpt.framework.context.ApplicationConfigurationLoader load
FINE: Loading configuration file: gpt/config/gpt.xml
Feb 26, 2016 1:10:49 PM com.esri.gpt.framework.sql.DatabaseReference openConnection
FINE: Connection opened for gpt, jndiName: jdbc/gpt, productName: Microsoft SQL Server, driver: Microsoft JDBC Driver 4.0 for SQL Server 4.0.2206.100
Feb 26, 2016 1:10:49 PM com.esri.gpt.framework.sql.DatabaseReference closeConnection
FINE: Closing connection for gpt, jndiName: jdbc/gpt
Feb 26, 2016 1:10:49 PM com.esri.gpt.framework.context.ApplicationConfigurationLoader loadDcatMappings
FINE: Loading dcat mapping file: gpt/metadata/dcat-mappings.xml
Feb 26, 2016 1:10:51 PM com.esri.gpt.framework.context.ApplicationConfigurationLoader loadHarvesterConfiguration
INFO: [SYNCHRONIZER] Missing "webharvester.poolSize" parameter. Default 4 will be used instead.
Feb 26, 2016 1:10:51 PM com.esri.gpt.framework.context.ApplicationConfigurationLoader loadHarvesterConfiguration
INFO: [SYNCHRONIZER] Missing "webharvester.autoSelectFrequency" parameter. Default 3,600,000 will be used instead.
Feb 26, 2016 1:10:51 PM com.esri.gpt.framework.context.ApplicationConfigurationLoader loadHarvesterConfiguration
INFO: [SYNCHRONIZER] Missing "webharvester.watchDogFrequency" parameter. Default 60,000 will be used instead.
Feb 26, 2016 1:10:51 PM com.esri.gpt.framework.context.ApplicationConfigurationLoader loadHarvesterConfiguration
INFO: [SYNCHRONIZER] Missing "webharvester.baseContextPath" parameter. Harvest notification messages will be sent without information about harvest report.
Feb 26, 2016 1:10:51 PM com.esri.gpt.framework.context.ApplicationConfigurationLoader loadHarvesterConfiguration
INFO: [SYNCHRONIZER] Missing "webharvester.resource.autoApprove" parameter. Default false will be used instead.
Feb 26, 2016 1:10:51 PM com.esri.gpt.framework.context.ApplicationConfigurationLoader load

@umacgillivray
Copy link
Contributor

@rajk1 Hi, Maybe you have more than one geoportal webapp deployed, both pointing to the same log file?

@rajk1
Copy link
Author

rajk1 commented Feb 29, 2016

Thanks @umacgillivray, mystery solved. That was it. There was an older version of GeoPortal on the same server which was renamed but not removed.

@zguo zguo assigned zguo and pandzel-zz and unassigned zguo Apr 5, 2016
@zguo zguo added this to the 1.2.7 milestone Apr 5, 2016
@zguo zguo closed this as completed Apr 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants