1 2 Previous Next 25 Replies Latest reply on Jul 22, 2015 11:48 AM by mmjose26

    jBPM on GlassFish - HTTP status 500

    naruszef

      Hi!

      I'm still trying to integrate jBPM with GlassFish (it was very hard job, i can't find any help in the internet).

      Now I can login into jbpm-console, but there is another problem - I can deploy new process - but when i'm trying to start new instance of this process (websale example) i have got message:

      HTTP status 500
      The server encountered an internal error () that prevented it from fulfilling this request.
      
      javax.servlet.ServletException: /sa/procdef.xhtml @43,221 test="#{filter_ended and entry.end != null or entry.end == null and (filter_suspended and entry.suspended or filter_running and ! entry.suspended)}": ELResolver cannot handle a null base Object with identifier 'entry'
      javax.el.PropertyNotFoundException: /sa/procdef.xhtml @43,221 test="#{filter_ended and entry.end != null or entry.end == null and (filter_suspended and entry.suspended or filter_running and ! entry.suspended)}": ELResolver cannot handle a null base Object with identifier 'entry'
      
      


      I found on the "A Sunny Commune - Cheng's Blog" (text posted more than 2 years ago) information, that:
      "jbpm uses Apache myfaces as its JSF implementatioin, while SJSAS uses Sun's JSF implementation."

      Is it still true? Should I switch jsf implementation in GlassFish?

      Thanks and regards
      Jakub Naruszewicz

        • 1. Re: jBPM on GlassFish - HTTP status 500
          kukeltje

          the jbpm console needs a jsf 1.2 compliant implementation. The 'default' is sun ri in JBoss AS.

          • 2. Re: jBPM on GlassFish - HTTP status 500
            naruszef

            So everything should be ok - but it isn't...

            Why? Is this really jsf problem? What does this error mean?

            Thanks for Your reply kukeltje and Regards
            jakub naruszewicz

            • 3. Re: jBPM on GlassFish - HTTP status 500
              naruszef

              Hm. Could jbpm-console, and examples be incompatible with glassfish's jsf implementation?

              • 4. Re: jBPM on GlassFish - HTTP status 500
                kukeltje

                the examples are certainly not incompatible, they are just plain jbpm workflow processes. Might be that there are some a4j issues (used in the jbpm4jsf tags). No idea what the errors mean

                • 5. Re: jBPM on GlassFish - HTTP status 500
                  naruszef

                  Hmm... I found where the problem is...

                  Now I can start and menage processess in jbpm-console...

                  The problem are some tags in jbpm-console xhtml files - errors occur in lines with tag. Now i'm trying comment this lines - it helps... But what is bad in this tag?


                  Thanks for all help and Regards

                  jakub naruszewicz

                  • 6. Re: jBPM on GlassFish - HTTP status 500
                    kukeltje

                    what tag? what file? I'm not clairvoyant ;-)

                    • 7. Re: jBPM on GlassFish - HTTP status 500
                      naruszef

                      Oups :)

                      Sorry, my stupid mistake :)

                      In tag - but not always - in several files (procins.xhtml,procdef.xhtlm, tasks.xhtml), and in this files only in one/two lines in each file...

                      Thanks for all answers and regards
                      Jakub Naruszewicz


                      • 8. Re: jBPM on GlassFish - HTTP status 500
                        naruszef

                        LOL - messages editor cut my tag :) - i can't use brackets in messages - there was tag "gd"

                        • 9. Re: jBPM on GlassFish - HTTP status 500
                          villatore

                          And the solution, wasssss??????? for run jBPM under other Java Aplication Server.

                          • 10. Re: jBPM on GlassFish - HTTP status 500
                            kukeltje

                            I get the impression some of your keys get stuck all the time ;-)

                            • 11. Re: jBPM on GlassFish - HTTP status 500
                              naruszef

                               

                              "villatore" wrote:
                              And the solution, wasssss??????? for run jBPM under other Java Aplication Server.


                              Hm solution - I think that it's not the simpliest way, but it works (almost):

                              Configure hibernate - easiest one :)
                              In deploy folder - ant customize.console.for.tomcat
                              In folder "target" You have to add some libraries - now I don't remember which ones - but I think that, it was libraries similar like in tomcat/websphere.
                              In file web.xml - change authorization method:
                               <login-config>
                               <auth-method>FORM</auth-method>
                               <realm-name>GlassFishRealmName</realm-name>
                               <form-login-config>
                               <form-login-page>/ua/login-example.jsf</form-login-page>
                               <form-error-page>/ua/login-example.jsf?error=true</form-error-page>
                               </form-login-config>
                               </login-config>
                              


                              Now You have to configure in GlassFish JDBC Connection, Connection Pools and realms.

                              Realms - set jdbc realm, use connection pool configured earlier. User table: JPBM_ID_USER, user column: USER_ passwd column: PASSWORD_. For group table You need create new view in Your database : In this view You should have Name with user name, and Group with name of group connected to him. (You should have in this view only secure-roles).
                              Then set username, password for database.

                              I think that's all...

                              /If everything works - You will have problems with jbpm-console forms - I still don't know how to fix it - commenting bad lines is simpliest way to do it...

                              Regards
                              Jakub Naruszewicz

                              • 12. Re: jBPM on GlassFish - HTTP status 500

                                The particular lines that seem to be causing trouble are the "gd:filter" tags. It seems that the entryVar is used in some EL expression inside the "test" and "filterArgument" attributes of this tag. My current guess is that Glassfish sees these and tries to evaluate them, but since the entryVar is not known to the EL context, it throws an exception.

                                So here's an example:

                                <gd:filter source="#{piList}" target="#{piList}" entryVar="entry" test="#{filter_ended and entry != null and entry.end != null or entry != null and entry.end == null and (filter_suspended and and entry.suspended or filter_running and ! and entry.suspended)}"/>


                                When Glassfish sees the #{ ... } it tries to evaluate it. It sees entry.end, and then tries to find the end property of the object "entry" in the current context. This doesn't exist --> BOOM.

                                I still don't know what to do to fix it...is entry supposed to exist at this point? Is the test being evaluated too soon? For now, I'll just disable the filter tags...



                                • 13. Re: jBPM on GlassFish - HTTP status 500

                                   

                                  "crued" wrote:
                                  The particular lines that seem to be causing trouble are the "gd:filter" tags...


                                  gd:sort also causes trouble.

                                  Running this command in the sa directory of the console "fixes" it for me (of course, filters and sorting wont work):

                                  for f in `ls *.xhtml` ; do sed -r 's/($[^<].*gd:(filter|sort).*)/<!-- \1 -->/g' < $f > $f.tmp ;mv $f.tmp $f ; done


                                  I know there's probably a nicer way to do it with sed alone, this is just the way I remember best

                                  • 14. Re: jBPM on GlassFish - HTTP status 500
                                    naruszef

                                    Hm... gd is a jboss gravel tag... So maybe try add gravel.jar to the project - maybe it will help...

                                    link to jboss gravel page http://www.jboss.org/gravel/

                                    1 2 Previous Next