facebook

java.lang.ClassCastException

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #609222 Reply

    mwyrembl
    Participant

    I have installed CodeMix in Spring Tool Suite 4 and I am getting the folloiwng exception in the .metadata/.log:

    java.lang.NoClassDefFoundError: com.genuitec.eclipse.code.ui.problem.javascript.JavaScriptValidationRuleSupport (initialization failure)
    at java.lang.J9VMInternals.initializationAlreadyFailed(J9VMInternals.java:91)
    at com.genuitec.eclipse.code.ui.problem.ValidationService.isExcludedByPattern(ValidationService.java:523)
    at com.genuitec.eclipse.code.ui.problem.ValidationService.lambda$6(ValidationService.java:364)
    at com.genuitec.eclipse.code.ui.problem.ValidationService$$Lambda$655.000000001A228460.visit(Unknown Source)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:67)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:51)
    at com.genuitec.eclipse.code.ui.problem.ValidationService.getValidationEntries(ValidationService.java:353)
    at com.genuitec.eclipse.code.ui.problem.ValidationService.countEnabledValidationEntriesFor(ValidationService.java:683)
    at com.genuitec.eclipse.code.ui.tasks.BuildTaskParticipant.isInterestingDelta(BuildTaskParticipant.java:535)
    at com.genuitec.eclipse.code.ui.tasks.BuildTaskParticipant.builderIncrementalParticipant(BuildTaskParticipant.java:411)
    at com.genuitec.eclipse.code.ui.problem.CodeBuilder.build(CodeBuilder.java:104)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:833)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
    at org.eclipse.core.internal.events.BuildManager._basicBuild(BuildManager.java:220)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:147)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
    Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration incompatible with org.apache.xerces.xni.parser.XMLParserConfiguration
    at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
    at com.genuitec.eclipse.code.ui.problem.BuildPathRuleCollector.<init>(BuildPathRuleCollector.java:43)
    at com.genuitec.eclipse.code.ui.problem.javascript.JavaScriptValidationRuleSupport.update(JavaScriptValidationRuleSupport.java:85)
    at com.genuitec.eclipse.code.ui.problem.javascript.JavaScriptValidationRuleSupport.initialize(JavaScriptValidationRuleSupport.java:76)
    at com.genuitec.eclipse.code.ui.problem.AbstractValidationRuleSupport.<init>(AbstractValidationRuleSupport.java:21)
    at com.genuitec.eclipse.code.ui.problem.javascript.JavaScriptValidationRuleSupport.<clinit>(JavaScriptValidationRuleSupport.java:23)
    … 23 more

    WHat can be done to solve this problem?

    #609226 Reply

    support-tony
    Keymaster

    mwyrembl,

    Sorry you’ve seen this problem with CodeMix. After some investigate based on the stack trace, we’ve seen that adding a VM argument has helped in similar cases:

    -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl

    Please add the above line below the -vmargs line in your SpringToolSuite4.ini file and relaunch STS.

    If that doesn’t help, or if you see other problems, can you please share more details?

    1. Which OS are you using?
    2. Which JDK are you using, including the version?
    3. What exactly are you doing with STS, when the error appears?
    4. Delete the error log file, reproduce the error and then attach the log file.
    #609228 Reply

    mwyrembl
    Participant

    I still get the same error.
    My OS is Windows Server 2012 R2
    JDK is:
    java version “1.8.0”
    Java(TM) SE Runtime Environment (build pwa6480sr3-20160428_01(SR3))
    IBM J9 VM (build 2.8, JRE 1.8.0 Windows Server 2012 R2 amd64-64 Compressed References 20160427_301573 (JIT enabled, AOT enabled)
    J9VM – R28_Java8_SR3_20160427_1620_B301573
    JIT – tr.r14.java.green_20160329_114288
    GC – R28_Java8_SR3_20160427_1620_B301573_CMPRSS
    J9CL – 20160427_301573)
    JCL – 20160421_01 based on Oracle jdk8u91-b14

    I am just opening the workspace.
    Attached is the fresh log file.

    Attachments:
    You must be logged in to view attached files.
    #609239 Reply

    Brian Fernandes
    Moderator

    We’ve been able to replicate this error with the IBM J9 VM, and our team is looking into it – I’m afraid we can’t suggest a workaround with this VM right now.

    Would it be possible for you to use an Oracle VM, or a HotSpot based JVM (not OpenJ9) from here: https://adoptopenjdk.net/

    To start with a different VM, you can use the -vm argument in your eclipse.ini file, as detailed here: https://wiki.eclipse.org/Eclipse.ini

    Do let us know if that resolves your issues, apologies for the inconvenience caused.

    #609246 Reply

    mwyrembl
    Participant

    OK i will try it. Thanks for the feedback.
    Do you also support the Zulu JDK from Azul Systems? (https://www.azul.com/downloads/zulu/)
    It is based on OpenJDK and would be my second choice if the IBM JDK is not supported yet.

    #609247 Reply

    Brian Fernandes
    Moderator

    Yes, Zulu should work too.

    Am curious to know why you want to use IBM JDK. Are you trying to stay away from Oracle due to the recent license changes, or do you specifically need the IBM JDK?

    #609250 Reply

    mwyrembl
    Participant

    Yes this is one reason (recent license changes) and the other is that we are using WebSphere application server in our environment so it makes sense for us to also develop with the same IBM JDK.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: java.lang.ClassCastException

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