> -----Original Message----- > From: news > > I try to update a web application from 1.4-rc1 to 1.4-rc2. > But that's not working. An error occurrs. The application is > running inside tomcat 5.0.19. >
As I said in one off the previous mails, the TC is the problem not Lucene. TC wronlgly sets java.io.tmpdir to be a relative path instead absolute. So edit your catalina.bat or just download 5.0.21 MT. > Here's the code: > > File f = > (File)servlet.getServletContext().getAttribute("javax.servlet. > context.tempdir"); > File ixDir = new File(f, "index"); > IndexWriter writer = new IndexWriter(ixDir.getPath(), new > StandardAnalyzer(), true) > > and here's the error. > > java.lang.NullPointerException > at > org.apache.lucene.store.FSDirectory.create(FSDirectory.java:146) > at > org.apache.lucene.store.FSDirectory.<init>(FSDirectory.java:126) > at > org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:102) > at > org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:83) > at > org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:172) > > > The code works with lucene 1.4-rc1. > > Regards > Ralph > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]