Bug 535760 (RHQ-2422)

Summary: Compilation errors when using OpenJDK 1.6.0
Product: [Other] RHQ Project Reporter: Steve Salevan <ssalevan>
Component: Build SystemAssignee: Filip Drabek <fdrabek>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 1.2CC: ckannan, cwelton
Target Milestone: ---Keywords: SubBug
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-2422
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
OS: Fedora 11 Version of RHQ: SVN Head Various bits of information from the CLI: $ rpm -q java-1.6.0-openjdk.i586 java-1.6.0-openjdk-1.6.0.0-27.b16.fc11.i586 $ java -version java version "1.5.0" gij (GNU libgcj) version 4.4.1 20090725 (Red Hat 4.4.1-2) Co
Last Closed: 2010-11-15 09:54:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 565628    

Description Steve Salevan 2009-09-11 19:35:00 UTC
If a user attempts to compile RHQ using the latest OpenJDK from the Fedora 11 repos, they'll run into the following compilation error when building the RHQ Network Services Plugin:

[INFO] ------------------------------------------------------------------------
[INFO] Building RHQ Network Services Plugin
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [build-helper:maven-version {execution: default}]
[INFO] [buildnumber:create {execution: default}]
[INFO] [enforcer:enforce {execution: enforce-versions}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using default encoding to copy filtered resources.
[INFO] [dependency:copy {execution: copy-dependency-jars}]
[INFO] Configured Artifact: commons-httpclient:commons-httpclient:3.0.1:jar
[INFO] commons-httpclient:commons-httpclient:3.0.1:jar already exists in /home/thesteve04/workspace/rhq/modules/plugins/netservices/target/classes/lib
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1 source file to /home/thesteve04/workspace/rhq/modules/plugins/netservices/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

could not parse error message: ----------
1. ERROR in /home/thesteve04/workspace/rhq/modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/PingNetServiceComponent.java (at line 75)
	return address.isReachable(5000) ? AvailabilityType.UP : AvailabilityType.DOWN;
	               ^^^^^^^^^^^

no more tokens - could not parse error message: The method isReachable(int) is undefined for the type InetAddress
----------
2. ERROR in /home/thesteve04/workspace/rhq/modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/PingNetServiceComponent.java (at line 93)
	address.isReachable(5000);
	        ^^^^^^^^^^^


[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
   at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
   at java.lang.reflect.Method.invoke(libgcj.so.10)
   at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
   at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
   at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
   at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
   ...14 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 minutes 10 seconds
[INFO] Finished at: Fri Sep 11 14:56:50 GMT-04:00 2009
[INFO] Final Memory: 85M/122M
[INFO] ------------------------------------------------------------------------

From what ips is able to tell, it looks like this problem might stem from the fact that GNU Classpath does not currently implement the isReachable method in the InetAddress class at the moment, according to this document:  http://builder.classpath.org/japi/openjdk-classpath.html

For further information, here's a relevant IRC conversation:
<ssalevan> i could install the latest sun jdk, if worst comes to worst
<ips> another possible workaround would be to modify the build to not build the netservices plugin
<ips> you could do that by commenting out the netservices module in modules/plugins/pom.xml
<ssalevan> ips, hmm, that might work too
<ips> it will be good to find out if any other parts of the build fail w/ openjdk
<ips> then we can document it and maybe even setup the enforcer plugin to require sun jdk for those modules
<ssalevan> yeah...  would you be cool if i wrote up a bug on that?
<ssalevan> (it's qa instinct talking here)
<ips> sure, you could create an RHQ issue, and we can track this and any other compile errors you find 
<ips> we could then feed them back to the icedtea team and maybe they can get us some fixes

Comment 1 Ian Springer 2009-09-11 19:51:01 UTC
I created an OpenJDK bug for the InetAddress.isReachable not defined issue:

http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=384


Comment 2 Steve Salevan 2009-09-11 20:00:08 UTC
If we skip the Network Services Plugin build step, it looks like there's another OpenJDK-related issue during the build of the Performance Test Plugin:

[INFO] ------------------------------------------------------------------------
[INFO] Building RHQ Performance Test Plugin
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [build-helper:maven-version {execution: default}]
[INFO] [buildnumber:create {execution: default}]
[INFO] [enforcer:enforce {execution: enforce-versions}]
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
     [echo] .                            !!!!!!! dev profile is active !!!!!!!
[INFO] Executed tasks
[INFO] [jaxb:generate {execution: default}]
[INFO] /home/thesteve04/workspace/rhq/modules/plugins/perftest/target/generated-sources/xjc/org/rhq/plugins/perftest/scenario is not found and thus excluded from the dependency check
[INFO] Compiling file:/home/thesteve04/workspace/rhq/modules/plugins/perftest/src/main/resources/perftest-scenario.xsd
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
   at org.relaxng.datatype.helpers.DatatypeLibraryLoader$Service$Loader2.getResources(libgcj.so.10)
   at org.relaxng.datatype.helpers.DatatypeLibraryLoader$Service.<init>(libgcj.so.10)
   at org.relaxng.datatype.helpers.DatatypeLibraryLoader.<init>(libgcj.so.10)
   at gnu.xml.validation.xmlschema.XMLSchemaBuilder.<init>(libgcj.so.10)
   at gnu.xml.validation.xmlschema.XMLSchemaSchemaFactory.newSchema(libgcj.so.10)
   at com.sun.tools.xjc.reader.xmlschema.parser.SchemaConstraintChecker.check(SchemaConstraintChecker.java:85)
   at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:329)
   at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:145)
   at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:91)
   at com.sun.tools.xjc.XJC2Task._doXJC(XJC2Task.java:450)
   at com.sun.tools.xjc.XJC2Task.doXJC(XJC2Task.java:397)
   at com.sun.tools.xjc.XJC2Task.execute(XJC2Task.java:332)
   at com.sun.tools.xjc.maven2.XJCMojo.execute(XJCMojo.java:310)
   at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
   at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
   at java.lang.reflect.Method.invoke(libgcj.so.10)
   at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 minutes 5 seconds
[INFO] Finished at: Fri Sep 11 15:47:50 GMT-04:00 2009
[INFO] Final Memory: 86M/130M
[INFO] ------------------------------------------------------------------------


Comment 3 Red Hat Bugzilla 2009-11-10 21:04:09 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2422


Comment 4 wes hayutin 2010-02-16 16:59:23 UTC
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug

Comment 5 wes hayutin 2010-02-16 17:04:30 UTC
making sure we're not missing any bugs in rhq_triage

Comment 9 Filip Drabek 2010-11-15 09:54:56 UTC
Tested on FC11, FC13 and I can not reproduce the problem.