2 Replies Latest reply on Oct 10, 2008 1:15 PM by andre80

    Jpdl on glassfish

    andre80

      Hi, I ve just succeeded in migrating my small app from eclipse to maven and using glassfish as its server. But I have problem in jpdl, the jpdl.xml is not loaded, i tried putting it on WAR's WEB-INF/classes/ but its failed. I'm using EAR deployment and put all the required jar's there. When using JBoss, u put all the .jpdl.xml at the same dir as ear lib and its ok. Can anybody point me where to put the .jpdl.xml and perhaps the jbpm.cfg.xml as well.

        • 1. Re: Jpdl on glassfish
          andre80

          Last update:


          I manage to put jbpm.cfg.xml at EAR's root folder by putting it at {basedir}/src/main/application, after that I get a resource not found exception stating that my register.jpdl.xml is not found.


          I tried putting it at /WEB-INF/flows/register.xml.jpdl


          and change the bpm line at components.xml into



             <bpm:jbpm>
                  <bpm:process-definitions></bpm:process-definitions>
                  <bpm:pageflow-definitions>
                      <value>/WEB-INF/flows/register.jpdl.xml</value>
                  </bpm:pageflow-definitions>
              </bpm:jbpm>
          


          the ear deployed successfully, but the conversation didn't start as expected. I start the conversation by calling

          #{register.begin}

          , its a statefull session bean with
          @Begin(join=true, pageflow="register")

          tag on its begin method.


          the initial page is at /register/account.xhtml but when I try putting any values on its form, and click the submit button, I get blank form. Please help.


          Note: its working on JBoss with different EAR Structure and core configurations.

          • 2. Re: Jpdl on glassfish
            andre80

            case closed!


            its not that the conversation or the pdl not started, its actually the view part! i use a4j:commandButton inside a a4j:form and it doesn't render the page. strangely, it is rendered on JBoss. Aniway my conclusion is that JBoss Seam is deployable to Glassfish and I can use maven for development.


            I use the basic archetype the simple j2ee one, and did some modification on persistence.xml and web.xml just as the seam booking jee5 did, changed the groupId and artifactId and add the dependencies at the primary-source project which result in all dependencies there is put into ejb, ear and web automatically. Add jsf-api (for facesMessages), persistence-api and ejb-api at ejb so that it can compile the classes (everything whose scope is provided inside primary source is not available to ejb but we don't want to include it on the ear as it should be provided by glassfish).


            create a src/main/application and put jbpm.cfg.xml there (taken from dvdstore), and change the bpm configuration inside components.xml and put a real resource path there '/WEB-INF/flows/register.jpdl.xml' instead of plain 'register.jpdl.xml' (JBoss is full of magic that it can search where I put it, Seam is using ServletContext to search for the resource and by right it should be inside the WAR and not the EAR CMIIW)


            and voila, it works. nice job seam team! now i can develop using my favourite IDE and Maven hehehe