MCms环境配置常见问题
楼主: 铭飞科技 2015-10-23 22:43:35 41709 31
1、包有错误且中文是乱码
解决方式:项目右键属性窗口,配置项目编码格式为UTF-8
2、包提示有错误
解决方式:项目右键属性窗口,检查jdk的环境与版本,MCms需要JDK7版本或以上版本。以下是Eclipse3处可配置版本的方式,都需要逐个进行检查。
这里的Dynamic Web Module 需要切换至3.0
3、切换Dynamic Web Module 版本提示错误
这时需要手动进行修改配置,切换到文件夹导航模式,修改截图对应的xml文件里面的版本号为3.0
4、提示下图错误信息
解决方式:手动创建test的目录,如果有疑问可以参考maven的项目结构。
5、如果提示JRE相关错误信息,检查Eclipse的Jdk配置参数。
解决方式:具体看截图操作
6、如果启动报异常,具体异常如下
[2016-03-16 16:53:48,718] localhost-startStop-1 org.mybatis.spring.mapper.ClassPathMapperScanner WARN - No MyBatis mapper was found in '[com.mingsoft.*.dao]' package. Please check your configuration.
[2016-03-16 16:53:49,375] localhost-startStop-1 org.springframework.web.context.ContextLoader ERROR - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseAuthFilter' defined in class path resource [spring-shiro.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1': Cannot resolve reference to bean 'druid-stat-pointcut' while setting bean property 'pointcut'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'druid-stat-pointcut' defined in class path resource [spring-mybatis.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#0' defined in class path resource [spring-shiro.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [spring-shiro.xml]: Cannot resolve reference to bean 'baseAuthRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.mingsoft.basic.security.BaseAuthRealm] for bean with name 'baseAuthRealm' defined in class path resource [spring-shiro.xml]; nested exception is java.lang.ClassNotFoundException: com.mingsoft.basic.security.BaseAuthRealm
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.mingsoft.basic.security.BaseAuthRealm] for bean with name 'baseAuthRealm' defined in class path resource [spring-shiro.xml]; nested exception is java.lang.ClassNotFoundException: com.mingsoft.basic.security.BaseAuthRealm
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.mingsoft.basic.security.BaseAuthRealm] for bean with name 'baseAuthRealm' defined in class path resource [spring-shiro.xml]; nested exception is java.lang.ClassNotFoundException: com.mingsoft.basic.security.BaseAuthRealm
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:471)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
...........
或
解决方式:清理一下项目重新编译一下,如果还不能解决请参考第2点与第3点
7、首页(前端)界面样式混乱或无法打开
解决方式:登录后台进行页面生成操作就可以修复。
8、文章访问不了或没有生成成功
解决方式:需要在生成文章时,选择生成文章时间,起始时间要选择靠前一点,比如文章时在2015年08月1日创建的,那么生成的时候时间需要选择在2015年08月1日前。
9、页面有部分乱码,如下截图
解决方式:需要更改tomcat/conf/server.xml文件的Connector节点(端口配置的Connector节点)增加URIEncoding="UTF-8",
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" />
10、出现提示信息“站点不存在”错误,
解决方式:重命名src/main/webapp/WEB-INF下面的ms.install.bak文件为ms.install,去掉.bak即可。
11、出现数据库表不存在的错误提示,可能是由于Mysql的区分大小写导致
尝试解决方式:在my.cnf的 [mysqld] 下增加一行 lower_case_table_names=1
12、Caused by: java.lang.ClassCastException: Cannot cast org.springframework.web.SpringServletContainerInitializer to javax.servlet.ServletContainerInitializer
解决方式:参考第2与第3点,基本都是版本的问题导致。
13、出现提示错误信息 “系统配置错误!详细看论坛常见问题贴:点击查看”,
可能是因为项目部署的地址变动导致
解决方式:如果项目下面存在/src/main/webapp/WEB-INF/ms.install.bak文件,将文件重命名为ms.install
14、生成栏目,生成文章点击更新,一直出于更新中
错误原因:标签使用错误所以才会出现这种情况
15、生成主页时,选择主页模板出现“暂未文件”
解决方式:去系统设置--->应用设置里面重新保存一下,再去刷新一下生成主页界面即可。
16、当系统中“文章管理”与“静态化”出现404的情况,其他功能正常
解决方式:这个可能是由于后台代码没有编译到,需要重新去编译成功,再启动(编译之后同步到tomcat,建议先去tomcat里面看下一是否同步成功)