嗨我正在进行从Websphere applcation服务器到Liberty的应用程序迁移,同时面临iam面临的错误

时间:2018-04-10 10:17:43

标签: slf4j apache-commons-logging

错误] SLF4J:类路径包含多个SLF4J绑定。

[错误] SLF4J:在[wsjar:file:/ C:/Users/AF51548/Downloads/wlp-webProfile7-18.0.0.1%20(1)/ wlp / usr / servers / defaultServer / workarea / org中找到绑定.eclipse.osgi / 112 /数据/高速缓存/ com.ibm.ws.app.manager_1 / .cache / egiqt入耳式1.6.0-SNAPSHOT / .cache / egiqt-战争1.6.0-SNAPSHOT.war / WEB -INF / LIB / SLF4J-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]

[错误] SLF4J:在[wsjar:file:/ C:/Users/AF51548/Downloads/wlp-webProfile7-18.0.0.1%20(1)/ wlp / usr / servers / defaultServer / workarea / org中找到绑定.eclipse.osgi / 112 /数据/高速缓存/ com.ibm.ws.app.manager_1 / .cache / egiqt入耳式1.6.0-SNAPSHOT / .cache / egiqt-战争1.6.0-SNAPSHOT.war / WEB -INF / LIB / SLF4J-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]

[错误] SLF4J:有关解释,请参阅http://www.slf4j.org/codes.html#multiple_bindings

[错误]部署期间出现严重错误:

配置失败! org.apache.commons.logging.LogFactory

[ERROR] SRVE0283E:初始化上下文时捕获到异常:java.lang.RuntimeException:com.sun.faces.config.ConfigurationException:CONFIGURATION FAILED! org.apache.commons.logging.LogFactory

git checkout master
git merge hotfix_branch
git checkout develop
git merge hotfix_branch
git branch -D hotfix_branch

引起:com.sun.faces.config.ConfigurationException:CONFIGURATION FAILED! org.apache.commons.logging.LogFactory

   at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:293)

   at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:2384)

   at [internal classes]

引起:java.lang.ClassNotFoundException:org.apache.commons.logging.LogFactory

   at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:357)

   at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226)

   ... 2 more

这是我的server.xml

   at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibraryClassLoaders(AppClassLoader.java:504)

   at [internal classes]

   at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

   at org.springframework.beans.factory.access.el.SpringBeanELResolver.<init>(SpringBeanELResolver.java:43)

   at org.springframework.web.jsf.el.SpringBeanFacesELResolver.<init>(SpringBeanFacesELResolver.java:68)

   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

   at java.lang.Class.newInstance(Class.java:442)

   at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:268)

   at com.sun.faces.config.processor.ApplicationConfigProcessor.addELResolver(ApplicationConfigProcessor.java:575)

   at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:302)

   at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)

   at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)

   at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)

   at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:216)

   at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:338)

这是我的web.xml

<!-- Enable features -->

<featureManager>

    <feature>webProfile-7.0</feature>

    <feature>commons-logging-1.1.1</feature>

   <feature>jsf-2.2</feature>

    <feature>cdi-1.2</feature>

    <feature>servlet-3.1</feature>

    <feature>managedBeans-1.0</feature>

    <feature>beanValidation-1.1</feature>

    <feature>jndi-1.0</feature>

    <feature>jdbc-4.1</feature>

     <feature>el-3.0</feature>



    <feature>localConnector-1.0</feature>

</featureManager>



<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->

<httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>





    <library id="db2JDBCDriverLibrary" name="DB2DriverLibrary">

    <fileset dir="C:/Program Files/IBM/SQLLIB/java" includes="db2jcc4.jar db2jcc_license_cu.jar"/>

</library>



<!-- DB2 driver -->

<jdbcDriver id="db2JDBCDriver" javax.sql.ConnectionPoolDataSource="com.ibm.db2.jcc.DB2ConnectionDataSource" javax.sql.DataSource="com.ibm.db2.jcc.DB2JccDataSource" javax.sql.XADataSource="com.ibm.db2.jcc.DB2XADataSource" libraryRef="db2JDBCDriverLibrary"/>

<dataSource id="***_DataSource" jndiName="jdbc/****">

   <jdbcDriver libraryRef="db2JDBCDriverLibrary"/>

    <properties.db2.jcc beginTranForResultSetScrollingAPIs="false" beginTranForVendorAPIs="false" connectionSharing="1" databaseName="***" enableClientInformation="false" enableMultithreadedAccessDetection="false" errorDetectionModel="ExceptionMapping" freeResourcesOnClose="false" jmsOnePhaseOptimization="false" name="******" nonTransactionalDataSource="false" optimizeDB2ForGetUseClose="false" password="****" portNumber="****" reauthentication="false" retrieveMessagesFromServerOnGetMessage="true" serverName="****" traceLevel="-1" unbindClientRerouteListFromJndi="false" useTransactionRedirect="false" user="****" validateNewConnection="false"/>

    <connectionManager agedTimeout="600" connectionTimeout="10" maxIdleTime="600" maxPoolSize="10" minPoolSize="1" reapTime="180"/>

   </dataSource>
在加载配置资源之前,

将查找应用程序配置资源

命名为/WEB-INF/facesconfig.xml(如果存在这样的资源)。

   xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">

   <display-name>

   egiqt-war</display-name>

   <context-param>

          <description>

          State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>

          <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

          <param-value>client</param-value>

   </context-param>

   <context-param>

          <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>

          <param-value>resources.application</param-value>

   </context-param>

   <context-param>

          <param-name>com.sun.faces.expressionFactory</param-name>

          <param-value>com.sun.el.ExpressionFactoryImpl</param-value>

   </context-param>

   <context-param>

          <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>

          <param-value>true</param-value>

   </context-param>



   <filter>

          <filter-name>PrimeFaces FileUpload Filter</filter-name>

          <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>

          <init-param>

                 <param-name>thresholdSize</param-name>

                 <param-value>10240</param-value> <!-- 10 Mb -->

          </init-param>

   </filter>

   <filter-mapping>

          <filter-name>PrimeFaces FileUpload Filter</filter-name>

          <servlet-name>Faces Servlet</servlet-name>

   </filter-mapping>



     <filter>

          <filter-name>UserAuthenticator</filter-name>

          <filter-class>org.UserAuthenticator</filter-class>

   </filter>

   <filter-mapping>

          <filter-name>UserAuthenticator</filter-name>

          <servlet-name>Faces Servlet</servlet-name>

   </filter-mapping>   

   <context-param>

          <description>

          Comma-delimited list of context-relative resource paths under which the JSF implementation

默认为'.jsp'。

          <param-name>javax.faces.CONFIG_FILES</param-name>

          <param-value>/WEB-INF/faces-config.xml</param-value>

   </context-param>

   <!--<context-param>

          <description>

          The default suffix for extension-mapped resources that contain JSF components.

更改而不重新启动服务器。如果此参数设置为false或

从部署描述符中删除,对Faces JSP文件所做的任何更改都可能

服务器在重新启动之前不会看到

。通常设置此参数

在开发和调试Faces JSP文件时

为true,以便

改善开发环境的性能。

          <param-name>javax.faces.DEFAULT_SUFFIX</param-name>

          <param-value>.jsp</param-value>

   </context-param>

   --><context-param>

          <description>

          Monitors Faces JSP files for modifications and synchronizes a running server with

在处理第一个JSF请求时,将加载并初始化JSF运行时。

这可能会禁用自定义JSF扩展,例如项目中定义的工厂。

          <param-name>com.ibm.ws.jsf.JSP_UPDATE_CHECK</param-name>

          <param-value>true</param-value>

   </context-param>

   <!-- <context-param>

          <description>

          Load JSF runtime when the application server starts up. If this parameter is set to false or removed,

          <param-name>com.ibm.ws.jsf.LOAD_FACES_CONFIG_AT_STARTUP</param-name>

          <param-value>true</param-value> -->

   </context-param>

   <listener>

          <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

   </listener>

   <listener>

   <listener-class>org.backingbean.SessionListener

   </listener-class>

   </listener>





   <servlet>

          <servlet-name>Login Servlet</servlet-name>

          <jsp-file>pages/public/login.jsp</jsp-file>          

   </servlet>

     <servlet-mapping>

          <servlet-name>Login Servlet</servlet-name>

             <url-pattern>/pages/public/Login.xhtml</url-pattern>

   </servlet-mapping> 



   <servlet>

          <servlet-name>Faces Servlet</servlet-name>

          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

          <load-on-startup>1</load-on-startup>

   </servlet>

   <servlet-mapping>

          <servlet-name>Faces Servlet</servlet-name>

          <url-pattern>

          *.faces</url-pattern>

   </servlet-mapping>

   <servlet-mapping>

          <servlet-name>Faces Servlet</servlet-name>

          <url-pattern>*.xhtml</url-pattern>

   </servlet-mapping>

   <servlet-mapping>

          <servlet-name>Faces Servlet</servlet-name>

          <url-pattern>

          *.jsf</url-pattern>

   </servlet-mapping>





   <context-param>

          <param-name>facelets.SKIP_COMMENTS</param-name>

          <param-value>true</param-value>

   </context-param>

请任何机构有任何想法告诉我

0 个答案:

没有答案