facebook

Unable to Create JAXBContext Error When Creating a WSDL

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #309181 Reply

    I am running MyEclipse 8.5 on Linux. I have a web service that I’m developing from a bottom-up scenario. When my service exposes just one operation, everything is fine, and the WSDL is created. However, when my service exposes more than one operation, I get the following error:
    An internal error occurred during: “Generating JAX-WS Web Services”.
    Unable to create JAXBContext
    That’s a consistent error; it happend every time I expose multiple operations. If I comment out all but one operation, everything works fine again. Can you tell me what’s going on?
    Thanks,
    Brian

    #309191 Reply

    Brian,
    Can you give some more information?
    1. Are there any errors logged in the log file located at workspace dir > .metadata > .log when more than one service is used?
    2. What is the server you are using to deploy your web service?

    #309237 Reply

    Shalini,
    1. I think this is ther error related to my problem:
    !ENTRY org.eclipse.equinox.p2.publisher 2 0 2010-06-17 10:03:05.448
    !MESSAGE An error occurred while loading the manifest /home/bhammond/eclipse/plugins/org.eclipse.mylyn_3.3.3.v20100330-0200-e3x.jar.
    !STACK 0
    java.util.zip.ZipException: error in opening zip file

    2. I’m using JBoss 5.1.0 on a Linux server running red hat (I don’t know which version).

    Thanks,
    Brian

    #309259 Reply

    Brian,

    I think this is ther error related to my problem

    Can you please clarify if you are referring to any errors in your code?
    If not, can you copy paste the exception that you are receiving?

    #309330 Reply

    I don’t have any errors or exceptions in my code. The only error message I get is:
    An internal error occurred during: “Generating JAX-WS Web Services”.
    Unable to create JAXBContext
    and that’s generated by MyEclipse when I elect to create a WSDL and click next in the web service wizard.
    I also checked to see if it was related to trying to pass complex objects by replacing all my enums with Strings. That didn’t seem to make any difference. Here is the code I’m using:
    import util.Constants.*;
    import util.Location;

    public class DataMngSvc {

    public String authenticateUser(String userName, String password)
    {
    return “ADMINUSER”;
    }

    // public String discoverData(String objectType, Location bBox, String param1, String object1, String param2, String object2)
    // {
    // return “SUCCESS”;
    // }
    With the part I have commented out, the web service is generated. If I un-comment it, the build fails.

    #309352 Reply

    Brian,
    I shall escalate this issue to the dev team member. They will get back to you on this.

    #309998 Reply

    Shalini,

    Could you check with the dev team and see if they’ve come up with anything on this problem. We’re to the point in the project where we need the web services and this is holding us up.
    Thanks,
    Brian

    #310020 Reply

    Brian Fernandes
    Moderator

    Brian,

    I’m assuming you pass the DataMngSvc class as input to the bottom up wizard? There may be a DataMngSvcDelegate class as well as an .apt-generated folder in the project. Could you delete those and try again? Does it work if you have authenticateUser commented instead of discovereData.

    Something else to try would be to try without the Location object in your dsicvoerData method. While the bottom up generation will work for simple objects, I’m not sure what the structure of your Location object is and that could be causing the problem – we were unable to replicate locally.

    If the Location object is the cause, you may need to annotate it with JAXB2 annotations in order to have it correctly serialized (were there any other errors along with the message stating that the JAXB context could not be created?) or you will have to use a top down approach instead of bottom up to generate your service. The bottom up approach will not be able to generate a webservice out of any classes without help.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Unable to Create JAXBContext Error When Creating a WSDL

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