wood burning stoves 2.0*
The moose likes Java in General and the fly likes The import org.apache.xmlrpc cannot be resolved Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "The import org.apache.xmlrpc cannot be resolved" Watch "The import org.apache.xmlrpc cannot be resolved" New topic
Author

The import org.apache.xmlrpc cannot be resolved

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Hi,

I am trying to run the folloeing example code


and i am getting the following error:

XMLRPCTestClient.java:7: package org.apache does not exist
import org.apache.xmlrpc;
^
./XmlRpcClient.java:23: cannot find symbol
symbol : class XmlRpcConfig
location: package org.apache.xmlrpc
import org.apache.xmlrpc.XmlRpcConfig;
^
./XmlRpcClient.java:24: cannot find symbol
symbol : class XmlRpcException
location: package org.apache.xmlrpc
import org.apache.xmlrpc.XmlRpcException;
^
./XmlRpcClient.java:25: cannot find symbol
symbol : class XmlRpcRequest
location: package org.apache.xmlrpc
import org.apache.xmlrpc.XmlRpcRequest;
^
./XmlRpcClient.java:26: package org.apache.xmlrpc.common does not exist
import org.apache.xmlrpc.common.XmlRpcController;
^
./XmlRpcClient.java:27: package org.apache.xmlrpc.common does not exist
import org.apache.xmlrpc.common.XmlRpcWorkerFactory;
^
./XmlRpcClient.java:28: package org.apache.xmlrpc.serializer does not exist
import org.apache.xmlrpc.serializer.XmlWriterFactory;
^
XMLRPCTestClient.java:77: cannot access XmlRpcClient
bad class file: ./XmlRpcClient.java
file does not contain class XmlRpcClient
Please remove or make sure it appears in the correct subdirectory of the classpath.
private static String executeValidateCardFull( XmlRpcClient client )



I have downloaded apache-xmlrpc-current-src.tar.gz.I hade untar that file also.But i am getting the error.Please help me to solve this.
Thanks
Sridhar Santhanakrishnan
Ranch Hand

Joined: Mar 20, 2007
Posts: 317
Looks like you have downloaded the source for RPC and not the jar archive.
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Thanks, I didnt find any jar files there. The following are the files i found in the package

1. apache-xmlrpc-current-bin.tar.bz2
2. apache-xmlrpc-current-bin.tar.bz2.asc
3. apache-xmlrpc-current-bin.tar.gz
4. apache-xmlrpc-current-bin.tar.gz.asc
5. apache-xmlrpc-current-bin.zip
6. apache-xmlrpc-current-bin.zip.asc
7. apache-xmlrpc-current-src.tar.bz2
8. apache-xmlrpc-current-src.tar.bz2.asc
9. apache-xmlrpc-current-src.tar.gz
10. apache-xmlrpc-current-src.tar.gz.asc
11. apache-xmlrpc-current-src.zip
12. apache-xmlrpc-current-src.zip.asc
13. binaries/
14. sources/


Sridhar Santhanakrishnan
Ranch Hand

Joined: Mar 20, 2007
Posts: 317
apache-xmlrpc-current-bin.zip should be the one you need.
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Actually i am working in linux machine. Thats why I have chosen tar.gz file. Is it wrong?
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
I have the following jar files in the path where the XMLRPCTestClient.java,

1.commons-logging-1.1.jar
2.ws-commons-util-1.0.2.jar
3.xmlrpc-client-3.1.3.jar
4.xmlrpc-common-3.1.3.jar
5.xmlrpc-server-3.1.3.jar.

These files are found in the folder apache-xmlrpc-current-bin

and tried to run the program using the command

javac -cp commons-logging-1.1.jar:.:ws-commons-util-1.0.2.jar:.:xmlrpc-client-3.1.3.jar:.:xmlrpc-common-3.1.3.jar:.:xmlrpc-server-3.1.3.jar XMLRPCTestClient.java


But still i am finding the same error.
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
I have included the jar files

1.commons-logging-1.1.jar
2.ws-commons-util-1.0.2.jar
3.xmlrpc-client-3.1.3.jar
4.xmlrpc-common-3.1.3.jar
5.xmlrpc-server-3.1.3.jar.


inside the eclipse and can able to solve some issues in the code.But still there are two errors.

In the line

XmlRpc.setDriver( "org.apache.xerces.parsers.SAXParser" );

// Specifiy the server
XmlRpcClient client = new XmlRpcClient(SECVPN_HOST_ADDRESS );



The error appears is :

1.XmlRpc cannot be resolved
2.The constructor XmlRpcClient(String) is undefined



Please assist me to get an solution

Thanks
 
Consider Paul's rocket mass heater.
 
subject: The import org.apache.xmlrpc cannot be resolved