Hi,
For some reason (I guess file uploads?) Stripes need a temporary directory
on the filesystem. That is a problem if the app is deployed to Google App
Engine, which does not support (RW) filesystem access. When application is
starting following exception is risen:
failed StripesFilter
net.sourceforge.stripes.exception.StripesRuntimeException: Problem
instantiating default configuration objects.
at
net.sourceforge.stripes.config.DefaultConfiguration.init(DefaultConfiguration.java:220)
at
net.sourceforge.stripes.config.RuntimeConfiguration.init(RuntimeConfiguration.java:272)
at
net.sourceforge.stripes.controller.StripesFilter.init(StripesFilter.java:125)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:190)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:167)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:113)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)
at
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4547)
at
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4545)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:359)
at com.google.net.rpc.impl.Server$2.run(Server.java:792)
at
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:489)
at com.google.net.rpc.impl.Server.startRpc(Server.java:748)
at com.google.net.rpc.impl.Server.processRequest(Server.java:340)
at
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:422)
at
com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319)
at
com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:419)
at
com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:733)
at
com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:207)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)
at
com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:249)
at
com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:373)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at java.io.File.<init>(File.java:276)
at
net.sourceforge.stripes.controller.multipart.DefaultMultipartWrapperFactory.init(DefaultMultipartWrapperFactory.java:101)
at
net.sourceforge.stripes.config.DefaultConfiguration.init(DefaultConfiguration.java:181)
... 33 more
In DefaultMultipartWrapperFactory.java is
// Figure out where the temp directory is, and store that info
File tempDir = (File)
config.getServletContext().getAttribute("javax.servlet.context.tempdir");
if (tempDir != null) {
this.temporaryDirectory = tempDir;
}
else {
*101: this.temporaryDirectory = new
File(System.getProperty("java.io.tmpdir")).getAbsoluteFile();*
}
Is there a way how to solve this? Somehow
replace DefaultMultipartWrapperFactory? Or maybe use ServletContext which
for javax.servlet.context.tempdir returns some directory which exists in the
environment? Thank you for any tips. I'm OK with application not being able
to upload files :)
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users