I am trying to integrate solr on tomcat. I have tried from almost a couple of blogs
http://www.beingjavaguys.com/2013/01/if-you-want-to-configure-solr4_19.html
http://wiki.apache.org/solr/SolrTomcat
But every time I am faced with the 404 not found page when trying to run-
localhost:4040/solr-4.4.0
On trying to start the webapp from tomcat manager its throwing
FAIL - Application at context path /solr-4.4.0 could not be started
I have checked the catalina.logs file
Sep 27, 2013 10:30:09 AM org.apache.catalina.core.StandardContext
startInternal SEVERE: Error filterStart Sep 27, 2013 10:30:09 AM
org.apache.catalina.core.StandardContext startInternal SEVERE: Context
[/solr-4.4.0] startup failed due to previous errors Sep 27, 2013
10:31:24 AM org.apache.catalina.startup.HostConfig deployWAR INFO:
Deploying web application archive AM.war Sep 27, 2013 10:31:24 AM
org.apache.catalina.loader.WebappClassLoader validateJarFile INFO:
validateJarFile(/root/Downloads/apache-tomcat-7.0.21/webapps/AM/WEB-INF/lib/servlet-api.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Any help here will be highly appreciated.
There was change in the way logging is implemented in Solr version 4.3 and higher. Please follow the directions outlined in Solr Logging - Using the example logging setup in containers other than Jetty for steps on how to setup logging to work properly with Tomcat.
Have you copied all jars from your solr home distribution to tomcat bin. make sure you copy all jars solr_home/bin & solr_home/bin/etc to tomcat lib folder and then give it a try.
Related
I am using MyEclipse 9 and Tomcat7.0 . I have taken latest code and deployed in Tomcat 7 and started the server. Immediately i got an error log as mentioned below.
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
Jan 10, 2014 5:53:40 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class com.aap.apweb.servlet.APServletContextListener
java.lang.ClassNotFoundException: com.aap.apweb.servlet.APServletContextListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4537)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5097)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5092)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Jan 10, 2014 5:53:40 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class com.aap.apweb.servlet.APHTTPSessionListener
java.lang.ClassNotFoundException: com.aap.apweb.servlet.APHTTPSessionListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4537)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5097)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5092)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Jan 10, 2014 5:53:40 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Jan 10, 2014 5:53:40 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Jan 10, 2014 5:53:40 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/apweb] startup failed due to previous errors
Jan 10, 2014 5:53:41 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/apweb] registered the JDBC driver [net.sourceforge.jtds.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Jan 10, 2014 5:53:41 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Jan 10, 2014 5:53:41 PM org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Jan 10, 2014 5:53:41 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 13243 ms
I think the jars path has to be set. But i am not able to find it.
Is com.aap.apweb.servlet.APHTTPSessionListener one of your classes? I don't get any hits on Google so I'm guessing it is. You need to ensure that you have set all dependencies in your build path and set deployment policies accordingly. Deployment policies for the project can be adjusted by right clicking on the project, selecting Properties, then going to the MyEclipse/Web page and clicking the Deployment tab. On that tab, you can choose to use the workbench settings (in which case most fields will be grayed out) or not (just deselect the "Use workbench default settings").
Note that the most recent release of MyEclipse gives you more explicit control over deployment, via a deployment assembly. A license for MyEclipse 9 also applies to MyEclipse 2014, which can be downloaded from the www.myeclipseide.com web site.
Right click on project
then go to build path -> add library in libraries pane.
then select server run time then add apache tomcat and then try to run your application.
You can export the required projects as jar files and place them in your .WAR file in WEB-INF\lib .This ensures that your classes from your jar files get loaded during application startup.
As per this line from the log:
The web application [/apweb] registered the JDBC driver [net.sourceforge.jtds.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
I have added db2 jdbc 1.6 jars(db2jcc4.jar and db2jcc4_license_cisuz.jar)to my project build path. These jars solved my problem while restarting the server. It started without any issue.
Thanks for all the geeks to responding me.
I am getting the same error when I started tomcat server in Eclipse Luna environment. And my OS is Ubuntu.
Actually the problem is when I build the project the web module not create the M2e-wtp maven folder. When we start the tomcat server it could not see the maven dependencies. That's while the exception came.
I resolve this issue by Downloading the latest Mars eclipse. And again I checked out my project.
After clean installed my project the issue was resolved. It's working fine.
Just trying to deploy web service war file but could not make it using apache tomcat 7. I tried sample war file and it works fine just accesing from browser localhost:8080/sample so sure that my tomcat is well configured. just copying the war under webapps/ and deploy it but same message: description The requested resource is not available.
I am wondering if web service application shows another way to deploy it ???
here is a content of catalina.log file:
4:28:25 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
4:28:25 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/APP] startup failed due to previous errors
Oct 12, 2012 4:28:25 PM org.apache.catalina.startup.HostConfig deployDirectory
Any idea ??
I had a similar problem. The catalina.out logged this log Message
Apr 17, 2013 5:14:46 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart
The error is caused when a exception is thrown while the server is starting.
To figure out what is causing the you should look at localhost.log (in the same directory as catalina.out) not catalina.out, you should be able to see the exception that caused the error
You can check the error by adding a logging.properties file in your WEB-INF/classes folder with the following contents:
org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler
I am taking over an existing Struts-based web application and am trying to deploy it for the first time on my local machine. My predecessor told me to run it through Eclipse on a Tomcat server.
I have installed the latest tomcat and it is running fine. I have grabbed the code from their CVS server and, with a few tweaks, removed all of the errors from the Java files. I then created a new Run Configuration having it run as "Run on server".
When I run the Run Config, the tomcat server starts up without error messages in the Console and an Eclipse browser page pops up to the correct local URL. The returned page is a 404, however. Looking at my Tomcat "webaps" folder, I see that my application is not there.
My question is, how can I troubleshoot this? My tomcat error logs do not get updated when I deploy and the Console output, shown below, offers no hint that there is a problem.
May 30, 2011 3:48:07 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: <long list of paths>
May 30, 2011 3:48:07 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 30, 2011 3:48:07 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 410 ms
May 30, 2011 3:48:07 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 30, 2011 3:48:07 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
May 30, 2011 3:48:08 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor CanPost_Emil.xml
May 30, 2011 3:48:08 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 30, 2011 3:48:08 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 30, 2011 3:48:08 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
May 30, 2011 3:48:08 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 244 ms
This is not the way to run web apps inside Eclipse.
Go to the Server view panel instead, and choose Add server. Here install the Tomcat adapter according to the instructions, and then add the projects you have (if they are Dynamic Web Projects). You can now start and stop the server and have the projects chosen updated when you change.
Do it this way. Do not try to create a Run Configuration launching Tomcat.
I have exactly the same problem.
While this is not a solution to the problem itself (running the project on Tomcat from within Eclipse), it is a way to run the project:
Pack(age) the project (I use maven: 'mvn clean package')
Copy the .war file into the webapps dir inside your tomcat installation.
(if not already running) Start up tomcat.
This works for me. I'm still looking for the proper answer to your question, but until I find it I'll just continue to manually package/deploy the project.
I am trying to create my first webservice using eclipse javaEE under Axis2,
i am following this turorial eclipse tutorial
to learn how to make it.I make the webservice but when i want to assure that the ws has been deployed through viewing it through URL, an HTTP status 400 occure. How can I know what is the error??
here what i make exactly:
i make the settings in preferences [ ant , axis2, tomcat and java ].
New -> New dynamic web page
new ->java (I create the class i want to convert to ws)
new ->web service (i want to create bottom up ws).
type http://localhost:8080/Axis2/services/listservices in the url of browser
this what return HTTP Status 404 - /services/listservices
can some one tell me how can i know what is the error? or how can i define it?
EDIT:
an exception happen in the console of eclipse which is :
org.apache.axis2.transport.http.AxisAdminServlet java.lang.ClassNotFoundException: org.apache.axis2.transport.http.AxisAdminServlet
what should I do ,in the configuration i specify where is axis2 and eclipse shows
Axis2 runtime loaded successfully
after creating new work space and create webservice again, this is the output appears in console
Dec 20, 2010 8:32:04 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path: C:\Program
Files\Java\jdk1.6.0_18\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;F:/alaa college/year 4/1st
semester/Advance sw/Libraries/eclipse/jre/bin/client;F:/alaa college/year 4/1st
semester/Advance sw/Libraries/eclipse/jre/bin;D:\app\AloOoSh\product\11.1.0\db_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.6.0_18\bin;%ANT_HOME%\bin;%AXIS2_HOME%\bin;%CATALINA_HOME%\bin;C:\Program Files\MATLAB\R2008a\bin;C:\Program Files\MATLAB\R2008a\bin\win32;
Dec 20, 2010 8:32:05 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source'
to 'org.eclipse.jst.jee.server:testFirst' did not find a matching property.
Dec 20, 2010 8:32:05 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Dec 20, 2010 8:32:05 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 401 ms
Dec 20, 2010 8:32:05 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 20, 2010 8:32:05 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
[INFO] Deploying module: addressing-1.4 - file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testF
irst/WEB-INF/modules/addressing-1.4.mar
[INFO] Deploying module: metadataExchange-1.4 -
file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/modules/mex-1.4.mar
[INFO] Deploying module: ping-1.4 -
file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/modules/ping-1.4.mar
[INFO] Deploying module: script-1.4 - file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/modules/scripting-1.4.mar
[INFO] Deploying module: smtpfault - file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/modules/smtpfault.mar
[INFO] Deploying module: soapmonitor-1.4 - file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/modules/soapmonitor-1.4.mar
[INFO] Deploying Web service: Converter - file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/services/Converter/
[INFO] Deploying Web service: version.aar - file:/D:/EclipseExcercises/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testFirst/WEB-INF/services/version.aar
Dec 20, 2010 8:32:06 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Dec 20, 2010 8:32:06 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Dec 20, 2010 8:32:06 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/19 config=null
Dec 20, 2010 8:32:06 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1383 ms
These is my own post to creating webservice and use that service in android. its
work properly.
Try this once below link
http://lukencode.com/2010/04/27/calling-web-services-in-android-using-httpclient/#comment-179
The 404 error occurs because there is nothing at the desired url. So there must have been something wrong with your deployment.
Have you set up a server in eclipse and actually published the WS at all? Note that this is different from running Tomcat from a directory somewhere else on your computer! You can add a server instance by selecting New => Server.
If the server configuration is otherwise correct, the server output should appear in eclipse's console, and if anything is wrong with your WS setup, there should be error messages you can use to track down the problem.
You probably extracted the contents of axis2.war (renamed to app.zip) into the wrong folder or deployed files to the wrong folder. Look for the WEB-INF folder directly under the app.war folder that you deployed. If you have another folder of WEB-INF for the axis2 extracted folders, then JBoss cannot locate them. The WEB-INF folder must be a folder as a 1st level descendant. Along with the following folders: axis2-web, META-INF and org.
I've been running Tomcat 6 on my pc for some time now, and it has been running successfully...up until today. I just tried to start it, and now for some reason it won't start.
I start it from a command line prompt. The second prompt that appears after I enter 'startup' in the first prompt is exiting quickly, whereas it usually stays open and shows the status of the server.
Here's what the log file logged -
Dec 3, 2010 4:00:00 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jdk1.5.0_16\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Java\jdk1.5.0_16\bin;C:\jakarta-tomcat\bin;C:\MYSQL\MySQL Server 5.1\bin
Dec 3, 2010 4:00:01 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Dec 3, 2010 4:00:01 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 424 ms
Dec 3, 2010 4:00:01 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 3, 2010 4:00:01 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Dec 3, 2010 4:00:01 PM org.apache.tomcat.util.modeler.Registry registerComponent
SEVERE: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/MyWebApp,J2EEApplication=none,J2EEServer=none
I never saw this before, where it says SEVERE: Null component... - what does it mean? What's causing it?
Here's what I ended up doing. I made a backup of my server.xml and web.xml files, along with my apps under the webapps folder, and removed jakarta-tomcat, and then reinstalled it. I restored the server.xml and web.xml file, threw my webapps back in, and started Tomcat up. This time, I got the same error as before, but it pinpointed that a particular servlet under one of my folders had a "bad version number". So I went through my servlet folders and recompiled the classes.
I started Tomcat again, and its running as it used to.
The problem was that a class had been compiled under a different version of the JDK, and it was causing an error.
Have you changed anything recently with regard to your Tomcat installation, configuration or deployments? Do you have a web application running under Tomcat called "MyWebApp"? If so, I would remove it and see if that fixes the problem. Otherwise, you might have to reinstall Tomcat.