By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,911 Members | 1,222 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,911 IT Pros & Developers. It's quick & easy.

org.apache cannot be resolved to a type - error

P: 48
Hi, I am trying to implement Java Web Service using Apache Axis2 and Eclipse as a tool. I have created the basic code and deployed the service using various eclipse plugin but when I try to invoke the service using client stub, I get this error...

Expand|Select|Wrap|Line Numbers
  1. Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
  2.     org.apache cannot be resolved to a type
  3.     org.apache cannot be resolved to a type
  4.     org.apache cannot be resolved to a type
  5.     org.apache cannot be resolved to a type
  6.     org.apache cannot be resolved to a type
  7.     org.apache cannot be resolved to a type
  8.     _serviceClient cannot be resolved
  9.     org.apache cannot be resolved to a type
  10.     _service cannot be resolved
  11.     _serviceClient cannot be resolved
  12.     _serviceClient cannot be resolved
  13.     org.apache cannot be resolved to a type
  14.     _serviceClient cannot be resolved
  15.     _serviceClient cannot be resolved
  16.     org.apache cannot be resolved
  17.     org.apache cannot be resolved to a type
  18.     org.apache cannot be resolved to a type
  19.     org.apache cannot be resolved to a type
  20.     org.apache cannot be resolved to a type
  21.     The constructor TemperatureConverterStub(null, String) is undefined
  22.     org.apache cannot be resolved to a type
  23.     _serviceClient cannot be resolved
  24.     _operations cannot be resolved
  25.     org.apache cannot be resolved
  26.     org.apache cannot be resolved to a type
  27.     org.apache cannot be resolved to a type
  28.     org.apache cannot be resolved to a type
  29.     _serviceClient cannot be resolved
  30.     org.apache cannot be resolved to a type
  31.     org.apache cannot be resolved
  32.     org.apache cannot be resolved to a type
  33.     org.apache cannot be resolved to a type
  34.     org.apache cannot be resolved to a type
  35.     org.apache cannot be resolved to a type
  36.     org.apache cannot be resolved to a type
  37.     org.apache cannot be resolved to a type
  38.     org.apache cannot be resolved
  39.     org.apache cannot be resolved
  40.     org.apache cannot be resolved to a type
  41.     org.apache cannot be resolved to a type
  42.     org.apache cannot be resolved
  43.     org.apache cannot be resolved
  44.     org.apache cannot be resolved
  45.     org.apache cannot be resolved to a type
  46.     org.apache cannot be resolved
  47.     org.apache cannot be resolved to a type
  48.     org.apache cannot be resolved to a type
  49.     org.apache cannot be resolved
  50.     org.apache cannot be resolved
  51.     org.apache cannot be resolved to a type
  52.     org.apache cannot be resolved to a type
  53.     org.apache cannot be resolved
  54.     org.apache cannot be resolved
  55.     org.apache cannot be resolved
  56.     org.apache cannot be resolved to a type
  57.     org.apache cannot be resolved
  58.     org.apache cannot be resolved to a type
  59.     org.apache cannot be resolved to a type
  60.     org.apache cannot be resolved to a type
  61.     org.apache cannot be resolved
  62.     org.apache cannot be resolved
  63.     org.apache cannot be resolved to a type
  64.     org.apache cannot be resolved to a type
  65.     org.apache cannot be resolved
  66.     org.apache cannot be resolved
  67.     org.apache cannot be resolved
  68.     org.apache cannot be resolved to a type
  69.     org.apache cannot be resolved
  70.     org.apache cannot be resolved to a type
  71.     org.apache cannot be resolved to a type
  72.     org.apache cannot be resolved
  73.     org.apache cannot be resolved
  74.     org.apache cannot be resolved to a type
  75.     org.apache cannot be resolved to a type
  76.     org.apache cannot be resolved
  77.     org.apache cannot be resolved
  78.     org.apache cannot be resolved
  79.     org.apache cannot be resolved to a type
  80.     org.apache cannot be resolved
  81.     org.apache cannot be resolved to a type
  82.     org.apache cannot be resolved to a type
  83.     org.apache cannot be resolved to a type
  84.     org.apache cannot be resolved to a type
  85.     org.apache cannot be resolved to a type
  86.     org.apache cannot be resolved to a type
  87.     org.apache cannot be resolved to a type
  88.     org.apache cannot be resolved to a type
  89.     org.apache cannot be resolved to a type
  90.  
  91.     at ws.example.TemperatureConverterStub.<init>(TemperatureConverterStub.java:17)
  92.     at ws.example.TemperatureConverterServiceClient.main(TemperatureConverterServiceClient.java:8)
  93.  
Does anyone know about these kind of errors. I do have all the important Apache classes in the lib folder within the Java project.

Thanks.
AJ

The two error files are -
Expand|Select|Wrap|Line Numbers
  1. package ws.example;
  2.  
  3. public class TemperatureConverterServiceClient {
  4.     public static void main(String[] args) {
  5.         TemperatureConverterStub stub;
  6.         try {
  7.             double c_value = 32;
  8.             stub = new TemperatureConverterStub
  9.            ("http://localhost:8080/axis2/services/TemperatureConverter");
  10.             TemperatureConverterStub.C2FConvertion c2f = new TemperatureConverterStub.C2FConvertion();
  11.             c2f.setCValue(c_value); 
  12.             TemperatureConverterStub.C2FConvertionResponse res = stub.c2FConvertion(c2f);  
  13.             System.out.println("C Value : "+c_value+ "\tResult : " +res.get_return());
  14.             TemperatureConverterStub.F2CConvertion f2c = new TemperatureConverterStub.F2CConvertion(); 
  15.             f2c.setFValue(res.get_return());
  16.  
  17.             TemperatureConverterStub.F2CConvertionResponse res1 = stub.f2CConvertion(f2c);
  18.             System.out.println("F Value : "+res.get_return()+ "\tResult : " +res1.get_return());
  19.        } catch (Exception e) {
  20.            e.printStackTrace();
  21.        }
  22.     }
  23. }
  24.  
Oct 4 '07 #1
Share this Question
Share on Google+
3 Replies


P: 1
Hi ,
I am trying out this and I get a org.apache.woden.resolver problem.
Did you resolve your earlier problem

Thanks
Sep 9 '08 #2

P: 48
Hi ,
I am trying out this and I get a org.apache.woden.resolver problem.
Did you resolve your earlier problem

Thanks
No. It still stands unresolved.
Sep 9 '08 #3

10K+
P: 13,264
You were trying to run the program before successfully compiling all the required classes. You are probably missing some import statements.
Sep 10 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.