[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to deploy axis under TomCat?

Posted on 2005-04-20
33
Medium Priority
?
1,080 Views
Last Modified: 2012-08-14
Hello!

I have problem with depolying Axis under TomCat. I just get this error when I start TomCat:

http://www.dsv.su.se/~fr-ander/tomcat1.JPG
http://www.dsv.su.se/~fr-ander/tomcat2.JPG

When I try to enter the site at: http://127.0.0.1:8080/axis/
I just get a 404


My TomCat is a fresh TomCat 5.5.9 with nothing else.

My Axis is 1_2RC3 acording to zip-file_name.

My Java is 1.5.0

My JAVA_HOME is set to C:\Program\Java\jdk1.5.0

I have put it like:

Tomcat/webapps/axis


I start TomCat with startup.bat


So if any one know what to do to get axis running in a Tomcat please let me know!

Best regards
Fredrik
0
Comment
Question by:fredand44
  • 16
  • 9
  • 6
  • +1
33 Comments
 
LVL 16

Expert Comment

by:suprapto45
ID: 13831425
Hi Fredrik,

Do you copy the axis from Axis sample?

Regards
Dave
0
 
LVL 16

Assisted Solution

by:suprapto45
suprapto45 earned 660 total points
ID: 13831426
Hi,

That is not axis problem. That is your Tomcat configuration problem (I believe :) ).

Regards
Dave
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 13831720
I just did exactly the same as you did and I can access http://localhost:8080/axis without any problem.
Try to reinstall tomcat.
Could you send the output of startup.bat file ?
On my system it is:
----
Using CATALINA_BASE:   C:\jakarta-tomcat-5.5.9
Using CATALINA_HOME:   C:\jakarta-tomcat-5.5.9
Using CATALINA_TMPDIR: C:\jakarta-tomcat-5.5.9\temp
Using JAVA_HOME:       c:\jdk1.5.0
-----

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 19

Expert Comment

by:ramazanyich
ID: 13831784
Do you use correct JAVA_HOME ?
You said:"My JAVA_HOME is set to C:\Program\Java\jdk1.5.0"
but is not it  "C:\Program Files\Java\jdk1.5.0" ?
0
 

Author Comment

by:fredand44
ID: 13832250
Hello!

Thanks for all comments!

To suprapto45 >
1) Yes I just copied the axis folder and put it under Tomcat\webbapps
The axis folder contains:
WEB-INF
EchoHeader.jws
fingerprint.jsp
happyaxis.jsp
i18nLib.jsp
index.html
index.jsp
SOAPMonitorApplet.java
StockQuoteServcie.jws

I also copied the jar files from
 axis_home_download_extracted_folder\lib
to
TomCat_home\common\lib

To ramazanyich >
1)
My output from stratup.bat is at (image unfortunately, I can not copy the text strangely):
http://www.dsv.su.se/~fr-ander/tomcat1.JPG
http://www.dsv.su.se/~fr-ander/tomcat2.JPG

2)
Yes my JAVA_HOME is set to C:\Program\Java\jdk1.5.0, my system has put all program files in to folder "Program". I guess it vary between computers.

3)
I realized that I had not set the environment variables that you mentioned. So I did it like:
CATALINA_BASE: D:\Fredrik\Tomcat
CATALINA_HOME:  D:\Fredrik\Tomcat
CATALINA_TMPDIR D:\Fredrik\Tomcat\temp

My folder Tomcat is your jakarta-tomcat-5.5.9.

Unfortunately those changes did no effect the out put is still the same. Se images above.

So if you guys got any ideas pleas let me know.

Do you think I have forgot anything else during the install of TomCat?

Best Regards
Fredrik

 

0
 

Author Comment

by:fredand44
ID: 13832339
Hello again!

When i look at the TomCat install the only thing I have done is:
(2.2) Unpack the binary distribution into a convenient location so that the
      distribution resides in its own directory (conventionally named
      "jakarta-tomcat-5").  For the purposes of the remainder of this document,
      the symbolic name "$CATALINA_HOME" is used to refer to the full
      pathname of the release directory.
(3) Start Up Tomcat

The server responds to call at 127.0.0.1:8080

Correct me if wrong but I guess that this is a proper install?

But the problem remains!

Fredrik
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 13832349
try to put JAVA_HOME variable to the startup.bat file:
set JAVA_HOME=c:\Program\Java\jdk1.5.0
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 13832353
Could you also start command prompt and execute set command:
>set

and send output of that command
0
 

Author Comment

by:fredand44
ID: 13832495
Hello!

I put set JAVA_HOME=c:\Program\Java\jdk1.5.0 first in startup.bat like:

....
rem Guess CATALINA_HOME if not defined
set JAVA_HOME=c:\Program\Java\jdk1.5.0
set CURRENT_DIR=%cd%.....

I also run the command in a prompt before I started the TomCat.

But the problem remains.

Very strange.

/Fredrik
0
 

Author Comment

by:fredand44
ID: 13832526
I can not image that the root folder for tomcat must be named to "jakarta-tomcat-5.5.9"???

I named it Tomcat

But I should try to rename it and update my environment variables.

...back in a minute!



0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 13832549
it has nothing to do with naming of tomcat home dir: I renamed jakarta-tomcat-5.5.9 to tomcat and I still can access http://localhost:8080/axis without any problem.
It has something to do with your envronment variables.
Could you send the output of set program ?
0
 

Author Comment

by:fredand44
ID: 13832576
Hello!

Just one thing I saw, when I extracted the downloaded_tomcat_zip I get:

D:\Fredrik\Downloads\TomCat\jakarta-tomcat-5.5.9\jakarta-tomcat-5.5.9

Yes that right, I got 2 jakarta-tomcat-5.5.9!!!

I just copied the last one.

But on other hand I can start it and the tomcat answer for calls to localhost:8080

So I guess it is correct just to copy the last jakarta-tomcat-5.5.9 folder.

But I will rename it, back in a minute!
/Fredrik
0
 

Author Comment

by:fredand44
ID: 13832583
Hello!

I guess you mean:

C:\>set program
ProgramFiles=C:\Program

C:\>

/Fredrik
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 13832599
no just call:
C>set

it will produce quite big output of all environment variables. Just copy and send output of that command.
0
 

Author Comment

by:fredand44
ID: 13832669
Hello!

Before I run set I just tired to rename my folder to jakarta-tomcat-5.5.9 and I updated all environment variables to this new folder name.

I also removed my CLASSPATH

But I still got the same problem.

Below is my output of "set"

C:\>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Frean\Application Data
AXISCPP_DEPLOY=D:\Fredrik\Downloads\Axis\Simple_Axis_Server_Folder\Axis
CATALINA_BASE=D:\Fredrik\jakarta-tomcat-5.5.9
CATALINA_HOME=D:\Fredrik\jakarta-tomcat-5.5.9
CATALINA_TMPDIR=D:\Fredrik\jakarta-tomcat-5.5.9\temp
CommonProgramFiles=C:\Program\Delade filer
COMPUTERNAME=FREANXP
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=Z:
HOMEPATH=\
HOMESHARE=\\FREJA\HOMEINST\Frean
JAVA_HOME=C:\Program\Java\jdk1.5.0
LOGONSERVER=\\LOKE
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program\Java\jdk
1.5.0\bin;C:\Borland\BCC55\Bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0401
ProgramFiles=C:\Program
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\Frean\LOKALA~1\Temp
TMP=C:\DOCUME~1\Frean\LOKALA~1\Temp
USERDNSDOMAIN=SKONDAL.SE
USERDOMAIN=POSTKONTORET
USERNAME=Frean
USERPROFILE=C:\Documents and Settings\Frean
windir=C:\WINDOWS

C:\>

/Fredrik
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 13832705
I suggest to remove CATALINA_BASE=D:\Fredrik\jakarta-tomcat-5.5.9
CATALINA_HOME=D:\Fredrik\jakarta-tomcat-5.5.9
CATALINA_TMPDIR=D:\Fredrik\jakarta-tomcat-5.5.9\temp

from your envieonment variables as tomcat will find that pathes by himself if they are not defined.
0
 

Author Comment

by:fredand44
ID: 13832779
Hello!

I removed the 3 envieonment variables CATALINA_BASE, CATALINA_HOME, CATALINA_TMPDIR

But when I tried to start TomCat with startup.bat the problem still remains.

To me it look like it is not possible to find javax/servlet/http/HttpSessionListener.

But I do know that it is in the jar file named servlet-api.jar that is in:
D:\Fredrik\jakarta-tomcat-5.5.9\common\lib

Or what do you think if you take an other glance at the:
http://www.dsv.su.se/~fr-ander/tomcat1.JPG

Best regards
Fredrik
0
 

Author Comment

by:fredand44
ID: 13832934
Hello!

Do you think that Tomcat or Axis uses my removed CLASSPATH environment variables?

Or do they got any CLASSPATH set in some config files?

/Fredrik
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 13832948
It is possible
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 13833026
You are missing a servlet-api.jar file either in axis/web-inf/lib or at common/lib..

most of the time it is suppose to be at common/lib..
I suggest you do a search on the tomcat installation and see if you have servlet-api.jar...
if not then your installation of tomcat was not perfect.. you can find this class inside the zip file of tomcat installation...
0
 

Author Comment

by:fredand44
ID: 13833098
I tried to set
CLASSPATH = D:\Fredrik\jakarta-tomcat-5.5.9\common\lib\servlet-api.jar
But the problem remains

I also tried to unpack the servlet-api.jar and put the files into
D:\Fredrik\jakarta-tomcat-5.5.9\common\classes
and set
CLASSPATH = D:\Fredrik\jakarta-tomcat-5.5.9\common\classes
But the problem remains

This problem is starting to be ridicules!

/Fredrik
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 13833162
I looked at the console and its suggesting me that Axis was not able to find javax.servlet.http.HttpSessionListner which is a class in servlet-api.jar.. now if you have it in your common/lib then it can not be the problem...

I think you should delete the webapp/axis directory restart tomcat and check the console... see if errors out somewhere or starts cleanly..
if it starts cleanly then we know that our problem lies in axis not in tomcat...

then we will copy axis  back again... and will try from there..

(P.S. = remove all those unpacked classes from commons... so that we can be sure that its not one of our attempts that are messing up tomcat)...

every ridicules problem always have a simple explanation at the end so dont worry....!
0
 

Author Comment

by:fredand44
ID: 13833173
Hello!

Perhaps some progress!

I did what Kuldeepchaturvedi said and put servlet-api.jar also in axis/web-inf/lib

Then I get this output:

http://www.dsv.su.se/~fr-ander/tomcat3.JPG

I also tried to unpack servlet-api.jar and out it in axis/web-inf/classes/

With the same result.

As you can see the output is sligthly different from before. I get something about that servlet-api.jar is not loaded. Do you know what this means?

Regards
Fredrik
0
 
LVL 19

Assisted Solution

by:ramazanyich
ramazanyich earned 660 total points
ID: 13833211
It is not loaded because tomcat checks that javax.* packages should not be in webapps lib directories. It should be in common/lib or shared/lib. In that case it will load once for all webapplications.
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 13833257
Hmm its not loading it because its already loaded.... i.e. it has picked it up from commons/lib..
by design, tomcat 5.5 will not let you load a class with the same signature twice...
normally whenever there is this error, system still works... check if your axis  is coming up...
0
 

Author Comment

by:fredand44
ID: 13833652
Oh!

Sorry I had to do some work that I'm employed to do.

I removed everything for axis, and all the unpacked servlet-api.jar

The Tomcat started well and I get a output from it like:

http://www.dsv.su.se/~fr-ander/tomcat4.JPG

/Fredrik



0
 

Author Comment

by:fredand44
ID: 13833701
While TomCat was running I copied the axis folder from:
D:\Fredrik\Downloads\Axis\axis-bin-1_2RC3\axis-1_2RC3\webapps
To
D:\Fredrik\jakarta-tomcat-5.5.9\webapps
And got the same error as before:

http://www.dsv.su.se/~fr-ander/tomcat5.JPG

...of course a bit later just!

/Fredrik
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 13833786
okay so this means.. TOMCAT is setup correctly...
the files that we have for axis are not the correct ones...
I just downloaded one from

http://ws.apache.org/axis/download.cgi
and unzipped the axis folder to my webapps directory.. and it works just fine...
lets try to do this on your box..
0
 

Author Comment

by:fredand44
ID: 13834083
Hello!

I did what you said and now I actually got an other problem so I guess we have done som progress.

Se output
http://www.dsv.su.se/~fr-ander/tomcat6.JPG

Now it can not find the javax/servlet/http/HttpServlet

I copied from:
D:\Fredrik\Downloads\Axis\axis-1_1\axis-1_1\webapps

Perhaps I should put the servlet-api.jar some where??



/Fredrik
0
 

Author Comment

by:fredand44
ID: 13836357
Hello Guys!

I tried to install it at home and it worked!!

I extracted the tomcat 5.5.9
I extracted the axis 1.1
I put the axis under the webapps in tomcat.
I set JAVA_HOME
I removed my classpath
I removed anything in path that involved the JDK
I copied the saaj.jar and jaxrpc.jar into common/lib

Ta da!

And now it works!

Hope I manage this tomorrow at work!

I get back to you in the morning!

Best regards
Fredrik
0
 
LVL 19

Accepted Solution

by:
Kuldeepchaturvedi earned 680 total points
ID: 13836376
sorry for getting to it late... I got stuck in meetings...
lets try to do a fresh install altogether and see what we are missing.....
I am sure its a jar file from axis that we need either in web-inf/lib or in common/lib..
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 13836382
oh okay.... while I was typing you did the same thing I was asking ...
okay we will see it tomorrow...
0
 

Author Comment

by:fredand44
ID: 13840704
Hello!

Yes, at last it works!

I also found the misstake I have done. While I was compiling a Web Service client before I started to install Tomcat and axis I put the axis.jar and some other jar-files from axis into C:\Program\Java\jdk1.5.0\jre\lib\ext so I should not need to put them into a classpath.

When I removed these jar-files from ext everything started to work fine.

I must say this is a bit strange cause I have learned that I should always be able to put jar-files into this folder and all will be fine. But apparently not.

I tried to remove all the jar-files from axis that I have in the ext folder and put them into an other folder. Then I created a CLASSPATH and added for eg axis.jar like "D:\Fredrik\jarfiles\axis.jar" this worked fine as well. So the big issue was to not put these jar-files into the ext folder.

Best regards and THANKS A LOT!!!!!

Fredrik
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
LinkedIn blogging is great for networking, building up an audience, and expanding your influence as well. However, if you want to achieve these results, you need to work really hard to make your post worth liking and sharing. Here are 4 tips that ca…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question