312 Star 2K Fork 711

dromara / J2eeFAST

 / 详情

linux部署tomcat启动报错

已完成
创建于  
2022-07-29 10:49

请按以下步骤描述你的问题 尽量图文描述, 问题描述清楚,否则不予处理!!!

1.你的问题是怎么引起的(出现这个问题时你之前改动过什么)?

使用tomcat打war包启动时报错

2.你是否针对这个问题有过自己的解决方案?你是怎么处理?你做过什么尝试?( 如果有就写,最好图文描述 )

一个服务是好的正常的,部署到另一个服务器时,就启动不了,tomcat配置文件都修改过了

3.问题重现步骤( 如果有就写,最好图文描述 )

4.报错信息

2022-07-29 10:37:27.226 WARN 72107 --- [ost-startStop-1] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'beanTypeAutoProxyCreator' defined in class path resource [com/j2eefast/common/core/config/DruidConfig.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroFilter' defined in class path resource [com/j2eefast/framework/config/ShiroConfig.class]: Unsatisfied dependency expressed through method 'shiroFilter' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/j2eefast/framework/config/ShiroConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.mgt.SecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionManager' defined in class path resource [com/j2eefast/framework/config/ShiroConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.session.mgt.SessionManager]: Factory method 'sessionManager' threw exception; nested exception is java.lang.NoSuchMethodError: com.j2eefast.common.core.shiro.ShiroSessionManager.setSessionIdUrlRewritingEnabled(Z)V
2022-07-29 10:37:27.245 INFO 72107 --- [ost-startStop-1] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-07-29 10:37:27.250 ERROR 72107 --- [ost-startStop-1] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

com.j2eefast.framework.config.ShiroConfig.sessionManager(ShiroConfig.java:186)

The following method did not exist:

com.j2eefast.common.core.shiro.ShiroSessionManager.setSessionIdUrlRewritingEnabled(Z)V

The method's class, com.j2eefast.common.core.shiro.ShiroSessionManager, is available from the following locations:

jar:file:/home/apache-tomcat-8.5.78/webapps/fast/WEB-INF/lib/fast-common-2.5.0.jar!/com/j2eefast/common/core/shiro/ShiroSessionManager.class

It was loaded from the following location:

file:/home/apache-tomcat-8.5.78/webapps/fast/WEB-INF/lib/fast-common-2.5.0.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of com.j2eefast.common.core.shiro.ShiroSessionManager

29-Jul-2022 10:37:27.251 严重 [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/fast]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1177)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1925)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'beanTypeAutoProxyCreator' defined in class path resource [com/j2eefast/common/core/config/DruidConfig.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroFilter' defined in class path resource [com/j2eefast/framework/config/ShiroConfig.class]: Unsatisfied dependency expressed through method 'shiroFilter' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/j2eefast/framework/config/ShiroConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.mgt.SecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionManager' defined in class path resource [com/j2eefast/framework/config/ShiroConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.session.mgt.SessionManager]: Factory method 'sessionManager' threw exception; nested exception is java.lang.NoSuchMethodError: com.j2eefast.common.core.shiro.ShiroSessionManager.setSessionIdUrlRewritingEnabled(Z)V
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1794)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:229)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:723)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:536)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:152)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:132)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:92)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5221)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 10 more

评论 (3)

Raber 创建了任务

建议直接jar 包启动

使用jar启动失败,找不到日志输入图片说明

可以修改启动脚本runFAST.sh、不让它删除控制台日志 就可以看到控制台信息了

周周 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
1816537 zhouhuanogp 1584234850
Java
1
https://gitee.com/dromara/J2EEFAST.git
git@gitee.com:dromara/J2EEFAST.git
dromara
J2EEFAST
J2eeFAST

搜索帮助