Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-3688

"ant build" failes on JBoss EAP 6.2 installed via RPM package from Redhat repositories

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: EJBCA 6.2.0
    • Fix Version/s: EJBCA 6.2.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      RHEL 6.0
      JBoss EAP 6.2 installed via RPM from official yum repos
    • Issue discovered during:
      Community

      Description

      In the RPM package Redhat named some files differently and thus the include-directives in "modules/build-properties.xml" do not match.

      ZIP: /usr/share/jbossas/modules/system/layers/base/javax/persistence/api/main/hibernate-jpa-2.0-api-1.0.1.Final-redhat-2.jar
      RPM: /usr/share/jbossas/modules/system/layers/base/javax/persistence/api/main/hibernate-jpa-2.0-api.jar
      
      ZIP: /usr/share/jbossas/modules/system/layers/base/javax/transaction/api/main/jboss-transaction-api_1.1_spec-1.0.1.Final-redhat-2.jar
      RPM: /usr/share/jbossas/modules/system/layers/base/javax/transaction/api/main/jboss-transaction-api_1.1_spec.jar
      
      ZIP: /usr/share/jbossas/modules/system/layers/base/javax/interceptor/api/main/jboss-interceptors-api_1.1_spec-1.0.1.Final-redhat-2.jar
      RPM: /usr/share/jbossas/modules/system/layers/base/javax/interceptor/api/main/jboss-interceptors-api_1.1_spec.jar
      
      ZIP: /usr/share/jbossas/modules/system/layers/base/javax/resource/api/main/jboss-connector-api_1.6_spec-1.0.1.Final-redhat-2.jar
      RPM: /usr/share/jbossas/modules/system/layers/base/javax/resource/api/main/jboss-connector-api_1.6_spec.jar
      
      ZIP: /usr/share/jbossas/modules/system/layers/base/javax/servlet/api/main/jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar
      RPM: /usr/share/jbossas/modules/system/layers/base/javax/servlet/api/main/jboss-servlet-api_3.0_spec.jar
      
      ZIP: /usr/share/jbossas/modules/system/layers/base/javax/faces/api/main/jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar
      RPM: /usr/share/jbossas/modules/system/layers/base/javax/faces/api/main/jboss-jsf-api_2.1_spec.jar
      
      ZIP: /usr/share/jbossas/modules/system/layers/base/javax/el/api/main/jboss-el-api_2.2_spec-1.0.2.Final-redhat-1.jar
      RPM: /usr/share/jbossas/modules/system/layers/base/javax/el/api/main/jboss-el-api_2.2_spec.jar
      

      I've fixed this in module/build-properties.xml and created a patch.

      Please review it and include it in one of the next releases.

      The error I received when running "ant build" prior to fixing this was:

      compile-common-web:
          [mkdir] Created dir: /tmp/ejbca_ce/modules/ejbca-ejb/build-common-web
          [javac] Compiling 48 source files to /tmp/ejbca_ce/modules/ejbca-ejb/build-common-web
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/core/model/approval/approvalrequests/AddEndEntityApprovalRequest.java:23: error: package javax.persistence does not exist
          [javac] import javax.persistence.PersistenceException;
          [javac]                         ^
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:39: error: package javax.servlet does not exist
          [javac] import javax.servlet.ServletContext;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:40: error: package javax.servlet does not exist
          [javac] import javax.servlet.ServletOutputStream;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:41: error: package javax.servlet.http does not exist
          [javac] import javax.servlet.http.HttpServletRequest;
          [javac]                          ^
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:42: error: package javax.servlet.http does not exist
          [javac] import javax.servlet.http.HttpServletResponse;
          [javac]                          ^
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/pub/ServletDebug.java:23: error: package javax.servlet does not exist
          [javac] import javax.servlet.ServletException;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/pub/ServletDebug.java:24: error: package javax.servlet.http does not exist
          [javac] import javax.servlet.http.HttpServletRequest;
          [javac]                          ^
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/pub/ServletDebug.java:25: error: package javax.servlet.http does not exist
          [javac] import javax.servlet.http.HttpServletResponse;
          [javac]                          ^
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:358: error: cannot find symbol
          [javac]     public static void sendNewCertToIidClient(byte[] certificate, HttpServletRequest request, OutputStream out, ServletContext sc,
          [javac]                                                                   ^
          [javac]   symbol:   class HttpServletRequest
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:358: error: cannot find symbol
          [javac]     public static void sendNewCertToIidClient(byte[] certificate, HttpServletRequest request, OutputStream out, ServletContext sc,
          [javac]                                                                                                                 ^
          [javac]   symbol:   class ServletContext
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:422: error: cannot find symbol
          [javac]     public static void sendNewCertToIEClient(byte[] b64cert, OutputStream out, ServletContext sc,
          [javac]                                                                                ^
          [javac]   symbol:   class ServletContext
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:475: error: cannot find symbol
          [javac]     public static void sendNewCertToNSClient(byte[] certs, HttpServletResponse out)
          [javac]                                                            ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:507: error: cannot find symbol
          [javac]     public static void sendNewB64File(byte[] b64cert, HttpServletResponse out, String filename, String beginKey, String endKey) 
          [javac]                                                       ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:543: error: cannot find symbol
          [javac]     public static void sendNewB64Cert(byte[] b64cert, HttpServletResponse out, String beginKey, String endKey)
          [javac]                                                       ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:556: error: cannot find symbol
          [javac]     public static void sendNewX509CaCert(byte[] cert, HttpServletResponse out)
          [javac]                                                       ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:572: error: cannot find symbol
          [javac]     public static void sendBinaryBytes(final byte[] bytes, final HttpServletResponse out, final String contentType, final String filename)
          [javac]                                                                  ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:608: error: cannot find symbol
          [javac]     public static void sendResultPage(byte[] certbytes, HttpServletResponse out, boolean hidemenu, CertificateResponseType resulttype) throws Exception {
          [javac]                                                         ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:625: error: cannot find symbol
          [javac]     public static void sendResultPage(byte[] certbytes, HttpServletResponse out, boolean hidemenu, String installToBrowser) throws Exception {
          [javac]                                                         ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:642: error: cannot find symbol
          [javac]     public static void setDefaultCharacterEncoding(HttpServletRequest request) throws UnsupportedEncodingException {
          [javac]                                                    ^
          [javac]   symbol:   class HttpServletRequest
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/pub/ServletDebug.java:37: error: cannot find symbol
          [javac]     private final HttpServletRequest request;
          [javac]                   ^
          [javac]   symbol:   class HttpServletRequest
          [javac]   location: class ServletDebug
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/pub/ServletDebug.java:38: error: cannot find symbol
          [javac]     private final HttpServletResponse response;
          [javac]                   ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class ServletDebug
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/pub/ServletDebug.java:40: error: cannot find symbol
          [javac]     public ServletDebug(HttpServletRequest request, HttpServletResponse response) {
          [javac]                         ^
          [javac]   symbol:   class HttpServletRequest
          [javac]   location: class ServletDebug
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/pub/ServletDebug.java:40: error: cannot find symbol
          [javac]     public ServletDebug(HttpServletRequest request, HttpServletResponse response) {
          [javac]                                                     ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class ServletDebug
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/pub/ServletDebug.java:47: error: cannot find symbol
          [javac]     public void printDebugInfo() throws IOException, ServletException {
          [javac]                                                      ^
          [javac]   symbol:   class ServletException
          [javac]   location: class ServletDebug
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:12: error: package javax.servlet does not exist
          [javac] import javax.servlet.Filter;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:13: error: package javax.servlet does not exist
          [javac] import javax.servlet.FilterChain;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:14: error: package javax.servlet does not exist
          [javac] import javax.servlet.FilterConfig;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:15: error: package javax.servlet does not exist
          [javac] import javax.servlet.ServletException;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:16: error: package javax.servlet does not exist
          [javac] import javax.servlet.ServletRequest;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:17: error: package javax.servlet does not exist
          [javac] import javax.servlet.ServletResponse;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:18: error: package javax.servlet.http does not exist
          [javac] import javax.servlet.http.HttpServletResponse;
          [javac]                          ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:23: error: cannot find symbol
          [javac] public class ClickjackFilter implements Filter 
          [javac]                                         ^
          [javac]   symbol: class Filter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:33: error: cannot find symbol
          [javac] 	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
          [javac] 	                     ^
          [javac]   symbol:   class ServletRequest
          [javac]   location: class ClickjackFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:33: error: cannot find symbol
          [javac] 	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
          [javac] 	                                             ^
          [javac]   symbol:   class ServletResponse
          [javac]   location: class ClickjackFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:33: error: cannot find symbol
          [javac] 	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
          [javac] 	                                                                       ^
          [javac]   symbol:   class FilterChain
          [javac]   location: class ClickjackFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:33: error: cannot find symbol
          [javac] 	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
          [javac] 	                                                                                                              ^
          [javac]   symbol:   class ServletException
          [javac]   location: class ClickjackFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:43: error: cannot find symbol
          [javac] 	public void init(FilterConfig filterConfig) {
          [javac] 	                 ^
          [javac]   symbol:   class FilterConfig
          [javac]   location: class ClickjackFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:12: error: package javax.servlet does not exist
          [javac] import javax.servlet.Filter;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:13: error: package javax.servlet does not exist
          [javac] import javax.servlet.FilterChain;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:14: error: package javax.servlet does not exist
          [javac] import javax.servlet.FilterConfig;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:15: error: package javax.servlet does not exist
          [javac] import javax.servlet.ServletException;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:16: error: package javax.servlet does not exist
          [javac] import javax.servlet.ServletRequest;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:17: error: package javax.servlet does not exist
          [javac] import javax.servlet.ServletResponse;
          [javac]                     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:18: error: package javax.servlet.http does not exist
          [javac] import javax.servlet.http.HttpServletResponse;
          [javac]                          ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:33: error: cannot find symbol
          [javac] public class ContentSecurityPolicyFilter implements Filter {
          [javac]                                                     ^
          [javac]   symbol: class Filter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:56: error: cannot find symbol
          [javac]     public void init(FilterConfig filterConfig) throws ServletException {
          [javac]                      ^
          [javac]   symbol:   class FilterConfig
          [javac]   location: class ContentSecurityPolicyFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:56: error: cannot find symbol
          [javac]     public void init(FilterConfig filterConfig) throws ServletException {
          [javac]                                                        ^
          [javac]   symbol:   class ServletException
          [javac]   location: class ContentSecurityPolicyFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:130: error: cannot find symbol
          [javac]     public void doFilter(ServletRequest request, ServletResponse response, FilterChain fchain) throws IOException, ServletException {
          [javac]                          ^
          [javac]   symbol:   class ServletRequest
          [javac]   location: class ContentSecurityPolicyFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:130: error: cannot find symbol
          [javac]     public void doFilter(ServletRequest request, ServletResponse response, FilterChain fchain) throws IOException, ServletException {
          [javac]                                                  ^
          [javac]   symbol:   class ServletResponse
          [javac]   location: class ContentSecurityPolicyFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:130: error: cannot find symbol
          [javac]     public void doFilter(ServletRequest request, ServletResponse response, FilterChain fchain) throws IOException, ServletException {
          [javac]                                                                            ^
          [javac]   symbol:   class FilterChain
          [javac]   location: class ContentSecurityPolicyFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:130: error: cannot find symbol
          [javac]     public void doFilter(ServletRequest request, ServletResponse response, FilterChain fchain) throws IOException, ServletException {
          [javac]                                                                                                                    ^
          [javac]   symbol:   class ServletException
          [javac]   location: class ContentSecurityPolicyFilter
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/pub/ServletUtils.java:3: error: package javax.servlet.http does not exist
          [javac] import javax.servlet.http.HttpServletResponse;
          [javac]                          ^
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/pub/ServletUtils.java:24: error: cannot find symbol
          [javac]     public static void removeCacheHeaders(final HttpServletResponse res) {
          [javac]                                                 ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class ServletUtils
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/pub/ServletUtils.java:43: error: cannot find symbol
          [javac]     public static void addCacheHeaders(final HttpServletResponse res) {
          [javac]                                              ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class ServletUtils
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/core/model/approval/approvalrequests/AddEndEntityApprovalRequest.java:94: error: cannot find symbol
          [javac] 		} catch (PersistenceException e) {
          [javac] 		         ^
          [javac]   symbol:   class PersistenceException
          [javac]   location: class AddEndEntityApprovalRequest
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:524: error: cannot find symbol
          [javac]         ServletOutputStream os = out.getOutputStream();
          [javac]         ^
          [javac]   symbol:   class ServletOutputStream
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/ejbca/ui/web/RequestHelper.java:590: error: cannot find symbol
          [javac]         final ServletOutputStream os = out.getOutputStream();
          [javac]               ^
          [javac]   symbol:   class ServletOutputStream
          [javac]   location: class RequestHelper
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:35: error: cannot find symbol
          [javac]         HttpServletResponse res = (HttpServletResponse)response;
          [javac]         ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class ClickjackFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ClickjackFilter.java:35: error: cannot find symbol
          [javac]         HttpServletResponse res = (HttpServletResponse)response;
          [javac]                                    ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class ClickjackFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:55: error: method does not override or implement a method from a supertype
          [javac]     @Override
          [javac]     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:132: error: cannot find symbol
          [javac]         HttpServletResponse httpResponse = ((HttpServletResponse) response);
          [javac]         ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class ContentSecurityPolicyFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:132: error: cannot find symbol
          [javac]         HttpServletResponse httpResponse = ((HttpServletResponse) response);
          [javac]                                              ^
          [javac]   symbol:   class HttpServletResponse
          [javac]   location: class ContentSecurityPolicyFilter
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:129: error: method does not override or implement a method from a supertype
          [javac]     @Override
          [javac]     ^
          [javac] /tmp/ejbca_ce/src/java/org/owasp/filters/ContentSecurityPolicyFilter.java:206: error: method does not override or implement a method from a supertype
          [javac]     @Override
          [javac]     ^
          [javac] Note: Some input files use or override a deprecated API.
          [javac] Note: Recompile with -Xlint:deprecation for details.
          [javac] 64 errors
      
      BUILD FAILED
      /tmp/ejbca_ce/build.xml:965: The following error occurred while executing this line:
      /tmp/ejbca_ce/modules/build.xml:278: The following error occurred while executing this line:
      /tmp/ejbca_ce/modules/ejbca-ejb/build.xml:542: Compile failed; see the compiler error output for details.
      

      I hope I didn't miss any files, but "ant build" is running fine now.
      If I could provide any further information to help you, please let me know.

        Attachments

          Activity

            People

            Assignee:
            tomas Tomas Gustavsson
            Reporter:
            micpos Michael Postmann
            Verified by:
            Tomas Gustavsson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: