帮助解决此问题:
由用户管道启动 远程建立jenkins-build-slave-bcd9bff503a8(。* Build)在工作区/ home / jenkins / workspace / ec1f37e9-e252-47eb-9f23-6285014fbac4 / 109c3733-91e9-432d-ba60-8cecffb912ff 克隆远程Git存储库 克隆存储库https://hub.jazz.net/git/sharathsamala/WordGuess 从https://hub.jazz.net/git/sharathsamala/WordGuess获取上游更改 使用.gitcredentials设置凭据 检查修订版ae1032552805c3acb45ec3693a505ad272db4356(已分离) 第一次建立。跳过更改日志。 [109c3733-91e9-432d-ba60-8cecffb912ff] $ / bin / bash /tmp/hudson2450631085921349728.sh 构建文件:/home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/build.xml
clean:
[delete] Deleting directory /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/bin
init:
[mkdir] Created dir: /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/bin
build-project:
[echo] WebStarterApp: /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/build.xml
[javac] Compiling 8 source files to /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/bin
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadGame.java:4: error: package javax.servlet does not exist
[javac] import javax.servlet.ServletException;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadGame.java:5: error: package javax.servlet.annotation does not exist
[javac] import javax.servlet.annotation.WebServlet;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadGame.java:6: error: package javax.servlet.http does not exist
[javac] import javax.servlet.http.HttpServlet;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadGame.java:7: error: package javax.servlet.http does not exist
[javac] import javax.servlet.http.HttpServletRequest;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadGame.java:8: error: package javax.servlet.http does not exist
[javac] import javax.servlet.http.HttpServletResponse;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadGame.java:17: error: cannot find symbol
[javac] public class LoadGame extends HttpServlet {
[javac] ^
[javac] symbol: class HttpServlet
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadGame.java:16: error: cannot find symbol
[javac] @WebServlet("/LoadGame")
[javac] ^
[javac] symbol: class WebServlet
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadGame.java:31: error: cannot find symbol
[javac] protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
[javac] ^
[javac] symbol: class HttpServletRequest
[javac] location: class LoadGame
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadGame.java:31: error: cannot find symbol
[javac] protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
[javac] ^
[javac] symbol: class HttpServletResponse
[javac] location: class LoadGame
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadGame.java:31: error: cannot find symbol
[javac] protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
[javac] ^
[javac] symbol: class ServletException
[javac] location: class LoadGame
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadIndex.java:6: error: package javax.servlet does not exist
[javac] import javax.servlet.ServletException;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadIndex.java:7: error: package javax.servlet.annotation does not exist
[javac] import javax.servlet.annotation.WebServlet;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadIndex.java:8: error: package javax.servlet.http does not exist
[javac] import javax.servlet.http.HttpServlet;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadIndex.java:9: error: package javax.servlet.http does not exist
[javac] import javax.servlet.http.HttpServletRequest;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadIndex.java:10: error: package javax.servlet.http does not exist
[javac] import javax.servlet.http.HttpServletResponse;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadIndex.java:19: error: cannot find symbol
[javac] public class LoadIndex extends HttpServlet {
[javac] ^
[javac] symbol: class HttpServlet
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadIndex.java:18: error: cannot find symbol
[javac] @WebServlet("/LoadIndex")
[javac] ^
[javac] symbol: class WebServlet
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadIndex.java:33: error: cannot find symbol
[javac] protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
[javac] ^
[javac] symbol: class HttpServletRequest
[javac] location: class LoadIndex
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadIndex.java:33: error: cannot find symbol
[javac] protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
[javac] ^
[javac] symbol: class HttpServletResponse
[javac] location: class LoadIndex
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/controller/LoadIndex.java:33: error: cannot find symbol
[javac] protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
[javac] ^
[javac] symbol: class ServletException
[javac] location: class LoadIndex
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/data/CloudantConnection.java:7: error: package org.apache.wink.json4j does not exist
[javac] import org.apache.wink.json4j.JSONArray;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/data/CloudantConnection.java:8: error: package org.apache.wink.json4j does not exist
[javac] import org.apache.wink.json4j.JSONObject;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/model/Category.java:3: error: package com.fasterxml.jackson.annotation does not exist
[javac] import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/model/Category.java:4: error: package com.fasterxml.jackson.annotation does not exist
[javac] import com.fasterxml.jackson.annotation.JsonProperty;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/model/Category.java:6: error: cannot find symbol
[javac] @JsonIgnoreProperties({"id", "revision"})
[javac] ^
[javac] symbol: class JsonIgnoreProperties
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/model/Word.java:3: error: package com.fasterxml.jackson.annotation does not exist
[javac] import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/model/Word.java:4: error: package com.fasterxml.jackson.annotation does not exist
[javac] import com.fasterxml.jackson.annotation.JsonProperty;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/model/Word.java:6: error: cannot find symbol
[javac] @JsonIgnoreProperties({"id", "revision"})
[javac] ^
[javac] symbol: class JsonIgnoreProperties
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/ibm/cloudoe/samples/HelloResource.java:3: error: package javax.ws.rs does not exist
[javac] import javax.ws.rs.GET;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/ibm/cloudoe/samples/HelloResource.java:4: error: package javax.ws.rs does not exist
[javac] import javax.ws.rs.Path;
[javac] ^
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/ibm/cloudoe/samples/HelloResource.java:7: error: cannot find symbol
[javac] @Path("/hello")
[javac] ^
[javac] symbol: class Path
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/model/Category.java:9: error: cannot find symbol
[javac] @JsonProperty("_id")
[javac] ^
[javac] symbol: class JsonProperty
[javac] location: class Category
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/model/Category.java:12: error: cannot find symbol
[javac] @JsonProperty("_rev")
[javac] ^
[javac] symbol: class JsonProperty
[javac] location: class Category
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/model/Word.java:9: error: cannot find symbol
[javac] @JsonProperty("_id")
[javac] ^
[javac] symbol: class JsonProperty
[javac] location: class Word
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/model/Word.java:12: error: cannot find symbol
[javac] @JsonProperty("_rev")
[javac] ^
[javac] symbol: class JsonProperty
[javac] location: class Word
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/ibm/cloudoe/samples/HelloResource.java:10: error: cannot find symbol
[javac] @GET
[javac] ^
[javac] symbol: class GET
[javac] location: class HelloResource
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/data/CloudantConnection.java:27: error: cannot find symbol
[javac] JSONObject obj = new JSONObject(System.getenv("VCAP_SERVICES"));
[javac] ^
[javac] symbol: class JSONObject
[javac] location: class CloudantConnection
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/data/CloudantConnection.java:27: error: cannot find symbol
[javac] JSONObject obj = new JSONObject(System.getenv("VCAP_SERVICES"));
[javac] ^
[javac] symbol: class JSONObject
[javac] location: class CloudantConnection
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/data/CloudantConnection.java:28: error: cannot find symbol
[javac] String******** names = JSONObject.getNames(obj);
[javac] ^
[javac] symbol: variable JSONObject
[javac] location: class CloudantConnection
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/data/CloudantConnection.java:33: error: cannot find symbol
[javac] JSONArray val = obj.getJSONArray(name);
[javac] ^
[javac] symbol: class JSONArray
[javac] location: class CloudantConnection
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/data/CloudantConnection.java:34: error: cannot find symbol
[javac] JSONObject serviceAttr = val.getJSONObject(0);
[javac] ^
[javac] symbol: class JSONObject
[javac] location: class CloudantConnection
[javac] /home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/src/com/bluemix/hangman/data/CloudantConnection.java:35: error: cannot find symbol
[javac] JSONObject credentials = serviceAttr.getJSONObject("credentials");
[javac] ^
[javac] symbol: class JSONObject
[javac] location: class CloudantConnection
[javac] 42 errors
[javac] 1 warning
BUILD FAILED
/home/jenkins/workspace/ec1f37e9-e252-47eb-9f23-6285014fbac4/109c3733-91e9-432d-ba60-8cecffb912ff/build.xml:24: Compile failed; see the compiler error output for details.
Total time: 1 second
Build step 'Execute shell' marked build as failure
Finished: FAILURE
答案 0 :(得分:1)
您在构建路径中缺少jar。看一下Java DB Web Starter示例代码。在dep-jar
和WebContent/WEB-INF/lib
文件夹中查找jar文件。然后将jar文件添加到build.xml
<path id="classpathDir">
<pathelement location="bin"/>
<pathelement location="WebContent/WEB-INF/lib/db2jcc.jar"/>
<pathelement location="WebContent/WEB-INF/lib/nosqljson.jar"/>
<fileset dir="dep-jar">
<include name="*.jar"/>
</fileset>
</path>
dep-jar
文件夹中的jar文件未打包在最终的war文件中。