2 Replies Latest reply on Jun 23, 2010 3:09 AM by divxer divxer

    jbpm 4.4 snapshot and maven-jetty-plugin

    divxer divxer Newbie

      I want to includ jbpm4.4 in my project. The following is jbpm4.4  dependency in my pom.xml.

       

      <dependency>
                      <groupId>org.jbpm.jbpm4</groupId>
                      <artifactId>jbpm-jpdl</artifactId>
                      <!--<version>4.3</version>-->
                      <version>4.4-SNAPSHOT</version>
                      <exclusions>
                          <exclusion>
                              <groupId>org.hibernate</groupId>
                              <artifactId>hibernate</artifactId>
                          </exclusion>
                          <exclusion>
                              <groupId>jboss</groupId>
                              <artifactId>jboss-j2ee</artifactId>
                          </exclusion>
                          <exclusion>
                              <groupId>org.jboss.client</groupId>
                              <artifactId>jbossall-client</artifactId>
                          </exclusion>
                          <exclusion>
                              <groupId>org.jboss.identity</groupId>
                              <artifactId>idm</artifactId>
                          </exclusion>
                          <exclusion>
                              <groupId>log4j</groupId>
                              <artifactId>log4j</artifactId>
                          </exclusion>
                          <exclusion>
                              <groupId>juel</groupId>
                              <artifactId>juel</artifactId>
                          </exclusion>
                          <exclusion>
                              <groupId>org.slf4j</groupId>
                              <artifactId>slf4j-jdk14</artifactId>
                          </exclusion>
                          <exclusion>
                              <groupId>org.hibernate</groupId>
                              <artifactId>hibernate-entitymanager</artifactId>
                          </exclusion>
                          <!-- Excluding cglib-full 2.0.2, becuase it's not compatible with Hibernate 3.x -->
                          <exclusion>
                              <groupId>cglib</groupId>
                              <artifactId>cglib-full</artifactId>
                          </exclusion>
                      </exclusions>
                  </dependency>
      

       

      And build with maven-jetty-plugin:

       

       

                 <plugin>
                      <groupId>org.mortbay.jetty</groupId>
                      <artifactId>maven-jetty-plugin</artifactId>
                      <version>6.1.10</version>
                      <configuration>
                          <contextPath>/</contextPath>
                          <scanIntervalSeconds>0</scanIntervalSeconds>
                          <scanTargetPatterns>
                              <scanTargetPattern>
                                  <directory>src/main/webapp/WEB-INF</directory>
                                  <excludes>
                                      <exclude>**/*.jsp</exclude>
                                  </excludes>
                                  <includes>
                                      <include>**/*.properties</include>
                                      <include>**/*.xml</include>
                                  </includes>
                              </scanTargetPattern>
                          </scanTargetPatterns>
                          <stopKey/>
                          <stopPort/>
                          <webDefaultXml>src/main/resources/webdefault.xml</webDefaultXml>
                      </configuration>
                  </plugin>
      


      When jetty:run, error occurred:

       

       

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tilesConfigurer' defined in ServletContext resource [/WEB-INF/applicationContext-web.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/mortbay/jetty/webapp/WebAppClassLoader) previously initiated loading for a different type with name "javax/el/ExpressionFactory"
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1401)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
       at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
       at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
       at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)
       at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)
       at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
       at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
       at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
       at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540)
       at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
       at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
       at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
       at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
       at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110)
       at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
       at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
       at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
       at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
       at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
       at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
       at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
       at org.mortbay.jetty.Server.doStart(Server.java:222)
       at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
       at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
       at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:371)
       at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:307)
       at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:203)
       at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:133)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:77)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:69)
       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:82)
       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:54)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.singleThreadedBuild(DefaultLifecycleExecutor.java:218)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:190)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:246)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:95)
       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:430)
       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:160)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:124)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
       at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
       at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
       at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
       at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)
      Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/mortbay/jetty/webapp/WebAppClassLoader) previously initiated loading for a different type with name "javax/el/ExpressionFactory"
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
       at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
       at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
       at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
       at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
       at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
       at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
       at javax.el.FactoryFinder.newInstance(FactoryFinder.java:52)
       at javax.el.FactoryFinder.find(FactoryFinder.java:124)
       at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:154)
       at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:125)
       at org.apache.jasper.runtime.JspApplicationContextImpl.getExpressionFactory(JspApplicationContextImpl.java:80)
       at org.apache.tiles.el.JspExpressionFactoryFactory.getExpressionFactory(JspExpressionFactoryFactory.java:61)
       at org.apache.tiles.el.ELAttributeEvaluator.init(ELAttributeEvaluator.java:106)
       at org.apache.tiles.factory.TilesContainerFactory.storeContainerDependencies(TilesContainerFactory.java:459)
       at org.apache.tiles.factory.TilesContainerFactory.initializeContainer(TilesContainerFactory.java:378)
       at org.apache.tiles.factory.TilesContainerFactory.createTilesContainer(TilesContainerFactory.java:293)
       at org.apache.tiles.factory.TilesContainerFactory.createContainer(TilesContainerFactory.java:237)
       at org.apache.tiles.startup.AbstractTilesInitializer.createContainer(AbstractTilesInitializer.java:124)
       at org.apache.tiles.startup.AbstractTilesInitializer.initialize(AbstractTilesInitializer.java:70)
       at org.springframework.web.servlet.view.tiles2.TilesConfigurer.afterPropertiesSet(TilesConfigurer.java:203)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398)
       ... 59 more
      

       

      I know, in tomcat 6, remove el-api.jar and put juel.jar, juel-engine.jar, juel-impl.jar file in lib directory can solve this problem. But I'm using maven-jetty-plugin...

       

      Pls help me. Thank you!