I'd like to know what could cause Tomcat or the native Java ZipFile.open
method to claim that a file does not exist when it actually does? This
has been a blocking issue for some of my work for the past month. It's
happening when attempting to run the tomcat7-maven-plugin. It works fine
on most machines, including mine (OSX), but fails on our build server
(LINUX) and one of my co-workers' boxes (OSX, same model laptop as mine).
Here's the error as seen in a Maven build:
[INFO] --- tomcat7-maven-plugin:2.2:run (start-tomcat) # PROJECT ---
[INFO] Running war on http://localhost:8080/contentmain
[INFO] Using existing Tomcat server configuration at
/WORKSPACE/PROJECT/tomcat7
Feb 05, 2015 11:17:53 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:
/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Feb 05, 2015 11:17:54 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Feb 05, 2015 11:17:54 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Feb 05, 2015 11:17:54 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8443"]
Feb 05, 2015 11:17:54 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 651 ms
Feb 05, 2015 11:17:54 PM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Feb 05, 2015 11:17:54 PM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.53
Feb 05, 2015 11:17:54 PM org.apache.tomcat.util.scan.StandardJarScanner
scan
WARNING: Failed to scan JAR
[file:/WORKSPACE/tomcat7/webapps/../../target/PROJECT/WEB-INF/lib/openws-1.
5.1.jar] from WEB-INF/lib
java.io.FileNotFoundException:
/WORKSPACE/PROJECT/tomcat7/webapps/../../target/PROJECT/WEB-INF/lib/openws-
1.5.1.jar (No such file or directory)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.jar.JarFile.<init>(JarFile.java:154)
at java.util.jar.JarFile.<init>(JarFile.java:91)
at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:99)
at
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122
)
at
sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:
89)
at org.apache.tomcat.util.scan.FileUrlJar.<init>(FileUrlJar.java:41)
at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:34)
at
org.apache.catalina.startup.ContextConfig$FragmentJarScannerCallback.scan(C
ontextConfig.java:2612)
at
org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.j
ava:259)
at
org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java
:178)
at
org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(Contex
tConfig.java:1868)
at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1256
)
at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java
:873)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java
:371)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppo
rt.java:117)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.jav
a:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java
:5355)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1
559)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1
549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1
145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
615)
at java.lang.Thread.run(Thread.java:745)
This error repeats for every JAR file in the project which was pulled in
from Maven dependencies. There are hundreds of these.
Note that I've placed a breakpoint at the ZipFile.open call on one of the
failing machines and performed the following in a separate terminal:
cd /WORKSPACE/PROJECT/tomcat7/webapps/../../target/PROJECT/WEB-INF/lib/
ls -la
I can confirm that all of the "missing" JAR files were there immediately
before the native open method is called and the exceptions are thrown
which claim that the files aren't there. This led me to suspect that the
JAR files may be corrupted, so I copied one of the failing JAR files from
my co-workers' machine and performed a diff with a local copy I had
following a successful build and execution. They were identical, so it
appears that the "corrupt JAR" theory is out.
I've also tried the following (without success):
Shortening the path used (I read somewhere that there might be a 256
character limit).
Moving the JAR files to a different directory and changing the Tomcat
configuration to point to the new location (they were under resources and
I moved them to the project base.dir).
Setting various JVM heap sizes from Xmx256 to Xmx4096 (I read in a few
posts that memory issues can cause Tomcat to claim that files are missing).
Removing the permgen settings that we normally use for our webapp.
Setting the "jarScanAllDirectories" option to either false or true for
the tomcat7-maven-plugin.
Downloading the sources for the tomcat-maven-plugin (this includes the
tomcat7-maven-plugin) from Apache SVN, attaching them with a remote
debugger to Maven and stepping through the execution (everything seems
identical right up until the native ZipFile.open call).
Playing around with various Jenkins job settings for Maven on the build
server (probably irrelevant since this also fails on a coworker's machine
without Jenkins being involved).
Comparing all of the environment variables used by our webapp to those
used by my coworker (they're identical).
Comparing JDK versions (our entire org is standardized on 1.7.0_45).
Comparing Tomcat versions (we have explicit pom.xml file dependencies for
the tomcat7-maven-plugin on version 7.0.53).
Waiting and hoping that the problem solves itself.
Asking all of my co-workers to take a look (this led to trying some of
the above, but the problem still has not been solved).
I'm at my wit's end here. I've been up past midnight for several days
just trying to get this thing to work. What's left to look at?
UPDATE (2/10/2015): It's been suggested that this is caused by missing file permissions on the Jenkins machine where this is running. I don't have access to the server where this is happening, but I did get a script to run there:
echo Displaying JAR files with current permissions...
ls -la ./target/MyProject/WEB-INF/lib/
echo Adding read, write, and execute permissions to JAR files...
chmod -R 777 ./target/MyProject/WEB-INF/lib/
echo Displaying JAR files with updated permissions...
ls -la ./target/MyProject/WEB-INF/lib/
This produces output like the following:
[INFO] --- exec-maven-plugin:1.3.2:exec (update_jar_file_permissions) #
MyProject ---
Displaying JAR files with current permissions...
total 124556
drwxr-xr-x 2 jenkins users 20480 Feb 10 17:26 .
drwxr-xr-x 6 jenkins users 4096 Feb 10 17:26 ..
-rw-r--r-- 1 jenkins users 62983 Jan 22 00:11 activation-1.1.jar
-rw-r--r-- 1 jenkins users 351656 Jan 22 00:25 amqp-client-3.1.3.jar
-rw-r--r-- 1 jenkins users 74080 Jan 22 00:25 annotations-2.0.0.jar
-rw-r--r-- 1 jenkins users 445288 Jan 22 00:25 antlr-2.7.7.jar
-rw-r--r-- 1 jenkins users 895124 Jan 22 00:25 antlr-3.2.jar
Adding read, write, and execute permissions to JAR files...
Displaying JAR files with updated permissions...
total 124556
drwxrwxrwx 2 jenkins users 20480 Feb 10 17:26 .
drwxr-xr-x 6 jenkins users 4096 Feb 10 17:26 ..
-rwxrwxrwx 1 jenkins users 62983 Jan 22 00:11 activation-1.1.jar
-rwxrwxrwx 1 jenkins users 351656 Jan 22 00:25 amqp-client-3.1.3.jar
-rwxrwxrwx 1 jenkins users 74080 Jan 22 00:25 annotations-2.0.0.jar
-rwxrwxrwx 1 jenkins users 445288 Jan 22 00:25 antlr-2.7.7.jar
-rwxrwxrwx 1 jenkins users 895124 Jan 22 00:25 antlr-3.2.jar
As you can see, there were missing permissions. However, this hasn't
solved the problem:
Feb 10, 2015 5:27:54 PM org.apache.tomcat.util.scan.StandardJarScanner scan
WARNING: Failed to scan JAR [file:/opt/jenkins/workspace/MY_JENKINS_JOB/tomcat7/webapps/../../target/MY_PROJECT/WEB-INF/lib/activation-1.1.jar] from WEB-INF/lib
java.io.FileNotFoundException: /opt/jenkins/workspace/MY_JENKINS_JOB/tomcat7/webapps/../../target/MY_PROJECT/WEB-INF/lib/activation-1.1.jar (No such file or directory)
at java.util.zip.ZipFile.open(Native Method)
The script was run right before tomcat7-maven-plugin. The permissions should have been in place and the JAR files should have been extractable. I still don't understand why this isn't working.
It turns out this wasn't a permissions issue at all. For some reason copying the JAR files out of the directory and back into it caused them to be picked up (I read this in a suggestion somewhere). Reading the 'man' entry for cp I see that it doesn't preserve "Access Control Lists (ACLs) and Extended Attributes (EAs), including resource forks" unless the -p flag is set (this is on by default when using mv). My guess is that removing this "access control" information somehow made the files accessible to the tomcat7-maven-plugin. It seems a little sketchy that I don't really know the root cause of the problem, but I'm happy that it's now fixed.
If somebody can definitively explain why this worked then I'll accept that as an answer instead of this one.
Related
A CentOS 7 server has Java 7 and tomcat 8 installed. I need to set the permgen space, but typing printenv on the command line does not include JAVA_OPTS in the list of environmental variables. I typed ps to get the list of running processes, and then I typed jmap -heap <pid> with the pid from the running java process, which listed values for MaxPermSize and PermSize among other values.
How do I set new values for these properties in a way that will persist when the system is rebooted, etc.? I hesitate to just create a JAVA_OPTS variable if the server in question has another place where it stores these persistent values.
EDIT:
As per #ChrisRobak's suggestion, I went searching for tomcat conf files. There is no /etc/tomcat directory, but /etc has directories called /etc/java, /etc/.java, /etc/jvm, and /etc/jvm-common. Also, the tomcat conf is as follows:
[root#myserver tomcat]# cd /opt/tomcat/conf
[root#myserver conf]# ls -al
total 280
drwxrwx---. 3 root root 4096 Oct 30 20:02 .
drwxr-xr-x. 14 root root 4096 Oct 30 20:58 ..
drwxrwx---. 7 root root 4096 Oct 30 21:00 Catalina
-rwxrwx---. 1 root root 12624 Nov 2 2014 catalina.policy
-rwxrwx---. 1 root root 6560 Nov 2 2014 catalina.properties
-rwxrwx---. 1 root root 1852 Jan 2 2015 context.xml
-rwxrwx---. 1 root root 3451 Nov 2 2014 logging.properties
-rwxr-x--- 1 root root 5018 Oct 30 21:52 server.xml
-rwxrwx---. 1 root root 1783 Nov 2 2014 tomcat-users.xml
-rwxrwx---. 1 root root 1888 Nov 2 2014 tomcat-users.xsd
-rwxrwx---. 1 root root 168082 Nov 2 2014 web.xml
[root#myserver conf]#
Which file should I look in?
Alternatively, is there a command line way of setting the Java options which will not only be persistent, but also not cause side effects due to conflicts with config files? I would just create a JAVA_OPTS variable if I thought the rest of the server would go to the JAVA_OPTS as the default.
ANSWER?
When none of the config files and scripts seemed to have JAVA_OPTS set, I finally just decided to type the following in the CENTOS 7 terminal:
export JAVA_OPTS="-Xms256m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m"
The result is that the MaxPermSize has been reset. If anyone else has a specific answer to CentOS 7 that is better than this, please alert me.
I think you can persist those in
/etc/tomcat8/tomcat8.conf
or a similar variant, the server i had access to was /etc/tomcat5/tomcat5.conf but i don't know about your version in particular
I am on 1.8.1 GAE for java using eclipse on a mac book pro mountain lion.
On trying to deploy I am getting error:
Unable to update:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=sakshumweb-hrd&version=3&
409 Conflict
Another transaction by user vik.ceo is already in progress for app: s~sakshumweb-hrd, version: 3. That user can undo the transaction with "appcfg rollback".
at com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:293)
at com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:253)
at com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:232)
at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:810)
at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:543)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:135)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:386)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:55)
<dx59b2s3gxmlhdp3940000gn/T/appengine-deploy2012670164492350692.log" 17L, 1449C
I have already executed the below command which succeeds but the deployment still fails with the same error. Please note that in past I have done it without any issues 100s of times.
/Users/vivekkumar/Downloads/Sakshum/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.8.1.1/appengine-java-sdk-1.8.1.1/bin/appcfg.sh rollback war
Reading application configuration data...
Oct 11, 2013 9:43:02 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed war/WEB-INF/appengine-web.xml
Oct 11, 2013 9:43:02 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed war/WEB-INF/web.xml
Oct 11, 2013 9:43:02 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed war/WEB-INF/cron.xml
Oct 11, 2013 9:43:02 PM com.google.apphosting.utils.config.IndexesXmlReader readConfigXml
INFO: Successfully processed war/WEB-INF/appengine-generated/datastore-indexes-auto.xml
Beginning interaction for server default...
0% Rolling back the update.
Success.
Cleaning up temporary files for server default...
I was the same issue (without GWT) and i solved deploy 409 error thanks this answer
Try it please, remove instance-class and automatic-scaling elements from appengine-web.xml.
You may need to cut down the number of permutations for the GWT compiler otherwise you'll end up with permutation explosion (the compiler will generate tons of files for each user agent, locale, ...etc), causing a timeout for app engine while deploying your app.
Try : Soft Permutations
OR : Controlling Permutation Explosion
Let me start with what I use:
- ubuntu 11.04
- apache-tomcat-6.0.33
some details on my java:
adam#adam-1215N:~$ java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
OpenJDK Server VM (build 20.0-b11, mixed mode)
adam#adam-1215N:~$ ll /usr/lib/jvm
total 84
drwxr-xr-x 3 root root 4096 2011-08-28 10:09 ./
drwxr-xr-x 229 root root 69632 2011-08-28 13:13 ../
lrwxrwxrwx 1 root root 14 2011-08-27 21:03 default-java -> java-6-openjdk/
lrwxrwxrwx 1 root root 14 2011-08-27 21:03 java-1.6.0-openjdk -> java-6-openjdk/
drwxr-xr-x 7 root root 4096 2011-08-27 21:11 java-6-openjdk/
-rw-r--r-- 1 root root 2164 2011-06-11 11:07 .java-6-openjdk.jinfo
How I deploy an application:
I build it using mvn clean install. Then I extract the content of created .war file and copy it to my directory in webapps in tomcat. It worked initially.
Now, the meritum:
Project that I try to deploy is quite simple. Everything worked until I wanted one method to return Set of objects. When building I got error that generics are not supported in java 1.3. I googled, and found that I need to add maven-compiler-plugin to my pom.xml pointing which java I want to use. So I added, pointing at 1.6. And here it comes:
Aug 28, 2011 6:25:50 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/myproject]
Aug 28, 2011 6:25:50 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Aug 28, 2011 6:25:50 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/myproject] startup failed due to previous errors
Now the bad news
I tried to return to initial maven configuration, deleted generics that made me use java 1.6 and problem still exists... I was messing with jdk, installing and removing different versions, that is why I gave you same details on what I have in the beginning.
Tomcat also gives one more warning, I thought it is irrelevant but I didn't see it before (or didn't notice) so I'm putting it here:
Aug 28, 2011 6:15:13 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: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/server:/usr/lib/jvm/java-6-openjdk/jre/lib/i386:/usr/lib/jvm/java-6-openjdk/jre/../lib/i386:/usr/java/packages/lib/i386:/usr/lib/i386-linux-gnu/jni:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/jni:/lib:/usr/lib
I'm confused and tired, after fighting with it almost 2 days. Any help appreciated.
Edit
I have found reason: I have changed name of class that was referenced in web.xml and "Refactor" tool in Eclipse didn't change it.
Leaving it here in case someone find it useful :)
I have looked up in logs/localhost.2011-08-28.log and found java.lang.ClassNotFoundException which led me to web.xml containing reference to class that I had renamed
I was getting this error when deploying a spring mvc app from eclipse. The maven build included all the dependent jars for spring under WEB-INF/lib and that worked fine when deployed to Tomcat. The eclipse Indigo export-war functionality was not exporting the dependent spring jars presumably because of the maven directory structure, even though it was in the build path and all the jars were displayed under the Libraries tag.
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.