java - JAX-WS server not deploying. What am I doing wrong? -
edit: ok has user class. typical java class. supposed special it? using java project referenced in build path "user" class
edit 2: well, solved old problem have new 1 strange. tomcatee, hosting service doesn't seem user class' setter methods.
here service interface:
import java.util.date; import java.util.list; import java.util.uuid; import javax.jws.webmethod; import javax.jws.webservice; import bioflip.user; import bioflip.user.permission; @webservice(targetnamespace = "http://bioflip.org/wsdl") public interface iuserservice { @webmethod public list<user> getuserlist(); @webmethod public int getregisteredusercount(); @webmethod public list<user> getguestlist(); @webmethod public boolean isenrolled(user user); @webmethod public boolean enrolluser(user user); @webmethod public boolean enrolluser(string firstname, string lastname, permission permission, string phonenumber, string fingerimage, string faceimage, date accessfrom, date accessto, date lastlogin, uuid id); @webmethod public boolean removeuser(user user); @webmethod public user getenrolleduser(uuid id); }
what strange getter/setter methods in user class seem messing tomcat.
the following work, , tomcat runs server (setters commented out):
/* returns user's last name */ public string getlastname() { return lastname; } /* sets user's last name */ // public void setlastname(string newlastname) { // lastname = newlastname; // } // /* returns user's first name */ public string getfirstname() { return firstname; } /* sets user's first name */ // public void setfirstname(string newfirstname) { // firstname = firstname; // }
the following causes tomcat crash:
/* sets user's last name */ // public void setlastname(string newlastname) { // lastname = newlastname; // } // /* returns user's first name */ public string getfirstname() { return firstname; } /* sets user's first name */ public void setfirstname(string newfirstname) { firstname = firstname; } /* returns user's permission level */ public permission getpermission() { return permission; }
here error:
aug 18, 2014 5:17:49 pm org.apache.openejb.server.webservices.wsservice deployapp severe: error deploying jax-ws web service ejb calculator java.lang.nullpointerexception @ org.apache.cxf.jaxb.utils.getmethodxjta(utils.java:294) @ org.apache.cxf.jaxb.jaxbcontextinitializer.walkreferences(jaxbcontextinitializer.java:375) @ org.apache.cxf.jaxb.jaxbcontextinitializer.addclass(jaxbcontextinitializer.java:329) @ org.apache.cxf.jaxb.jaxbcontextinitializer.addtype(jaxbcontextinitializer.java:232) @ org.apache.cxf.jaxb.jaxbcontextinitializer.addtype(jaxbcontextinitializer.java:222) @ org.apache.cxf.jaxb.jaxbcontextinitializer.walkreferences(jaxbcontextinitializer.java:365) @ org.apache.cxf.jaxb.jaxbcontextinitializer.addclass(jaxbcontextinitializer.java:329) @ org.apache.cxf.jaxb.jaxbcontextinitializer.begin(jaxbcontextinitializer.java:183) @ org.apache.cxf.service.servicemodelvisitor.visitoperation(servicemodelvisitor.java:97) @ org.apache.cxf.service.servicemodelvisitor.walk(servicemodelvisitor.java:74) @ org.apache.cxf.jaxb.jaxbdatabinding.initialize(jaxbdatabinding.java:325) @ org.apache.cxf.service.factory.abstractservicefactorybean.initializedatabindings(abstractservicefactorybean.java:86) @ org.apache.cxf.service.factory.reflectionservicefactorybean.buildservicefromclass(reflectionservicefactorybean.java:490) @ org.apache.cxf.jaxws.support.jaxwsservicefactorybean.buildservicefromclass(jaxwsservicefactorybean.java:697) @ org.apache.cxf.service.factory.reflectionservicefactorybean.initializeservicemodel(reflectionservicefactorybean.java:550) @ org.apache.cxf.service.factory.reflectionservicefactorybean.create(reflectionservicefactorybean.java:265) @ org.apache.cxf.jaxws.support.jaxwsservicefactorybean.create(jaxwsservicefactorybean.java:214) @ org.apache.openejb.server.cxf.cxfendpoint.doservicecreate(cxfendpoint.java:101) @ org.apache.openejb.server.cxf.ejb.ejbendpoint.<init>(ejbendpoint.java:64) @ org.apache.openejb.server.cxf.ejb.ejbwscontainer.createendpoint(ejbwscontainer.java:55) @ org.apache.openejb.server.cxf.ejb.ejbwscontainer.createendpoint(ejbwscontainer.java:44) @ org.apache.openejb.server.cxf.cxfwscontainer.start(cxfwscontainer.java:50) @ org.apache.openejb.server.cxf.cxfservice.createejbwscontainer(cxfservice.java:83) @ org.apache.openejb.server.webservices.wsservice.deployapp(wsservice.java:281) @ org.apache.openejb.server.webservices.wsservice.deploy(wsservice.java:227) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.apache.openejb.observer.observermanager$methodinvocation.invoke(observermanager.java:399) @ org.apache.openejb.observer.observermanager$invocationlist.invoke(observermanager.java:514) @ org.apache.openejb.observer.observermanager$beforeandafterinvocationset.invoke(observermanager.java:494) @ org.apache.openejb.observer.observermanager.dofire(observermanager.java:110) @ org.apache.openejb.observer.observermanager.fireevent(observermanager.java:99) @ org.apache.openejb.loader.systeminstance.fireevent(systeminstance.java:134) @ org.apache.openejb.assembler.classic.assembler.createapplication(assembler.java:884) @ org.apache.openejb.assembler.classic.assembler.createapplication(assembler.java:623) @ org.apache.tomee.catalina.tomcatwebappbuilder.startinternal(tomcatwebappbuilder.java:1248) @ org.apache.tomee.catalina.tomcatwebappbuilder.configurestart(tomcatwebappbuilder.java:1087) @ org.apache.tomee.catalina.globallistenersupport.lifecycleevent(globallistenersupport.java:130) @ org.apache.catalina.util.lifecyclesupport.firelifecycleevent(lifecyclesupport.java:117) @ org.apache.catalina.util.lifecyclebase.firelifecycleevent(lifecyclebase.java:90) @ org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:5378) @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:150) @ org.apache.catalina.core.containerbase$startchild.call(containerbase.java:1575) @ org.apache.catalina.core.containerbase$startchild.call(containerbase.java:1565) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:724)
Comments
Post a Comment