Hi.
I still have problem with it

My code worked well when I run it by command line, ex."php srcLucene.php"
But it didn't work on web browser, still got an error like this.
================================================================
indexing ... Exception occured: [[o:Exception]:"java.lang.Exception:
CreateInstance failed: new
org.apache.lucene.index.IndexWriter((o:Directory)[o:String],
(o:Analyzer)[c:StandardAnalyzer],
(o:IndexWriter$MaxFieldLength)[o:Boolean]). Cause:
java.lang.IllegalArgumentException:
java.lang.classcastexcept...@506411 Responsible VM:
1.6.0...@http://java.sun.com/"; at: #-8
sun.reflect.GeneratedConstructorAccessor1.newInstance(Unknown Source)
#-7 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
#-6 java.lang.reflect.Constructor.newInstance(Constructor.java:513) #0
Java.inc(161): java_ThrowExceptionProxyFactory->getProxy(6, false) #1
Java.inc(314): java_Arg->getResult(false) #2 Java.inc(317):
java_Client->getWrappedResult(false) #3 Java.inc(481):
java_Client->getInternalResult() #4 Java.inc(703):
java_Client->createObject('org.apache.luce...', Array, true) #5
Java.inc(834): java_create(Array, true) #6
/var/www/html/DLL/luceneweb/lucenetes/srcLucene.php(22):
Java->Java('org.apache.luce...', '/tmp/idxOIP8mb....', Object(Java),
true) #7 {main}]
==================================================================

I'm using
Linux CentOS 5.2,
Jdk 1.6.0_20,
PHP 5.1.6,
Apache Web Server 2.2

Any suggestion?

Thanks
--
Dian


On 10/24/10, Uwe Schindler <u...@thetaphi.de> wrote:
> Are you sure that you use the same Lucene version? If you use latest (3.0.x)
> now, then your IndexWriter ctor cannot work, because you have to call
> FSDirectory.open() in java code first. Directly passing a native
> java.io.File to IW is no longer possible. So maybe it simply does not find
> the correct ctor?
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: u...@thetaphi.de
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to