From: <art...@ug...> - 2005-12-14 12:57:59
|
Hello, I'm using version 3.0.2 with PHP 5.0.4. I don't know why i'm getting this strange error: Fatal error: Uncaught [o(Exception):"java.lang.Exception: Invoke failed: [o(Indexador)]->index((String)o(String), (String)o(String)). Cause: java.lang.NullPointerException"] thrown in h:\wamp\www\testjava.php on line 9 with this piece of code: <?php java_require("h:/search_engine/lucene-1.4.3.jar;h:/search_engine/Indexador.jar"); $indexer = new Java("org.ew.lucene.Indexador"); $indexer->index("h:\puleva2\puleva2\data","h:\search_engine\index"); ?> the index method is defined as follows: public void index(String DataDir, String IndexDir) throws Exception { } Any help is appreciated. Regards, Arturo. |
From: <art...@ug...> - 2005-12-14 13:09:15
|
Answering myself, The problem seems to happens with the second parameter of the index method, that contains a character '_'. This cause null exception! is it a bug? Changing that directory to something else like 'h:\test' solve the problem. Cheers, Arturo. > Hello, > > I'm using version 3.0.2 with PHP 5.0.4. I don't know why i'm getting this > strange error: > > Fatal error: Uncaught [o(Exception):"java.lang.Exception: Invoke failed: > [o(Indexador)]->index((String)o(String), (String)o(String)). Cause: > java.lang.NullPointerException"] thrown in h:\wamp\www\testjava.php on > line 9 > > with this piece of code: > > <?php > > java_require("h:/search_engine/lucene-1.4.3.jar;h:/search_engine/Indexador.jar"); > $indexer = new Java("org.ew.lucene.Indexador"); > $indexer->index("h:\puleva2\puleva2\data","h:\search_engine\index"); > > ?> > > the index method is defined as follows: > > public void index(String DataDir, String IndexDir) throws Exception { > > } > > Any help is appreciated. > > Regards, > > Arturo. > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: Arturo <art...@ug...> - 2005-12-14 13:22:50
|
I thought it was solved (caused it ran changing that dir!), but strangely not... going to try debugging the code of the index method, but it seems unstable. I can't find the logfile! I'm on Windows XP. Cheers, Arturo. El mi=C3=A9, 14-12-2005 a las 14:09 +0100, art...@ug... escribi=C3=B3: > Answering myself, >=20 > The problem seems to happens with the second parameter of the index > method, that contains a character '_'. This cause null exception! is it= a > bug? Changing that directory to something else like 'h:\test' solve the > problem. >=20 > Cheers, >=20 > Arturo. >=20 > > Hello, > > > > I'm using version 3.0.2 with PHP 5.0.4. I don't know why i'm getting = this > > strange error: > > > > Fatal error: Uncaught [o(Exception):"java.lang.Exception: Invoke fail= ed: > > [o(Indexador)]->index((String)o(String), (String)o(String)). Cause: > > java.lang.NullPointerException"] thrown in h:\wamp\www\testjava.php o= n > > line 9 > > > > with this piece of code: > > > > <?php > > > > java_require("h:/search_engine/lucene-1.4.3.jar;h:/search_engine/Inde= xador.jar"); > > $indexer =3D new Java("org.ew.lucene.Indexador"); > > $indexer->index("h:\puleva2\puleva2\data","h:\search_engine\index"); > > > > ?> > > > > the index method is defined as follows: > > > > public void index(String DataDir, String IndexDir) throws Exception { > > > > } > > > > Any help is appreciated. > > > > Regards, > > > > Arturo. > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through lo= g > > files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. DOWNLOAD SPLUN= K! > > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log = files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: Jost B. <jos...@ya...> - 2005-12-15 18:55:28
|
Hi, > java.lang.NullPointerException"] thrown in > h:\wamp\www\testjava.php on > line 9 > public void index(String DataDir, String IndexDir) > throws Exception { is it possible print the stack trace? Please see this (http://cvs.sourceforge.net/viewcvs.py/php-java-bridge/php-java-bridge/tests.php5/printStackTrace.php?rev=1.5&view=markup) as an example how to print a stack trace. If the null pointer appears in the PHP/Java Bridge code, please open a ticket (please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) BTW: Catching exceptions using try/catch is a good idea anyway, especially if your java code reports these exceptions to php level. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |