NutzCN Logo
问答 nutzwk打包war部署linux上报错,在本地Tomcat上没有问题
发布于 2551天前 作者 huapan123 1600 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

[DEBUG] 2017-12-28 14:45:26,826 org.apache.shiro.io.ResourceUtils.loadFromClassPath(ResourceUtils.java:159) - Opening resource from class path [shiro.ini] [DEBUG] 2017-12-28 14:45:26,854 org.apache.shiro.config.Ini.load(Ini.java:342) - Parsing [main] [DEBUG] 2017-12-28 14:45:26,874 org.apache.shiro.config.Ini.load(Ini.java:342) - Parsing [urls] [DEBUG] 2017-12-28 14:45:26,885 org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:122) - Creating instance from Ini [sections=main,urls] [INFO ] 2017-12-28 14:45:27,605 org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:138) - An instance with name 'authc' already exists. Redefining this object as a new instance of type cn.wizzer.common.shiro.filter.SimpleAuthenticationFilter
[DEBUG] 2017-12-28 14:45:27,781 org.apache.shiro.config.ReflectionBuilder.resolveReference(ReflectionBuilder.java:238) - Encountered object reference '$cacheManager'. Looking up object with id 'cacheManager'
[DEBUG] 2017-12-28 14:45:27,782 org.apache.shiro.config.ReflectionBuilder.resolveReference(ReflectionBuilder.java:238) - Encountered object reference '$sessionDAO'. Looking up object with id 'sessionDAO'
[DEBUG] 2017-12-28 14:45:27,847 org.apache.shiro.config.ReflectionBuilder.resolveReference(ReflectionBuilder.java:238) - Encountered object reference '$sessionManager'. Looking up object with id 'sessionManager'
[DEBUG] 2017-12-28 14:45:27,870 org.apache.shiro.config.ReflectionBuilder.resolveReference(ReflectionBuilder.java:238) - Encountered object reference '$sessionIdCookie'. Looking up object with id 'sessionIdCookie'
[DEBUG] 2017-12-28 14:45:27,927 org.apache.shiro.config.ReflectionBuilder.resolveReference(ReflectionBuilder.java:238) - Encountered object reference '$rememberMeCookie'. Looking up object with id 'rememberMeCookie'
[DEBUG] 2017-12-28 14:45:28,048 org.apache.shiro.config.ReflectionBuilder.resolveReference(ReflectionBuilder.java:238) - Encountered object reference '$sha256Matcher'. Looking up object with id 'sha256Matcher'
[DEBUG] 2017-12-28 14:45:28,049 org.apache.shiro.config.ReflectionBuilder.resolveReference(ReflectionBuilder.java:238) - Encountered object reference '$shiroDbRealm'. Looking up object with id 'shiroDbRealm'
[DEBUG] 2017-12-28 14:45:28,049 org.apache.shiro.config.ReflectionBuilder.resolveReference(ReflectionBuilder.java:238) - Encountered object reference '$shiroDbRealm'. Looking up object with id 'shiroDbRealm'
[DEBUG] 2017-12-28 14:45:28,062 org.apache.shiro.config.ReflectionBuilder.resolveReference(ReflectionBuilder.java:238) - Encountered object reference '$authcStrategy'. Looking up object with id 'authcStrategy'
[DEBUG] 2017-12-28 14:45:28,062 org.apache.shiro.config.ReflectionBuilder.resolveReference(ReflectionBuilder.java:238) - Encountered object reference '$cacheManager'. Looking up object with id 'cacheManager'
[DEBUG] 2017-12-28 14:45:28,062 org.apache.shiro.realm.AuthorizingRealm.getAuthorizationCacheLazy(AuthorizingRealm.java:234) - No authorizationCache instance set. Checking for a cacheManager...
[DEBUG] 2017-12-28 14:45:28,064 org.apache.shiro.realm.AuthorizingRealm.getAuthorizationCacheLazy(AuthorizingRealm.java:242) - CacheManager [org.apache.shiro.cache.ehcache.EhCacheManager@689f8ef8] has been configured. Building authorization cache named [shiroDbRealm.authorizationCache] [DEBUG] 2017-12-28 14:45:28,078 org.apache.shiro.io.ResourceUtils.loadFromClassPath(ResourceUtils.java:159) - Opening resource from class path [ehcache.xml] [ERROR] 2017-12-28 14:45:29,274 org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:146) - Shiro environment initialization failed
org.apache.shiro.config.ConfigurationException: Unable to set property 'cacheManager' with value [org.apache.shiro.cache.ehcache.EhCacheManager@689f8ef8] on object of type org.apache.shiro.web.mgt.DefaultWebSecurityManager. If 'org.apache.shiro.cache.ehcache.EhCacheManager@689f8ef8' is a reference to another (previously defined) object, prefix it with '$' to indicate that the referenced object should be used as the actual value. For example, $org.apache.shiro.cache.ehcache.EhCacheManager@689f8ef8
at org.apache.shiro.config.ReflectionBuilder.setProperty(ReflectionBuilder.java:501)
at org.apache.shiro.config.ReflectionBuilder.applyProperty(ReflectionBuilder.java:450)
at org.apache.shiro.config.ReflectionBuilder.applyProperty(ReflectionBuilder.java:562)
at org.apache.shiro.config.ReflectionBuilder.applySingleProperty(ReflectionBuilder.java:206)
at org.apache.shiro.config.ReflectionBuilder.applyProperty(ReflectionBuilder.java:167)
at org.apache.shiro.config.ReflectionBuilder.buildObjects(ReflectionBuilder.java:124)
at org.apache.shiro.config.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:161)
at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:124)
at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:102)
at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:88)
at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:46)
at org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:123)
at org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:47)
at org.apache.shiro.web.env.IniWebEnvironment.createWebSecurityManager(IniWebEnvironment.java:203)
at org.apache.shiro.web.env.IniWebEnvironment.configure(IniWebEnvironment.java:99)
at org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:92)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40)
at org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:221)
at org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:133)
at org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4754)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5216)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2170)
at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:2151)
at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1957)
at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:2064)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1017)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:456)
at org.apache.shiro.config.ReflectionBuilder.setProperty(ReflectionBuilder.java:493)
... 29 more
Caused by: org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: Disk store path can't be created: ehcache.disk.store.dir/nutzwk
at org.apache.shiro.cache.ehcache.EhCacheManager.ensureCacheManager(EhCacheManager.java:223)
at org.apache.shiro.cache.ehcache.EhCacheManager.getCache(EhCacheManager.java:155)
at org.apache.shiro.realm.AuthorizingRealm.getAuthorizationCacheLazy(AuthorizingRealm.java:245)
at org.apache.shiro.realm.AuthorizingRealm.getAvailableAuthorizationCache(AuthorizingRealm.java:260)
at org.apache.shiro.realm.AuthorizingRealm.afterCacheManagerSet(AuthorizingRealm.java:226)
at org.apache.shiro.realm.CachingRealm.setCacheManager(CachingRealm.java:96)
at org.apache.shiro.mgt.RealmSecurityManager.applyCacheManagerToRealms(RealmSecurityManager.java:115)
at org.apache.shiro.mgt.RealmSecurityManager.afterCacheManagerSet(RealmSecurityManager.java:127)
at org.apache.shiro.mgt.SessionsSecurityManager.afterCacheManagerSet(SessionsSecurityManager.java:103)
at org.apache.shiro.mgt.CachingSecurityManager.setCacheManager(CachingSecurityManager.java:72)
... 40 more
Caused by: net.sf.ehcache.CacheException: Disk store path can't be created: ehcache.disk.store.dir/nutzwk
at net.sf.ehcache.DiskStorePathManager.resolveAndLockIfNeeded(DiskStorePathManager.java:141)
at net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:262)
at net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:251)
at net.sf.ehcache.store.disk.DiskStorageFactory.(DiskStorageFactory.java:127)
at net.sf.ehcache.store.disk.DiskStore.create(DiskStore.java:154)
at net.sf.ehcache.store.disk.DiskStore.createCacheStore(DiskStore.java:182)
at net.sf.ehcache.Cache.initialise(Cache.java:1216)
at net.sf.ehcache.CacheManager.initializeEhcache(CacheManager.java:1357)
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1423)
at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:819)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:498)
at net.sf.ehcache.CacheManager.init(CacheManager.java:394)
at net.sf.ehcache.CacheManager.(CacheManager.java:355)
at org.apache.shiro.cache.ehcache.EhCacheManager.ensureCacheManager(EhCacheManager.java:212)
... 49 more
28-Dec-2017 14:45:29.283 SEVERE [qdkft.com-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.apache.shiro.web.env.EnvironmentLoaderListener
org.apache.shiro.config.ConfigurationException: Unable to set property 'cacheManager' with value [org.apache.shiro.cache.ehcache.EhCacheManager@689f8ef8] on object of type org.apache.shiro.web.mgt.DefaultWebSecurityManager. If 'org.apache.shiro.cache.ehcache.EhCacheManager@689f8ef8' is a reference to another (previously defined) object, prefix it with '$' to indicate that the referenced object should be used as the actual value. For example, $org.apache.shiro.cache.ehcache.EhCacheManager@689f8ef8
at org.apache.shiro.config.ReflectionBuilder.setProperty(ReflectionBuilder.java:501)
at org.apache.shiro.config.ReflectionBuilder.applyProperty(ReflectionBuilder.java:450)
at org.apache.shiro.config.ReflectionBuilder.applyProperty(ReflectionBuilder.java:562)
at org.apache.shiro.config.ReflectionBuilder.applySingleProperty(ReflectionBuilder.java:206)
at org.apache.shiro.config.ReflectionBuilder.applyProperty(ReflectionBuilder.java:167)
at org.apache.shiro.config.ReflectionBuilder.buildObjects(ReflectionBuilder.java:124)
at org.apache.shiro.config.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:161)
at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:124)
at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:102)
at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:88)
at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:46)
at org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:123)
at org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:47)
at org.apache.shiro.web.env.IniWebEnvironment.createWebSecurityManager(IniWebEnvironment.java:203)
at org.apache.shiro.web.env.IniWebEnvironment.configure(IniWebEnvironment.java:99)
at org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:92)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40)
at org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:221)
at org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:133)
at org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4754)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5216)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2170)
at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:2151)
at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1957)
at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:2064)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1017)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:456)
at org.apache.shiro.config.ReflectionBuilder.setProperty(ReflectionBuilder.java:493)
... 29 more
Caused by: org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: Disk store path can't be created: ehcache.disk.store.dir/nutzwk
at org.apache.shiro.cache.ehcache.EhCacheManager.ensureCacheManager(EhCacheManager.java:223)
at org.apache.shiro.cache.ehcache.EhCacheManager.getCache(EhCacheManager.java:155)
at org.apache.shiro.realm.AuthorizingRealm.getAuthorizationCacheLazy(AuthorizingRealm.java:245)
at org.apache.shiro.realm.AuthorizingRealm.getAvailableAuthorizationCache(AuthorizingRealm.java:260)
at org.apache.shiro.realm.AuthorizingRealm.afterCacheManagerSet(AuthorizingRealm.java:226)
at org.apache.shiro.realm.CachingRealm.setCacheManager(CachingRealm.java:96)
at org.apache.shiro.mgt.RealmSecurityManager.applyCacheManagerToRealms(RealmSecurityManager.java:115)
at org.apache.shiro.mgt.RealmSecurityManager.afterCacheManagerSet(RealmSecurityManager.java:127)
at org.apache.shiro.mgt.SessionsSecurityManager.afterCacheManagerSet(SessionsSecurityManager.java:103)
at org.apache.shiro.mgt.CachingSecurityManager.setCacheManager(CachingSecurityManager.java:72)
... 40 more
Caused by: net.sf.ehcache.CacheException: Disk store path can't be created: ehcache.disk.store.dir/nutzwk
at net.sf.ehcache.DiskStorePathManager.resolveAndLockIfNeeded(DiskStorePathManager.java:141)
at net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:262)
at net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:251)
at net.sf.ehcache.store.disk.DiskStorageFactory.(DiskStorageFactory.java:127)
at net.sf.ehcache.store.disk.DiskStore.create(DiskStore.java:154)
at net.sf.ehcache.store.disk.DiskStore.createCacheStore(DiskStore.java:182)
at net.sf.ehcache.Cache.initialise(Cache.java:1216)
at net.sf.ehcache.CacheManager.initializeEhcache(CacheManager.java:1357)
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1423)
at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:819)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:498)
at net.sf.ehcache.CacheManager.init(CacheManager.java:394)
at net.sf.ehcache.CacheManager.(CacheManager.java:355)
at org.apache.shiro.cache.ehcache.EhCacheManager.ensureCacheManager(EhCacheManager.java:212)
... 49 more

15 回复

服务器上也是tomcat吗? 本地跑的时候也是war吗?

是的,war包是在本地运行没有问题才上传到服务器上的

服务器上的tomcat版本也一样吗?

chmod 777 /项目路径
试试?

设置777权限也是一样的错误,tomcat7 、8、 9版本都试了还是没解决

ehcache.disk.store.dir/nutzwk 没加环境变量 "ehcache.disk.store.dir"

在tomcat的setenv.sh里面添加

JAVA_OPTS="-Dehcache.disk.store.dir=/opt/ehcache        其他jvm参数"

确保ehcache.disk.store.dir指向的目录存在且可访问,可以读写

tomcat的问题,我在官方下载的Tomcat没有问题,服务器上是宝塔自带的tomcat

版本号多少呢?

额,我说的是宝塔的版本号...

添加回复
请先登陆
回到顶部