10 Replies Latest reply on Oct 21, 2005 2:35 AM by Ronald van Kuijk

    Error in build.xml

    Tran Lap Newbie

      I have created a project with eclipse, from menu: file/new/other->Process Project, project's name is "New".
      I don't change everthing, all codes is default.
      Then, i add a "build.xml" file:
      code:

      <project name="New" basedir ="." default="deploy.par">
       <target name="deploy.par">
       <taskdef name="deploypar" classname="org.jbpm.ant.DeployParTask" classpath="c:/jbpm/jbpm/build/jbpm-3.0.1.jar"/>
       <deploypar par="C:/jbpm/jbpm/build/new.par" properties="C:/eclipse/workspace/New/src/config.files/hibernate.properties"/>
       </target>
      </project>
      


      don't have any error with eclipse, but when i run build.xml with "Ant Build", i have an error:

      Buildfile: C:\eclipse\workspace\New\build.xml
      deploy.par:
      
      BUILD FAILED
      java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
      
      Total time: 344 milliseconds
      

      what is this, what should i do ???
      please help me.
      Thanks

        • 1. Re: Error in build.xml
          Brian Bulthuis Newbie

          You will need to add the apache commons logging library to your classpath. It's available here: http://jakarta.apache.org/commons/#The%20Commons%20Proper. There are a bunch of other dependencies, too. I don't have a complete list off the top of my head, but you'll encounter the same error (but different classes missing) until you've set your classpath to include them all. All the required libraries should be included somewhere in your jBPM download, though.

          • 2. Re: Error in build.xml
            Ronald van Kuijk Master

            if you create your own build.xml file, make sure all required libraries are on the ant classpath. See the build.xml file in jbpm.3.

            • 3. Re: Error in build.xml
              Tran Lap Newbie

               

              "kukeltje" wrote:
              if you create your own build.xml file, make sure all required libraries are on the ant classpath. See the build.xml file in jbpm.3.



              Thanks for the repplys.
              I did it, but have new errors.
              I changed my code to:
              <project name="New" basedir ="." default="deploy.par">
               <path id="classpath">
               <fileset dir="c:/jbpm/jbpm" includes="*.jar" />
               <fileset dir="c:/jbpm/jbpm/build" includes="*.jar" />
               <fileset dir="c:/hibernate" includes="*.jar" />
               <fileset dir="C:/portal/ext/lib" includes="*.jar"/>
               <fileset dir="C:/ant/lib" includes="*.jar"/>
               </path>
              
               <target name="deploy.par">
               <taskdef name="deploypar" classname="org.jbpm.ant.DeployParTask">
               <classpath refid="classpath"/>
               </taskdef>
               <deploypar par="C:/jbpm/jbpm/build/new.par" properties="C:/eclipse/workspace/New/src/config.files/hibernate.properties"/>
               </target>
              </project>


              This code will includes some .jar files need to deploy, but occur an error:
              Buildfile: C:\eclipse\workspace\New\build.xml
              deploy.par:
              [deploypar] log4j:WARN No appenders could be found for logger (org.jbpm.ant.AntTaskJbpmSessionFactory).
              [deploypar] log4j:WARN Please initialize the log4j system properly.
              
              BUILD FAILED
              java.lang.NoClassDefFoundError: bsh/EvalError


              I don't know "bsh.EvalError" parkage and coun't find it. I think if i have the "bsh.EvalError" and include it into my project, of course this error will not occur, but perhap some other errors can occurs so it very long to correct this file.
              Please correct it for me, or give some simple examples.
              Thank you very much.


              • 4. Re: Error in build.xml
                Ronald van Kuijk Master

                then you still mis some libs. Try putting all libs in the jbpm.3 lib dir on the classpath. Then you probably have to much but it will work

                • 5. Re: Error in build.xml
                  Tran Lap Newbie

                  Thanks for the repply.
                  I returned to the GPD way, it's ok.
                  But i can find where my data is stored ?? You can give me a guide ?
                  Thanks very much.

                  • 6. Re: Error in build.xml
                    Tran Lap Newbie

                    And How can i config Database Engine for jBPM Server(defaul: H_SQL)?
                    for exam: default is Postgres Database Engine, not HSQL.
                    What must i do ?
                    Thanks

                    • 7. Re: Error in build.xml
                      Ronald van Kuijk Master

                      what data? the par file created by the deployer? The par file in the engine? please can you be a bit more clear?

                      • 8. Re: Error in build.xml
                        Tran Lap Newbie

                        Thanks.
                        Example, bellow is my configs.

                        hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
                        hibernate.connection.driver_class=org.postgresql.Driver
                        hibernate.connection.url=jdbc:postgresql://localhost:5432/jbpmtest
                        hibernate.connection.username=postgres
                        hibernate.connection.password=postgres
                        
                        hibernate.show_sql=true
                        hibernate.c3p0.min_size=1
                        hibernate.c3p0.max_size=3


                        Where is data of my project saved ??
                        I think it will save in my Postgres Database Engine, but i can't find anything change in my Postgres Database, so where is it saved??
                        Please help me, thanks.


                        • 9. Re: Error in build.xml
                          Tran Lap Newbie

                          Sorry.
                          That code is in src/config.files -> hibernate.properties.
                          In my project with eclipse GPD.

                          • 10. Re: Error in build.xml
                            Ronald van Kuijk Master

                            the jbpm.sar (if you use that also contains one of these config files. That one is used for running the processes. Search the source dirs and you will see.

                            Ronald