javaweb项目演示编译报错,如何解决?

宿命panthers 发布于 2015/04/06 16:02
阅读 751
收藏 0

springmvc项目,本地运行没问题,在osc上项目演示就不行,看了日志编译报错如下:

  1. NFO] --- maven-resources-plugin:2.6:resources (default-resources) @ zpxmaven ---

  2. WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

  3. INFO] Copying 3 resources

  4. INFO]

  5. INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ zpxmaven ---

  6. INFO] Changes detected - recompiling the module!

  7. WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!

  8. INFO] Compiling 17 source files to /var/vcap/store/fss_backend1/0a97950a-a3dd-4c4b-aa17-e008dd45bab0/9b056079-65cb-4a23-bacb-4d8f5ffd7ff3/haoduolang/management-system/zpxmaven/target/classes

  9. INFO] -------------------------------------------------------------

  10. ERROR] COMPILATION ERROR :

  11. INFO] -------------------------------------------------------------

  12. ERROR] /var/vcap/store/fss_backend1/0a97950a-a3dd-4c4b-aa17-e008dd45bab0/9b056079-65cb-4a23-bacb-4d8f5ffd7ff3/haoduolang/management-system/zpxmaven/src/main/java/zpx/model/ComAttachment.java:[13,47] cannot find symbolnsymbol : class Statusnlocation: package com.sun.org.apache.xerces.internal.util

  13. ERROR] /var/vcap/store/fss_backend1/0a97950a-a3dd-4c4b-aa17-e008dd45bab0/9b056079-65cb-4a23-bacb-4d8f5ffd7ff3/haoduolang/management-system/zpxmaven/src/main/java/zpx/model/FtpAttachment.java:[13,47] cannot find symbolnsymbol : class Statusnlocation: package com.sun.org.apache.xerces.internal.util

  14. INFO] 2 errors

本人是新手,刚学maven,忘各位大神给指一条明路

加载中
0
粉色乃团团
粉色乃团团
<plugin>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>2.3.2</version>
      <configuration>
        <source>1.7</source>
        <target>1.7</target>
        <encoding>UTF-8</encoding>
      </configuration>
</plugin>

source和target指定为你项目用的jdk版本


宿命panthers
宿命panthers
回复 @Shawock : 各种404。。。明天再搞吧,谢谢你的耐心回复哈
粉色乃团团
粉色乃团团
回复 @宿命panthers : 说明项目war包没有上去呗
粉色乃团团
粉色乃团团
回复 @宿命panthers : 求分享地址。。
宿命panthers
宿命panthers
@Shawock 嗯。。就是oschina的项目演示那个平台
下一页
0
JacarriChan
JacarriChan
莫非使用了SUN专用的API?
JacarriChan
JacarriChan
回复 @宿命panthers : 因为出现了这个【package com.sun.org.apache.xerces.internal.util】 所以有那个推测
宿命panthers
宿命panthers
没有吧。。。
0
宿命panthers
宿命panthers
问题解决了,最初原因是引用了jdk废弃的包,后来404报错是因为项目中hibernate3,而maven中我没有找到hibernate3在pom.xml中的配置,本地的话可以自己向本地仓库导入jar包,但在oschina我就没办法了,只能改用hibernate4了,hibernate3和4使用配置有少许的不同,有该问题的搜下很容易就找到了
返回顶部
顶部