How to run carrot2 web application?

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

How to run carrot2 web application?

reed_lee
This post has NOT been accepted by the mailing list yet.
I have installing apache tomcat and jdk. But I can not run carrot2 web application, can you tell me how to run the carrot2 web application. My email is lilq87@qq.com. By the way, I am a new java developers. I used C++.
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Stanislaw Osinski
Administrator
Hello,

Carrot2 Web Application is a standard Java web application that should run in any Servlet container, e.g. Tomcat. Please take a look at Tomcat documentation for more instructions:

http://tomcat.apache.org/tomcat-6.0-doc/index.html

Cheers,

Staszek


reed_lee wrote
I have installing apache tomcat and jdk. But I can not run carrot2 web application, can you tell me how to run the carrot2 web application. My email is lilq87@qq.com. By the way, I am a new java developers. I used C++.
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

reed_lee
This post has NOT been accepted by the mailing list yet.
I am so happy to receive you answer so quickly. But I still not  understand.  Is that copy the carrot2's file to the ROOT folder then I can run the carrot2? But when I do it , it does't work, It appear "The requested resource () is not available.", so what can I do for this problem. Can you tell me how to run the carrot2 web application Step by step. The jdk and tomcat 's status is OK. I am a new user, I hope I can get more help from you.


Stanislaw Osinski wrote
Hello,

Carrot2 Web Application is a standard Java web application that should run in any Servlet container, e.g. Tomcat. Please take a look at Tomcat documentation for more instructions:

http://tomcat.apache.org/tomcat-6.0-doc/index.html

Cheers,

Staszek


reed_lee wrote
I have installing apache tomcat and jdk. But I can not run carrot2 web application, can you tell me how to run the carrot2 web application. My email is lilq87@qq.com. By the way, I am a new java developers. I used C++.
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Jilly Tree
In reply to this post by reed_lee

reed_lee wrote
I have installing apache tomcat and jdk. But I can not run carrot2 web application, can you tell me how to run the carrot2 web application. My email is lilq87@qq.com. By the way, I am a new java developers. I used C++.
I would like to give my suggestion.Please read the guide munual in the documentation. There are the steps to run web application. Download the carrot2-webapp-3.0.war package,then put it on the path of Tomcat-->webapps,the Tomcat will decompress the war package.Then visit http://localhost:8080/carrot2-webapp-3.0, you can see the search page.That's OK!
Am I right?
I still have a problem with the web application. When I use my own Lucene index result, which is in Chinese, the search result clustering engine cann't return a right result with the information "Your query returned no documents". Is there an API to cinfigure the web application to support Chinese?
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Stanislaw Osinski
Administrator
I still have a problem with the web application. When I use my own Lucene index result, which is in Chinese, the search result clustering engine cann't return a right result with the information "Your query returned no documents". Is there an API to cinfigure the web application to support Chinese?

Hi,

That problem might be related to this:

http://download.carrot2.org/head/manual/#section.troubleshooting.webapp.uri-encoding

Please let me know if that solves the problem.

Cheers

S.

------------------------------------------------------------------------------

_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Jilly Tree

Stanislaw Osinski wrote
>
> I still have a problem with the web application. When I use my own Lucene
> index result, which is in Chinese, the search result clustering engine
> cann't return a right result with the information "Your query returned no
> documents". Is there an API to cinfigure the web application to support
> Chinese?


Hi,

That problem might be related to this:

http://download.carrot2.org/head/manual/#section.troubleshooting.webapp.uri-encoding

Please let me know if that solves the problem.

Cheers

S.

------------------------------------------------------------------------------

_______________________________________________
Carrot2-developers mailing list
Carrot2-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Thank you very much to reply so quickly. I've tried the way you mentioned. Before configure the Tomcat's code, the Chinese words is changed to ? automaticly.After that the search word is displayed correctly but the result is still nothing.
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Stanislaw Osinski
Administrator
Thank you very much to reply so quickly. I've tried the way you mentioned. Before configure the Tomcat's code, the Chinese words is changed to ? automaticly.After that the search word is displayed correctly but the result is still nothing.

Weird... One more thing -- can you try the same index with Document Clustering Workbench (http://download.carrot2.org/head/manual/#section.workbench)?

Cheers,

S.

------------------------------------------------------------------------------

_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Jilly Tree

Stanislaw Osinski wrote
>
> Thank you very much to reply so quickly. I've tried the way you mentioned.
> Before configure the Tomcat's code, the Chinese words is changed to ?
> automaticly.After that the search word is displayed correctly but the result
> is still nothing.


Weird... One more thing -- can you try the same index with Document
Clustering Workbench (
http://download.carrot2.org/head/manual/#section.workbench)?

Yes,I've tried the same index with Document  Clustering Workbench, I can cluster the index correctly. I configure the parameters in the file lucene.attribute.xml, but the cluster result is still nothing in Chinese.
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Stanislaw Osinski
Administrator
> Thank you very much to reply so quickly. I've tried the way you mentioned.
> Before configure the Tomcat's code, the Chinese words is changed to ?
> automaticly.After that the search word is displayed correctly but the result
> is still nothing.

In that case you'd probably need to debug the web application to see what's going on, e.g. if the query correctly reaches Carrot2 code (e.g. encoding-wise). Please see here for some information on running the web application in Eclipse:

http://download.carrot2.org/head/manual/#section.advanced-topics.running-in-eclipse.webapp

Cheers,

S.

------------------------------------------------------------------------------

_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Jilly Tree

Stanislaw Osinski wrote
In that case you'd probably need to debug the web application to see what's
going on, e.g. if the query correctly reaches Carrot2 code (e.g.
encoding-wise). Please see here for some information on running the web
application in Eclipse:

http://download.carrot2.org/head/manual/#section.advanced-topics.running-in-eclipse.webapp

Cheers,

S.
Thank you for so much help, the method you've told worked in the right way, but how can I configure the source code to query with my own lucene index? Package the source code to a war package and then use you method in munual?

Cheers,
J,T
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Stanislaw Osinski
Administrator
Thank you for so much help, the method you've told worked in the right way, but how can I configure the source code to query with my own lucene index? Package the source code to a war package and then use you method in munual?
The content of the WEB-INF/classes/carrot2-default folder in the WAR file is in the /suites/carrot2-default folder of the carrot2-component-suites project.

Cheers,

S.

------------------------------------------------------------------------------

_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Jilly Tree

Thank you for so much help. I am sorry to disturb you. I've tried the method. When I queried some keyword there are some exceptions occured.

2009-04-01 21:25:33,592 ERROR org.carrot2.webapp.QueryProcessorServlet: Processing error: java.lang.NoClassDefFoundError: org/apache/lucene/search/BooleanQuery
org.carrot2.core.ProcessingException: java.lang.NoClassDefFoundError: org/apache/lucene/search/BooleanQuery


The most frequently result is

Your query returned no documents.
Please try a more general query.

The information:
2009-04-01 21:43:47,084 WARN  org.carrot2.util.xml.TransformerErrorListener: Warning (recoverable): 无法装入请求的文档:D:\Carrot2\source\carrot2\applications\carrot2-webapp\web\skins\simple\template-document.xml (系统找不到指定的文件。)

I don't known why? Waitting for your help.

Cheers,
J.T
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Jilly Tree
In reply to this post by Stanislaw Osinski

Stanislaw Osinski wrote

Just follow instructions from here:

http://download.carrot2.org/head/manual/#section.advanced-topics.customizing-applications.adding-source-to-webapp

The content of the WEB-INF/classes/carrot2-default folder in the WAR file is
in the /suites/carrot2-default folder of the carrot2-component-suites
project.

Cheers,

S.
Another question, I followed the steps of Running Carrot2 Document Clustering Workbench in Eclipse IDE in the manual. There is not the workbench Eclipse Application to run. I want to know where is wrong?
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Stanislaw Osinski
Administrator
In reply to this post by Jilly Tree
Thank you for so much help. I am sorry to disturb you. I've tried the method. When I queried some keyword there are some exceptions occured.
2009-04-01 21:25:33,592 ERROR org.carrot2.webapp.QueryProcessorServlet: Processing error: java.lang.NoClassDefFoundError: org/apache/lucene/search/BooleanQuery
org.carrot2.core.ProcessingException: java.lang.NoClassDefFoundError: org/apache/lucene/search/BooleanQuery

Interesting... I've just tried the instructions on my machine (with Carrot2 set up in Eclipse as in http://download.carrot2.org/head/manual/#section.integration.setting-up-carrot2-sources-in-eclipse) and I'm not getting any exceptions.

The only idea that springs to my mind is adding "manually" the org.apache.lucene project (which has the missing class) to the build path of the carrot2-webapp project.

S.

------------------------------------------------------------------------------

_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Stanislaw Osinski
Administrator
In reply to this post by Jilly Tree
Another question, I followed the steps of Running Carrot2 Document Clustering Workbench in Eclipse IDE in the manual. There is not the workbench Eclipse Application to run. I want to know where is wrong?

Two ideas that spring to my mind:

1. You may have the "Eclipse Application" group filtered out in your Run Configurations window (http://download.carrot2.org/head/manual/#figure.workbench-run-configuration). Click the rightmost icon above the tree to change filtering settings.

2. You may need to run Workbench in an Eclipse distribution for plugin developers (http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/SR2/eclipse-rcp-ganymede-SR2-win32.zip).

Cheers,

S.

------------------------------------------------------------------------------

_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Stanislaw Osinski
Administrator
Two ideas that spring to my mind:

1. You may have the "Eclipse Application" group filtered out in your Run Configurations window (http://download.carrot2.org/head/manual/#figure.workbench-run-configuration). Click the rightmost icon above the tree to change filtering settings.

2. You may need to run Workbench in an Eclipse distribution for plugin developers (http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/SR2/eclipse-rcp-ganymede-SR2-win32.zip).

Oh, one more thing -- Workbench run configuration is available only in trunk (https://carrot2.svn.sourceforge.net/svnroot/carrot2/trunk) for the time being, it's not there in the stable branch (until we release the next stable version).

Cheers,

S.

------------------------------------------------------------------------------

_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Jilly Tree

Stanislaw Osinski wrote
Oh, one more thing -- Workbench run configuration is available only in trunk
(https://carrot2.svn.sourceforge.net/svnroot/carrot2/trunk) for the time
being, it's not there in the stable branch (until we release the next stable
version).
When I run the workbench as the munual said, the eclipse encounter the error with the information as follow:
->Event Details:
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.eclipse.core.internal.runtime.PlatformActivator.startAppContainer(PlatformActivator.java:47)
at org.eclipse.core.internal.runtime.PlatformActivator.start(PlatformActivator.java:32)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297)

I wonder if you can help me with this problem.
Thank you very much!
J.T
Reply | Threaded
Open this post in threaded view
|

Re: How to run carrot2 web application?

Stanislaw Osinski
Administrator
When I run the workbench as the munual said, the eclipse encounter the error with the information as follow:
->Event Details:
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.eclipse.core.internal.runtime.PlatformActivator.startAppContainer(PlatformActivator.java:47)
at org.eclipse.core.internal.runtime.PlatformActivator.start(PlatformActivator.java:32)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297)

I wonder if you can help me with this problem.

Are you trying to run Workbench straight from the repository or you've made some changes (like adding components, adding sources / algorithms in the suite XML etc.). RCP-related errors are really hard to debug without looking into the specific installation. One thing to try would be to install a clean version of Eclipse for plugin developers, attach a clean checkout of Carrot2 to it and see if the error still occurs. If not, you could start applying your changes from there.

Cheers,

S.

------------------------------------------------------------------------------

_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers