如何在weblogic 12c上部署war文件

时间:2017-03-06 11:32:09

标签: deployment weblogic

前几天我的老板告诉我们在weblogic12c上部署我们的项目war文件,我做了但是weblogic给了我这两个错误,我不知道该怎么做:

all I see is about these error and next key stop

这是我的xml文件

<?xml version="1.0" encoding="UTF-8"?>

-<web-app version="3.0" id="WebApp_ID" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<display-name>JournalDev-PrimefacesWebApplication</display-name>


-<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>*.xhtml</url-pattern>

</servlet-mapping>


-<context-param>

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

<param-value>Production</param-value>

</context-param>


-<context-param>

<param-name>primefaces.THEME</param-name>

<param-value>ultima-#{guestPreferences.theme}</param-value>

</context-param>


-<context-param>

<param-name>primefaces.FONT_AWESOME</param-name>

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

</context-param>


-<context-param>

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

<param-value>/WEB-INF/primefaces-ultima.taglib.xml</param-value>

</context-param>


-<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>


-<listener>

<listener-class>com.sun.faces.config.ConfigureListener</listener-class>

</listener>


-<context-param>

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

<param-value>false</param-value>

</context-param>


-<context-param>

<param-name>org.apache.myfaces.CONFIG_REFRESH_PERIOD</param-name>

<param-value>0</param-value>

</context-param>


-<context-param>

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

<param-value>ApplicationResources</param-value>

</context-param>


-<context-param>

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

<param-value>/WEB-INF/faces-beans.xml,/WEB-INF/faces-navigations.xml</param-value>

</context-param>


-<context-param>

<param-name>contextConfigLocation</param-name>

<param-value>/WEB-INF/classes/config/applicationContext-*.xml,**/applicationContext-*.xml </param-value>

</context-param>


-<context-param>

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

<param-value>en</param-value>

</context-param>


-<context-param>

<param-name>datasource</param-name>

<param-value>news_DS</param-value>

</context-param>


-<welcome-file-list>

<welcome-file>user/body.xhtml</welcome-file>

</welcome-file-list>


-<session-config>

<session-timeout>30</session-timeout>

</session-config>


-<filter>

<filter-name>requestContextFilter</filter-name>

<filter-class>org.springframework.web.filter.RequestContextFilter</filter-class>

</filter>


-<filter-mapping>

<filter-name>requestContextFilter</filter-name>

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

<dispatcher>FORWARD</dispatcher>

<dispatcher>REQUEST</dispatcher>

</filter-mapping>


-<filter-mapping>

<filter-name>requestContextFilter</filter-name>

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

</filter-mapping>


-<filter>

<filter-name>encodingFilter</filter-name>

<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>


-<init-param>

<param-name>encoding</param-name>

<param-value>UTF-8</param-value>

</init-param>


-<init-param>

<param-name>forceEncoding</param-name>

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

</init-param>

</filter>


-<filter-mapping>

<filter-name>encodingFilter</filter-name>

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

</filter-mapping>


-<filter-mapping>

<filter-name>encodingFilter</filter-name>

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

</filter-mapping>


-<filter>

<filter-name>hibernateFilter</filter-name>

<filter-class> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>

</filter>


-<filter-mapping>

<filter-name>hibernateFilter</filter-name>

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

</filter-mapping>


-<filter-mapping>

<filter-name>hibernateFilter</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>


-<filter-mapping>

<filter-name>hibernateFilter</filter-name>

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

</filter-mapping>


-<filter-mapping>

<filter-name>hibernateFilter</filter-name>

<url-pattern>/faces/*</url-pattern>

</filter-mapping>


-<filter-mapping>

<filter-name>hibernateFilter</filter-name>

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

</filter-mapping>


-<filter>

<filter-name>extensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>


-<init-param>

<description> Set the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB </description>

<param-name>uploadMaxFileSize</param-name>

<param-value>100m</param-value>

</init-param>


-<init-param>

<description> Set the threshold size - files below this limit are stored in memory, files above this limit are stored on disk. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB </description>

<param-name>uploadThresholdSize</param-name>

<param-value>100k</param-value>

</init-param>

</filter>


-<filter-mapping>

<filter-name>extensionsFilter</filter-name>

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

</filter-mapping>


-<filter-mapping>

<filter-name>extensionsFilter</filter-name>

<url-pattern>/faces/*</url-pattern>

</filter-mapping>


-<filter>

<filter-name>AccessFilter</filter-name>

<filter-class>org.nspl.access.AccessFilter</filter-class>

</filter>


-<filter-mapping>

<filter-name>AccessFilter</filter-name>

<url-pattern>/user/*</url-pattern>

<dispatcher>INCLUDE</dispatcher>

<dispatcher>FORWARD</dispatcher>

<dispatcher>REQUEST</dispatcher>

</filter-mapping>


-<filter-mapping>

<filter-name>AccessFilter</filter-name>

<url-pattern>/admin/*</url-pattern>

<dispatcher>INCLUDE</dispatcher>

<dispatcher>FORWARD</dispatcher>

<dispatcher>REQUEST</dispatcher>

</filter-mapping>


-<servlet>

<servlet-name>picServlet</servlet-name>

<servlet-class>org.nspl.access.PicServlet</servlet-class>

</servlet>


-<servlet-mapping>

<servlet-name>picServlet</servlet-name>

<url-pattern>/picServlet</url-pattern>

</servlet-mapping>


-<servlet>

<servlet-name>Select</servlet-name>

<servlet-class>org.nspl.access.Select</servlet-class>

</servlet>


-<servlet-mapping>

<servlet-name>Select</servlet-name>

<url-pattern>/Select</url-pattern>

</servlet-mapping>


-<servlet>

<servlet-name>Index</servlet-name>

<servlet-class>org.nspl.access.Index</servlet-class>

</servlet>


-<servlet-mapping>

<servlet-name>Index</servlet-name>

<url-pattern>/Index</url-pattern>

</servlet-mapping>


-<servlet>

<servlet-name>AttachmentServlet</servlet-name>

<servlet-class>org.nspl.access.AttachmentServlet</servlet-class>

</servlet>


-<servlet-mapping>

<servlet-name>AttachmentServlet</servlet-name>

<url-pattern>/AttachmentServlet</url-pattern>

</servlet-mapping>


-<servlet>

<servlet-name>picPersonServlet</servlet-name>

<servlet-class>org.nspl.access.PicPersonServlet</servlet-class>

</servlet>


-<servlet-mapping>

<servlet-name>picPersonServlet</servlet-name>

<url-pattern>/picPersonServlet</url-pattern>

</servlet-mapping>


-<servlet>

<servlet-name>baseInfoACMServlet</servlet-name>

<servlet-class>org.nspl.access.BaseInfoACMServlet</servlet-class>

</servlet>


-<servlet-mapping>

<servlet-name>baseInfoACMServlet</servlet-name>

<url-pattern>/baseInfoACMServlet</url-pattern>

</servlet-mapping>


-<servlet>

<servlet-name>operationServlet</servlet-name>

<servlet-class>org.nspl.access.OperationServlet</servlet-class>

</servlet>


-<servlet-mapping>

<servlet-name>operationServlet</servlet-name>

<url-pattern>/operationServlet</url-pattern>

</servlet-mapping>


-<servlet>

<servlet-name>bulletinServlet</servlet-name>

<servlet-class>org.nspl.access.BulletinServlet</servlet-class>

</servlet>


-<servlet-mapping>

<servlet-name>bulletinServlet</servlet-name>

<url-pattern>/bulletinServlet</url-pattern>

</servlet-mapping>


-<servlet>

<servlet-name>reportsServlet</servlet-name>

<servlet-class>org.nspl.access.ReportsServlet</servlet-class>

</servlet>


-<servlet-mapping>

<servlet-name>reportsServlet</servlet-name>

<url-pattern>/reportsServlet</url-pattern>

</servlet-mapping>


-<servlet>

<servlet-name>Kaptcha</servlet-name>

<servlet-class>com.google.code.kaptcha.servlet.KaptchaServlet</servlet-class>

</servlet>


-<servlet-mapping>

<servlet-name>Kaptcha</servlet-name>

<url-pattern>/kaptcha.jpg</url-pattern>

</servlet-mapping>


-<listener>

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

</listener>


-<listener>

<listener-class>org.nspl.access.SessionListener</listener-class>

</listener>


-<listener>

<listener-class> org.springframework.web.util.IntrospectorCleanupListener </listener-class>

</listener>


-<listener>

<listener-class> org.springframework.web.context.request.RequestContextListener </listener-class>

</listener>


-<context-param>

<param-name>org.apache.myfaces.ERROR_HANDLING</param-name>

<param-value>false</param-value>

</context-param>


-<context-param>

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

<param-value>false</param-value>

</context-param>


-<listener>

<listener-class>com.sun.faces.config.ConfigureListener</listener-class>

</listener>


-<filter>

<filter-name>Character Encoding Filter</filter-name>

<filter-class>org.primefaces.ultima.filter.CharacterEncodingFilter</filter-class>

</filter>


-<filter-mapping>

<filter-name>Character Encoding Filter</filter-name>

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

</filter-mapping>


-<mime-mapping>

<extension>ttf</extension>

<mime-type>application/font-sfnt</mime-type>

</mime-mapping>


-<mime-mapping>

<extension>woff</extension>

<mime-type>application/font-woff</mime-type>

</mime-mapping>


-<mime-mapping>

<extension>woff2</extension>

<mime-type>application/font-woff2</mime-type>

</mime-mapping>


-<mime-mapping>

<extension>eot</extension>

<mime-type>application/vnd.ms-fontobject</mime-type>

</mime-mapping>


-<mime-mapping>

<extension>eot?#iefix</extension>

<mime-type>application/vnd.ms-fontobject</mime-type>

</mime-mapping>


-<mime-mapping>

<extension>svg</extension>

<mime-type>image/svg+xml</mime-type>

</mime-mapping>


-<mime-mapping>

<extension>svg#exosemibold</extension>

<mime-type>image/svg+xml</mime-type>

</mime-mapping>


-<mime-mapping>

<extension>svg#exobolditalic</extension>

<mime-type>image/svg+xml</mime-type>

</mime-mapping>


-<mime-mapping>

<extension>svg#exomedium</extension>

<mime-type>image/svg+xml</mime-type>

</mime-mapping>


-<mime-mapping>

<extension>svg#exoregular</extension>

<mime-type>image/svg+xml</mime-type>

</mime-mapping>


-<mime-mapping>

<extension>svg#fontawesomeregular</extension>

<mime-type>image/svg+xml</mime-type>

</mime-mapping>

</web-app>

和我的管理员服务器日志:https://drive.google.com/open?id=0B4URKdA128Y5WURXT1lnby13blE

我谷歌和found一些关于web.xml文件的解决方案,但我不明白我该怎么办?

1 个答案:

答案 0 :(得分:1)

感谢您发布管理服务器日志。服务器日志中存在长堆栈跟踪错误,指出:

Caused by: com.bea.xml.XmlException: weblogic.descriptor.BeanAlreadyExistsException: **Bean already exists**: "weblogic.j2ee.descriptor.FilterMappingBeanImpl@f5a45ff9(/FilterMappings[[CompoundKey: **hibernateFilter**[CompoundKey: ][CompoundKey: *.xhtml]]])".

有时尤其是在您使用WebLogic的自动部署功能时。我在这里假设您使用自动部署功能在开发模式下部署到单个服务器(管理服务器)。

我会推荐以下内容:

  1. 在管理控制台中,删除部署,即使它已标记为FAILED。如果您尝试删除它时出错,请参阅下文。
  2. 关闭所有正在运行的WebLogic服务器
  3. 删除自动部署目录的内容(如果您正在使用autodeploy,这就是它的样子)
  4. 删除内容 /家庭/萨德尔/甲骨文/中间件/ ORACLE_HOME / user_projects /域/ BASE_DOMAIN /服务器/ AdminServer中的/ tmp
  5. 如果您无法通过管理控制台删除部署,则必须从域&#config.xml中删除部署: /home/sadr/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/config/config.xml (在编辑前进行备份)

  6. 重新启动管理服务器

  7. 重新部署WAR文件

  8. 就个人而言,除非您在自己的工作站上进行实际开发,否则我不是自动编程的粉丝。即使这样,您也可以使用JDeveloper在本地开发环境中与WebLogic集成。如果您在更多的集成类型环境中工作,那么我建议不要使用自动部署功能 - 这有时是不可能的。