当前访客身份:游客 [ 登录 | 加入开源中国 ]

问答

当前位置:
问答 » 技术问答 » PublicCMS

开程序员的淘宝店!寻找开源技术服务伙伴!>>> »  

请问 

将publiccms-by-maven 部署到myeclipse以后

右键工程properties  -> MyEclipse -> Web   

想把工程 Web Context-root 改成 "/"

以前这么改了以后  工程会被自动部署到 tomcat webApps ROOT中

现在这么改就报错为什么?

无敌小学僧 无敌小学僧
发帖于 1个月前
4回/166阅

按票数排序  显示最新回答   共有4个回答 (最后回答: 1个月前 )

    0
  • kerneler
    报什么错呢 这样部署是没问题的 它跟其他web工程没什么区别
    评论(0)| 引用此答案| 举报 (2016-12-14 20:19)
  • 0
  • 无敌小学僧

    启动的时候满屏幕都是这些 大概是spring 注入bean时候出错了吧

    Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'templateComponent': Unsatisfied dependency expressed through method 'setFreeMarkerConfigurer' parameter 1: Error creating bean with name 'publishPageDirective': Unsatisfied dependency expressed through field 'fileComponent': Error creating bean with name 'fileComponent' defined in file [D:\apache-tomcat-7.0.40\webapps\ROOT\WEB-INF\classes\com\publiccms\logic\component\FileComponent.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.publiccms.logic.component.FileComponent]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:

        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        DirectoryStream cannot be resolved to a type
        Path cannot be resolved to a type
        Files cannot be resolved
        Paths cannot be resolved
        Path cannot be resolved to a type
        Path cannot be resolved to a type
        BasicFileAttributes cannot be resolved to a type
        Files cannot be resolved
        BasicFileAttributes cannot be resolved to a type
        BasicFileAttributes cannot be resolved to a type
    ; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileComponent' defined in file [D:\apache-tomcat-7.0.40\webapps\ROOT\WEB-INF\classes\com\publiccms\logic\component\FileComponent.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.publiccms.logic.component.FileComponent]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        DirectoryStream cannot be resolved to a type
        Path cannot be resolved to a type
        Files cannot be resolved
        Paths cannot be resolved
        Path cannot be resolved to a type
        Path cannot be resolved to a type
        BasicFileAttributes cannot be resolved to a type
        Files cannot be resolved
        BasicFileAttributes cannot be resolved to a type
        BasicFileAttr
    ibutes cannot be resolved to a type
    ; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'publishPageDirective': Unsatisfied dependency expressed through field 'fileComponent': Error creating bean with name 'fileComponent' defined in file [D:\apache-tomcat-7.0.40\webapps\ROOT\WEB-INF\classes\com\publiccms\logic\component\FileComponent.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.publiccms.logic.component.FileComponent]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        DirectoryStream cannot be resolved to a type
        Path cannot be resolved to a type
        Files cannot be resolved
        Paths cannot be resolved
        Path cannot be resolved to a type
        Path cannot be resolved to a type
        BasicFileAttributes cannot be resolved to a type
        Files cannot be resolved
        BasicFileAttributes cannot be resolved to a type
        BasicFileAttributes cannot be resolved to a type
    ; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileComponent' defined in file [D:\apache-tomcat-7.0.40\webapps\ROOT\WEB-INF\classes\com\publiccms\logic\component\FileComponent.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.publiccms.logic.component.FileComponent]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        The import java.nio.file cannot be resolved
        DirectoryStream cannot be resolved to a type
        Path cannot be resolved to a type
        Files cannot be resolved
        Paths cannot be resolved
        Path cannot be resolved to a type
        Path cannot be resolved to a type
        BasicFileAttributes cannot be resolved to a type
        Files cannot be resolved
        BasicFileAttributes cannot be resolved to a type

        BasicFileAttributes cannot be resolved to a type
    我就简短复制一些。

    评论(0)| 引用此答案| 举报 (2016-12-15 10:36)
  • 0
  • 秋痕
    我猜测 你的项目有飘红的地方吧 编译貌似没过啊
    --- 共有 2 条评论 ---
    • 无敌小学僧 好了 好了 是我弄错了 才发现JRE版本是1.6的 换成1.7的瞬间解决!! (1个月前)   回复
    • 无敌小学僧 是的,是有飘红的地方。。。 主要是java.nio.file这个包找不到, 但是我如果不更改Web Context-root 为"/" 而是使用默认的"/cms" 程序就不会报错一切正常。。。 (1个月前)   回复
    评论(2)| 引用此答案| 举报 (2016-12-15 11:13)
  • 0
  • 无敌小学僧
    谢谢  秋痕  kerneler  问题解决!
    评论(0)| 引用此答案| 举报 (2016-12-15 11:29)
最新热门职位
更多开发者职位上 开源中国·招聘


回答案顶部 | 回页面顶部