NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

JAXB No-Arg Constructor Generation

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
jbethune



Joined: 11 Aug 2010
Posts: 4

PostPosted: Wed Aug 11, 2010 9:52 pm    Post subject: JAXB No-Arg Constructor Generation Reply with quote

Hi everyone,

We have code generation based on wsdl & xsd documents. Deploying on SJSAS 9.1 would work no problem, but whenever I try to deploy to glassfish v3 and then try and look at wsdl on the server (or try and make a web service client from that wsdl in netbeans) I get:

Code:

javax.xml.ws.WebServiceException: Unable to create JAXBContext
root cause

java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
javax.xml.bind.JAXBElement does not have a no-arg default constructor.


And I've checked, none of my generated classes have a no-arg constructor. So my question is how do I get JAXB/XJC to generate code with default constructors in netbeans? Or is this a different issue altogether?

Thanks!
Jeff
Back to top
jbethune



Joined: 11 Aug 2010
Posts: 4

PostPosted: Wed Aug 11, 2010 11:09 pm    Post subject: Reply with quote

Actually just drilling into the problem deeper... The full exception is this:

Code:

   this problem is related to the following location:
      at javax.xml.bind.JAXBElement
      at public javax.xml.bind.JAXBElement com.companyname.project.ExportData.getCheckSum()
      at com.companyname.project.ExportData
      at public com.companyname.project.ExportData  com.companyname.project.web.jaxws.RunBatch.exportData
      at com.companyname.project.web.jaxws.RunBatch


As some background the CheckSum is simply a string and is defined in the wsdl as following:
Code:

<xsd:element minOccurs="0" name="checkSum" nillable="true" type="xsd:string"/>


with the generated code looking like:
Code:

    public JAXBElement<String> getCheckSum() {
        return checkSum;
    }


So does this imply that it's complaining about the JAXBElement class itself not having a no-argument constructor?

Thanks again.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo