Java Technologies for Web Services - This forum is dead or what
Why the apt tool throw an error when I reference a class inside of a jar in my web service ?
I have the following class
package org.rmilian;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;
import org.apache.log4j.Logger;
@WebService
publicclass Hello{
static Logger logger = Logger.getLogger(Hello.class);
@WebMethod
publicvoid hello(String hello){
System.out.println(hello);
}
publicstaticvoid main(String[] args){
Hello hello =new Hello();
Endpoint endpoint = Endpoint
.publish("http://localhost:81/hello", hello);
}
}
And when I try to run apt with the above class I get the error below:
warning: Annotation types without processors: [javax.xml.bind.annotation.XmlRoot
Element, javax.xml.bind.annotation.XmlAccessorType, javax.xml.bind.annotation.Xm
lType, javax.xml.bind.annotation.XmlElement]
.\org\rmilian\Hello.java:7: package org.apache.log4j does not exist
import org.apache.log4j.Logger;
^
.\org\rmilian\Hello.java:7: package org.apache.log4j does not exist
import org.apache.log4j.Logger;
^
.\org\rmilian\Hello.java:12: cannot find symbol
symbol : class Logger
location: class org.rmilian.Hello
static Logger logger = Logger.getLogger(Hello.class);
^
3 errors
1 warning
If I remove the Logger statement all work well. I have proved this with references to other classes and I guess that the problem is when the classes I抦 referencing are in bytecode format i meant in .class and when are in .java all work well.
My question is if there is any way of generating the wrapper classes and keep the reference to .class files?

