JDK-6180021 : REGRESSION: javac throws exception: CompletionFailure during TypeTrans
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0,5.0u3
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows_xp
  • CPU: other,x86
  • Submitted: 2004-10-15
  • Updated: 2010-12-08
  • Resolved: 2005-06-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b43Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
javac in jdk1.5 throws exception while compiling. The same source code is compiled successfully with Tiger b49.

E:\tst>javac -classpath e:\tst\weblogic\dev\tools\interop\classes;e:\tst\weblogic.jar;e:\tst\weblogic\dev\tools\interop\coconut\coconutx.jar;e:\tst\weblogic\dev\tools\interop\src\ejb11\txcrossdomain\FlightAgentBean;e:\tst\weblogic\dev\tools\interop\src\ejb11\txcrossdomain\TravelPlannerBean e:\tst\weblogic\dev\tools\interop\src\weblogic\qa\tests\interop\ejb11\txcrossdomain\TxCrossDomainTest.java
An exception has occurred in the compiler (1.5.0-rc). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checkingthe Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: file weblogic\qa\tests\interop\ejb11\basic\stateful\TraderHome.class not found

See comments for reproducible testcase.
###@###.### 10/15/04 19:57 GMT

Comments
SUGGESTED FIX Index: src/share/classes/com/sun/tools/javac/comp/TransTypes.java ================================================================= @@ -248,6 +248,7 @@ Symbol sym, ClassSymbol origin, ListBuffer<Tree> bridges) { +try { if (sym.kind == MTH && sym.name != names.init && (sym.flags() & (PRIVATE | SYNTHETIC | STATIC)) == 0 && @@ -290,6 +291,12 @@ meth, meth.location(origin.type, types)); } } +} catch (Symbol.CompletionFailure ex) { + log.rawError(pos, + "problem during type translation; " + ex.errmsg + + "\nmethod: " + sym + + "\nin : " + sym.owner); +} } void addBridges(int pos, ###@###.### 10/16/04 03:08 GMT Index: src/share/classes/com/sun/tools/javac/code/Types.java ============================================================ @@ -649,7 +649,8 @@ result = isSameType(t, upperBound(that)) && isSameType(t, lowerBound(that)); return; } - if ((t.tsym.flags() & that.tsym.flags() & COMPOUND) != 0) { + if (that.tsym.completer == null && +(t.tsym.flags() & that.tsym.flags() & COMPOUND) != 0) { if (!isSameType(supertype(t), supertype(that))) { result = false; return; ###@###.### 10/16/04 04:35 GMT See http://javac.sfbay/reviews?bugid=6180021 ###@###.### 2005-05-18 02:44:03 GMT
15-10-2004

EVALUATION The compiler might have changed behavior and the compiler crashes. However, this is a matter of a class missing from the build: weblogic\qa\tests\interop\ejb11\basic\stateful\TraderHome.class The file tst/weblogic/dev/tools/interop/classes/weblogic/qa/tests/interop/ejb11/basic/BaseSessionBeanTest.class refers to that class: [ahe@newman 6180021]$ javap -verbose tst/weblogic/dev/tools/interop/classes/weblogic/qa/tests/interop/ejb11/basic/BaseSessionBeanTest | grep Lweblogic/qa/tests/interop/ejb11/basic/stateful/TraderHome\; const #45 = Asciz (Lweblogic/qa/tests/interop/ejb11/basic/stateful/TraderHome;)Ljavax/ejb/EJBObject;; const #47 = Asciz Lweblogic/qa/tests/interop/ejb11/basic/stateful/TraderHome;; 0 16 1 home Lweblogic/qa/tests/interop/ejb11/basic/stateful/TraderHome; 15 7 2 home Lweblogic/qa/tests/interop/ejb11/basic/stateful/TraderHome; 14 12 2 home Lweblogic/qa/tests/interop/ejb11/basic/stateful/TraderHome; [ahe@newman 6180021]$ Since the compiler crashes, I'm proposing a fix that would give this error message: tst/weblogic/dev/tools/interop/src/weblogic/qa/tests/interop/ejb11/txcrossdomain/TxCrossDomainTest.java:13: problem during type translation; file weblogic/qa/tests/interop/ejb11/basic/stateful/TraderHome.class not found missing symbol: weblogic.qa.tests.interop.ejb11.basic.stateful.TraderHome from method : createBean(weblogic.qa.tests.interop.ejb11.basic.stateful.TraderHome) in : weblogic.qa.tests.interop.ejb11.basic.BaseSessionBeanTest public class TxCrossDomainTest extends BaseSessionBeanTest { ^ I'm very interested in feedback on the usefulness of this error message. ###@###.### 10/16/04 03:08 GMT I have investigated a bit further and this was apparently caused by the fix for 5041233. I have discovered a way to revert to the behavior of tiger b49. However, I do not intend to apply that fix since it will become obsolete after 5034571 is fixed. I really think that the right solution is to include TraderHome.class in the build. ###@###.### 10/16/04 04:35 GMT We are currently working on integrating the workaround as 5034571 is not suitable for backporting to a Tiger update. ###@###.### 2005-03-30 20:42:13 GMT Producing good regression tests complicated the fix. However, we have regression tests now and the fix is targeted for Mustang and Tiger update 6. ###@###.### 2005-06-08 22:09:10 GMT The fix is targeted JDK 5.0 update 5. ###@###.### 2005-06-14 20:27:07 GMT
15-10-2004

WORK AROUND Add the missing class to the build: weblogic\qa\tests\interop\ejb11\basic\stateful\TraderHome.class ###@###.### 10/16/04 03:08 GMT
15-10-2004