Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
jBPM 3.2.2 with spring-modules-0.9 error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • jBPM 3.2.2 with spring-modules-0.9 error

    Hi all,

    I am getting this nasty error. Is it some kind of dependency problem?


    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating
    bean with name 'sessionFactory' defined in class path resource
    [jbpm-spring.xml]: Invocation of init method failed; nested exception is
    java.lang.NoClassDefFoundError: javax.jcr.RepositoryException
    at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
    (AbstractAutowireCapableBeanFactory.java:1337)
    at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean
    (AbstractAutowire
    CapableBeanFactory.java:473)
    at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
    $1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged
    (AccessController.java:219)
    at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
    (AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory
    $1.getObject(AbstractBeanFactory.java:264)
    at
    org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
    (DefaultSingletonBeanRegistry.java:221)
    at
    org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean
    (AbstractBeanFactory.java:261)
    at
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:185)
    at
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:164)
    at
    org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
    (DefaultListableBeanFactory.java:423)
    at
    org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization
    (AbstractApplicationContext.java:729)
    at
    org.springframework.context.support.AbstractApplicationContext.refresh
    (AbstractApplicationContext.java:381)
    at
    org.springframework.context.support.ClassPathXmlApplicationContext.
    (ClassPathXmlApplicationContext.java:139)
    at
    org.springframework.context.support.ClassPathXmlApplicationContext.
    (ClassPathXmlApplicationContext.java:93)
    at
    de.hsbc.trinkaus.ba.ssi.services.impl.ProcessServiceImplTest.oneTimeStepUp
    (ProcessServiceImplTest.java:68)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke
    (NativeMethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke
    (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:618)
    at org.junit.internal.runners.ClassRoadie.runBefores
    (ClassRoadie.java:49)
    at org.junit.internal.runners.ClassRoadie.runProtected
    (ClassRoadie.java:36)
    at org.junit.internal.runners.JUnit4ClassRunner.run
    (JUnit4ClassRunner.java:42)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
    (JUnit4TestReference.java:38)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run
    (TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
    (RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
    (RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
    (RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
    (RemoteTestRunner.java:196)
    Caused by: java.lang.NoClassDefFoundError: javax.jcr.RepositoryException
    at java.lang.J9VMInternals.verifyImpl(Native Method)
    at java.lang.J9VMInternals.verify(J9VMInternals.java:68)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:129)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance
    (NativeConstructorAccessorImpl.java:67)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
    (DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:522)
    at org.hibernate.engine.UnsavedValueFactory.instantiate
    (UnsavedValueFactory.java:22)
    at org.hibernate.engine.UnsavedValueFactory.getUnsavedIdentifierValue
    (UnsavedValueFactory.java:44)
    at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty
    (PropertyFactory.java:44)
    at org.hibernate.tuple.entity.EntityMetamodel.
    (EntityMetamodel.java:123)
    at org.hibernate.persister.entity.AbstractEntityPersister.
    (AbstractEntityPersister.java:434)
    at org.hibernate.persister.entity.SingleTableEntityPersister.
    (SingleTableEntityPersister.java:109)
    at org.hibernate.persister.PersisterFactory.createClassPersister
    (PersisterFactory.java:55)
    at org.hibernate.impl.SessionFactoryImpl.
    (SessionFactoryImpl.java:226)
    at org.hibernate.cfg.Configuration.buildSessionFactory
    (Configuration.java:1294)
    at
    org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory
    (LocalSessionFactoryBean.java:814)
    at
    org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory
    (LocalSessionFactoryBean.java:732)
    at
    org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet
    (AbstractSessionFactoryBean.java:211)
    at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods
    (AbstractAutowireCapableBeanFactory.java:1368)
    at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
    (AbstractAutowireCapableBeanFactory.java:1334)
    ... 28 more
    Caused by: java.lang.ClassNotFoundException: javax.jcr.RepositoryException
    at java.net.URLClassLoader.findClass(URLClassLoader.java:496)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:631)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
    ... 49 more

    Code:
    Code:
    
    <beans>
    
    <!-- SessionFactory definition -->
    
    <bean id="dataSource"
    class=
    "org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName">
    <value>com.ibm.db2.jcc.DB2Driver</value>
    </property>
    <property name="url">
    <value>jdbc:db2:/xxxxxx</value>
    </property>
    
    <property name="username">
    <value>xxx</value>
    </property>
    
    <property name="password">
    <value>xxx</value>
    </property>
    
    </bean>
    
    
    <bean id="sessionFactory"
    class=
    "org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    <property name="dataSource" ref="dataSource" />
    <property name="mappingLocations"
    value="classpath*:/org/jbpm/**/*.hbm.xml">
    </property>
    <property name="schemaUpdate" value="true" />
    
    <property name="configLocation">
    <value>classpath:/hibernate.cfg.xml</value>
    </property>
    
    </bean>
    
    
    <!-- JBPM Configuration -->
    <bean id="jbpmConfiguration"
    class=
    "org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
    <property name="sessionFactory" ref="sessionFactory" />
    <property name="configuration" value="classpath:/jbpm.cfg.xml"
    />
    </bean>
    
    <!-- jBPM template -->
    <bean id="jbpmTemplate"
    class="org.springmodules.workflow.jbpm31.JbpmTemplate">
    <constructor-arg index="0" ref="jbpmConfiguration" />
    <constructor-arg index="1" ref="my-workflow" />
    </bean>
    
    </beans>

  • #2
    Problem solved

    I was missing this jar:

    exoplatform.services.jcr.api-1.0.jar

    after adding it to /lib it started woirking!

    Comment

    Working...
    X