jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Janssen <l...@fazy.net>
Subject Re: How to use MySQL persistence manager with Jackrabbit standalone
Date Fri, 01 Mar 2013 16:30:34 GMT
Still getting the same problem... :(

I wasn't sure if it was picking up the CLASSPATH variable, so I used -cp on
the java command:

java -cp /usr/share/java/mysql-connector-java-5.1.16.jar
-XX:MaxPermSize=128m -Xmx512M -Xms128M -Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1111
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.password.file=/opt/jackrabbit/startup/jmx.user
-Dcom.sun.management.jmxremote.access.file=/opt/jackrabbit/startup/jmx.role
-jar /opt/jackrabbit/jackrabbit-standalone-2.6.0.jar

I hope I'm using the right connector, this one from Debian APT:
    libmysql-java - Java database (JDBC) driver for MySQL

The apt-file command confirms that it's providing this file:
    /usr/share/java/mysql-connector-java-5.1.16.jar

Thanks,
Lars.






On Fri, Mar 1, 2013 at 4:02 PM, Stefan Guggisberg <
stefan.guggisberg@gmail.com> wrote:

> here's the culprit:
>
> Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
>
> make sure you've added the mysql jdbc driver to the classpath.
>
> cheers
> stefan
>
> On Fri, Mar 1, 2013 at 4:40 PM, Lars Janssen <lars@fazy.net> wrote:
> > Hi Stefan,
> >
> > Thanks for replying. I cleared the log file and started Jackrabbit again,
> > here is the entire log from the startup operation:
> >
> > 2013-03-01 15:35:26.586 INFO  [main] RepositoryImpl.java:256
> > Starting repository...
> > 2013-03-01 15:35:26.588 INFO  [main] LocalFileSystem.java:164
> >  LocalFileSystem initialized at path jackrabbit/repository
> > 2013-03-01 15:35:26.664 INFO  [main] NodeTypeRegistry.java:870         no
> > custom node type definitions found
> > 2013-03-01 15:35:26.683 INFO  [main] LocalFileSystem.java:164
> >  LocalFileSystem initialized at path jackrabbit/version
> > 2013-03-01 15:35:27.717 ERROR [main] RepositoryImpl.java:366
> > failed to start Repository: Cannot instantiate persistence manager
> > org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager
> > javax.jcr.RepositoryException: Cannot instantiate persistence manager
> > org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager
> >         at
> >
> org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1353)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.RepositoryImpl.createVersionManager(RepositoryImpl.java:486)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:311)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:589)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.RepositoryContext.create(RepositoryContext.java:149)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.servlet.jackrabbit.JackrabbitRepositoryServlet.init(JackrabbitRepositoryServlet.java:109)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at javax.servlet.GenericServlet.init(GenericServlet.java:241)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at org.mortbay.jetty.Server.doStart(Server.java:224)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at org.apache.jackrabbit.standalone.Main.run(Main.java:173)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at org.apache.jackrabbit.standalone.Main.main(Main.java:60)
> > [jackrabbit-standalone-2.6.0.jar:na]
> > Caused by: javax.jcr.RepositoryException: Could not load JDBC driver
> class
> > org.gjt.mm.mysql.Driver
> >         at
> >
> org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:265)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:233)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:169)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.getDataSource(BundleDbPersistenceManager.java:569)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.init(BundleDbPersistenceManager.java:537)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager.init(MySqlPersistenceManager.java:51)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1349)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         ... 23 common frames omitted
> > Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
> >         at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> > ~[na:1.6.0_24]
> >         at java.security.AccessController.doPrivileged(Native Method)
> > ~[na:1.6.0_24]
> >         at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> > ~[na:1.6.0_24]
> >         at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> > ~[na:1.6.0_24]
> >         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> > ~[na:1.6.0_24]
> >         at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> > ~[na:1.6.0_24]
> >         at java.lang.Class.forName0(Native Method) ~[na:1.6.0_24]
> >         at java.lang.Class.forName(Class.java:186) ~[na:1.6.0_24]
> >         at
> >
> org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:260)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         ... 29 common frames omitted
> > 2013-03-01 15:35:27.718 INFO  [main] RepositoryImpl.java:1060
> >  Shutting down repository...
> > 2013-03-01 15:35:27.719 INFO  [main] RepositoryImpl.java:1165
> >  Repository has been shutdown
> > 2013-03-01 15:35:27.720 WARN  [main] Slf4jLog.java:89
> >  unavailable
> > javax.jcr.RepositoryException: Cannot instantiate persistence manager
> > org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager
> >         at
> >
> org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1353)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.RepositoryImpl.createVersionManager(RepositoryImpl.java:486)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:311)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:589)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.RepositoryContext.create(RepositoryContext.java:149)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.servlet.jackrabbit.JackrabbitRepositoryServlet.init(JackrabbitRepositoryServlet.java:109)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at javax.servlet.GenericServlet.init(GenericServlet.java:241)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at org.mortbay.jetty.Server.doStart(Server.java:224)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at
> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at org.apache.jackrabbit.standalone.Main.run(Main.java:173)
> > [jackrabbit-standalone-2.6.0.jar:na]
> >         at org.apache.jackrabbit.standalone.Main.main(Main.java:60)
> > [jackrabbit-standalone-2.6.0.jar:na]
> > Caused by: javax.jcr.RepositoryException: Could not load JDBC driver
> class
> > org.gjt.mm.mysql.Driver
> >         at
> >
> org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:265)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:233)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:169)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.getDataSource(BundleDbPersistenceManager.java:569)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.init(BundleDbPersistenceManager.java:537)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager.init(MySqlPersistenceManager.java:51)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         at
> >
> org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1349)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         ... 23 common frames omitted
> > Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
> >         at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> > ~[na:1.6.0_24]
> >         at java.security.AccessController.doPrivileged(Native Method)
> > ~[na:1.6.0_24]
> >         at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> > ~[na:1.6.0_24]
> >         at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> > ~[na:1.6.0_24]
> >         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> > ~[na:1.6.0_24]
> >         at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> > ~[na:1.6.0_24]
> >         at java.lang.Class.forName0(Native Method) ~[na:1.6.0_24]
> >         at java.lang.Class.forName(Class.java:186) ~[na:1.6.0_24]
> >         at
> >
> org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:260)
> > ~[jackrabbit-standalone-2.6.0.jar:na]
> >         ... 29 common frames omitted
> > 2013-03-01 15:35:27.721 INFO  [main] RepositoryAccessServlet.java:98
> > RepositoryAccessServlet initialized.
> > 2013-03-01 15:35:27.727 INFO  [main] AbstractWebdavServlet.java:169
> >  authenticate-header = Basic realm="Jackrabbit Webdav Server"
> > 2013-03-01 15:35:27.727 INFO  [main] AbstractWebdavServlet.java:174
> >  csrf-protection = null
> > 2013-03-01 15:35:27.727 INFO  [main] AbstractWebdavServlet.java:181
> >  createAbsoluteURI = true
> > 2013-03-01 15:35:27.728 INFO  [main] SimpleWebdavServlet.java:144
> >  resource-path-prefix = '/repository'
> > 2013-03-01 15:35:27.838 INFO  [main] AbstractWebdavServlet.java:169
> >  authenticate-header = Basic realm="Jackrabbit Webdav Server"
> > 2013-03-01 15:35:27.838 INFO  [main] AbstractWebdavServlet.java:174
> >  csrf-protection = null
> > 2013-03-01 15:35:27.838 INFO  [main] AbstractWebdavServlet.java:181
> >  createAbsoluteURI = true
> >
> >
> > Best regards,
> >
> > Lars.
> >
> >
> >
> > On Fri, Mar 1, 2013 at 3:19 PM, Stefan Guggisberg <
> > stefan.guggisberg@gmail.com> wrote:
> >
> >> hi lars,
> >>
> >> On Fri, Mar 1, 2013 at 4:08 PM, Lars Janssen <lars-listmail@ukmix.net>
> >> wrote:
> >> > Hi all,
> >> >
> >> > I've been successfully using Apache Jackrabbit 2.4.3 and now 2.6.0
> >> > (standalone server in both cases) using the default configuration, so
> the
> >> > repository is stored on the filesystem.
> >> >
> >> > How can I make it connect to a MySQL back end instead? I don't need to
> >> > worry about migration, just set it up as a fresh install.
> >> >
> >> > After trying the steps below, Jackrabbit fails to start correctly or
> >> > populate the DATASTORE table in the database, and I find this error in
> >> the
> >> > logs:
> >> >
> >> > ERROR [main] RepositoryImpl.java:366
> >> >            failed to start Repository: Cannot instantiate persistence
> >> > manager
> >> org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager
> >> >     javax.jcr.RepositoryException: Cannot instantiate persistence
> manager
> >> > org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager
> >> >     [... oodles of backtrace cut ...]
> >>
> >> could you please provide the full stack trace, or, even better, the
> >> complete error log?
> >>
> >> cheers
> >> stefan
> >>
> >> > What I've done so far:
> >> >
> >> > I've created the Jackrabbit database/user, which I can connect to no
> >> > problem:
> >> >
> >> > mysql -D jackrabbit -u jackrabbit -h localhost -pjackrabbit
> >> > I started with a clean slate (empty /var/jackrabbit directory), except
> >> the
> >> > configuration file comes from here:
> >> > https://raw.github.com/wiki/jackalope/jackalope/files/repository.xml
> >> >
> >> > Here's the startup script I'm using:
> >> > https://github.com/sixty-nine/Jackrabbit-startup-script
> >> >
> >> > And here's the java process that runs:
> >> >
> >> > java -XX:MaxPermSize=128m -Xmx512M -Xms128M
> >> -Dcom.sun.management.jmxremote
> >> > -Dcom.sun.management.jmxremote.port=1111
> >> > -Dcom.sun.management.jmxremote.authenticate=true
> >> > -Dcom.sun.management.jmxremote.ssl=false
> >> >
> >>
> -Dcom.sun.management.jmxremote.password.file=/opt/jackrabbit/startup/jmx.user
> >> >
> >>
> -Dcom.sun.management.jmxremote.access.file=/opt/jackrabbit/startup/jmx.role
> >> > -jar /opt/jackrabbit/jackrabbit-standalone-2.6.0.jar -h 127.0.0.1 -p
> 8080
> >> > I don't think I get far enough for it to matter, but I'm using MySQL
> >> > 5.5.28-1.
> >> >
> >> > I'm having the above problem with both 2.4.3 and 2.6.0.
> >> >
> >> > Also:
> >> >
> >> > java version "1.6.0_24"
> >> > OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-1)
> >> > OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
> >> > Plus I subsequently installed the MySQL JDBC library on Debian:
> >> >
> >> > apt-get install libmysql-java
> >> >
> >> > Thanks,
> >> >
> >> > Lars.
> >>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message