You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Pratik Das <Pr...@skytechsolutions.co.in> on 2004/09/16 06:11:30 UTC
Linkage error in lucene
I hardcoded my web-inf path in crawl_and_index.xml. But now I am
encountering an error java.lang.LinkageError. Has anybody come across
this? Given below is the build results:
Buildfile: webapp\lenya\bin\crawl_and_index.xml
init:
[echo] INFO: Init
[echo] INFO: webapp.dir=${webapp.dir}
[echo] INFO: web-inf.dir=c:/Lenya/build/lenya/webapp/WEB-INF
index:
[echo] INFO: Index hypertext documents
[echo] INFO: Show configuration
[java] java.lang.LinkageError: loader constraints violated when
linking org
/w3c/dom/Document class
[echo] INFO: Create index ...
[java] java.lang.LinkageError: loader constraints violated when
linking org
/w3c/dom/Document class
[echo] INFO: Index has been created
BUILD SUCCESSFUL
regards
Pratik
Andreas Hartmann <an...@apache.org>
Sent by: news <ne...@sea.gmane.org>
09/15/2004 08:44 PM
Please respond to
"Lenya Users List" <le...@cocoon.apache.org>
To
lenya-user@cocoon.apache.org
cc
Subject
Re: configuring search.properties for lucene
Pratik Das wrote:
>
> My lenya executible is in C drive in windows. I have set webapp.dir
> value to webapp.dir=c:/Lenya/build/lenya/webapp
> When I run ant using the following command:
> C:\Lenya\build\lenya>ant -f webapp/lenya/bin/crawl_and_index.xml
> -Dlucene.xconf=webapp\lenya\pubs\Mypub\config\search\lucene-live.xconf
> index
> Buildfile: webapp\lenya\bin\crawl_and_index.xml
>
> where myPub is my pub floder I get the error as Could not find
> org.apache.lenya.lucene.IndexConfiguration.Is my setting correct?
This looks like a classpath issue.
Maybe you forgot to configure a parameter in a config file?
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Linkage error in lucene
Posted by Andreas Hartmann <an...@apache.org>.
Gregor J. Rothfuss wrote:
> Pratik Das wrote:
>
>> [java] java.lang.StringIndexOutOfBoundsException: String index
>> out of range
>> : -1
>> [java] at java.lang.String.substring(String.java:1480)
>> [java] at
>> org.apache.avalon.excalibur.io.FileUtil.catPath(FileUtil.java
>> :509)
>> [java] at
>> org.apache.lenya.lucene.IndexConfiguration.resolvePath(IndexC
>> onfiguration.java:161)
>
>
> this looks like the code in question was not written with portability in
> mind. it may assume / for path concatenation.
>
Exactly, FileUtil.catPath() assumes "/" as file separator:
http://www.mail-archive.com/avalon-dev@jakarta.apache.org/msg13473.html
This means the IndexConfiguration has to take care of transforming
File.separator into "/" before calling FileUtil.catPath().
Patrik, would you mind filing a bug?
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Linkage error in lucene
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Pratik Das wrote:
> [java] java.lang.StringIndexOutOfBoundsException: String index out of
> range
> : -1
> [java] at java.lang.String.substring(String.java:1480)
> [java] at
> org.apache.avalon.excalibur.io.FileUtil.catPath(FileUtil.java
> :509)
> [java] at
> org.apache.lenya.lucene.IndexConfiguration.resolvePath(IndexC
> onfiguration.java:161)
this looks like the code in question was not written with portability in
mind. it may assume / for path concatenation.
--
Gregor J. Rothfuss
Wyona Inc. - Open Source Content Management - Apache Lenya
http://wyona.com http://cocoon.apache.org/lenya
gregor.rothfuss@wyona.com gregor@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Linkage error in lucene
Posted by Pratik Das <Pr...@skytechsolutions.co.in>.
Ok I have moved one step ahead. But I am getting
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
error. This was posted by Luis Zorita before. I tried changing my
lucene-livexconf with the following entries without success:
<index-dir
src="c:/lenya/build/lenya/webapp/lenya/pubs/myPub/work/search/lucene/index/live/index"/>
<htdocs-dump-dir
src="c:/lenya/build/lenya/webapp/lenya/pubs/myPub/work/search/lucene/htdocs_dump/live"/>
<indexer class="org.apache.lenya.lucene.index.DefaultIndexer"/>
and
<index-dir
src="/lenya/build/lenya/webapp/lenya/pubs/transw/work/search/lucene/index/live/index"/>
<htdocs-dump-dir
src="/lenya/build/lenya/webapp/lenya/pubs/transw/work/search/lucene/htdocs_dump/live"/>
<indexer class="org.apache.lenya.lucene.index.DefaultIndexer"/>
Build results:
Buildfile: webapp\lenya\bin\crawl_and_index.xml
init:
[echo] INFO: Init
[echo] INFO: webapp.dir=${webapp.dir}
[echo] INFO: web-inf.dir=c:/Lenya/build/lenya/webapp/WEB-INF
index:
[echo] INFO: Index hypertext documents
[echo] INFO: Show configuration
[java] Index type: new
[java] Index dir:
c:/lenya/build/lenya/webapp/lenya/pubs/transw/work/search
/lucene/index/live/index
[java] java.lang.StringIndexOutOfBoundsException: String index out of
range
: -1
[echo] INFO: Create index ...
[java] java.lang.StringIndexOutOfBoundsException: String index out of
range
: -1
[java] at java.lang.String.substring(String.java:1480)
[java] at
org.apache.avalon.excalibur.io.FileUtil.catPath(FileUtil.java
:509)
[java] at
org.apache.lenya.lucene.IndexConfiguration.resolvePath(IndexC
onfiguration.java:161)
[java] at org.apache.lenya.lucene.index.Index.main(Index.java:52)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.jav
a:196)
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava
.java:133)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:661)
[java] at
org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:168)
[java] at
org.apache.tools.ant.taskdefs.Java.execute(Java.java:77)
[java] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:269)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at org.apache.tools.ant.Target.execute(Target.java:301)
[java] at
org.apache.tools.ant.Target.performTasks(Target.java:328)
[java] at
org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[java] at
org.apache.tools.ant.Project.executeTargets(Project.java:1063
)
[java] at org.apache.tools.ant.Main.runBuild(Main.java:632)
[java] at org.apache.tools.ant.Main.startAnt(Main.java:183)
[java] at org.apache.tools.ant.Main.start(Main.java:147)
[java] at org.apache.tools.ant.Main.main(Main.java:230)
[echo] INFO: Index has been created
regards
Pratik
Michael Wechner <mi...@wyona.com>
09/16/2004 12:10 PM
Please respond to
"Lenya Users List" <le...@cocoon.apache.org>
To
Lenya Users List <le...@cocoon.apache.org>
cc
Subject
Re: Linkage error in lucene
Pratik Das wrote:
>
> I hardcoded my web-inf path in crawl_and_index.xml. But now I am
> encountering an error java.lang.LinkageError.
are you using Ant 1.6? you should ;-)
Michi
> Has anybody come across this? Given below is the build results:
> Buildfile: webapp\lenya\bin\crawl_and_index.xml
>
> init:
> [echo] INFO: Init
> [echo] INFO: webapp.dir=${webapp.dir}
> [echo] INFO: web-inf.dir=c:/Lenya/build/lenya/webapp/WEB-INF
>
> index:
> [echo] INFO: Index hypertext documents
> [echo] INFO: Show configuration
> [java] java.lang.LinkageError: loader constraints violated when
> linking org
> /w3c/dom/Document class
> [echo] INFO: Create index ...
> [java] java.lang.LinkageError: loader constraints violated when
> linking org
> /w3c/dom/Document class
> [echo] INFO: Index has been created
>
> BUILD SUCCESSFUL
>
> regards
> Pratik
>
>
>
> *Andreas Hartmann <an...@apache.org>*
> Sent by: news <ne...@sea.gmane.org>
>
> 09/15/2004 08:44 PM
> Please respond to
> "Lenya Users List" <le...@cocoon.apache.org>
>
>
>
> To
> lenya-user@cocoon.apache.org
> cc
>
> Subject
> Re: configuring search.properties for lucene
>
>
>
>
>
>
>
>
>
> Pratik Das wrote:
> >
> > My lenya executible is in C drive in windows. I have set webapp.dir
> > value to webapp.dir=c:/Lenya/build/lenya/webapp
> > When I run ant using the following command:
> > C:\Lenya\build\lenya>ant -f webapp/lenya/bin/crawl_and_index.xml
> > -Dlucene.xconf=webapp\lenya\pubs\Mypub\config\search\lucene-live.xconf
> > index
> > Buildfile: webapp\lenya\bin\crawl_and_index.xml
> >
> > where myPub is my pub floder I get the error as Could not find
> > org.apache.lenya.lucene.IndexConfiguration.Is my setting correct?
>
> This looks like a classpath issue.
> Maybe you forgot to configure a parameter in a config file?
>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>
>
--
Michael Wechner
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://cocoon.apache.org/lenya/
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Linkage error in lucene
Posted by Michael Wechner <mi...@wyona.com>.
Pratik Das wrote:
>
> I hardcoded my web-inf path in crawl_and_index.xml. But now I am
> encountering an error java.lang.LinkageError.
are you using Ant 1.6? you should ;-)
Michi
> Has anybody come across this? Given below is the build results:
> Buildfile: webapp\lenya\bin\crawl_and_index.xml
>
> init:
> [echo] INFO: Init
> [echo] INFO: webapp.dir=${webapp.dir}
> [echo] INFO: web-inf.dir=c:/Lenya/build/lenya/webapp/WEB-INF
>
> index:
> [echo] INFO: Index hypertext documents
> [echo] INFO: Show configuration
> [java] java.lang.LinkageError: loader constraints violated when
> linking org
> /w3c/dom/Document class
> [echo] INFO: Create index ...
> [java] java.lang.LinkageError: loader constraints violated when
> linking org
> /w3c/dom/Document class
> [echo] INFO: Index has been created
>
> BUILD SUCCESSFUL
>
> regards
> Pratik
>
>
>
> *Andreas Hartmann <an...@apache.org>*
> Sent by: news <ne...@sea.gmane.org>
>
> 09/15/2004 08:44 PM
> Please respond to
> "Lenya Users List" <le...@cocoon.apache.org>
>
>
>
> To
> lenya-user@cocoon.apache.org
> cc
>
> Subject
> Re: configuring search.properties for lucene
>
>
>
>
>
>
>
>
>
> Pratik Das wrote:
> >
> > My lenya executible is in C drive in windows. I have set webapp.dir
> > value to webapp.dir=c:/Lenya/build/lenya/webapp
> > When I run ant using the following command:
> > C:\Lenya\build\lenya>ant -f webapp/lenya/bin/crawl_and_index.xml
> > -Dlucene.xconf=webapp\lenya\pubs\Mypub\config\search\lucene-live.xconf
> > index
> > Buildfile: webapp\lenya\bin\crawl_and_index.xml
> >
> > where myPub is my pub floder I get the error as Could not find
> > org.apache.lenya.lucene.IndexConfiguration.Is my setting correct?
>
> This looks like a classpath issue.
> Maybe you forgot to configure a parameter in a config file?
>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>
>
--
Michael Wechner
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://cocoon.apache.org/lenya/
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org