GAE - ClassNotFoundException after deployment to Appspot server - java

I've got the Google's example Guestbook project created using Maven's archetype com.google.appengine.archetypes:guestbook-archetype. When I run it locally using mvn appengine:devserver it works alright, the problems start when I try to deploy it on Google's Appspot. I get the following message:
Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message and the query that caused it.
In the logs I can see this:
2013-05-01 05:38:28.356 / 500 3166ms 0kb Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31
2001:6d8:10:a014:5176:bdbe:c152:53c0 - - [01/May/2013:05:38:28 -0700] "GET / HTTP/1.1" 500 0 - "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31" "aghinzop.appspot.com" ms=3167 cpu_ms=2100 loading_request=1 app_engine_release=1.7.7 instance=00c61b117cdf51947e909cbfaf52e1739a7f4c
W 2013-05-01 05:38:28.325
EXCEPTION
java.lang.ClassNotFoundException: ioserv.ioserv.SignGuestbookServlet
at com.google.appengine.runtime.Request.process-53e8711216f37199(Request.java)
at java.lang.ClassLoader.loadClass(ClassLoader.java:359)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
at org.mortbay.util.Loader.loadClass(Loader.java:71)
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:242)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:480)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:487)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:774)
at com.google.tracing.TraceContext$DoInTraceContext.runInContext(TraceContext.java:751)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:342)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:334)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:484)
at java.lang.Thread.run(Thread.java:722)
E 2013-05-01 05:38:28.326
javax.servlet.ServletContext log: unavailable
javax.servlet.UnavailableException: ioserv.ioserv.SignGuestbookServlet
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:242)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:219)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:194)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:134)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:438)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:480)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:487)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:774)
at com.google.tracing.TraceContext$DoInTraceContext.runInContext(TraceContext.java:751)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:342)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:334)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:484)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:722)
W 2013-05-01 05:38:28.338
Failed startup of context com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext#11c3e97{/,/base/data/home/apps/s~aghinzop/1.367061823227494749}
java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:219)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:194)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:134)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:438)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:480)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:487)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:774)
at com.google.tracing.TraceContext$DoInTraceContext.runInContext(TraceContext.java:751)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:342)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:334)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:484)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:722)
C 2013-05-01 05:38:28.342
Uncaught exception from servlet
javax.servlet.UnavailableException: Initialization failed.
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:228)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:194)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:134)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:438)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:480)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:487)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:774)
at com.google.tracing.TraceContext$DoInTraceContext.runInContext(TraceContext.java:751)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:342)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:334)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:484)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:722)
I 2013-05-01 05:38:28.355
This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.
Here are the basic settings I have in Eclipse and the deployment log (I use App Engine Eclipse Plugin).
I'm not sure what "disabled because this is a Maven project" means here. Could you explain? And should I check this box?
The App Engine SDK selected here is the one provided by the Eclipse Plugin.
Here are the libs provided by plugin. There are also some Maven libs added by the archetype.
And here are the libs in WEB-INF/lib. I can see that there are very few of them and I realize that something may be missing. The problem is when I try to copy libs into this folder I get Cannot paste the clipboard contents into the selected elements. How can I do this? In a normal Dynamic Web Project (using this facet) it's as easy as Properties>Deployment Assembly>Add but here I have no clue how to do this.
I'd really appreciate your help! Thank you!

I'm not sure what "disabled because this is a Maven project" means here. Could you explain? And should I check this box?
There are two ways to manage your application (specifically web folder), one letting maven do it, and other letting google eclipse plugin do it. Since your application is built by maven, default assumption is your web app management is done by maven itself, so google eclipse plugin has disabled it by default.
unless you are not removing maven, it should be as it is.
Coming to error, my guess is, though you are building and testing through maven, you might be trying to deploy through eclipse, please try mvn appengine:update and it should work.
hope it helps.

Related

java.io.FileNotFoundException: jackrabbit-standalone.jar

I want to use Apache Jackrabbit as a file storage tool in my web-project. I don`t have experience in using Jackrabbit. I started with downloading jackrabbit-standalone-2.10.1.jar,and then try to run the standalone server with:
java -jar jackrabbit-standalone-2.10.1.jar --port 8099
I have the next message:
Welcome to Apache Jackrabbit!
-------------------------------
Using repository directory jackrabbit
Writing log messages to jackrabbit/log
Starting the server...
Apache Jackrabbit is now running at http://localhost:8099/
But, when I move to localhost:8099 in browser, I have:
HTTP ERROR: 503
Problem accessing /. Reason:
SERVICE_UNAVAILABLE
I checked jackrabbit.log and it is empty, but jetty.log contains:
2015-12-23 02:52:25.862 INFO [main] Slf4jLog.java:67 Logging to Logger[org.mortbay.log] via org.mortbay.log.Slf4jLog
2015-12-23 02:52:25.873 INFO [main] Slf4jLog.java:67 jetty-6.1.x
2015-12-23 02:52:25.924 WARN [main] Slf4jLog.java:76 Web application not found jackrabbit-standalone.jar
2015-12-23 02:52:25.931 WARN [main] Slf4jLog.java:89 Failed startup of context org.mortbay.jetty.webapp.WebAppContext#3f2a3a5{/,jackrabbit-standalone.jar}
java.io.FileNotFoundException: jackrabbit-standalone.jar
at org.mortbay.jetty.webapp.WebAppContext.resolveWebApp(WebAppContext.java:965) ~[jackrabbit-standalone-2.10.1.jar:na]
at org.mortbay.jetty.webapp.WebAppContext.getWebInf(WebAppContext.java:800) ~[jackrabbit-standalone-2.10.1.jar:na]
at org.mortbay.jetty.webapp.WebInfConfiguration.configureClassLoader(WebInfConfiguration.java:62) ~[jackrabbit-standalone-2.10.1.jar:na]
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:457) ~[jackrabbit-standalone-2.10.1.jar:na]
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [jackrabbit-standalone-2.10.1.jar:na]
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) [jackrabbit-standalone-2.10.1.jar:na]
at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115) [jackrabbit-standalone-2.10.1.jar:na]
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [jackrabbit-standalone-2.10.1.jar:na]
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) [jackrabbit-standalone-2.10.1.jar:na]
at org.mortbay.jetty.Server.doStart(Server.java:224) [jackrabbit-standalone-2.10.1.jar:na]
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [jackrabbit-standalone-2.10.1.jar:na]
at org.apache.jackrabbit.standalone.Main.run(Main.java:173) [jackrabbit-standalone-2.10.1.jar:na]
at org.apache.jackrabbit.standalone.Main.main(Main.java:60) [jackrabbit-standalone-2.10.1.jar:na]
I use Ubuntu 14.04, it works properly on Windows 7.
Thanks in advance for help.

ClassNotFoundException - ResteasyBootstrap

Upon running my GWT/GAE (App Engine) application the app throws this error:
ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
Here is the POM.xml
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxb-provider</artifactId>
<version>${resteasy.version}</version>
</dependency>
And here is the log:
java.lang.ClassNotFoundException:
org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap at
java.net.URLClassLoader$1.run(URLClassLoader.java:366) at
java.net.URLClassLoader$1.run(URLClassLoader.java:355) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:354) at
java.lang.ClassLoader.loadClass(ClassLoader.java:423) at
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:213)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at
org.mortbay.jetty.handler.ContextHandler.loadClass(ContextHandler.java:1101)
at
org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:630)
at
org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368)
at
org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289)
at
org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222)
at
org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1247)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224) at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:205)
at
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:232)
at
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:157)
at
com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509) at
com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093) at
com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836) at
com.google.gwt.dev.DevMode.main(DevMode.java:311)
What could be missing?
Update:
Anyone can share their web.xml that worked for RestEasy + GAE
The exception indicates the classes are not there.
Ensure that resteasy-jaxrs are copied into your WEB-INF/lib and also ensure that your version is 2.3.0.GA or higher.
If your project is maven base project then run
mvn eclipse:clean
mvn eclipse:eclipse
it will add jar from m2 repo to lib folder then redeploy webapp and restart tomcat/server
Please check that
You are not pointing to a JRE, should be a JDK.
Remove and Add your server. Then run the application again.

How to use MySQL persistence manager with Jackrabbit standalone

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 ...]
[edit: here's the full backtrace]
2013-03-04 10:59:27.526 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_27]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_27]
at java.net.URLClassLoader.findClass(URLClassLoader.java:205) ~[na:1.6.0_27]
at java.lang.ClassLoader.loadClass(ClassLoader.java:321) ~[na:1.6.0_27]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) ~[na:1.6.0_27]
at java.lang.ClassLoader.loadClass(ClassLoader.java:266) ~[na:1.6.0_27]
at java.lang.Class.forName0(Native Method) ~[na:1.6.0_27]
at java.lang.Class.forName(Class.java:188) ~[na:1.6.0_27]
at org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:260) ~[jackrabbit-standalone-2.6.0.jar:na]
... 29 common frames omitted
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
The MySqlPersistenceManager tries to load the driver class org.gjt.mm.mysql.Driver, which is very old. Try using a more recent driver class, the class com.mysql.jdbc.Driver instead. To do that, you would need to configure the persistence manager in the repository.xml and all workspace.xml files as follows:
<PersistenceManager ...>
...
<param name="driver" value="com.mysql.jdbc.Driver"/>
</PersistenceManager>
In order to load the MySQL driver with Apache Jackrabbit-standalone. You will need to update the jackrabbit-stabndalone-x.x.x.jar in MANIFEST.MF.
Simply add a Class-Path statement to the bottom of the file such as:
Class-Path: lib/mysql-connector-java-5.1.25-bin.jar
I had the same problem as you and this was the only way I could get the MySQL driver class recognized.
Answering my own question, although it doesn't directly answer it:
Instead of trying to use the jackrabbit-standalone version, I've successfully got it running under Tomcat by following the instructions here:
https://github.com/jackalope/jackalope/wiki/Running-jackrabbit-in-tomcat-with-mysql
This gives me what I need; a working Jackrabbit instance that connects to a MySQL data store. Although this doesn't help anyone who comes across this and specifically needs to use Jackrabbit standalone, I would say that setting it up under Tomcat proved much easier for me, so is worth considering.
Please do the following activities.
Un-jar the standalone server jar (in my case it is : jackrabbit-standalone-2.8.3). You will see many folders. among them you will find two folder. 1.com 2. org.
Un-jar mysql-connector-java-5.1.30-bin. again you will find above mentioned two folders. go inside both the folders and copy the git(org) and mysql(com)
Paste inside the step 1's folder respectively. and restart the standalone server.
Regards,
Nitesh

Google app engine deployment causes 500 server error

I just straight away paste the log from dashboard. Can anybody guide what is happening behind the scenes and what is wrong because it works just fine on the dev server.
182.19.30.169 - - [14/Nov/2012:10:16:14 -0800] "GET / HTTP/1.1" 500 0 - "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" "cloudcvapp.appspot.com" ms=281 cpu_ms=129 instance=00c61b117c07c18415a7a2919a158e127eee2796
W 2012-11-14 23:46:14.822
Failed startup of context com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext#1d81ec9{/,/base/data/home/apps/s~cloudcvapp/1.363170872947752764}
java.lang.IllegalStateException: No forced path servlet for /WEB-INF/index.jsp
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:679)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:219)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:194)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:134)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:447)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:454)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:461)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:703)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:338)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:330)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:458)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:679)
C 2012-11-14 23:46:14.823
Uncaught exception from servlet
javax.servlet.UnavailableException: Initialization failed.
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:228)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:194)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:134)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:447)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:454)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:461)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:703)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:338)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:330)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:458)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:679)
redeploy the application to google app engine again.

Logging.LogFactory error in google web application engine project developmenter

I am using the google web application engine and develop a project. I meet with a problem of runtime error like that :
Apr 28, 2011 10:28:36 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error starting handlers
java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory is a restricted class. Please see the Google App Engine developer's guide for more details.
at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
at org.springframework.web.context.ContextLoader.<clinit>(ContextLoader.java:146)
at org.springframework.web.context.ContextLoaderListener.createContextLoader(ContextLoaderListener.java:53)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:44)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:185)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:147)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:219)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Apr 28, 2011 10:28:36 AM com.google.apphosting.utils.jetty.JettyLogger debug
How can I get the solution for this?
Here is my logging.properties...
A default java.util.logging configuration.
(All App Engine logging is through java.util.logging by default).
#
To use this configuration, copy it into your application's WEB-INF
folder and add the following to your appengine-web.xml:
#
Set the default logging level for all loggers to WARNING
.level = ALL
handlers = java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=ALL
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
Set the default logging level for ORM, specifically, to WARNING
DataNucleus.JDO.level=WARNING
DataNucleus.Persistence.level=WARNING
DataNucleus.Cache.level=WARNING
DataNucleus.MetaData.level=WARNING
DataNucleus.General.level=WARNING
DataNucleus.Utility.level=WARNING
DataNucleus.Transaction.level=WARNING
DataNucleus.Datastore.level=WARNING
DataNucleus.ClassLoading.level=WARNING
DataNucleus.Plugin.level=WARNING
DataNucleus.ValueGeneration.level=WARNING
DataNucleus.Enhancer.level=WARNING
DataNucleus.SchemaTool.level=WARNING
java.sql.level=INFO
It is possible you're missing commons-logging-xxx.jar in your build path

Categories

Resources