大神求助 非常棘手的一个问题 关于tomcat启动配置

yeazq 2015-10-15 04:15:19
首先是报错
信息: Starting ProtocolHandler ["ajp-apr-8009"]
十月 15, 2015 3:41:05 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 36 ms
[2015-10-15 03:41:05,606] Artifact ajjxs:war exploded: Artifact is being deployed, please wait...
Connected to server
十月 15, 2015 3:41:05 下午 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(C:\Users\Administrator\IdeaProjects\ajjxs\out\artifacts\ajjxs_war_exploded\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
十月 15, 2015 3:41:09 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[org.springframework.web.context.ContextLoader]Root WebApplicationContext: initialization started
[org.springframework.web.context.support.XmlWebApplicationContext]Refreshing Root WebApplicationContext: startup date [Thu Oct 15 15:41:09 CST 2015]; root of context hierarchy
[org.springframework.beans.factory.support.DefaultListableBeanFactory]Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5eb7033e: defining beans []; root of factory hierarchy
[org.springframework.web.context.ContextLoader]Root WebApplicationContext: initialization completed in 224 ms
十月 15, 2015 3:41:09 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
十月 15, 2015 3:41:09 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [] startup failed due to previous errors
[org.springframework.web.context.support.XmlWebApplicationContext]Closing Root WebApplicationContext: startup date [Thu Oct 15 15:41:09 CST 2015]; root of context hierarchy
[org.springframework.beans.factory.support.DefaultListableBeanFactory]Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5eb7033e: defining beans []; root of factory hierarchy
[2015-10-15 03:41:10,012] Artifact ajjxs:war exploded: Error during artifact deployment. See server log for details.
十月 15, 2015 3:41:15 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.64\webapps\manager
十月 15, 2015 3:41:15 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\apache-tomcat-7.0.64\webapps\manager has finished in 94 ms

严重: Exception sending context initialized event to listener instance of class org.jeecgframework.web.system.listener.InitListener
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'systemService' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:575)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1114)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:279)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
at org.jeecgframework.web.system.listener.InitListener.contextInitialized(InitListener.java:27)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5003)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1809)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1420)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$2.run(Transport.java:202)
at sun.rmi.transport.Transport$2.run(Transport.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:198)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:567)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.access$400(TCPTransport.java:619)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:684)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:681)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:681)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

上面提示是说关于listeners 的bean没有加载成功 但是代码没有问题 接下来是代码
<servlet>
<description>spring mvc servlet</description>
<servlet-name>springMvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<description>spring mvc 配置文件</description>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-mvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<context:component-scan base-package="org.jeecgframework.web.*">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service" />
</context:component-scan>
<context:component-scan base-package="com.ajjx.*">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service" />
</context:component-scan>

@Service("systemService")
@Transactional
public class SystemServiceImpl extends CommonServiceImpl implements SystemService {
@Autowired
private JeecgDictDao jeecgDictDao;

public TSUser checkUserExits(TSUser user) throws Exception {
return this.commonDao.getUserByUserIdAndUserNameExits(user);
}

public List<DictEntity> queryDict(String dicTable, String dicCode,String dicText){
List<DictEntity> dictList = null;
//step.1 如果没有字典表则使用系统字典表
if(StringUtil.isEmpty(dicTable)){
dictList = jeecgDictDao.querySystemDict(dicCode);
for(DictEntity t:dictList){
t.setTypename(MutiLangUtil.getMutiLangInstance().getLang(t.getTypename()));
}
}else {
dicText = StringUtil.isEmpty(dicText, dicCode);
dictList = jeecgDictDao.queryCustomDict(dicTable, dicCode, dicText);
}
return dictList;
}

问了很到人 还是没有找到原因
以下是个人观点:首先我怀疑并不是代码出了问题 而是配置出了问题 spring我用的是3.2.9的版本 我在web.xml上已经将listeners放在最末尾了 有人说是因为加载的顺序不对 我也无法排除这种可能
...全文
44074 点赞 收藏 6
写回复
6 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
Ineverthati 2017-10-11
你有东西没有修改,比如说包没有更新上去什么的
回复
ZDevil912 2017-03-31
最后楼主解决了吗?求告知
回复
imdongrui 2016-07-29
最后楼主解决了吗?求告知
回复
imdongrui 2016-07-29
oh my god! GG...
回复
yeazq 2015-10-16
继续人工置顶
回复
yeazq 2015-10-15
人工置顶 人工置顶 求大神
回复
相关推荐
发帖
Apache
创建于2007-09-28

2.4w+

社区成员

Web 开发 Apache
申请成为版主
帖子事件
创建了帖子
2015-10-15 04:15
社区公告
暂无公告