0

所以我有一个 Seam 项目,我正在尝试集成 Tomahawk 1.2。我在 WebInf/lib 中复制了 tomahawk12.jar,并且在 web.xml 中有以下配置:

<filter>
   <filter-name>MyFacesExtensionsFilter</filter-name>
   <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
   <init-param>
       <param-name>maxFileSize</param-name>
       <param-value>20m</param-value>
   </init-param>
</filter>

<filter-mapping>
   <filter-name>MyFacesExtensionsFilter</filter-name>
   <servlet-name>Faces Servlet</servlet-name>
</filter-mapping>

<filter-mapping>
   <filter-name>MyFacesExtensionsFilter</filter-name>
   <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>*.seam</url-pattern>
</filter-mapping>

我想使用调度程序,但我得到以下异常:

"Caused by: javax.el.ELException: /pages/Interpreter/interpreterCalendar.xhtml @28,67 value="#{schedule.model}": Error reading 'model' on type org.javassist.tmp.java.lang.Object_$$_javassist_seam_2
        at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
        at javax.faces.component.ValueBindingValueExpressionAdapter.getValue(ValueBindingValueExpressionAdapter.java:113)
        ... 66 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
        at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
        at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
        at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
        at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
        at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
        at org.javassist.tmp.java.lang.Object_$$_javassist_seam_2.getModel(Object_$$_javassist_seam_2.java)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
        at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
        at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
        at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
        at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
        at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
        ... 67 more
Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/web/tomcat/service/WebCtxLoader$ENCLoader) previously initiated loading for a different type with name "org/apache/myfaces/custom/schedule/model/SimpleScheduleModel"
        at $Proxy234.getModel(Unknown Source)
        ... 89 more"

有任何想法吗?

4

1 回答 1

0

“java.lang.LinkageError:加载程序约束违规”通常意味着您的类路径中有问题。检查你的类路径中是否有重复的 jars(在本例中为 tomahawk jars)。

于 2011-10-27T18:59:18.947 回答