Clarity

 View Only
Expand all | Collapse all

BPM-0704: ... ClassCastException: org.apache.xerces.dom.DeferredCommentImpl for GEL in 14.x

  • 1.  BPM-0704: ... ClassCastException: org.apache.xerces.dom.DeferredCommentImpl for GEL in 14.x

    Posted Jun 18, 2015 11:37 AM

    Hi all,

     

    We've had a couple of reports of the following so I wanted to share this in the hopes others can avoid it.

     

    The nature of the problem is that after installing or upgrading to CA PPM 14.x your GEL scripts in a process may report the following problem when they run:

     

    BPM-0704: An error occurred while executing custom script: java.lang.ClassCastException: org.apache.xerces.dom.DeferredCommentImpl cannot be cast to org.w3c.dom.Element at com.niku.union.gel.GELValidator.limitSQLQuery(GELValidator.java:379)

    at com.niku.union.gel.GELScript.run(GELScript.java:55)

    at com.niku.union.gel.GELController.invoke(GELController.java:74)

    at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:207)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

    at java.lang.Thread.run(Thread.java:745)

     

    The cause and solution are straight forward.  There is an expectation that the first entity encountered in a GEL script will be an 'element', specifically <gel:script>, like this:

     

    <gel:script
      xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
      xmlns:core="jelly:core">
    <!-- I am a comment -->
    ...
    </gel:script>
    
    

     

    Notice that the comments are inside that element (line 04).

     

    If your script is formatted like this instead, then inside processes on version 14.x you will begin to see the error:

     

    <!-- I am a comment -->
    <gel:script
      xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
      xmlns:core="jelly:core">
    ...
    </gel:script>
    
    

     

    If you have any scripts like this, please edit them and move the comments inside the <gel:script> element body like the first example in order to prevent this becoming a problem.  We have reported this to our developers as a potential defect (CLRT-77273), but it may still result in this change to the scripts being necessary in future so addressing it beforehand will cause the least inconvenience.



  • 2.  Re: BPM-0704: ... ClassCastException: org.apache.xerces.dom.DeferredCommentImpl for GEL in 14.x

    Posted Jun 19, 2015 01:08 AM

    Thanks for sharing this, Nick

     

    Happy Friday !!!!

     

    Regards

    NJ