facebook

JAXWS exception when generating wsdl

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #345624 Reply

    heshesh2010
    Member

    i’m new to using jax-ws

    i have got some error on generating web service WSDL file from newService button

    i’m using java ee 6 and jdk 1.6

    and i have recently created wsdl for java class that don’t return anything

    message :

    An internal error occurred during: “Generating JAX-WS Web Services”.
    Unable to create JAXBContext

    full java class :


    @WebService

    public class LoginWs {

    // Take two strings from android TextFields .

    public LoginWs() {

    }

    @WebMethod(operationName = “login”, action = “urn:Login”)
    public String login(String username, String password)
    throws ClassNotFoundException, SQLException, Exception,
    IllegalAccessException {

    // Make new Connection to database .
    int TID = -1;
    try {

    Dbconnection NewConnect = new Dbconnection();
    Connection con = NewConnect.MakeConnect();
    Statement stmt = con.createStatement();

    ResultSet rs = stmt
    .executeQuery(“SELECT Teacher_id FROM teacher where User_Name = ”
    + “‘”
    + username
    + “‘”
    + “and Pass = ”
    + “‘”
    + password + “‘”);

    while (rs.next()) {

    TID = rs.getInt(1);

    }
    rs.close();
    stmt.close();
    con.close();

    } catch (SQLException e) {
    return “-1”;
    }

    return String.valueOf(TID);

    } // End of login MethodWS .

    }

    Log File :

    !ENTRY org.eclipse.core.jobs 4 2 2013-12-31 13:30:34.762
    !MESSAGE An internal error occurred during: “Generating JAX-WS Web Services”.
    !STACK 0
    javax.xml.ws.WebServiceException: Unable to create JAXBContext
    at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:158)
    at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:87)
    at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:262)
    at com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:225)
    at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:124)
    at com.genuitec.eclipse.ws.jaxws.JaxWSBUJob.wsGen(JaxWSBUJob.java:229)
    at com.genuitec.eclipse.ws.jaxws.JaxWSBUJob.run(JaxWSBUJob.java:125)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    java.lang.StackTraceElement does not have a no-arg default constructor.
    this problem is related to the following location:
    at java.lang.StackTraceElement
    at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
    at java.lang.Throwable
    at private java.lang.Throwable com.sams.ws.jaxws.ClassNotFoundExceptionBean.exception
    at com.sams.ws.jaxws.ClassNotFoundExceptionBean

    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:148)
    … 7 more
    Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    java.lang.StackTraceElement does not have a no-arg default constructor.
    this problem is related to the following location:
    at java.lang.StackTraceElement
    at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
    at java.lang.Throwable
    at private java.lang.Throwable com.sams.ws.jaxws.ClassNotFoundExceptionBean.exception
    at com.sams.ws.jaxws.ClassNotFoundExceptionBean

    at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnn otationsException.java:102)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init> (JAXBContextImpl.java:286)
    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
    at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:105)
    at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:153)
    at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:149)
    … 9 more

    #345640 Reply

    support-tony
    Keymaster

    heshesh2010,

    I’ve answered this on stackoverflow. Can you check out the answer there to see if it helps?

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: JAXWS exception when generating wsdl

You must be logged in to post in the forum log in