Bug 1163164 - [F21] ovirt-engine-reports fails to build on Fedora 21
Summary: [F21] ovirt-engine-reports fails to build on Fedora 21
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-reports
Classification: Retired
Component: General
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Shirly Radco
QA Contact: Lukas Svaty
URL: http://jenkins.ovirt.org/view/Publish...
Whiteboard: integration
Depends On:
Blocks: oVirt_Fedora_21_Support 1172045
TreeView+ depends on / blocked
 
Reported: 2014-11-12 12:55 UTC by Sandro Bonazzola
Modified: 2016-02-02 16:22 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1172045 (view as bug list)
Environment:
Last Closed: 2016-02-02 16:22:30 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-3.6.0+
ylavi: planning_ack+
rule-engine: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 35882 0 master MERGED build: fix fedora 21 build Never
oVirt gerrit 36000 0 ovirt-engine-reports-3.5 ABANDONED build: fix fedora 21 build Never

Description Sandro Bonazzola 2014-11-12 12:55:52 UTC
Buildfile: /builddir/build/BUILD/ovirt-reports/build.xml
 detect.jasper:
     [echo] jasper home: /usr/share/jasperreports-server
     [echo] jasper lib: /usr/share/jasperreports-server/buildomatic/conf_source/ieCe/lib
 dependencies:
 all:
 jars:
     [echo] ChartsCustomizers
 all:
    [mkdir] Created dir: /builddir/build/BUILD/ovirt-reports/ovirt-engine-reports/ChartsCustomizers/target
    [mkdir] Created dir: /builddir/build/BUILD/ovirt-reports/lib
    [javac] Compiling 20 source files to /builddir/build/BUILD/ovirt-reports/ovirt-engine-reports/ChartsCustomizers/target
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
    [javac] 1 warning
      [jar] Building jar: /builddir/build/BUILD/ovirt-reports/lib/ChartsCustomizers.jar
     [echo] CustomOvirtReportsQueryManipulator
 all:
    [mkdir] Created dir: /builddir/build/BUILD/ovirt-reports/ovirt-engine-reports/CustomOvirtReportsQueryManipulator/target
    [javac] Compiling 1 source file to /builddir/build/BUILD/ovirt-reports/ovirt-engine-reports/CustomOvirtReportsQueryManipulator/target
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
    [javac] 1 warning
      [jar] Building jar: /builddir/build/BUILD/ovirt-reports/lib/CustomOvirtReportsQueryManipulator.jar
     [echo] EngineAuthentication
 all:
    [mkdir] Created dir: /builddir/build/BUILD/ovirt-reports/ovirt-engine-reports/EngineAuthentication/target
    [javac] Compiling 2 source files to /builddir/build/BUILD/ovirt-reports/ovirt-engine-reports/EngineAuthentication/target
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
    [javac] /builddir/build/BUILD/ovirt-reports/ovirt-engine-reports/EngineAuthentication/src/main/java/org/ovirt/authentication/EngineSimplePreAuthFilter.java:164: error: cannot access User
    [javac]                 UsernamePasswordAuthenticationToken originalAuthentication = (UsernamePasswordAuthenticationToken) metadataUserDetails.getOriginalAuthentication();
    [javac]                                                                                                                                       ^
    [javac]   class file for com.jaspersoft.jasperserver.api.metadata.user.domain.User not found
    [javac] 1 error
    [javac] 1 warning
 BUILD FAILED
 /builddir/build/BUILD/ovirt-reports/build.xml:36: The following error occurred while executing this line:
 /builddir/build/BUILD/ovirt-reports/build.xml:54: The following error occurred while executing this line:
 /builddir/build/BUILD/ovirt-reports/ovirt-engine-reports/EngineAuthentication/build.xml:29: Compile failed; see the compiler error output for details.
 Total time: 2 seconds
 Makefile:135: recipe for target 'tmp.built' failed
 make: *** [tmp.built] Error 1
 RPM build errors:
 error: Bad exit status from /var/tmp/rpm-tmp.r5y8kF (%build)
    Bad exit status from /var/tmp/rpm-tmp.r5y8kF (%build)
 Child return code was: 1
 EXCEPTION: Command failed. See logs for output.
  # ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps  builddir/build/SPECS/ovirt-engine-reports.spec']
 Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 378, in do
    raise mockbuild.exception.Error, ("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
 Error: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps  builddir/build/SPECS/ovirt-engine-reports.spec']
 LEAVE do --> EXCEPTION RAISED

Comment 1 Sandro Bonazzola 2014-12-04 14:59:05 UTC
ant -verbose shows:

    [javac] Compiling 2 source files to /root/ovirt-reports/ovirt-engine-reports/EngineAuthentication/target
    [javac] Using modern compiler
    [javac] Compilation arguments:
    [javac] '-d'
    [javac] '/root/ovirt-reports/ovirt-engine-reports/EngineAuthentication/target'
    [javac] '-classpath'
    [javac] '/root/ovirt-reports/ovirt-engine-reports/EngineAuthentication/target:/usr/share/jasperreports-server/buildomatic/conf_source/ieCe/lib/commons-logging-1.0.4.jar:/usr/share/jasperreports-server/buildomatic/conf_source/ieCe/lib/commons-logging-api-1.1.jar:/usr/share/jasperreports-server/buildomatic/conf_source/ieCe/lib/jasperserver-api-metadata-impl-5.5.0.jar:/usr/share/jasperreports-server/buildomatic/conf_source/ieCe/lib/servlet-api-2.4.jar:/usr/share/jasperreports-server/buildomatic/conf_source/ieCe/lib/spring-core-3.1.0.RELEASE.jar:/usr/share/jasperreports-server/buildomatic/conf_source/ieCe/lib/spring-context-3.1.0.RELEASE.jar:/usr/share/jasperreports-server/buildomatic/conf_source/ieCe/lib/spring-context-support-3.1.0.RELEASE.jar:/usr/share/jasperreports-server/buildomatic/conf_source/ieCe/lib/spring-beans-3.1.0.RELEASE.jar:/usr/share/jasperreports-server/buildomatic/conf_source/ieCe/lib/spring-security-core-2.0.7.RELEASE.jar'
    [javac] '-sourcepath'
    [javac] '/root/ovirt-reports/ovirt-engine-reports/EngineAuthentication/src'
    [javac] '-target'
    [javac] '1.7'
    [javac] '-encoding'
    [javac] 'utf-8'
    [javac] '-g:lines,vars,source'
    [javac] '-source'
    [javac] '1.7'
    [javac] 
    [javac] The ' characters around the executable and arguments are
    [javac] not part of the command.
    [javac] Files to be compiled:
    [javac]     /root/ovirt-reports/ovirt-engine-reports/EngineAuthentication/src/main/java/org/ovirt/authentication/EngineSimplePreAuthFilter.java
    [javac]     /root/ovirt-reports/ovirt-engine-reports/EngineAuthentication/src/main/java/org/ovirt/authentication/EngineUserDetails.java
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
    [javac] /root/ovirt-reports/ovirt-engine-reports/EngineAuthentication/src/main/java/org/ovirt/authentication/EngineSimplePreAuthFilter.java:164: error: cannot access User
    [javac]                 UsernamePasswordAuthenticationToken originalAuthentication = (UsernamePasswordAuthenticationToken) metadataUserDetails.getOriginalAuthentication();
    [javac]                                                                                                                                       ^
    [javac]   class file for com.jaspersoft.jasperserver.api.metadata.user.domain.User not found
    [javac] 1 error
    [javac] 1 warning
      [ant] Exiting /root/ovirt-reports/ovirt-engine-reports/EngineAuthentication/build.xml.
  [antcall] Exiting /root/ovirt-reports/build.xml.


and I see in /usr/share/jasperreports-server/buildomatic/conf_source/ieCe/applicationContext.xml

    <bean id="mappingResourceFactory" class="com.jaspersoft.jasperserver.api.metadata.common.service.impl.ResourceFactoryImpl">
        <property name="objectFactory" ref="objectFactory"/>
        <property name="implementationClassMappings">
            <map>
                ...
                <entry key="com.jaspersoft.jasperserver.api.metadata.user.domain.User"
                    value="com.jaspersoft.jasperserver.api.metadata.user.domain.client.UserImpl"/>


Are we missing something in the build.xml for correctly mapping com.jaspersoft.jasperserver.api.metadata.user.domain.User ?
I don't know ant enough to fix it myself.

Comment 2 Sandro Bonazzola 2014-12-04 15:09:30 UTC
This fixes the build on F21:

diff --git a/ovirt-engine-reports/EngineAuthentication/build.xml b/ovirt-engine-reports/EngineAuthentication/build.xml
index f45bf9d..6571009 100644
--- a/ovirt-engine-reports/EngineAuthentication/build.xml
+++ b/ovirt-engine-reports/EngineAuthentication/build.xml
@@ -5,6 +5,8 @@
 
        <path id="local.classpath">
                <fileset dir="${jasper.lib}"><filename name="commons-logging-*.jar"/></fileset>
+                <fileset dir="${jasper.lib}"><filename name="jasperserver-api-common-*.jar"/></fileset>
+                <fileset dir="${jasper.lib}"><filename name="jasperserver-api-metadata-*.jar"/></fileset>
                <fileset dir="${jasper.lib}"><filename name="jasperserver-api-metadata-impl-*.jar"/></fileset>
                <fileset dir="${jasper.lib}"><filename name="servlet-api-*.jar"/></fileset>
                <fileset dir="${jasper.lib}"><filename name="spring-core-*.jar"/></fileset>

Comment 3 Sandro Bonazzola 2014-12-04 15:26:27 UTC
Pushed a fix to gerrit

Comment 4 Lukas Svaty 2016-01-21 10:27:59 UTC
F21 is EOL since 2015-12-01, testing on F22/F23

new builds on F22/F23 successful:
http://jenkins.ovirt.org/job/ovirt-reports_master_create-rpms-fc22-x86_64_created/
http://jenkins.ovirt.org/job/ovirt-reports_master_create-rpms-fc23-x86_64_created/

If this needs further verification on installation on F22/F23 pls move back to ON_QA


Note You need to log in before you can comment on or make changes to this bug.