当前位置: 首页 > 知识库问答 >
问题:

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

靳彦
2023-03-14

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

我看到的只是这些错误和下一个关键点

这是我的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

我在谷歌上找到了一些关于网络的解决方案。xml文件,但我不明白该怎么办?

共有1个答案

孙言
2023-03-14

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

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

这有时会发生,尤其是在您使用WebLogic的自动部署功能时。我在这里假设您正在使用自动部署功能以开发模式部署到单个服务器(Admin Server)。

我建议如下:

>

重新启动管理服务器

重新部署WAR文件

就个人而言,我不喜欢自动部署,除非你在自己的工作站上进行实际开发。即便如此,你也会使用JDeveloper在本地开发环境中与WebLogic集成。如果你在更多的集成类型环境中工作,那么我建议不要使用自动部署功能——这有时是不现实的。

 类似资料:
  • 我有一个带有grails的web应用程序,我想使用.war文件在cPanel中部署这个web应用程序。我遵循这个指南,首先我创建了数据库,然后在我的应用程序数据源上添加了数据库信息,制作了war文件并在cPanel上上传了PUBLIC_HTML文件上的war,将war文件重命名为zip文件并解压缩。我检查了url(sampleDomain.com/myApp),但它显示如下错误: 我不知道如何部署

  • 我需要在tomcat7部署战争文件...到目前为止我所做的是1。安装Tomcat7-启动并运行。能够看到索引页2。安装apache2-up并运行.成功地将80重定向到tomcat的8080端口。所有请求都被重定向到tomcat。3.现在我需要部署战争文件。 我的战争没有被发现,也没有扩大。没有日志。。未创建“mycompany”目录。 我检查了我的server.xml下面是代码 我错过了什么吗。。

  • 问题内容: 我已将文件复制到的目录中,并且可以访问。 现在将如何部署它,我的意思是我需要在浏览器中打开它吗?如何访问该应用程序? 问题答案: 你可以从以下位置访问你的应用程序: http://localhost:8080/sample 默认情况下,war文件的部署或重新部署是自动的-复制/覆盖文件后,检查webapps文件夹中是否有解压缩的文件夹z。 如果无法正常打开,请检查日志文件(例如)是否存

  • 我正试图将一个新的war文件部署到我的tomcat服务器上,但我没有看到我的更改得到反映。以下是我的工作流程: 在代码中添加了额外的日志记录 运行以下Ant任务:clean/dist dev/generate war 停止Apache Tomcat服务 删除新生成的。war文件保存到webapps文件夹中 启动ApacheTomcat服务 结果:web应用程序正常启动,但我的新日志功能没有反映在日

  • 在将文件部署到Wildfly时,应将文件复制到何处? 我看不到文件在哪里: 似乎要进行爆炸式部署: 在运行期间,启用的war文件由tmp目录中的vfs分解。这些文件将在停止/重新启动/禁用时删除。 参考内容位于内容数据目录中,用于重新创建tmp文件。

  • 我已经创建了管理员用户,但对于部署,我只使用wildfly用户设置。对于它,我还取消了bin/init中的字段注释。野蝇。飞吧。但完全没有意识到错误。 注意:我们也在linux机器上尝试过,但不是ROOT。那里也没有部署战争。习惯于