[appengine-java] Re: Exception on creation of java.io.File in GAE

2009-09-01 Thread barak

10x :-)

On Aug 31, 6:57 pm, Toby Reyelts to...@google.com wrote:
 It looks like compass is reading the System property, java.io.tmpdir and
 eventually it gets passed into a File constructor call. App Engine doesn't
 have a temp directory (we don't allow the writing of any files to disk), so
 this system property is set to null. If you need to set this system property
 for compass, you can configure it in your appengine-web.xml. For example,

 system-properties
   property name=java.io.tmpdir value=./
 /system-properties



 On Mon, Aug 31, 2009 at 4:05 AM, barak barak.ya...@gmail.com wrote:

  Hello all,

  I'm trying to upload an application that using Lucene and compass. The
  Lucene files are stored under the war directory and should be open to
  read access only. When booting the application, the files are opened
  by the lucene (wrapped with compass). All works ok in the developmemt
  server, when deployed in GAE, the following exception raised:

  java.lang.NullPointerException
         at java.io.File.init(File.java:276)
         at
  org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:
  139)
         at org.compass.core.lucene.engine.store.FSDirectoryStore.configure
  (FSDirectoryStore.java:55)
         at
  org.compass.core.lucene.engine.store.DefaultLuceneSearchEngineStore.init
  (DefaultLuceneSearchEngineStore.java:144)
         at org.compass.core.lucene.engine.LuceneSearchEngineFactory.init
  (LuceneSearchEngineFactory.java:122)
         at org.compass.core.impl.DefaultCompass.init(DefaultCompass.java:
  123)
         at org.compass.core.impl.DefaultCompass.init(DefaultCompass.java:
  116)
         at org.compass.core.config.CompassConfiguration.buildCompass
  (CompassConfiguration.java:288)
         at com.me.store.DataAccessObject.init(DataAccessObject.java:76)
         at com.me.store.DataAccessObject.getInstance(DataAccessObject.java:
  53)
         at com.me.jsf.LargeDataModelBeanSample$Model.fetchPage
  (LargeDataModelBeanSample.java:192)
         at com.me.jsf.PagedListDataModel.fetchPageInternal
  (PagedListDataModel.java:178)
         at
  com.me.jsf.PagedListDataModel.getPage(PagedListDataModel.java:107)
         at com.me.jsf.PagedListDataModel.isRowAvailable
  (PagedListDataModel.java:201)
         at
  org.apache.myfaces.component.html.ext.HtmlDataTableHack.isRowAvailable
  (HtmlDataTableHack.java:88)
         at
  org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex
  (HtmlDataTableHack.java:297)
         at
  org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.setRowIndex
  (AbstractHtmlDataTable.java:276)
         at javax.faces.component.UIData.processColumnChildren(UIData.java:
  725)
         at javax.faces.component.UIData.processDecodes(UIData.java:613)
         at
  org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.processDecodes
  (AbstractHtmlDataTable.java:306)
         at javax.faces.component.UIForm.processDecodes(UIForm.java:61)
         at javax.faces.component.UIComponentBase.processDecodes
  (UIComponentBase.java:844)
         at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:
  158)
         at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute
  (ApplyRequestValuesExecutor.java:32)
         at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase
  (LifecycleImpl.java:105)
         at org.apache.myfaces.lifecycle.LifecycleImpl.execute
  (LifecycleImpl.java:80)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:143)
         at
  org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
  487)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
  (ServletHandler.java:1093)
         at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
  (SaveSessionFilter.java:35)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
  (ServletHandler.java:1084)
         at
  com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
  (TransactionCleanupFilter.java:43)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
  (ServletHandler.java:1084)
         at org.mortbay.jetty.servlet.ServletHandler.handle
  (ServletHandler.java:360)
         at org.mortbay.jetty.security.SecurityHandler.handle
  (SecurityHandler.java:216)
         at org.mortbay.jetty.servlet.SessionHandler.handle
  (SessionHandler.java:181)
         at org.mortbay.jetty.handler.ContextHandler.handle
  (ContextHandler.java:712)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
  405)
         at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
  (AppVersionHandlerMap.java:237)
         at org.mortbay.jetty.handler.HandlerWrapper.handle
  (HandlerWrapper.java:139)
         at org.mortbay.jetty.Server.handle(Server.java:313)
         at
  org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
  506)
         at 

[appengine-java] Re: Exception on creation of java.io.File in GAE

2009-08-31 Thread leszek

http://code.google.com/appengine/docs/java/config/appconfig.html

May be you find there the solution, but I'm guessing only.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Exception on creation of java.io.File in GAE

2009-08-31 Thread Toby Reyelts
It looks like compass is reading the System property, java.io.tmpdir and
eventually it gets passed into a File constructor call. App Engine doesn't
have a temp directory (we don't allow the writing of any files to disk), so
this system property is set to null. If you need to set this system property
for compass, you can configure it in your appengine-web.xml. For example,

system-properties
  property name=java.io.tmpdir value=./
/system-properties

On Mon, Aug 31, 2009 at 4:05 AM, barak barak.ya...@gmail.com wrote:


 Hello all,

 I'm trying to upload an application that using Lucene and compass. The
 Lucene files are stored under the war directory and should be open to
 read access only. When booting the application, the files are opened
 by the lucene (wrapped with compass). All works ok in the developmemt
 server, when deployed in GAE, the following exception raised:

 java.lang.NullPointerException
at java.io.File.init(File.java:276)
at
 org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:
 139)
at org.compass.core.lucene.engine.store.FSDirectoryStore.configure
 (FSDirectoryStore.java:55)
at
 org.compass.core.lucene.engine.store.DefaultLuceneSearchEngineStore.init
 (DefaultLuceneSearchEngineStore.java:144)
at org.compass.core.lucene.engine.LuceneSearchEngineFactory.init
 (LuceneSearchEngineFactory.java:122)
at org.compass.core.impl.DefaultCompass.init(DefaultCompass.java:
 123)
at org.compass.core.impl.DefaultCompass.init(DefaultCompass.java:
 116)
at org.compass.core.config.CompassConfiguration.buildCompass
 (CompassConfiguration.java:288)
at com.me.store.DataAccessObject.init(DataAccessObject.java:76)
at com.me.store.DataAccessObject.getInstance(DataAccessObject.java:
 53)
at com.me.jsf.LargeDataModelBeanSample$Model.fetchPage
 (LargeDataModelBeanSample.java:192)
at com.me.jsf.PagedListDataModel.fetchPageInternal
 (PagedListDataModel.java:178)
at
 com.me.jsf.PagedListDataModel.getPage(PagedListDataModel.java:107)
at com.me.jsf.PagedListDataModel.isRowAvailable
 (PagedListDataModel.java:201)
at
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.isRowAvailable
 (HtmlDataTableHack.java:88)
at
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex
 (HtmlDataTableHack.java:297)
at
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.setRowIndex
 (AbstractHtmlDataTable.java:276)
at javax.faces.component.UIData.processColumnChildren(UIData.java:
 725)
at javax.faces.component.UIData.processDecodes(UIData.java:613)
at
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.processDecodes
 (AbstractHtmlDataTable.java:306)
at javax.faces.component.UIForm.processDecodes(UIForm.java:61)
at javax.faces.component.UIComponentBase.processDecodes
 (UIComponentBase.java:844)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:
 158)
at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute
 (ApplyRequestValuesExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase
 (LifecycleImpl.java:105)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute
 (LifecycleImpl.java:80)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:143)
at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1093)
at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
 (SaveSessionFilter.java:35)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
 (TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
 (ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
 (SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
 (SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
 (ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 405)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
 (AppVersionHandlerMap.java:237)
at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 506)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
 (HttpConnection.java:830)
at
 com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
 (RpcRequestParser.java:76)
at