Ontology compile bug

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Ontology compile bug

Michael Wechner
Hi

It seems to me that refine-query-init.jsp should be patch as below,
otherwise search.jsp will not compile because
it already initializes nutchConf (I am using nutch-0.8):

Index: src/web/jsp/refine-query-init.jsp
===================================================================
--- src/web/jsp/refine-query-init.jsp   (Revision 433565)
+++ src/web/jsp/refine-query-init.jsp   (Arbeitskopie)
@@ -13,7 +13,7 @@
 // being loaded into the JVM. Need improvement in future.

   try {
-    Configuration nutchConf = NutchConfiguration.get(application);
+    //Configuration nutchConf = NutchConfiguration.get(application);
     String urls = nutchConf.get("extension.ontology.urls");
     ontology = new
org.apache.nutch.ontology.OntologyFactory(nutchConf).getOntology();
     if (urls==null || urls.trim().equals("")) {


HTH

Michi

--
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
[hidden email]                        [hidden email]
+41 44 272 91 61

Reply | Threaded
Open this post in threaded view
|

Re: Ontology compile bug

Otis Gospodnetic-2-2
I might be just tired, but I don't see the difference between those two lines.

Otis

----- Original Message ----
From: Michael Wechner <[hidden email]>
To: [hidden email]
Sent: Tuesday, August 22, 2006 9:07:12 AM
Subject: Ontology compile bug

Hi

It seems to me that refine-query-init.jsp should be patch as below,
otherwise search.jsp will not compile because
it already initializes nutchConf (I am using nutch-0.8):

Index: src/web/jsp/refine-query-init.jsp
===================================================================
--- src/web/jsp/refine-query-init.jsp   (Revision 433565)
+++ src/web/jsp/refine-query-init.jsp   (Arbeitskopie)
@@ -13,7 +13,7 @@
 // being loaded into the JVM. Need improvement in future.

   try {
-    Configuration nutchConf = NutchConfiguration.get(application);
+    //Configuration nutchConf = NutchConfiguration.get(application);
     String urls = nutchConf.get("extension.ontology.urls");
     ontology = new
org.apache.nutch.ontology.OntologyFactory(nutchConf).getOntology();
     if (urls==null || urls.trim().equals("")) {


HTH

Michi

--
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
[hidden email]                        [hidden email]
+41 44 272 91 61




Reply | Threaded
Open this post in threaded view
|

Re: Ontology compile bug

dee-2
Hi Otis

the point is that Nutch has been already compiled,
so if you do not comment this line out:
You will get an error

nutchConf is already defined

because it is already configured due to this is an include script in
search.jsp

HTH david
[hidden email] schrieb:

> I might be just tired, but I don't see the difference between those two lines.
>
> Otis
>
> ----- Original Message ----
> From: Michael Wechner <[hidden email]>
> To: [hidden email]
> Sent: Tuesday, August 22, 2006 9:07:12 AM
> Subject: Ontology compile bug
>
> Hi
>
> It seems to me that refine-query-init.jsp should be patch as below,
> otherwise search.jsp will not compile because
> it already initializes nutchConf (I am using nutch-0.8):
>
> Index: src/web/jsp/refine-query-init.jsp
> ===================================================================
> --- src/web/jsp/refine-query-init.jsp   (Revision 433565)
> +++ src/web/jsp/refine-query-init.jsp   (Arbeitskopie)
> @@ -13,7 +13,7 @@
>  // being loaded into the JVM. Need improvement in future.
>
>    try {
> -    Configuration nutchConf = NutchConfiguration.get(application);
> +    //Configuration nutchConf = NutchConfiguration.get(application);
>      String urls = nutchConf.get("extension.ontology.urls");
>      ontology = new
> org.apache.nutch.ontology.OntologyFactory(nutchConf).getOntology();
>      if (urls==null || urls.trim().equals("")) {
>
>
> HTH
>
> Michi
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: Ontology compile bug

Michael Wechner
In reply to this post by Otis Gospodnetic-2-2
[hidden email] wrote:

>I might be just tired, but I don't see the difference between those two lines.
>  
>

nutchConf is already being defined within search.jsp and hence will lead
to an error when
refine-query-init.jsp is being uncommented resp. enabled.

In order to better see this I have just commented, hence the minor
difference of the two slashes ;-)

HTH

Michi

>Otis
>
>----- Original Message ----
>From: Michael Wechner <[hidden email]>
>To: [hidden email]
>Sent: Tuesday, August 22, 2006 9:07:12 AM
>Subject: Ontology compile bug
>
>Hi
>
>It seems to me that refine-query-init.jsp should be patch as below,
>otherwise search.jsp will not compile because
>it already initializes nutchConf (I am using nutch-0.8):
>
>Index: src/web/jsp/refine-query-init.jsp
>===================================================================
>--- src/web/jsp/refine-query-init.jsp   (Revision 433565)
>+++ src/web/jsp/refine-query-init.jsp   (Arbeitskopie)
>@@ -13,7 +13,7 @@
> // being loaded into the JVM. Need improvement in future.
>
>   try {
>-    Configuration nutchConf = NutchConfiguration.get(application);
>+    //Configuration nutchConf = NutchConfiguration.get(application);
>     String urls = nutchConf.get("extension.ontology.urls");
>     ontology = new
>org.apache.nutch.ontology.OntologyFactory(nutchConf).getOntology();
>     if (urls==null || urls.trim().equals("")) {
>
>
>HTH
>
>Michi
>
>  
>


--
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
[hidden email]                        [hidden email]
+41 44 272 91 61