File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Problem running Apache axis Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem running Apache axis" Watch "Problem running Apache axis" New topic

Problem running Apache axis

igwe kalu kalu ogba
Ranch Hand

Joined: Feb 03, 2005
Posts: 133
Hello, I've installed Apache AXIS on my system but I am having one problem. My programs compile but each time I try to run them I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/Service

Any ideas on how to fix this?
sergio mendez-rueda
Ranch Hand

Joined: May 12, 2005
Posts: 37
after the installation you must copy the directory
into (by example!!) C:\Programme\Tomcat5.0\webapps
(axis runs as wepapps!!) yue need an application server (T:-)Cat)?
if you are working with resin:
into C:\Programme\resin-3.0.12\webapps
On the box:
this is my batch file to start tomcat and axis:
rem begin of file setJava.bat
@echo off
@rem -----------------------------------------
@rem setJava.bat
@rem Sets up the Java environment
@rem by adding the correct java files for JDK Ver 1.4.2_04
@rem to the PATH
@rem ant environment will be initialized
@rem Xalan environment will be initialized
@rem xerces environment will be initialized
@rem junit environment will be initialized
@rem tomcat environment will be initialized
@rem -----------------------------------------
set CATALINA_HOME=C:\Programme\Tomcat5.0
set CATALINA_BASE=C:\Programme\Tomcat5.0
set JAVA_HOME=D:\Programme\j2sdk1.4.2_04
set JUNIT_HOME=D:\Programme\XerTom\junit3.8.1
set CLASSPATH=%JAVA_HOME%\lib\tools.jar
set ANT_HOME=D:\Programme\apache-ant-1.6.2
set CLASSPATH=.;D:\Programme\XerTom\xerces-2_2_0\xercesImpl.jar;%CLASSPATH%
set CLASSPATH=C:\Sun\AppServer\lib\j2ee.jar;%CLASSPATH%
set CLASSPATH=%CLASSPATH%;D:\Programme\XerTom\xalan-j_2_4_1\bin\xalan.jar
set CLASSPATH=%CLASSPATH%;D:\Programme\XerTom\xalan-j_2_4_1\bin\xml-apis.jar
set CLASSPATH=%CLASSPATH%;D:\Programme\XerTom\xalan-j_2_4_1\bin\xalansamples.jar
set CLASSPATH=%CLASSPATH%;D:\Programme\XerTom\xalan-j_2_4_1\bin\xalanservlet.jar
set CLASSPATH=%CLASSPATH%;D:\Programme\jndi\lib\fscontext.jar
set CLASSPATH=%CLASSPATH%;D:\Programme\jndi\lib\providerutil.jar
set AXISCLASSPATH=D:\Programme\axis-1_1\lib\axis.jar
set AXISCLASSPATH=%AXISCLASSPATH%;D:\Programme\axis-1_1\lib\axis-ant.jar
set AXISCLASSPATH=%AXISCLASSPATH%;D:\Programme\axis-1_1\lib\commons-discovery.jar
set AXISCLASSPATH=%AXISCLASSPATH%;D:\Programme\axis-1_1\lib\commons-logging.jar
set AXISCLASSPATH=%AXISCLASSPATH%;D:\Programme\axis-1_1\lib\jaxrpc.jar
set AXISCLASSPATH=%AXISCLASSPATH%;D:\Programme\axis-1_1\lib\log4j-1.2.8.jar
set AXISCLASSPATH=%AXISCLASSPATH%;D:\Programme\axis-1_1\lib\saaj.jar
set AXISCLASSPATH=%AXISCLASSPATH%;D:\Programme\axis-1_1\lib\wsdl4j.jar
@rem call %CATALINA_HOME%\bin\startup.bat
@rem end of file setJava.bat
You need perhaps only the set AXISCLASSPATH's
enjoy AXIS
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 577

My programs compile but each time I try to run them I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/Service

Just have a look into axis documentation files. Firstly go through install.html

(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
I agree. Here's the link:
subject: Problem running Apache axis
It's not a secret anymore!