Bug 412468 - [WTP] Error building org.eclipse.jpt.common.utility
Summary: [WTP] Error building org.eclipse.jpt.common.utility
Status: RESOLVED FIXED
Alias: None
Product: CBI
Classification: Technology
Component: prototype (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: CBI Dummy user CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 412211
  Show dependency tree
 
Reported: 2013-07-07 18:02 EDT by Thanh Ha CLA
Modified: 2013-11-11 11:45 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thanh Ha CLA 2013-07-07 18:02:23 EDT
This issue seems to block building webtools.dali completely as many of the modules require org.eclipse.jpt.common.utility.

When building org.eclipse.jpt.common.utility a Type mismatch error occurs as shown below.



[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.19.0-SNAPSHOT:compile (default-compile) on project org.eclipse.jpt.common.utility: Compilation failure: Compilation failure:
[ERROR] /buildroot/webtools.releng.aggregator/webtools.dali/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/ClassTools.java:[642,0]
[ERROR] Constructor<T>[] constructors = javaClass.getDeclaredConstructors();
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Type mismatch: cannot convert from Constructor<?>[] to Constructor<T>[]
[ERROR] /buildroot/webtools.releng.aggregator/webtools.dali/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/jdbc/DriverWrapper.java:[29,0]
[ERROR] public class DriverWrapper
[ERROR] ^^^^^^^^^^^^^
[ERROR] The type DriverWrapper must implement the inherited abstract method Driver.getParentLogger()
[ERROR] 2 problems (2 errors)
[ERROR] -> [Help 1]
Comment 1 Neil Hauge CLA 2013-07-08 10:03:23 EDT
This compiles without issue in the current WTP build and in dev environments.  What JDK is being used to compile?
Comment 2 Thanh Ha CLA 2013-07-08 10:08:30 EDT
(In reply to comment #1)
> This compiles without issue in the current WTP build and in dev
> environments.  What JDK is being used to compile?

Maven 3.0.5
JDK 1.7.0_40 (Oracle)
Comment 3 Brian Vosburgh CLA 2013-07-08 11:35:24 EDT
The module org.eclipse.jpt.common.utility is supposed to be compiled with 1.5 compliance and using a 1.5 library. The compile errors appear to be caused by using a 1.7 library.
Comment 4 Thanh Ha CLA 2013-07-08 14:29:55 EDT
(In reply to comment #3)
> The module org.eclipse.jpt.common.utility is supposed to be compiled with
> 1.5 compliance and using a 1.5 library. The compile errors appear to be
> caused by using a 1.7 library.

Thanks Brian, as a quick test I switched my JDK to 1.5 and successfully built with that. I guess next steps is to tell Tycho to use 1.5 when building this bundle. I will try configuring Tycho to use BREEs with JDK 1.5 defined and try again with my 1.7 JAVA_HOME.
Comment 5 Carl Anderson CLA 2013-07-08 14:39:48 EDT
(In reply to comment #4)

Thanks Brian,
> as a quick test I switched my JDK to 1.5 and successfully built with that. I
> guess next steps is to tell Tycho to use 1.5 when building this bundle. I
> will try configuring Tycho to use BREEs with JDK 1.5 defined and try again
> with my 1.7 JAVA_HOME.

The current WTP build respects the BREE of each plugin that is built.  Can the CBI build do that automatically?  Or does it have to be done by hand?
Comment 6 Thanh Ha CLA 2013-07-08 14:47:16 EDT
(In reply to comment #5)
> The current WTP build respects the BREE of each plugin that is built.  Can
> the CBI build do that automatically?  Or does it have to be done by hand?

Yes it's possible, the Eclipse Platform build uses BREEs in fact to build. Only minor issue with BREEs is it makes it a little more difficult for people to run local builds as they will need to configure a toolchains.xml file for Maven.

In the Eclipse Platform build we have a profile "bree-libs" [1] which when active will use BREEs however it is not required and someone just cloning the code can simply use their SYSTEM environment instead.

I guess in the case of this bug BREE will be required for someone running who wants to build WTP on their local system.

Also some Tycho docs regarding BREE [2].


[1] http://wiki.eclipse.org/Platform-releng/Platform_Build#Using_BREE_Libs
[2] http://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#useJDK
Comment 7 Thanh Ha CLA 2013-07-18 13:27:42 EDT
Marking as resolved as this bundle's building since I enabled BREE.
Comment 8 Carl Anderson CLA 2013-11-11 11:45:38 EST
Please see http://wiki.eclipse.org/WTP/Build/CBI_Build for the latest instructions on how to build WTP using CBI.  (I am adding this info since people that don't use a BREE are finding this bug, and then they run into other issues that the web page describes how to resolve.)