1

I have installed GeoNetwork using the windows installer, but when i try to open, it displays the error message below:

Raised exception while initializing resource main-db in C:\Program Files (x86)\geonetwork\web\geonetwork\WEB-INF\config.xml. Skipped. Cannot create PoolableConnectionFactory (IO Exception: "java.io.FileNotFoundException: C:\Program Files (x86)\geonetwork\jetty\geonetwork.lock.db (Access is denied)"; "C:\Program Files (x86)\geonetwork\jetty\geonetwork.lock.db" [90031-152]) org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (IO Exception: "java.io.FileNotFoundException: C:\Program Files (x86)\geonetwork\jetty\geonetwork.lock.db (Access is denied)"; "C:\Program Files (x86)\geonetwork\jetty\geonetwork.lock.db" [90031-152]) Provider jeeves.resources.dbms.ApacheDBCPool Stack org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (IO Exception: "java.io.FileNotFoundException: C:\Program Files (x86)\geonetwork\jetty\geonetwork.lock.db (Access is denied)"; "C:\Program Files (x86)\geonetwork\jetty\geonetwork.lock.db" [90031-152]) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at jeeves.resources.dbms.Dbms.connect(Dbms.java:89) at jeeves.resources.dbms.AbstractDbmsPool.open(AbstractDbmsPool.java:142) at jeeves.server.JeevesEngine.initResources(JeevesEngine.java:528) at jeeves.server.JeevesEngine.loadConfigFile(JeevesEngine.java:335) at jeeves.server.JeevesEngine.init(JeevesEngine.java:192) at jeeves.server.sources.http.JeevesServlet.init(JeevesServlet.java:91) at javax.servlet.GenericServlet.init(GenericServlet.java:241) at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:477) at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:293) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:739) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:254) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1238) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:683) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:480) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39) at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186) at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494) at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141) at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145) at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56) at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609) at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540) at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403) at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555) at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96) at org.eclipse.jetty.server.Server.doStart(Server.java:275) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1266) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1189) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.jetty.start.Main.invokeMain(Main.java:472) at org.eclipse.jetty.start.Main.start(Main.java:620) at org.eclipse.jetty.start.Main.main(Main.java:95) Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.FileNotFoundException: C:\Program Files (x86)\geonetwork\jetty\geonetwork.lock.db (Access is denied)"; "C:\Program Files (x86)\geonetwork\jetty\geonetwork.lock.db" [90031-152] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) at org.h2.message.DbException.get(DbException.java:156) at org.h2.message.DbException.convertIOException(DbException.java:313) at org.h2.store.fs.FileSystemDisk.openFileOutputStream(FileSystemDisk.java:382) at org.h2.store.FileLock.save(FileLock.java:203) at org.h2.store.FileLock.lockFile(FileLock.java:335) at org.h2.store.FileLock.lock(FileLock.java:134) at org.h2.engine.Database.open(Database.java:535) at org.h2.engine.Database.openDatabase(Database.java:218) at org.h2.engine.Database.(Database.java:213) at org.h2.engine.Engine.openSession(Engine.java:56) at org.h2.engine.Engine.openSession(Engine.java:159) at org.h2.engine.Engine.createSessionAndValidate(Engine.java:138) at org.h2.engine.Engine.createSession(Engine.java:121) at org.h2.engine.Engine.createSession(Engine.java:28) at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:285) at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:114) at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:98) at org.h2.Driver.connect(Driver.java:72) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ... 49 more Caused by: java.io.FileNotFoundException: C:\Program Files (x86)\geonetwork\jetty\geonetwork.lock.db (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.(Unknown Source) at java.io.FileOutputStream.(Unknown Source) at org.h2.store.fs.FileSystemDisk.openFileOutputStream(FileSystemDisk.java:374) ... 68 more

How do I fix this?

  • Have you tried "run as" Administrator? – BradHards Nov 27 '14 at 10:35
  • Yes, but no change – user30839 Nov 27 '14 at 11:10
3

It is trying to create the H2 database on "java.io.FileNotFoundException: C:\Program Files (x86)\geonetwork\jetty\geonetwork.lock.db (Access is denied)". So it seems that you have a privileges problem.

The fastest thing to solve this is to modify the config.xml file to point the database url to another place where you know your tomcat user has writable access.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.