how can I use dll to analyze

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

how can I use dll to analyze

James liu-2
This problem not about solr, but i think maybe someone know how to resolve.

i have some.dll jni_some.dll, some_analyzer_func.jar whick used to anlyze. I
try it in cmd and it ok.

now i wanna use it with solr so i have to use java call these dll files.

I use tomcat 6, java 1.5_11, in winxp,,,jar files all set in tomcat's lib
directory. dll all set in sytem32 directory.

i open solr admin page and click analzyer , i wanna test analyzer.

Input text and some word,,,just click analyzer button.

it show me :

HTTP Status 500 -
------------------------------

*type* Exception report

*message*

*description* *The server encountered an internal error () that prevented it
from fulfilling this request.*

*exception*

org.apache.jasper.JasperException: javax.servlet.ServletException:
java.lang.UnsatisfiedLinkError: segment0


segment0 is function name.



waiting for your suggestion.



--
regards
jl
Reply | Threaded
Open this post in threaded view
|

Re: how can I use dll to analyze

Chris Hostetter-3

: i have some.dll jni_some.dll, some_analyzer_func.jar whick used to anlyze. I
: try it in cmd and it ok.
:
: now i wanna use it with solr so i have to use java call these dll files.
:
: I use tomcat 6, java 1.5_11, in winxp,,,jar files all set in tomcat's lib
: directory. dll all set in sytem32 directory.

DLLs are a weird windows voodoo i don't pretend to understand ... if
you've gotten your analyzer/jar/jni/dll to work in a command line app, the
next step before trying to use it in Solr is probably to try and use it in
a simple JSP .. make a little webapp containing the lucene jar, your
analyzer jar, and a simple JSP that runs some text through your analyzer
... the tomcat user community should be able to help you figure out how
to get the JNI stuff working (and by using a simple little webapp, thye
won't have to understand all of Solr)

once you get that working, Solr should be cake.


-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: how can I use dll to analyze

James liu-2
I can use it with jsp,,,,just use bean.

how can i use it with solr?

i think solr use jsp to index, search...



2007/3/13, Chris Hostetter <[hidden email]>:

>
>
> : i have some.dll jni_some.dll, some_analyzer_func.jar whick used to
> anlyze. I
> : try it in cmd and it ok.
> :
> : now i wanna use it with solr so i have to use java call these dll files.
> :
> : I use tomcat 6, java 1.5_11, in winxp,,,jar files all set in tomcat's
> lib
> : directory. dll all set in sytem32 directory.
>
> DLLs are a weird windows voodoo i don't pretend to understand ... if
> you've gotten your analyzer/jar/jni/dll to work in a command line app, the
> next step before trying to use it in Solr is probably to try and use it in
> a simple JSP .. make a little webapp containing the lucene jar, your
> analyzer jar, and a simple JSP that runs some text through your analyzer
> ... the tomcat user community should be able to help you figure out how
> to get the JNI stuff working (and by using a simple little webapp, thye
> won't have to understand all of Solr)
>
> once you get that working, Solr should be cake.
>
>
> -Hoss
>
>


--
regards
jl
Reply | Threaded
Open this post in threaded view
|

Re: how can I use dll to analyze

Ryan McKinley
does your "use bean" jsp example work if you dump it into the exploded
solr.war directory?

(solr does not rely on jsp - it is only used for the admin interface.)


On 3/12/07, James liu <[hidden email]> wrote:

> I can use it with jsp,,,,just use bean.
>
> how can i use it with solr?
>
> i think solr use jsp to index, search...
>
>
>
> 2007/3/13, Chris Hostetter <[hidden email]>:
> >
> >
> > : i have some.dll jni_some.dll, some_analyzer_func.jar whick used to
> > anlyze. I
> > : try it in cmd and it ok.
> > :
> > : now i wanna use it with solr so i have to use java call these dll files.
> > :
> > : I use tomcat 6, java 1.5_11, in winxp,,,jar files all set in tomcat's
> > lib
> > : directory. dll all set in sytem32 directory.
> >
> > DLLs are a weird windows voodoo i don't pretend to understand ... if
> > you've gotten your analyzer/jar/jni/dll to work in a command line app, the
> > next step before trying to use it in Solr is probably to try and use it in
> > a simple JSP .. make a little webapp containing the lucene jar, your
> > analyzer jar, and a simple JSP that runs some text through your analyzer
> > ... the tomcat user community should be able to help you figure out how
> > to get the JNI stuff working (and by using a simple little webapp, thye
> > won't have to understand all of Solr)
> >
> > once you get that working, Solr should be cake.
> >
> >
> > -Hoss
> >
> >
>
>
> --
> regards
> jl
>
Reply | Threaded
Open this post in threaded view
|

Re: how can I use dll to analyze

James liu-2
I use jsp only for test.

you've gotten your analyzer/jar/jni/dll to work in a command line app, the
> next step before trying to use it in Solr is probably to try and use it in
> a simple JSP


Do u mean if it work well in cmd that meas it can use with solr?





2007/3/13, Ryan McKinley <[hidden email]>:

>
> does your "use bean" jsp example work if you dump it into the exploded
> solr.war directory?
>
> (solr does not rely on jsp - it is only used for the admin interface.)
>
>
> On 3/12/07, James liu <[hidden email]> wrote:
> > I can use it with jsp,,,,just use bean.
> >
> > how can i use it with solr?
> >
> > i think solr use jsp to index, search...
> >
> >
> >
> > 2007/3/13, Chris Hostetter <[hidden email]>:
> > >
> > >
> > > : i have some.dll jni_some.dll, some_analyzer_func.jar whick used to
> > > anlyze. I
> > > : try it in cmd and it ok.
> > > :
> > > : now i wanna use it with solr so i have to use java call these dll
> files.
> > > :
> > > : I use tomcat 6, java 1.5_11, in winxp,,,jar files all set in
> tomcat's
> > > lib
> > > : directory. dll all set in sytem32 directory.
> > >
> > > DLLs are a weird windows voodoo i don't pretend to understand ... if
> > > you've gotten your analyzer/jar/jni/dll to work in a command line app,
> the
> > > next step before trying to use it in Solr is probably to try and use
> it in
> > > a simple JSP .. make a little webapp containing the lucene jar, your
> > > analyzer jar, and a simple JSP that runs some text through your
> analyzer
> > > ... the tomcat user community should be able to help you figure out
> how
> > > to get the JNI stuff working (and by using a simple little webapp,
> thye
> > > won't have to understand all of Solr)
> > >
> > > once you get that working, Solr should be cake.
> > >
> > >
> > > -Hoss
> > >
> > >
> >
> >
> > --
> > regards
> > jl
> >
>



--
regards
jl
Reply | Threaded
Open this post in threaded view
|

Re: how can I use dll to analyze

James liu-2
But now i can't use it with solr.(i compiled solr with ant)



2007/3/13, James liu <[hidden email]>:

>
> I use jsp only for test.
>
> you've gotten your analyzer/jar/jni/dll to work in a command line app, the
> >
> > next step before trying to use it in Solr is probably to try and use it
> > in
> > a simple JSP
>
>
> Do u mean if it work well in cmd that meas it can use with solr?
>
>
>
>
>
> 2007/3/13, Ryan McKinley <[hidden email]>:
> >
> > does your "use bean" jsp example work if you dump it into the exploded
> > solr.war directory?
> >
> > (solr does not rely on jsp - it is only used for the admin interface.)
> >
> >
> > On 3/12/07, James liu < [hidden email]> wrote:
> > > I can use it with jsp,,,,just use bean.
> > >
> > > how can i use it with solr?
> > >
> > > i think solr use jsp to index, search...
> > >
> > >
> > >
> > > 2007/3/13, Chris Hostetter < [hidden email]>:
> > > >
> > > >
> > > > : i have some.dll jni_some.dll, some_analyzer_func.jar whick used to
> > > > anlyze. I
> > > > : try it in cmd and it ok.
> > > > :
> > > > : now i wanna use it with solr so i have to use java call these dll
> > files.
> > > > :
> > > > : I use tomcat 6, java 1.5_11, in winxp,,,jar files all set in
> > tomcat's
> > > > lib
> > > > : directory. dll all set in sytem32 directory.
> > > >
> > > > DLLs are a weird windows voodoo i don't pretend to understand ... if
> > > > you've gotten your analyzer/jar/jni/dll to work in a command line
> > app, the
> > > > next step before trying to use it in Solr is probably to try and use
> > it in
> > > > a simple JSP .. make a little webapp containing the lucene jar, your
> > > > analyzer jar, and a simple JSP that runs some text through your
> > analyzer
> > > > ... the tomcat user community should be able to help you figure out
> > how
> > > > to get the JNI stuff working (and by using a simple little webapp,
> > thye
> > > > won't have to understand all of Solr)
> > > >
> > > > once you get that working, Solr should be cake.
> > > >
> > > >
> > > > -Hoss
> > > >
> > > >
> > >
> > >
> > > --
> > > regards
> > > jl
> > >
> >
>
>
>
> --
> regards
> jl




--
regards
jl
Reply | Threaded
Open this post in threaded view
|

Re: how can I use dll to analyze

Ryan McKinley
In reply to this post by James liu-2
I'm not totally following your problem, but i'll give it a shot.

You need to make sure the classpath for the solr web-app has
everything you need.  I suggested putting your test jsp file into the
solr web-app.

If your jsp test works, you should be able to use the JNI bindings from solr.

If your jsp test does not work, keep futzing with the classpath till
it does work.  The tomcat docs/mailing list is probably a good place
to get help with this

ryan


On 3/13/07, James liu <[hidden email]> wrote:

> I use jsp only for test.
>
> you've gotten your analyzer/jar/jni/dll to work in a command line app, the
> > next step before trying to use it in Solr is probably to try and use it in
> > a simple JSP
>
>
> Do u mean if it work well in cmd that meas it can use with solr?
>
>
>
>
>
> 2007/3/13, Ryan McKinley <[hidden email]>:
> >
> > does your "use bean" jsp example work if you dump it into the exploded
> > solr.war directory?
> >
> > (solr does not rely on jsp - it is only used for the admin interface.)
> >
> >
> > On 3/12/07, James liu <[hidden email]> wrote:
> > > I can use it with jsp,,,,just use bean.
> > >
> > > how can i use it with solr?
> > >
> > > i think solr use jsp to index, search...
> > >
> > >
> > >
> > > 2007/3/13, Chris Hostetter <[hidden email]>:
> > > >
> > > >
> > > > : i have some.dll jni_some.dll, some_analyzer_func.jar whick used to
> > > > anlyze. I
> > > > : try it in cmd and it ok.
> > > > :
> > > > : now i wanna use it with solr so i have to use java call these dll
> > files.
> > > > :
> > > > : I use tomcat 6, java 1.5_11, in winxp,,,jar files all set in
> > tomcat's
> > > > lib
> > > > : directory. dll all set in sytem32 directory.
> > > >
> > > > DLLs are a weird windows voodoo i don't pretend to understand ... if
> > > > you've gotten your analyzer/jar/jni/dll to work in a command line app,
> > the
> > > > next step before trying to use it in Solr is probably to try and use
> > it in
> > > > a simple JSP .. make a little webapp containing the lucene jar, your
> > > > analyzer jar, and a simple JSP that runs some text through your
> > analyzer
> > > > ... the tomcat user community should be able to help you figure out
> > how
> > > > to get the JNI stuff working (and by using a simple little webapp,
> > thye
> > > > won't have to understand all of Solr)
> > > >
> > > > once you get that working, Solr should be cake.
> > > >
> > > >
> > > > -Hoss
> > > >
> > > >
> > >
> > >
> > > --
> > > regards
> > > jl
> > >
> >
>
>
>
> --
> regards
> jl
>
Reply | Threaded
Open this post in threaded view
|

Re: how can I use dll to analyze

Chris Hostetter-3
In reply to this post by James liu-2

: you've gotten your analyzer/jar/jni/dll to work in a command line app, the
: > next step before trying to use it in Solr is probably to try and use it in
: > a simple JSP

: Do u mean if it work well in cmd that meas it can use with solr?

i mean that if you wrote a simple little command line app, that includes
the lucene jar (with Analyzer.class) and includes your custom analyzer,
and uses your analyzer-- and that runs successully, then it should be
possible to get it working in Tomcat/Solr ... i just don't know how off
the top of my head.

: > > I can use it with jsp,,,,just use bean.

I don't know what that means ... an Analyzer isn't a Java Bean.

if you've got a JSP that can successfully use your JNI based Analyzer
(cast to a regular lucene Analyzer) but you can't use your Analyzer in
solr, please paste your JSP into your email so we can understand how you
are using it and try to figure out why it doens't work in Solr.




-Hoss