9 Replies Latest reply on Feb 12, 2007 6:48 PM by Alejandro Guizar

    BPEL Installation Question

    Jason Greiner Newbie

      I am trying to install the BPEL Engine on my JBOSS Server. I need it to point to an oracle database which I have it doing. However the tables do not exist on the Oracle database server.

      When I run ant create-schema I get the error below. I have set my Dialect to Oracle9Dialect which worked when I deployed JBPM. I was wonder does anyone know where the scripts are to build the BPEL Tables manually? I would like to try that once and see how she shakes out.

      2007-02-08 11:20:02,268 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jbpm-bpel].[dbSchemaServlet]] Servlet.service() for servlet
      org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
       at org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
       at org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
       at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:241)
       at org.hibernate.mapping.Column.getSqlType(Column.java:181)
       at org.hibernate.mapping.Table.sqlCreateString(Table.java:383)
       at org.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:774)
       at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:92)
       at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:59)
       at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSchemaExport(DbPersistenceServiceFactory.java:77)
       at org.jbpm.persistence.db.DbPersistenceServiceFactory.createSchema(DbPersistenceServiceFactory.java:108)
       at org.jbpm.JbpmConfiguration.createSchema(JbpmConfiguration.java:441)
       at org.jbpm.JbpmConfiguration.createSchema(JbpmConfiguration.java:433)
       at org.jbpm.bpel.web.DBSchemaServlet.createSchema(DBSchemaServlet.java:39)
       at org.jbpm.bpel.web.DBSchemaServlet.doGet(DBSchemaServlet.java:28)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:495)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      


        • 1. Re: BPEL Installation Question
          Alejandro Guizar Master

          You can generate the DDL scripts using Hibernate's SchemaExport tool. The Toolset Guide chapter in the reference manual describes it in detail.

          The command must be something like:

          java -cp hibernate.jar;jbpm-jpdl.jar;jbpm-bpel.jar org.hibernate.tool.hbm2ddl.SchemaExport --create --quiet --output=jbpm-bpel.ddl --config=hibernate.cfg.xml --format

          but I won't take the excitement of figuring it out away from you :-)


          • 2. Re: BPEL Installation Question
            Jason Greiner Newbie

            Boy I was really hoping for "Yup here is the script you need".....:)

            However, I appreciate your suggestion as well.

            Thanks
            Jason

            • 3. Re: BPEL Installation Question
              Jason Greiner Newbie

              Well I took a few steps back to get this working. I decided that I would deploy the bpel engine to the jboss server that comes with the jbpm starter kit. I get it compiled and deployed but get a error.

              08:56:45,571 INFO [STDOUT] java.lang.NoClassDefFoundError: org/jbpm/bpel/wsdl/Property
              08:56:45,571 INFO [STDOUT] at java.lang.Class.getDeclaredMethods0(Native Method)
              08:56:45,571 INFO [STDOUT] at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
              08:56:45,571 INFO [STDOUT] at java.lang.Class.getDeclaredMethods(Class.java:1763)
              08:56:45,571 INFO [STDOUT] at org.hibernate.property.BasicPropertyAccessor.getterMethod(BasicPropertyAccessor.java:317)
              08:56:45,571 INFO [STDOUT] at org.hibernate.property.BasicPropertyAccessor.getGetterOrNull(BasicPropertyAccessor.java:297)
              08:56:45,571 INFO [STDOUT] at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:280)
              08:56:45,571 INFO [STDOUT] at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)
              08:56:45,571 INFO [STDOUT] at org.hibernate.util.ReflectHelper.getter(ReflectHelper.java:86)
              08:56:45,571 INFO [STDOUT] at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:77)
              08:56:45,571 INFO [STDOUT] at org.hibernate.mapping.ToOne.setTypeUsingReflection(ToOne.java:58)
              08:56:45,571 INFO [STDOUT] at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2022)
              08:56:45,571 INFO [STDOUT] at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2007)
              08:56:45,571 INFO [STDOUT] at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1897)
              08:56:45,571 INFO [STDOUT] at org.hibernate.cfg.HbmBinder.bindSubclass(HbmBinder.java:779)
              08:56:45,602 INFO [STDOUT] at org.hibernate.cfg.HbmBinder.handleSubclass(HbmBinder.java:2068)
              08:56:45,602 INFO [STDOUT] at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1967)
              08:56:45,602 INFO [STDOUT] at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1897)
              08:56:45,602 INFO [STDOUT] at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:325)
              08:56:45,602 INFO [STDOUT] at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:239)
              08:56:45,602 INFO [STDOUT] at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:110)
              08:56:45,602 INFO [STDOUT] at org.hibernate.cfg.Configuration.add(Configuration.java:379)
              08:56:45,602 INFO [STDOUT] at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:418)
              08:56:45,602 INFO [STDOUT] at org.hibernate.cfg.Configuration.addResource(Configuration.java:473)
              08:56:45,602 INFO [STDOUT] at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1414)
              08:56:45,602 INFO [STDOUT] at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1382)
              08:56:45,602 INFO [STDOUT] at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1363)
              08:56:45,618 INFO [STDOUT] at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1339)
              08:56:45,618 INFO [STDOUT] at org.hibernate.cfg.Configuration.configure(Configuration.java:1259)
              08:56:45,618 INFO [STDOUT] at org.jbpm.db.hibernate.HibernateHelper.createConfiguration(HibernateHelper.java:91)
              08:56:45,618 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceServiceFactory.getConfiguration(DbPersistenceServiceFactory.java:69)
              08:56:45,618 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
              08:56:45,618 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94)
              08:56:45,618 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98)
              08:56:45,634 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:281)
              08:56:45,634 INFO [STDOUT] at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:526)
              08:56:45,634 INFO [STDOUT] at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109)
              08:56:45,634 INFO [STDOUT] at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56)
              


              Does anyone know why I would be getting this? I look in the jbpm-bpel.jar that gets packaged in the jbpm-bpel.sar and see the class there.

              Thanks
              Jason

              • 4. Re: BPEL Installation Question
                Alejandro Guizar Master

                jbpm-bpel.sar contains modified versions of several artifacts already present in the jboss server that comes with the starters kit. These existing artifacts conflict with the new ones and cause errors like this.

                This is why the user guide covers installing a generally available version of jboss. Try the default server configuration.

                • 5. Re: BPEL Installation Question
                  Jason Greiner Newbie

                  Well trying to create the schema again. Unfortunately it gives me this error. I copied all the jars, and the hibernate.cfg.xml file into a directory and from there I run the java command. I am not up to speed with hibernate, so does anyone now why it does not find the cfg.xml file? I have tried to fully qualify the path as well.

                  java -cp hibernate3.jar;jbpm-jpdl.jar;jbpm-bpel.jar;commons-logging.jar;dom4j.jar;antlr-2.7.6.jar org.hibernate.tool.hbm2ddl.SchemaExport --config=hibernate.cfg.xml --create --quiet --output=jbpm-bpel.ddl --format

                  Feb 12, 2007 9:54:28 AM org.hibernate.tool.hbm2ddl.SchemaExport main
                  SEVERE: Error creating schema
                  org.hibernate.HibernateException: hibernate.cfg.xml not found
                   at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147)
                   at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1329)
                   at org.hibernate.cfg.Configuration.configure(Configuration.java:1351)
                   at org.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:366)
                  org.hibernate.HibernateException: hibernate.cfg.xml not found
                   at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147)
                   at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1329)
                   at org.hibernate.cfg.Configuration.configure(Configuration.java:1351)
                   at org.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:366)
                  


                  • 6. Re: BPEL Installation Question
                    Alejandro Guizar Master

                    Looking at the stack trace, Hibernate is trying to load hibernate.cfg.xml as a classpath resource. Hence you need to add the directory where hibernate.cfg.xml is located to the classpath.

                    • 7. Re: BPEL Installation Question
                      Jason Greiner Newbie

                      Sweet seems like I am getting closer.

                      Well it ran for a while then failed with another exception. This is the same error I get when I run the ant create-schema from the examples directory.

                      Feb 12, 2007 11:09:44 AM org.hibernate.tool.hbm2ddl.SchemaExport main
                      SEVERE: Error creating schema
                      org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
                       at org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
                       at org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
                       at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:255)
                       at org.hibernate.mapping.Column.getSqlType(Column.java:182)
                       at org.hibernate.mapping.Table.sqlCreateString(Table.java:383)
                       at org.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:779)
                       at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:94)
                       at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:61)
                       at org.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:394)
                      org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
                       at org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
                       at org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
                       at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:255)
                       at org.hibernate.mapping.Column.getSqlType(Column.java:182)
                       at org.hibernate.mapping.Table.sqlCreateString(Table.java:383)
                       at org.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:779)
                       at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:94)
                       at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:61)
                       at org.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:394)
                      
                      




                      Here is my hibernate.cfg.xml (at least the part that is important)

                       <!-- SQL dialect -->
                       <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
                      
                       <!-- JDBC connection properties (begin) ===
                       <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
                       <property name="hibernate.connection.url">jdbc:oracle:thin:@db01:1521:ods</property>
                       <property name="hibernate.connection.username">jbpm</property>
                       <property name="hibernate.connection.password">password</property>
                       <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
                       ==== JDBC connection properties (end) -->
                      
                       <!-- DataSource properties (begin) -->
                       <property name="hibernate.connection.datasource">java:/JbpmBpelDS</property>
                       <property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
                       <!-- DataSource properties (end) -->
                      


                      Thanks for all the help by the way.


                      • 8. Re: BPEL Installation Question
                        Jason Greiner Newbie

                        By the way to help someone in the future searching the forums for the same problem here is my java command

                        java -cp hibernate3.jar;jbpm-jpdl.jar;jbpm-bpel.jar;commons-logging.jar;dom4j.jar;antlr-2.7.6.jar;jbpm-identity-3.1.4.jar;commons-collections.jar;commons-lang.jar;wsdl4j.jar;bsh-1.3.0.jar;C:\Development\Java\jbpm-starters-kit-3.1.4\jbpm-bpel-1.1.Beta3\db org.hibernate.tool.hbm2ddl.SchemaExport --config=hibernate.cfg.xml --create --quiet --output=jbpm-bpel.ddl --format

                        Copy all the jar's into a directory and add the hibernate.cfg.xml.

                        • 9. Re: BPEL Installation Question
                          Alejandro Guizar Master

                          In java.sql.Types, value -1 corresponds to LONGVARCHAR. Properties of type org.jbpm.bpel.db.type.ElementType in jBPM BPEL use that JDBC type. HSQL and MySQL support it but not Oracle, apparently.

                          The solution is changing the JDBC type to VARCHAR. I've created issue BPEL-230 for tracking purposes. I will describe a workaround there.