I got the same problem with the questions here : Tomcat started in eclipse but unable to connect to link to http://localhost:8085/, that means I can't open http://localhost:8080/ at the browser :
HTTP Status 404 - /
type Status report
message /
description The requested resource (/) is not available.
Apache Tomcat/7.0.27
//Console info when tomcat started//
Apr 10, 2012 4:26:32 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to org.eclipse.jst.jee.server:SimpleServletProject' did not find a matching property.
Apr 10, 2012 4:26:32 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Apr 10, 2012 4:26:33 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Apr 10, 2012 4:26:33 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 880 ms
Apr 10, 2012 4:26:33 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 10, 2012 4:26:33 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
Apr 10, 2012 4:26:33 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Apr 10, 2012 4:26:33 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Apr 10, 2012 4:26:33 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 495 ms
I'm using Tomcat 7.0.27, Eclipse Europa and Java 1.6.0_32. I saw BalusC's answer, but the problem is that I couldn't select Tomcat installation (the picture below).
What could be wrong here?
EDIT1 : When I tried to create demo webpage, it couldn't be opened too (with the same error).
EDIT2: Followed this thread Why tomcat server location property is greyed in Eclipse I can open http://localhost:8080/ in the browser, but still cant access the demo web page..
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web- app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>SimpleServletProject</display-name>
<welcome-file-list>
<welcome-file> index.html</welcome-file>
</welcome-file-list>
</web-app>
PS : It seems that there's no more space to me to post index.hmtl (it's just a normal html )..
I am using apache 7. When started in command prompt everything works as expected but if I start same from eclipse then I was not able to access it and find the settings.
Looks like eclipse uses by default 'Use workspace metadata' and deploy path to 'wtpwebapps' in server settings. Follow the below steps to change these and you will be able access localhost:8080 when you start server in eclipse.
In eclipse servers tab at bottom, right click, where you can see start, stop etc, and select properties.
In properties window, select general, then select Switch Location.
Now you can see Tomcat v7.0 Server at localhost in the servers tab, double click on it.
a. If there are any modules deployed, temporarily remove them and close out tab to save this change, otherwise go directly to step 4c below.
b. If you removed any modules, restart server after step 4a and proceed to step 4c.
c. In server location, select radio button 'Use tomcat installation', and select 'webapps' in deploy path.
Save and start server in eclipse. Now you will be able to access the server.
You want to access the root application (http://server:port/) but I'm quite sure that Eclipse wont install a root application. Try to access the application you deployed within the (eclipse managed) tomcat under http://server:port/yourapp.
In eclipse servers tab at bottom, right click, where you can see start, stop etc, and select properties.
****This works fine:****
In properties window, select general, then select Switch Location.
Now you can see Tomcat v7.0 Server at localhost in the servers tab, double click on it.
a. If there are any modules deployed, temporarily remove them and close out tab to save this change, otherwise go directly to step 4c below.
b. If you removed any modules, restart server after step 4a and proceed to step 4c.
c. In server location, select radio button 'Use tomcat installation', and select 'webapps' in deploy path.
Please check your sample application request context path.
It seems you want to connect to the same port as eclipse (8080). same as running skype and running a server will by default clash because they want to send data through the same port.
Try configurating the server connection ports you might want to set the localhost to port 3000 and try if that works.
Related
So I deployed a WAR file containing my jHipster app (Angularjs+Spring boot) on openshift Tomcat 7 Cartridge. I can open reach my application with no problems (the front end) but once I try to login (interaction with the backend) i get an error.
Normally I check the exception stacktrace in the console of Eclipse IDE if I am debugging my application locally.
I checked the logs in app-root/logs/jbossews.log but I only see that my app is deployed logs. like :
INFO: Deploying web application archive /var/lib/openshift/57582f677628e108ba000096/app-root/runtime/dependencies/jbossews/webapps/ROOT.war
Jun 10, 2016 10:43:18 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/openshift/57582f677628e108ba000096/app-root/runtime/dependencies/jbossews/webapps/ROOT.war has finished in 29,121 ms
Jun 10, 2016 10:43:18 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.8.28.129-8080"]
Jun 10, 2016 10:43:18 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 29501 ms
Not my application exceptions.
Is there any configuration that I should add to get my application exceptions in the logs ?
Hard to tell without seeing your configuration but there is a "OPENSHIFT_LOG_DIR" environment variable in every Openshift gear and you can use that to write your log files to the designated log directory.
Example in your spring-boot application.yml file, you can add
logging:
path: ${OPENSHIFT_LOG_DIR}
file: myApplication.log
I have been trying to work on things using selendroid, but I can't get the standalone to run. I have been trying to run the command "java -jar selendroid-standalone-0.15.0-with-dependencies.jar -app selendroid-test-app-0.14.0.apk". But I just keep getting "SEVERE: Error building server: Command 'aapt' was not found inside the Android SDK....". I already referenced This, but it didn't help.
Paths to Java and Android SDK's
Outputs in the Command Prompt
I realized that the picture was a bit small...
Apr 30, 2015 1:40:41 PM io.selendroid.standalone.SelendroidLauncher main
INFO: ################# Selendroid #################
Apr 30, 2015 1:40:41 PM io.selendroid.standalone.SelendroidLauncher main
INFO: ################# Configuration in use #################
Apr 30, 2015 1:40:41 PM io.selendroid.standalone.SelendroidLauncher main
INFO: io.selendroid.standalone.SelendroidConfiguration#816f27d[
port=4444
timeoutEmulatorStart=300000
supportedApps=[selendroid-test-app-0.15.0.apk]
verbose=false
emulatorPort=5560
deviceScreenshot=false
selendroidServerPort=8080
keystore=<null>
keystorePassword=<null>
keystoreAlias=<null>
emulatorOptions=<null>
keepEmulator=false
registrationUrl=<null>
proxy=<null>
serverHost=<null>
keepAdbAlive=false
maxSession=5
maxInstances=5
noWebViewApp=false
noClearData=false
sessionTimeoutSeconds=1800
forceReinstall=false
logLevel=ERROR
deviceLog=true
serverStartTimeout=20000
printHelp=false
serverStartRetries=5
folder=<null>
]
Apr 30, 2015 1:40:41 PM io.selendroid.standalone.SelendroidLauncher launchServer
INFO: Starting Selendroid standalone on port 4444
Apr 30, 2015 1:40:41 PM io.selendroid.standalone.SelendroidLauncher launchServer
SEVERE: Error building server: Command 'aapt' was not found inside the Android SDK. Please update to the latest development tools and try again.
If I left out any information just let me know.
Thanks
EDIT: Here's the latest
Your ANDROID_HOME environment variable is:
C:\Program Files(x86)\Android\android-skd
Please try to change to:
C:\Program Files(x86)\Android\android-sdk
EDIT: Also check that aapt.exe is inside of platform-tools folder, otherwise copy aapt.exe from the last build tools you have, for example:
<android-sdk>\build-tools\22.0.1\aapt.exe
to:
<android-sdk>\platform-tools\aapt.exe
As Mattai said, Selendroid checks for aapt inside platform-tools.
But I was getting the same error even after copying the appt to platform-tools folder.
But worked when I tried after restarting the system!
Thanks Mattai!
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.