Human Task Problem

Version 2

    I meet some problem when implement Human Task:

    1) At first, I meet the following errors when I run Human Task:  (then, according to the error message, I update slf4j-api-1.6.0.jar to slf4j-log4j12-1.6.1.jar

     

    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

    SLF4J: Defaulting to no-operation (NOP) logger implementation

    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

    javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.task] Unable to build EntityManagerFactory

        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)

        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)

        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)

        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)

        at com.sample.ProcessTest.main(ProcessTest.java:57)

    Caused by: org.hibernate.HibernateException: JDBC Driver class not found: org.h2.Driver

        at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:89)

        at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)

        at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)

        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)

        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)

        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)

        at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)

        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)

        ... 4 more

    Caused by: java.lang.ClassNotFoundException: org.h2.Driver

        at java.net.URLClassLoader$1.run(Unknown Source)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Unknown Source)

        at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:123)

        at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:84)

     

    2) After I update to slf4j-log4j12-1.6.1.jar, another error still shows:

     

    "java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

        at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:151)

        at org.hibernate.ejb.Ejb3Configuration.<clinit>(Ejb3Configuration.java:107)

        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:124)

        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)

        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)

        at com.sample.ProcessTest.main(ProcessTest.java:57)

    Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory

        at java.net.URLClassLoader$1.run(Unknown Source)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        ... 6 more

    http://community.jboss.org/message/581435#581435? "

     

     

    The problem is with this line:

      EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.task");

     

    Is there anything wrong with the path of this jar?

     

    3) where to update your eclipse to the latest Drools snapshot plugin?

     

    I appreciate your help so much!