Topic
  • 12 replies
  • Latest Post - ‏2013-10-30T13:59:42Z by KoushikPaul
balaghanta
balaghanta
4 Posts

Pinned topic java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

‏2010-02-04T14:10:03Z |
Hi,

I am migrating my application from Java 1.4 to Java 1.6 and RAD 7.0 to RAD 7.5
When I am opening my projects which used to be in RAD 7.0, some of the files which are generated from WSDL, getting the following error:
“Syntax error on token , class expected ; com.ibm.ws.webservices.engine cannot be resolved to a type”

For the below lines:
com.ibm.ws.webservices.engine.enum.Style.WRAPPED
com.ibm.ws.webservices.engine.enum.Use.LITERAL
When we manually changed the class path like below it compiled in 1.6:
com.ibm.ws.webservices.engine.enumtype.Style.WRAPPED
com.ibm.ws.webservices.engine.enumtype.Use.LITERAL

Since the above files are auto generated, please help me how to generate the java files with proper package name.
Updated on 2012-03-14T12:52:56Z at 2012-03-14T12:52:56Z by Ekid
  • Jarabek
    Jarabek
    2 Posts

    Re: java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

    ‏2010-02-24T17:31:10Z  
    Hi balaghanta,

    I am having this exact issue as well (exact same migration).

    Have you had any luck in finding a solution?

    Cheers,
    Jarabek
  • Jarabek
    Jarabek
    2 Posts

    Re: java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

    ‏2010-02-24T18:51:58Z  
    • Jarabek
    • ‏2010-02-24T17:31:10Z
    Hi balaghanta,

    I am having this exact issue as well (exact same migration).

    Have you had any luck in finding a solution?

    Cheers,
    Jarabek
    For anyone who is interested.

    My successful solution to the above problem was to upgrade the Java library for the WebSphere application server.

    1) Right click on project, click properties
    2) Click Java build path, Click libraries tab
    3) Remove "WebSphere Application Server v6.0http://WebSphere Application Server v6.0 stub
    4) Click Add library, select 'server runtime'
    5) select WebSphere Application Server 7.0.
    6) Click finish.
  • Subahan
    Subahan
    1 Post

    Re: java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

    ‏2010-03-02T22:33:13Z  
    • Jarabek
    • ‏2010-02-24T18:51:58Z
    For anyone who is interested.

    My successful solution to the above problem was to upgrade the Java library for the WebSphere application server.

    1) Right click on project, click properties
    2) Click Java build path, Click libraries tab
    3) Remove "WebSphere Application Server v6.0http://WebSphere Application Server v6.0 stub
    4) Click Add library, select 'server runtime'
    5) select WebSphere Application Server 7.0.
    6) Click finish.
    Jarabek ,
    Did it work for you when you are using Java6.0 compiler ?
  • deepthaw
    deepthaw
    1 Post

    Re: java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

    ‏2010-03-12T18:06:46Z  
    Just simply replace com.ibm.ws.webservices.engine.enum with com.ibm.ws.webservices.engine.enumtype

    WAS 7.0 has renamed the package since enum is a reserved word in Java 5. I had this issue myself and it was so difficult to find any documentation from IBM.
  • anu_das3
    anu_das3
    1 Post

    Re: java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

    ‏2011-05-11T10:27:42Z  
    • deepthaw
    • ‏2010-03-12T18:06:46Z
    Just simply replace com.ibm.ws.webservices.engine.enum with com.ibm.ws.webservices.engine.enumtype

    WAS 7.0 has renamed the package since enum is a reserved word in Java 5. I had this issue myself and it was so difficult to find any documentation from IBM.
    even i also phase the above issue.. i tried to rplace com.ibm.ws.webservices.engine.enum with com.ibm.ws.webservices.engine.enumtype

    now i get error like this

    com.ibm.ws.webservices.engine.enumtype does not exist

    if any have any idea please reply back
  • archie_ait
    archie_ait
    2 Posts

    Re: java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

    ‏2011-07-07T19:51:14Z  
    I am working on the migration of a project developed in RAD to eclipse. I am using webservices.jar file and it did solve many issues regarding com.ibm.ws not resolved errors. But still there is one error in the application. The error is: "com.ibm.ws.webservices.engine.enumtype cannot be resolved to a variable". I checked the jar file, it has the above path until engine and after that it has enum instead of enumtype. I can't change the code to enum because it is a keyword. Does anyone know how to resolve this error? Or if there is any updated jar file that I could use to fix this error. Any help is appreciated.
    Thanks in advance. :)
    I am attaching the jar file which i am using presently.
  • archie_ait
    archie_ait
    2 Posts

    Re: java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

    ‏2011-07-07T19:52:33Z  
    • anu_das3
    • ‏2011-05-11T10:27:42Z
    even i also phase the above issue.. i tried to rplace com.ibm.ws.webservices.engine.enum with com.ibm.ws.webservices.engine.enumtype

    now i get error like this

    com.ibm.ws.webservices.engine.enumtype does not exist

    if any have any idea please reply back
    Check out you jar file if it has the path you mentioned in the code.
  • gote
    gote
    1 Post

    Re: java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

    ‏2011-11-18T18:56:35Z  
    Check out you jar file if it has the path you mentioned in the code.
    I am facing perhaps a related issue in RAD 8 with WS 7.0, here's what I found.

    In the websphere jars (base_v7, com.ibm.ws.runtime.jar) Style and other classes rely on com.ibm.ws.webservices.engine.description.OperationDescription, which references com.ibm.ws.webservices.engine.enum.Style, and as you know enum is a reserved keyword in java 1.5 and above, so the package com.ibm.ws.webservices.engine.enum was removed from the jar but the reference to it remains. I'm thinking this is a problem.

    Any help on this is appreciated.
  • Tyagi001
    Tyagi001
    2 Posts

    Re: java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

    ‏2011-12-14T15:56:33Z  
    • gote
    • ‏2011-11-18T18:56:35Z
    I am facing perhaps a related issue in RAD 8 with WS 7.0, here's what I found.

    In the websphere jars (base_v7, com.ibm.ws.runtime.jar) Style and other classes rely on com.ibm.ws.webservices.engine.description.OperationDescription, which references com.ibm.ws.webservices.engine.enum.Style, and as you know enum is a reserved keyword in java 1.5 and above, so the package com.ibm.ws.webservices.engine.enum was removed from the jar but the reference to it remains. I'm thinking this is a problem.

    Any help on this is appreciated.
    Did Any one find the solution to this error. I am facing the same issue and I have tried all the solution mentioned above. Although I am using RSA 8.0.4.
  • Tyagi001
    Tyagi001
    2 Posts

    Re: java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

    ‏2011-12-20T16:17:42Z  
    • Tyagi001
    • ‏2011-12-14T15:56:33Z
    Did Any one find the solution to this error. I am facing the same issue and I have tried all the solution mentioned above. Although I am using RSA 8.0.4.
    I have found the solution to my question by myself, though it took long time, so here is the solution.

    change com.ibm.ws.webservice.engine.enum to com.ibm.ws.webservice.engine.enumtype
    add "com.ibm.ws.webservices.thinclient_7.0.0.jar" to your classpath and recompile the code.

    You can find the "com.ibm.ws.webservices.thinclient_7.0.0.jar" in your <WAS HOME>/runtimes folder
  • Ekid
    Ekid
    1 Post

    Re: java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

    ‏2012-03-14T12:52:56Z  
    • Tyagi001
    • ‏2011-12-20T16:17:42Z
    I have found the solution to my question by myself, though it took long time, so here is the solution.

    change com.ibm.ws.webservice.engine.enum to com.ibm.ws.webservice.engine.enumtype
    add "com.ibm.ws.webservices.thinclient_7.0.0.jar" to your classpath and recompile the code.

    You can find the "com.ibm.ws.webservices.thinclient_7.0.0.jar" in your <WAS HOME>/runtimes folder
    I checked and I already included com.ibm.ws.webservices.thinclient_7.0.0.jar. Still I'm getting error....(note: the error does not show up in RAD problem tab as error but when I open up the file it has red x

    I have been experiencing the same issue depicted above.
    The works from where I have in workspace but when I make an executable jar and try to work from different folder as a stand alone executable file ( note, I have made runnable jar and packaged with all jars that I used from my workspace where the code is working, I also checked manifest file and it looks right with main class and all dependent jars entries), it fails…throughing error as under.

    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/xerces/dom/AttrImpl
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPConstants.<clinit>(SOAPConstants.java:98)
    at com.ibm.ws.webservices.engine.Constants.<clinit>(Constants.java:167)
    at com.ibm.ws.webservices.engine.enumtype.Use$Type.<init>(Use.java:146)
    at com.ibm.ws.webservices.engine.enumtype.Use$Type.<init>(Use.java:144)
    at com.ibm.ws.webservices.engine.enumtype.Use.<clinit>(Use.java:103)
    at xx.application.automation.ws.sm.sd_v1.so.Sd_v1_1_SOAPBindingStub._getcreateInteractionOperation0(Sd_v1_1_SOAPBindingStub.java:310)
    at xx.application.automation.ws.sm.sd_v1.so.Sd_v1_1_SOAPBindingStub._staticInit(Sd_v1_1_SOAPBindingStub.java:1445)
    at xx.application.automation.ws.sm.sd_v1.so.Sd_v1_1_SOAPBindingStub.<clinit>(Sd_v1_1_SOAPBindingStub.java:1463)
    at xx.application.automation.ws.v1.client.WSThinClient.initiateWS(WSThinClient.java:46)
    at xx.application.automation.ws.v1.UI.HPSMDataEntryForm$2.doProcessingOnValidFields(HPSMDataEntryForm.java:633)
    at xx.application.automation.ws.v1.UI.HPSMDataEntryForm$2.actionPerformed(HPSMDataEntryForm.java:443)
    at java.awt.Button.processActionEvent(Unknown Source)
    at java.awt.Button.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: org.apache.xerces.dom.AttrImpl
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    ... 34 more

    I clicked on “Sd_v1_1_SOAPBindingStub.java:310” and RAD showed me the line

    _createxxxxxxxx.setUse(com.ibm.ws.webservices.engine.enumtype.Use.LITERAL);
    When I hover over, I got below message.
    The type com.ibm.ws.webservices.engine.enum.Use can’t be resovled it is indirectly referenced from required .class file quick fix : configure build path.
    When I click on configure build path, it brings me to library tab of Java Build path. I don’t know which jar I need to import here. Any help would be greatly appreciated.
    Strange part is,
    The code is… _createxxxxxxxx.setUse(com.ibm.ws.webservices.engine.enumtype.Use.LITERAL);
    But when I hover over the mouse, it says “The type com.ibm.ws.webservices.engine.enum.Use can’t be resovled it is indirectly referenced from required .class file quick fix : configure build path” so looks like eventhough code says enumtype, it is looking for enum.
  • KoushikPaul
    KoushikPaul
    1 Post

    Re: java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

    ‏2013-10-30T13:59:42Z  
    • Jarabek
    • ‏2010-02-24T18:51:58Z
    For anyone who is interested.

    My successful solution to the above problem was to upgrade the Java library for the WebSphere application server.

    1) Right click on project, click properties
    2) Click Java build path, Click libraries tab
    3) Remove "WebSphere Application Server v6.0http://WebSphere Application Server v6.0 stub
    4) Click Add library, select 'server runtime'
    5) select WebSphere Application Server 7.0.
    6) Click finish.

    Thanks a Ton