On 23/05/2016 13:51, Andrew Dinn wrote:
Hi All,
Red Hat's Transactions developers are having problems compiling their
Corba-based code using the latest early access release of JDK9
(9-ea-b119). When the maven compiler plugin executes javac the compile
fails because various corba packages are not visible. These are /not/
classes belonging to concealed packages.
Some of the relevant error messages are shown in the first listing
following my sig.
Indeed, what is more strange is that we found that we could remedy the
first of these errors by adding an explicit addExports for the relevant
package to the javac arguments configured in the maven pom:
<compilerArgs>
<arg>-XaddExports:java.corba/org.omg.CORBA=ALL-UNNAMED</arg>
</compilerArgs>
The second listing shows the difference this makes. Note that package
org.omg.CORBA is now recognised.
No doubt the same sort of fix would apply to remove the other errors but
I don't understand why the use of addExports is necessary. When I run
jmod describe on the java.corba module it tells me that org.omg.CORBA
etc are already exported. So, java.corba does not seem to be a special
sort of package different to all the others in the jmod dir.
Is there some hidden switch which disables exports for this module? If
so then is there a switch (equally as well hidden :-) which allows me to
re-instate them? If not then does anyone have any idea why are we seeing
these missing package errors?
n.b. please keep Mike Musgrove in the cc for any replies as he is not
subscribed to this list.
As Sander said, compiling with `-addmods java.corba` will ensure that
the java.corba module is resolved.
That said, I'm puzzled as to why -XaddExports makes a difference here,
also by some of the types mentioned in the compilation messages as they
aren't types in the JDK java.corba module.
It would help if you or Michael could summarize what org.omg.** classes
are in the environment. We've had problems off-list with another app
server in this area too. In that case, it was augmenting the CORBA
version in the JDK with additional classes as part of adding support for
OMG APIs that the JDK version doesn't support. I don't know if we've got
something similar here. If so, then bring a packed lunch as it will be a
long day :-)
-Alan