我开始跳船时有两个问题 [英] There are two questions when i start jetty
问题描述
maven +码头+ 3.2春季
maven + jetty + spring 3.2
我的码头信息:
2013-03-08 20:16:23.541:INFO:oejs.Server:main: jetty-9.0.0.RC2
2013-03-08 20:16:26.590:INFO:oejpw.PlusConfiguration:main: No Transaction manager found - if your webapp requires one, please configure one.
[DEBUG][2013-03-08 20:16:35,801]->org.eclipse.jetty.util.log [Logging to org.slf4j.impl.Log4jLoggerAdapter(org.eclipse.jetty.util.log) via org.eclipse.jetty.util.log.Slf4jLog]
2013-03-08 20:16:35.848:INFO:/:main: No Spring WebApplicationInitializer types detected on classpath
2013-03-08 20:16:36.743:INFO:/:main: Initializing Spring FrameworkServlet 'app-servlet'
Jetty找不到事务管理器,但是我已经在我的spring application-context(app-servlet.xml)中配置了它:
Jetty can't find the transaction manager but I have already configured it in my spring application-context(app-servlet.xml):
<!-- 使用注解方式管理事务 -->
<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/>
<!-- 配置事务管理 -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
它说在类路径上没有检测到Spring WebApplicationInitializer类型",我还在web.xml中配置了"app-servlet.xml":
And it says "No Spring WebApplicationInitializer types detected on classpath", I have also configured "app-servlet.xml" in web.xml:
<!-- spring mvc的dispatcherServlet负责转发请求 -->
<servlet>
<servlet-name>app-servlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<!-- spring context文件 -->
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:/spring/**/app-*.xml
</param-value>
</init-param>
<!-- 服务启动的时候第一个将此servlet初始化加载,非零的时候,数字越小,优先级越高 -->
<load-on-startup>1</load-on-startup>
</servlet>
我的pom.xml:
<!-- jetty -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.0.0.RC2</version>
</plugin>
为什么跳船会这样警告我?如何消除这些异常信息? 感谢您回答这两个问题.
Why did jetty warn me like that? How can I eliminate these abnormal infomation? Thank for answer these two questions.
推荐答案
有关事务管理器的信息性消息...
The informational message about Transaction Managers ...
2013-03-08 20:16:26.590:INFO:oejpw.PlusConfiguration:main: No Transaction manager found - if your webapp requires one, please configure one.
是因为您没有在JNDI中声明的XA交易管理器.
典型配置在 /WEB-INF/jetty-env.xml
中或在服务器端使用部署上下文描述符.
Occurs because you do not have a XA Transaction Manager declared in JNDI.
Typical configuration for this is in the /WEB-INF/jetty-env.xml
or on a server side using a Deployment Context Descriptor.
对于来自Spring的其他错误消息,要多一些解决起来很麻烦.
As for the other error message from Spring, that's a bit more messy to solve.
这篇关于我开始跳船时有两个问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!