Topic
  • 10 replies
  • Latest Post - ‏2013-06-27T20:48:14Z by DougBreaux
DougBreaux
DougBreaux
19 Posts

Pinned topic Switch Web Project from WAS 6.1 to WAS 8.5

‏2013-06-26T19:12:04Z |

When I switch a Web Project in RAD from Targeted Runtime WebSphere 6.1 to 8.5, all of a sudden I get compilation errors that just the basic java. packages cannot be found. Despite seeing them in the included "WebSphere Application Server V8.5 JRE" library.

For example:

The type java.util.Map cannot be resolved. It is indirectly referenced from required .class files

When I switch back to WebSphere 6.1 Targeted Runtime (and revert the automatically-changed Project Facets to appropriate versions too), compilation works again.

Any ideas how to resolve or debug?

  • e_yuen
    e_yuen
    1 Post
    ACCEPTED ANSWER

    Re: Switch Web Project from WAS 6.1 to WAS 8.5

    ‏2013-06-27T19:37:35Z  

    It can be the jre entry that corresponds to the runtime is corrupted for some reasons.  You can try create a new runtime with a different name that points to the same installation directory.  And then target to the new runtime to see if it resolves the problem. Alternatively, you can also try delete the runtime from the preference page "Server > Runtime Environments" and create a new runtime with the same name again to resolve the problem.

    Elson

  • DougBreaux
    DougBreaux
    19 Posts

    Re: Switch Web Project from WAS 6.1 to WAS 8.5

    ‏2013-06-26T19:26:43Z  

    Sorry, RAD 8.5.1 iFix 2

  • DougBreaux
    DougBreaux
    19 Posts

    Re: Switch Web Project from WAS 6.1 to WAS 8.5

    ‏2013-06-27T14:53:35Z  

    Things that have no effect:

    • Project > Clean
    • Project > Close, Project > Open
    • Starting with -clean
  • DougBreaux
    DougBreaux
    19 Posts

    Re: Switch Web Project from WAS 6.1 to WAS 8.5

    ‏2013-06-27T15:39:10Z  

    Things that have no effect:

    • Project > Clean
    • Project > Close, Project > Open
    • Starting with -clean

    Removing JRE and re-adding it has no effect.

    Reordering the Build Path so that the JRE is first has no effect.

  • DougBreaux
    DougBreaux
    19 Posts

    Re: Switch Web Project from WAS 6.1 to WAS 8.5

    ‏2013-06-27T16:12:39Z  

    Further, RAD *is* actually successfully compiling the classes. I can see them in the output folder even when I switch it to a new location.

  • DougBreaux
    DougBreaux
    19 Posts

    Re: Switch Web Project from WAS 6.1 to WAS 8.5

    ‏2013-06-27T18:56:13Z  

    Ok, I had RAD find all JREs, and it found again the same directory that the "WebSphere Application Server V8.5 JRE" is using, but when I use that JRE, the problem ceases.

    Comparing the lists of jars between the two, the default WAS 8.5 one has these jars that the newly-discovered one does not:

    • AppServer\endorsed_apis\javax.j2ee.annotation.jar
    • AppServer\endorsed_apis\jaxb-api.jar
    • AppServer\endorsed_apis\jaxws-api.jar

    But the newly-discovered (working) JRE has these jars that the default one does not:

    • AppServer\java\jre\bin\default\jclSC160\vm.jar
    • AppServer\java\jre\lib\annotation.jar
    • AppServer\java\jre\lib\beans.jar
    • AppServer\java\jre\lib\java.util.jar
    • AppServer\java\jre\lib\jndi.jar
    • AppServer\java\jre\lib\logging.jar
    • AppServer\java\jre\lib\security.jar
    • AppServer\java\jre\lib\sql.jar
    • AppServer\java\jre\lib\ibmorb.jar
    • AppServer\java\jre\lib\ibmorbapi.jar
    • AppServer\java\jre\lib\ibmcfw.jar
    • AppServer\java\jre\lib\charsets.jar
    • AppServer\java\jre\lib\resources.jar
    • AppServer\java\jre\lib\ibmpkcs.jar
    • AppServer\java\jre\lib\ibmcertpathfw.jar
    • AppServer\java\jre\lib\ibmjgssfw.jar
    • AppServer\java\jre\lib\ibmjssefw.jar
    • AppServer\java\jre\lib\ibmsaslfw.jar
    • AppServer\java\jre\lib\ibmjcefw.jar
    • AppServer\java\jre\lib\ibmjgssprovider.jar
    • AppServer\java\jre\lib\ibmjsseprovider2.jar
    • AppServer\java\jre\lib\ibmcertpathprovider.jar
    • AppServer\java\jre\lib\management-agent.jar
    • AppServer\java\jre\lib\xml.jar
    • AppServer\java\jre\lib\jlm.jar
    • AppServer\java\jre\lib\javascript.jar

    Is it possible my default WAS 8.5 JRE was just created incorrectly or corrupted?

  • VictorSosa
    VictorSosa
    24 Posts

    Re: Switch Web Project from WAS 6.1 to WAS 8.5

    ‏2013-06-27T19:11:39Z  

    Hello Doug.

    Looks really strange what you have here. In order to better diagnose the problem, could you recreate the problem and attach the log file here? (<your_workspace>/.metadata/.log)

  • e_yuen
    e_yuen
    1 Post

    Re: Switch Web Project from WAS 6.1 to WAS 8.5

    ‏2013-06-27T19:37:35Z  

    It can be the jre entry that corresponds to the runtime is corrupted for some reasons.  You can try create a new runtime with a different name that points to the same installation directory.  And then target to the new runtime to see if it resolves the problem. Alternatively, you can also try delete the runtime from the preference page "Server > Runtime Environments" and create a new runtime with the same name again to resolve the problem.

    Elson

  • DougBreaux
    DougBreaux
    19 Posts

    Re: Switch Web Project from WAS 6.1 to WAS 8.5

    ‏2013-06-27T20:02:38Z  
    • e_yuen
    • ‏2013-06-27T19:37:35Z

    It can be the jre entry that corresponds to the runtime is corrupted for some reasons.  You can try create a new runtime with a different name that points to the same installation directory.  And then target to the new runtime to see if it resolves the problem. Alternatively, you can also try delete the runtime from the preference page "Server > Runtime Environments" and create a new runtime with the same name again to resolve the problem.

    Elson

    First, thanks for the reply!

    Unsurprisingly, when I delete the JRE and add it again, pointing at that AppServer/java directory, it included all the same jars that the Search had included, which don't include the endorsed_apis ones, but do include all the others.

    So, also unsurprisingly, this works too. Does that endorsed_apis one look wrong, then?

    And now that I deleted the failing one, I can't get it back to try further understanding what went wrong. I wish I hadn't done that :)

    Hmmm... how do I get the "automatic", default WAS 8.5 JRE recreated? Delete my WAS 8.5 server and create a new one, maybe?

  • DougBreaux
    DougBreaux
    19 Posts

    Re: Switch Web Project from WAS 6.1 to WAS 8.5

    ‏2013-06-27T20:20:13Z  

    First, thanks for the reply!

    Unsurprisingly, when I delete the JRE and add it again, pointing at that AppServer/java directory, it included all the same jars that the Search had included, which don't include the endorsed_apis ones, but do include all the others.

    So, also unsurprisingly, this works too. Does that endorsed_apis one look wrong, then?

    And now that I deleted the failing one, I can't get it back to try further understanding what went wrong. I wish I hadn't done that :)

    Hmmm... how do I get the "automatic", default WAS 8.5 JRE recreated? Delete my WAS 8.5 server and create a new one, maybe?

    Ahhh... Server > Runtime Environments > New

    That created a new Runtime Environment and a new JRE, and the new JRE now has all the same jars the manually created JRE had, plus the endorsed_apis jars. And that JRE doesn't complain about missing java. classes.

    So something was clearly wrong with that initial Runtime Environment.

    (Now... to clean up from two environments without deleting my server and its configured apps)

  • DougBreaux
    DougBreaux
    19 Posts

    Re: Switch Web Project from WAS 6.1 to WAS 8.5

    ‏2013-06-27T20:48:14Z  

    Hello Doug.

    Looks really strange what you have here. In order to better diagnose the problem, could you recreate the problem and attach the log file here? (<your_workspace>/.metadata/.log)

    Thanks, I forgot about that file until you mentioned it here. On quick scan, I didn't see anything relevant, but there were too many other things there, and I had since deleted the offending JRE, so I couldn't recreate it.