<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic LinkageError / NoSuchMethodError when using with JSF2 in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/linkageerror-nosuchmethoderror-when-using-with-jsf2/m-p/22563#M10839</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm setting up my Activiti app with Tomcat, Spring, and JSF 2 (MyFaces) Frontend.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is clashing EL library used by Activiti (JUEL) with the EL specification used by Tomcat and MyFaces.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By default, I get a LinkageError for ELResolver interface when starting the MyFaces listener in Tomcat.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First, I thought it is because there are two ELResolver definitions in the classpath (one in juel, and one in Tomcat's el-api.jar).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I replaced el-api in tomcat\lib with juel. No luck!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I even searched every JAR file in the JDK, Tomcat, and my WEB-INF\lib, and the only ELResolver present was juel's. But I still get that LinkageError.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway,… I thought the better way to do so is to remove the redundant EL API. So, I added an "exclusion" in the my pom.xml (maven) to omit JUEL jar file as the dependency, and added juel-impl myself (only having the EL implementation, not the API). So that I can use Tomcat without any change outside my webapp. This time, I get a NoSuchMethorError, in the constructor of ProcessEngineFactoryBean (javax.el.ExpressionFactory.newInstance()).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The method is not present in the Tomcat's included EL-API, and I guess it is a change in the JSR Spec that is included in JUEL but not in the EL-API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, right now I'm stuck. This was as far as I could go. The alternate option for me is to change the Activiti source code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any recommendations?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are the exception traces:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Originally, or when replacing the el-api.jar with juel.jar:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.addELResolver(Ljavax/el/ELResolver&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;V" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, org/apache/myfaces/webapp/Jsp21FacesInitializer, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ELResolver used in the signature&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.apache.myfaces.webapp.Jsp21FacesInitializer.configureResolverForJSP(Jsp21FacesInitializer.java:123)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:77)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:113)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:186)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:159)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When using juel-impl:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Caused by: java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.el.ExpressionManager.&amp;lt;init&amp;gt;(ExpressionManager.java:55)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.cfg.ProcessEngineConfiguration.&amp;lt;init&amp;gt;(ProcessEngineConfiguration.java:164)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.cfg.spring.ProcessEngineFactoryBean.&amp;lt;init&amp;gt;(ProcessEngineFactoryBean.java:51)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at java.lang.reflect.Constructor.newInstance(Constructor.java:513)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;… 52 more&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Hamed&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Sep 2010 08:17:04 GMT</pubDate>
    <dc:creator>iravanchi</dc:creator>
    <dc:date>2010-09-19T08:17:04Z</dc:date>
    <item>
      <title>LinkageError / NoSuchMethodError when using with JSF2</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/linkageerror-nosuchmethoderror-when-using-with-jsf2/m-p/22563#M10839</link>
      <description>Hi,I'm setting up my Activiti app with Tomcat, Spring, and JSF 2 (MyFaces) Frontend.The problem is clashing EL library used by Activiti (JUEL) with the EL specification used by Tomcat and MyFaces.By default, I get a LinkageError for ELResolver interface when starting the MyFaces listener in Tomcat.F</description>
      <pubDate>Sun, 19 Sep 2010 08:17:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/linkageerror-nosuchmethoderror-when-using-with-jsf2/m-p/22563#M10839</guid>
      <dc:creator>iravanchi</dc:creator>
      <dc:date>2010-09-19T08:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: LinkageError / NoSuchMethodError when using with JSF2</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/linkageerror-nosuchmethoderror-when-using-with-jsf2/m-p/22564#M10840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, I found a way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I needed to remove JUEL from my WEB-INF\lib when I added it to tomcat's lib folder. It works now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But a solution for this issue that doesn't involve changing the Tomcat's lib folder (anything outside the context root) would be nice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe there's an issue registered for it in Activiti's JIRA.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Sep 2010 11:38:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/linkageerror-nosuchmethoderror-when-using-with-jsf2/m-p/22564#M10840</guid>
      <dc:creator>iravanchi</dc:creator>
      <dc:date>2010-09-19T11:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: LinkageError / NoSuchMethodError when using with JSF2</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/linkageerror-nosuchmethoderror-when-using-with-jsf2/m-p/22565#M10841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's a known issue at the moment, and we are working on it to resolve it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The workaround is indeed as you describe: remove the juel libs from the Tomcat lib, which removes the clashes with the EL resolver of Tomcat (which is a different version of EL)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Sep 2010 08:04:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/linkageerror-nosuchmethoderror-when-using-with-jsf2/m-p/22565#M10841</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2010-09-20T08:04:03Z</dc:date>
    </item>
  </channel>
</rss>

