axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sachin Chowdhary" <csac...@pisoftek.com>
Subject Novice Programmer:-Help Me Please(Urgent)
Date Wed, 02 Apr 2003 08:45:16 GMT
When i am trying to deploy my webservice using Apache Axis it is giving
error.I am new in Apache Axis Can Any one suggest me why it is giving
Error.Even when i am trying to Deploy the examples which comes in with
axis,is giving same can you help me.It is really urgent.
I have to use Web Service implementation using Apache Axis and not able to
deploy It Please help me


C:\Program Files\Apache Group\Tomcat
4.1\webapps\axis\WEB-INF\classes\fibonacci\ws>java
org.apache.axis.client.AdminClient deploy.wsdd
Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.log4j.spi.LoggingEvent.getThrowableStrRep()[Ljava/lang/String;
        at
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:295)
        at org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
        at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)

        at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders
(AppenderAttachableImpl.java:56)
        at org.apache.log4j.Category.callAppenders(Category.java:258)
        at org.apache.log4j.Category.forcedLog(Category.java:454)
        at org.apache.log4j.Category.log(Category.java:885)
        at
org.apache.commons.logging.impl.Log4JCategoryLog.info(Log4JCategoryLo
g.java:180)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:255)
        at org.apache.axis.client.AdminClient.main(AdminClient.java:341)


Here is procedure which i have followed

% java org.apache.axis.wsdl.Java2WSDL -o
fib.wsdl -l"http://localhost:8080/axis/services/fibonacci" -n
urn:fibonacci -p"fibonacci" urn:fibonacci fibonacci.Fibonacci

The full command for our example becomes something like:

% java org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -p fibonacci.ws
fib.wsdl

After running this program, a slew of code has been generated for us in the
fibonacci\ws directory:

FibonacciSoapBindingImpl.java
Fibonacci.java
FibonacciService.java
FibonacciServiceLocator.java
FibonacciSoapBindingSkeleton.java
FibonacciSoapBindingStub.java
deploy.wsdd
undeploy.wsdd

Now I move files into jar files and place into lib Directory

% jar cvf fib.jar fibonacci/*.class fibonacci/ws/*.class

% mv fib.jar %TOMCAT_HOME%/webapps/axis/WEB-INF/lib

And After little Manipulation in file I gave Command:

java org.apache.axis.client.AdminClient deploy.wsdd


Then I am getting Error

C:\Program Files\Apache Group\Tomcat
4.1\webapps\axis\WEB-INF\classes\fibonacci\ws>java
org.apache.axis.client.AdminClient deploy.wsdd
Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.log4j.spi.LoggingEvent.getThrowableStrRep()[Ljava/lang/String;
        at
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:295)
        at org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
        at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)

        at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders
(AppenderAttachableImpl.java:56)
        at org.apache.log4j.Category.callAppenders(Category.java:258)
        at org.apache.log4j.Category.forcedLog(Category.java:454)
        at org.apache.log4j.Category.log(Category.java:885)
        at
org.apache.commons.logging.impl.Log4JCategoryLog.info(Log4JCategoryLo
g.java:180)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:255)
        at org.apache.axis.client.AdminClient.main(AdminClient.java:341)




I am Using axis-1_1RC2 & xml-axis-10 tried with Both
tomcat 4.1.18 JDK1.4  log4j1.2.8
Fibonacci.java

Here is My Code:-(Basically it is an Oreilly Example on site )

package fibonacci;

public interface Fibonacci {

	// Method to calculate the fibonacci sequence
	public int calculateFibonacci( int num );

	public int[] calculateFibonacciRange(int start, int stop);
}

FibonacciImpl.java

package fibonacci;

public class FibonacciImpl {

	// Method to calculate the fibonacci sequence
	public int calculateFibonacci( int num ) {

		if (num <= 0) return 0;
		if (num == 1) return 1;

		int previous1 = 1, previous2 = 0, fib = 0;

		for (int i=2; i <= num; i++) {
			// the fib is the answer of the previous two answers
			fib = previous1 + previous2;

			// reset the previous values
			previous2 = previous1;
			previous1 = fib;
		}

		return fib;
	}

	public int[] calculateFibonacciRange(int start, int stop) {
		int[] results = new int[stop + 1];

		for (int x=start; x <= stop; x++) {
			results[x] = this.calculateFibonacci( x );
		}
		return results;
	}
}


Mime
View raw message