- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
使用hibernate、spring mvc。文件:
web.xml
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Spring MVC Application</display-name>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>mvc-dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>*.gif</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>*.jpg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>*.png</url-pattern>
</servlet-mapping>
</web-app>
主上下文文件
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"
>
<context:component-scan base-package="com.education"/>
<context:component-scan base-package="com.education.controllers"/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/pages/"/>
<property name="suffix" value=".jsp"/>
</bean>
<mvc:annotation-driven />
<mvc:resources mapping="/resources/**" location="/resources/" />
<import resource="root-context.xml" />
</beans>
根上下文.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<context:annotation-config />
<context:component-scan base-package="com.education.Dao" />
<context:component-scan base-package="com.education.Service" />
<import resource="data.xml" />
<import resource="security.xml" />
</beans>
在我成功编译并运行这个应用程序之前,添加hibernate代码和这个xml文件并遇到错误。
错误代码
16:40:50,403 ERROR [org.jboss.as.server] (management-handler-thread - 12) JBAS015870: Deploy of deployment "education.war" was rolled back with the following failure message: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"education.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"education.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"education.war\" Caused by: java.lang.LinkageError: Failed to link org/springframework/web/filter/GenericFilterBean (Module \"deployment.education.war:main\" from Service Module Loader) Caused by: java.lang.NoClassDefFoundError: org/springframework/context/EnvironmentAware Caused by: java.lang.ClassNotFoundException: org.springframework.context.EnvironmentAware from [Module \"deployment.education.war:main\" from Service Module Loader]"}} 16:40:50,533 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015877: Stopped deployment education.war (runtime-name: education.war) in 130ms
最佳答案
堆栈跟踪中的这一行说明了一切:
Caused by: java.lang.NoClassDefFoundError: org/springframework/context/EnvironmentAware Caused by: java.lang.ClassNotFoundException: org.springframework.context.EnvironmentAware
如果使用 Maven,您需要将 spring-context
添加到 pom.xml 文件:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.1.3.RELEASE</version>
</dependency>
请注意,版本可能会因您的项目而异
关于java - jboss eap-6.1 无法处理部署的 POST_MODULE 阶段\"education.war\",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20593683/
我知道 eap tls 是传输层安全功能。但即使在谷歌搜索之后,仍然存在一些不清晰的地方。 eap tls 是通用 eap 协议(protocol)定义的特殊实现吗?或者 eap tls 是 eap
我想在 Jboss EAP 7 上升级到 JSF 2.3。 我遵循了本指南: https://docs.jboss.org/author/display/WFLY10/JSF+Configuratio
我的项目在 JBOSS EAP 6 上运行。这个 XX.war 部署在 Jboss EAP6 中,但现在我们正在升级到 EAP7。当我在 Jboss EAP7 本地部署 war 文件时,出现此错误。
在 Ansible 提供 JBoss EAP 之后,我在配置 JBoss EAP 时遇到了麻烦。 添加数据源 gradle 任务因 java.lang.IllegalArgumentException
我有一个包含 JPA 2.1 API 和 Hibernate 4.3.0.Final(JPA 2.1 实现)的 war 应用程序,使用 Spring 容器打包和引导,我想在 JBoss EAP 6.1
前言 在C# 5.0中,新增了async await 2个关键字支持异步编程的操作。在讲述这两个关键字之前,我先总结一下.NET中的常见的异步编程模型。 异步编程一直是比较复
我试图用以下代码将 EAP 包装在任务中。 public static async Task Caller() { var ret = await RunProgram();
我已将 jenkins 配置为将从作业生成的 jar 文件复制到运行 jboss 的远程主机 (GNU LINUX) 上的目标文件夹。目前我每次都必须手动重新启动 jboss 才能反射(reflect
我正在尝试以编程方式在 Android 上创建企业 WiFi 配置文件(WPA-Enterprise、WPA2-Enterprise)。 我见过一个比较有名的方案,就是用反射来实现。据我了解,如果必须
从.NET 4.5开始,支持的三种异步编程模式: •基于事件的异步编程设计模式 (EAP,Event-based Asynchronous Pattern) •异步编程模型(
我这里有个情况: 我有一个 .eap 文件,并且我有一个可用的工具,即 StarUML。我需要将 .eap 文件内容导入 StarUML。 基本上,我需要知道如何将 .eap 转换为某种格式以导入 S
当我运行以下 Dockerfile 时,容器响应错误并退出。 如果我注释掉 COPY,容器将正常启动。 我是否需要配置其他内容才能让容器启动并部署应用程序? docker 文件: FROM regis
我正在使用 Jboss EAP 6.4 域架构。我的计划是将所有资源属性文件捆绑为外部模块,并定义一个部署结构以将它们添加到类路径中。这工作得很好,但是服务器没有检测到运行时所做的更改,需要重新启动
我在同一台机器上运行域 Controller 、一个主机 Controller 和一台服务器。 我正在使用 IDEA 连接到远程服务器进行调试,但它并没有在断点处停止,即使它正在运行代码(我已经通过系
我正在尝试决定是在我们的 JBoss EAP 6 环境中使用独立模式还是域模式。我们在一台机器上运行多个 JBoss 环境。 有什么好处和坏处?对我来说,域模型可能是管理环境的一种优雅方式,但是修改一
我在我的 WPF 应用程序中使用 CefSharp 3 来使用基于 Chromium 的 webBrowser 控件。为了调用 html 中的某些脚本,使用了 ExecutScriptAsync 方法
我的场景: 我有 2 个不同的 keystore (A.jks 和 B.jks),用于与两个不同服务器的 SSL 连接。这些 keystore 在进行“冒烟测试”时从命令行运行。 使用EAP服务器,如
我在一个特定的 linux 机器上有多个 jboss 实例。我不想 grep jboss 实例的进程 ID 和监听端口。server.log 或 CLI 命令是否有解决方法? 最佳答案 除了 Pana
在过去的几天里,我在从 Eclipse 发布到 JBoss EAP 6.3 或 Wildfly 8.2 时遇到了这个错误。 Error renaming D:\Servers\wildfly-8.2.
Jboss EAP 6 的默认管理控制台密码是什么? 它不允许我在没有密码的情况下查看管理控制台。而且我也找不到配置页面。 请指教。 最佳答案 转到 JBOSS_HOME\bin,运行 add-use
我是一名优秀的程序员,十分优秀!