如何在 postgres 服务器上 运行 oak-运行 控制台
How to run oak-run console on postgres server
我正在尝试连接到我在 postgresql 数据库中的 DocumentNodeStore。
按照此处的说明 https://jackrabbit.apache.org/oak/docs/features/oak-run-nodestore-connection-options.html
export CLASSPATH=postgresql-42.2.5.jar:oak-run-1.9.9.jar
java org.apache.jackrabbit.oak.run.Main console jdbc:postgresql://localhost/mydb --rdbjdbcuser myuser --rdbjdbcpasswd mypassword
我收到以下错误:
Apache Jackrabbit Oak 1.9.9
Exception in thread "main" org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: trying to create datasource org.apache.tomcat.jdbc.pool.DataSource
at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDataSourceFactory.forJdbcUrl(RDBDataSourceFactory.java:90)
at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDataSourceFactory.forJdbcUrl(RDBDataSourceFactory.java:100)
at org.apache.jackrabbit.oak.run.cli.DocumentFixtureProvider.configureDocumentMk(DocumentFixtureProvider.java:117)
at org.apache.jackrabbit.oak.run.cli.NodeStoreFixtureProvider.create(NodeStoreFixtureProvider.java:70)
at org.apache.jackrabbit.oak.run.cli.NodeStoreFixtureProvider.create(NodeStoreFixtureProvider.java:49)
at org.apache.jackrabbit.oak.console.Console.main(Console.java:49)
at org.apache.jackrabbit.oak.run.ConsoleCommand.execute(ConsoleCommand.java:27)
at org.apache.jackrabbit.oak.run.Main.main(Main.java:49)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.jdbc.pool.DataSource
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDataSourceFactory.forJdbcUrl(RDBDataSourceFactory.java:74)
... 7 more
我错过了什么吗?
如link所述:
Note that the oak-run JAR file lacks several RDB specific JAR files that need to be added to the classpath:
1. tomcat-jdbc-8.5.*.jar (Apache Tomcat JDBC connection pool)
2. juli-6.0.*.jar (Apache Tomcat Logger)
3. Whatever JDBC driver is needed to connect to the database
我错过了前 2 个罐子
我正在尝试连接到我在 postgresql 数据库中的 DocumentNodeStore。 按照此处的说明 https://jackrabbit.apache.org/oak/docs/features/oak-run-nodestore-connection-options.html
export CLASSPATH=postgresql-42.2.5.jar:oak-run-1.9.9.jar
java org.apache.jackrabbit.oak.run.Main console jdbc:postgresql://localhost/mydb --rdbjdbcuser myuser --rdbjdbcpasswd mypassword
我收到以下错误:
Apache Jackrabbit Oak 1.9.9
Exception in thread "main" org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: trying to create datasource org.apache.tomcat.jdbc.pool.DataSource
at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDataSourceFactory.forJdbcUrl(RDBDataSourceFactory.java:90)
at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDataSourceFactory.forJdbcUrl(RDBDataSourceFactory.java:100)
at org.apache.jackrabbit.oak.run.cli.DocumentFixtureProvider.configureDocumentMk(DocumentFixtureProvider.java:117)
at org.apache.jackrabbit.oak.run.cli.NodeStoreFixtureProvider.create(NodeStoreFixtureProvider.java:70)
at org.apache.jackrabbit.oak.run.cli.NodeStoreFixtureProvider.create(NodeStoreFixtureProvider.java:49)
at org.apache.jackrabbit.oak.console.Console.main(Console.java:49)
at org.apache.jackrabbit.oak.run.ConsoleCommand.execute(ConsoleCommand.java:27)
at org.apache.jackrabbit.oak.run.Main.main(Main.java:49)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.jdbc.pool.DataSource
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDataSourceFactory.forJdbcUrl(RDBDataSourceFactory.java:74)
... 7 more
我错过了什么吗?
如link所述:
Note that the oak-run JAR file lacks several RDB specific JAR files that need to be added to the classpath:
1. tomcat-jdbc-8.5.*.jar (Apache Tomcat JDBC connection pool)
2. juli-6.0.*.jar (Apache Tomcat Logger)
3. Whatever JDBC driver is needed to connect to the database
我错过了前 2 个罐子