Does anyone on this list have working JacORB packages for FC6 (using the Free Java stack, i.e. GCJ etc.)? I'm interested in JacORB because a class I'm taking at the university uses it.
I tried building a package by: * reconstructing the no longer available jacorb-2.2-3jpp_8fc: - I started from jacorb-2.2-3.1mdk, which is essentially jacorb-2.2-3jpp_3fc - I removed the stuff apparently added by Mandriva (changelog entry, conditionalization of GCJ support) - I applied all the patches from the fedora-cvs-commits list leading up to 8fc - I fixed the whitespace in the GCJ 4.1 patch so it actually applies, because the mailing list software mangled the tabs in the patch to spaces * bumping the release, ending up with this: http://www.tigen.org/kevin.kofler/pcprogs/jacorb-2.2-3jpp.9.fc6.nosrc.rpm (This is an 8 KB nosrc RPM, I didn't include the source tarball for space reasons.)
Unfortunately, this _does not build_ under FC6. Judging from the error output, it tries to use the wrong org.omg.CORBA classes (the libgcj ones), and I can't seem to fix that. I verified that the gcj41 patch is applied, I tried setting both classpath and bootclasspath, and also adding this: <compilerarg value="-endorseddirs"/> <compilerarg value="${dirs.base}/classes"/> None of that works. So help from the experts would be appreciated.
Kevin Kofler
"Kevin" == Kevin Kofler kevin.kofler@chello.at writes:
Kevin> Does anyone on this list have working JacORB packages for FC6 Kevin> (using the Free Java stack, i.e. GCJ etc.)?
Not me..
Kevin> Unfortunately, this _does not build_ under FC6. Judging from Kevin> the error output, it tries to use the wrong org.omg.CORBA Kevin> classes (the libgcj ones), and I can't seem to fix that.
Could you post the error output? Perhaps with 'ant -verbose' so we can see the compiler command line? Overriding the libgcj classes at compile time ought to work ok.
Tom
Tom Tromey <tromey@...> writes:
Kevin> Unfortunately, this _does not build_ under FC6. Judging from Kevin> the error output, it tries to use the wrong org.omg.CORBA Kevin> classes (the libgcj ones), and I can't seem to fix that.
Could you post the error output? Perhaps with 'ant -verbose' so we can see the compiler command line? Overriding the libgcj classes at compile time ought to work ok.
[javac] Compiling 6 source files to /usr/src/redhat/BUILD/JacORB_2_2/classes [javac] Using modern compiler [javac] Compilation arguments: [javac] '-d' [javac] '/usr/src/redhat/BUILD/JacORB_2_2/classes' [javac] '-classpath' [javac] '/usr/src/redhat/BUILD/JacORB_2_2/classes:/usr/share/java/ant.jar:/usr/share/ java/ant-launcher.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/xml- commons-apis.jar:/usr/share/java/antlr.jar:/usr/share/java/ant/ant-antlr.jar:/ usr/share/java/bcel.jar:/usr/share/java/ant/ant-apache-bcel.jar:/usr/share/java/ log4j.jar:/usr/share/java/ant/ant-apache-log4j.jar:/usr/share/java/oro.jar:/usr/ share/java/ant/ant-apache-oro.jar:/usr/share/java/regexp.jar:/usr/share/java/ant /ant-apache-regexp.jar:/usr/share/java/xml-commons-resolver.jar:/usr/share/java/ ant/ant-apache-resolver.jar:/usr/share/java/jakarta-commons-logging.jar:/usr/ share/java/ant/ant-commons-logging.jar:/usr/share/java/javamail.jar:/usr/share/ java/jaf.jar:/usr/share/java/ant/ant-javamail.jar:/usr/share/java/jdepend.jar:/ usr/share/java/ant/ant-jdepend.jar:/usr/share/java/jsch.jar:/usr/share/java/ant/ ant-jsch.jar:/usr/share/java/junit.jar:/usr/share/java/ant/ant-junit.jar:/usr/ share/java/ant/ant-nodeps.jar:/usr/share/java/ant/ant-swing.jar:/usr/share/java/ jaxp_transform_impl.jar:/usr/share/java/ant/ant-trax.jar:/usr/lib/jvm/java/lib/ tools.jar:/usr/share/java/concurrent.jar:/usr/share/java/tanukiwrapper.jar:/usr/ share/java/avalon-framework.jar:/usr/share/java/avalon-logkit.jar' [javac] '-sourcepath' [javac] '/usr/src/redhat/BUILD/JacORB_2_2/src:/usr/src/redhat/BUILD/JacORB_2_2/src/ generated' [javac] '-bootclasspath' [javac] '/usr/src/redhat/BUILD/JacORB_2_2/classes:/usr/src/redhat/BUILD/JacORB_2_2/lib/ logkit-1.2.jar:/usr/src/redhat/BUILD/JacORB_2_2/lib/idl.jar:/usr/src/redhat/ BUILD/JacORB_2_2/lib/antlr-2.7.2.jar:/usr/src/redhat/BUILD/JacORB_2_2/lib/avalon -framework-4.1.5.jar:/usr/src/redhat/BUILD/JacORB_2_2/lib/concurrent-1.3.2.jar:/ usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/rt.jar:/usr/share/java/ant.jar:/usr/ share/java/ant-launcher.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java /xml-commons-apis.jar:/usr/share/java/antlr.jar:/usr/share/java/ant/ant-antlr. jar:/usr/share/java/bcel.jar:/usr/share/java/ant/ant-apache-bcel.jar:/usr/share/ java/log4j.jar:/usr/share/java/ant/ant-apache-log4j.jar:/usr/share/java/oro.jar: /usr/share/java/ant/ant-apache-oro.jar:/usr/share/java/regexp.jar:/usr/share/ java/ant/ant-apache-regexp.jar:/usr/share/java/xml-commons-resolver.jar:/usr/ share/java/ant/ant-apache-resolver.jar:/usr/share/java/jakarta-commons-logging. jar:/usr/share/java/ant/ant-commons-logging.jar:/usr/share/java/javamail.jar:/ usr/share/java/jaf.jar:/usr/share/java/ant/ant-javamail.jar:/usr/share/java/ jdepend.jar:/usr/share/java/ant/ant-jdepend.jar:/usr/share/java/jsch.jar:/usr/ share/java/ant/ant-jsch.jar:/usr/share/java/junit.jar:/usr/share/java/ant/ant- junit.jar:/usr/share/java/ant/ant-nodeps.jar:/usr/share/java/ant/ant-swing.jar:/ usr/share/java/jaxp_transform_impl.jar:/usr/share/java/ant/ant-trax.jar:/usr/lib /jvm/java/lib/tools.jar:/usr/share/java/concurrent.jar:/usr/share/java/ tanukiwrapper.jar:/usr/share/java/avalon-framework.jar:/usr/share/java/avalon- logkit.jar' [javac] '-g:none' [javac] [javac] The ' characters around the executable and arguments are [javac] not part of the command. [javac] Files to be compiled: [javac] /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/ORBSingleton.java [javac] /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/Reference.java [javac] /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/ServantDelegate.java [javac] /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/TypeCode.java [javac] /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ IORInfoImpl.java [javac] /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ ServerRequestInfoImpl.java [javac] ---------- [javac] 1. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/ORBSingleton.java (at line 37) [javac] public class ORBSingleton [javac] ^^^^^^^^^^^^ [javac] The type ORBSingleton must implement the inherited abstract method ORB.create_recursive_sequence_tc(int, int) [javac] ---------- [javac] 2. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/ORBSingleton.java [javac] (at line 525) [javac] return new org.jacorb.orb.TypeCode (org.omg.CORBA.TCKind._tk_local_interface, [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [javac] org.omg.CORBA.TCKind._tk_local_interface cannot be resolved [javac] ---------- [javac] ---------- [javac] 3. WARNING in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/Reference.java (at line 26) [javac] public class Reference [javac] ^^^^^^^^^ [javac] The serializable class Reference does not declare a static final serialVersionUID field of type long [javac] ---------- [javac] ---------- [javac] 4. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/ServantDelegate.java [javac] (at line 268) [javac] _out.write_Object(self._get_interface() ); [javac] ^^^^^^^^^^^^^^ [javac] The method _get_interface() is undefined for the type Servant [javac] ---------- [javac] ---------- [javac] 5. WARNING in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/TypeCode.java (at line 40) [javac] public class TypeCode [javac] ^^^^^^^^ [javac] The serializable class TypeCode does not declare a static final serialVersionUID field of type long [javac] ----------
[javac] 6. WARNING in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/TypeCode.java (at line 69) [javac] private static boolean class_init = false; [javac] ^^^^^^^^^^ [javac] The field TypeCode.class_init is never read locally [javac] ---------- [javac] 7. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/TypeCode.java (at line 453) [javac] kind == TCKind._tk_local_interface ) [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^ [javac] TCKind._tk_local_interface cannot be resolved [javac] ---------- [javac] 8. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/TypeCode.java (at line 598) [javac] case TCKind._tk_local_interface: [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^ [javac] TCKind._tk_local_interface cannot be resolved [javac] ---------- [javac] 9. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/TypeCode.java (at line 624) [javac] case TCKind._tk_local_interface: [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^ [javac] TCKind._tk_local_interface cannot be resolved [javac] ---------- [javac] 10. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/TypeCode.java (at line 942) [javac] kind == TCKind._tk_local_interface ) [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^ [javac] TCKind._tk_local_interface cannot be resolved [javac] ---------- [javac] 11. WARNING in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/TypeCode.java (at line 1080) [javac] private void set_recursive() [javac] ^^^^^^^^^^^^^^^ [javac] The method set_recursive() from the type TypeCode is never used locally [javac] ---------- [javac] 12. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/TypeCode.java (at line 1114) [javac] case TCKind._tk_local_interface: [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^ [javac] TCKind._tk_local_interface cannot be resolved [javac] ---------- [javac] ---------- [javac] 13. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ IORInfoImpl.java (at line 44) [javac] public class IORInfoImpl extends org.omg.CORBA.LocalObject [javac] ^^^^^^^^^^^ [javac] The type IORInfoImpl must implement the inherited abstract method IORInfoOperations.adapter_template() [javac] ---------- [javac] 14. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ IORInfoImpl.jav [javac] a (at line 44) [javac] public class IORInfoImpl extends org.omg.CORBA.LocalObject [javac] ^^^^^^^^^^^ [javac] The type IORInfoImpl must implement the inherited abstract method IORInfoOperations.manager_id() [javac] ---------- [javac] 15. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ IORInfoImpl.java (at line 44) [javac] public class IORInfoImpl extends org.omg.CORBA.LocalObject [javac] ^^^^^^^^^^^ [javac] The type IORInfoImpl must implement the inherited abstract method IORInfoOperations.current_factory(ObjectReferenceFactory) [javac] ---------- [javac] 16. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ IORInfoImpl.jav [javac] a (at line 44) [javac] public class IORInfoImpl extends org.omg.CORBA.LocalObject [javac] ^^^^^^^^^^^ [javac] The type IORInfoImpl must implement the inherited abstract method IORInfoOperations.current_factory() [javac] ---------- [javac] 17. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ IORInfoImpl.java (at line 44) [javac] public class IORInfoImpl extends org.omg.CORBA.LocalObject [javac] ^^^^^^^^^^^ [javac] The type IORInfoImpl must implement the inherited abstract method IORInfoOperations.state() [javac] ---------- [javac] 18. WARNING in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ IORInfoImpl.j [javac] ava (at line 44) [javac] public class IORInfoImpl extends org.omg.CORBA.LocalObject [javac] ^^^^^^^^^^^ [javac] The serializable class IORInfoImpl does not declare a static final serialVersionUID field of type long [javac] ---------- [javac] ---------- [javac] 19. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ ServerRequestInfoImpl.java (at line 45) [javac] public class ServerRequestInfoImpl [javac] ^^^^^^^^^^^^^^^^^^^^^ [javac] The type ServerRequestInfoImpl must implement the inherited abstract method ServerRequestInfoOperations.adapter_name() [javac] ---------- [javac] 20. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ ServerRequestIn [javac] foImpl.java (at line 45) [javac] public class ServerRequestInfoImpl [javac] ^^^^^^^^^^^^^^^^^^^^^ [javac] The type ServerRequestInfoImpl must implement the inherited abstract method ServerRequestInfoOperations.server_id() [javac] ---------- [javac] 21. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ ServerRequestInfoImpl.java (at line 45) [javac] public class ServerRequestInfoImpl [javac] ^^^^^^^^^^^^^^^^^^^^^ [javac] The type ServerRequestInfoImpl must implement the inherited abstract method ServerRequestInfoOperations.orb_id() [javac] ---------- [javac] 22. WARNING in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ ServerRequest [javac] InfoImpl.java (at line 45) [javac] public class ServerRequestInfoImpl [javac] ^^^^^^^^^^^^^^^^^^^^^ [javac] The serializable class ServerRequestInfoImpl does not declare a static final serialVersionUID field of type long [javac] ---------- [javac] ---------- [javac] 23. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/poa/POA.java (at line 47) [javac] public class POA [javac] ^^^ [javac] The type POA must implement the inherited abstract method POAOperations.id() [javac] ---------- [javac] 24. WARNING in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/poa/POA.java (at line 47) [javac] public class POA [javac] ^^^ [javac] The serializable class POA does not declare a static final serialVersionUID field of type long [javac] ---------- [javac] 25. ERROR in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/poa/POA.java (at line 826) [javac] public org.omg.CORBA.Object create_reference_with_id(byte[] oid, [javac] [javac] String intf_rep_id) [javac] throws WrongPolicy [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [javac] Exception WrongPolicy is not compatible with throws clause in POAOperations.create_reference_with_id(byte[], String) [javac] ---------- [javac] 26. WARNING in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/poa/POA.java (at line 1831) [javac] Enumeration enum; [javac] ^^^^ [javac] 'enum' should not be used as an identifier, since it is a reserved keyword from source level 5.0 on [javac] ---------- [javac] 27. WARNING in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/poa/POA.java (at line 1837) [javac] enum = childs.elements(); [javac] ^^^^ [javac] 'enum' should not be used as an identifier, since it is a reserved keyword from source level 5.0 on [javac] ---------- [javac] 28. WARNING in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/poa/POA.java (at line 1838) [javac] while (enum.hasMoreElements()) [javac] ^^^^ [javac] 'enum' should not be used as an identifier, since it is a reserved keyword from source level 5.0 on [javac] ---------- [javac] 29. WARNING in /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/poa/POA.java (at line 1840) [javac] children[i] = (org.omg.PortableServer.POA) enum.nextElement(); [javac] ^^^^ [javac] 'enum' should not be used as an identifier, since it is a reserved keyword from source level 5.0 on [javac] ---------- [javac] 29 problems (18 errors, 11 warnings) [antcall] Exiting /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/build.xml. [ant] Exiting /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/build.xml. [ant] Exiting /usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/build.xml.
Kevin Kofler
Il giorno sab, 09/12/2006 alle 00.12 +0000, Kevin Kofler ha scritto:
[javac] 21. ERROR in
/usr/src/redhat/BUILD/JacORB_2_2/src/org/jacorb/orb/portableInterceptor/ ServerRequestInfoImpl.java (at line 45) [javac] public class ServerRequestInfoImpl [javac] ^^^^^^^^^^^^^^^^^^^^^ [javac] The type ServerRequestInfoImpl must implement the inherited
Hello Kevin!
This is a known problem.
See this discussion for some hints:
https://www.redhat.com/archives/fedora-devel-java-list/2005-December/msg0000... http://www.spinics.net/linux/fedora/fedora-devel-java/msg01360.html
The build file has changed a bit, so it is not immediate to get it working.
I guess the best thing here would be to patch the upstream version directly to be compliant with the specs (if possible).
Indeed we have a bootclasspath problem: javac handle this correctly, while ecj fails.
Mario
Mario Torre <neugens@...> writes:
This is a known problem.
See this discussion for some hints:
https://www.redhat.com/archives/fedora-devel-java-list/2005-December/
msg00007.html
http://www.spinics.net/linux/fedora/fedora-devel-java/msg01360.html
But the fix from that thread is already in the SRPM I built! (It was added in 2.2-3jpp_5fc, I built 2.2-3jpp_8fc.) My problem is that the fix no longer works.
Kevin Kofler
I've given up on aot-compiling and just used the JacORB 2.2.4 binary zipfile. This works with gij if you symlink avalon-framework-4.1.5.jar, jacorb.jar and logkit-1.2.jar into /usr/share/java/gcj-endorsed. (Also run dos2unix and chmod +x on the shell scripts in the "bin" directory.) You can then simplify the jaco script to: #!/bin/sh
JACORB_HOME="/path/to/JacORB-2.2.4" export JACORB_HOME
# call java interpreter exec java \ -Djacorb.home="$JACORB_HOME" \ -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB \ -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton \ "$@"
(The bootclasspath hackery which the jaco script normally does doesn't work with gij, at least not for me.) At least the name server appears to start up that way, I haven't done any further testing yet.
I'd of course prefer a nice native RPM, but at least this works, so I'm posting the instructions in case other people are interested.
Kevin Kofler
(The bootclasspath hackery which the jaco script normally does doesn't work with gij, at least not for me.) At least the name server appears to start up that way, I haven't done any further testing yet.
Unfortunately, value types don't work when doing things this way due to some type conflict between the libgcj and the JacORB classes: Exception in thread "main" java.lang.NoClassDefFoundError: gnu.javax.rmi.CORBA.RmiUtilities at java.lang.Class.initializeClass(libgcj.so.7rh) at java.lang.Class.initializeClass(libgcj.so.7rh) at java.lang.Class.forName(libgcj.so.7rh) at gnu.CORBA.ObjectCreator.forName(libgcj.so.7rh) at gnu.javax.rmi.CORBA.DelegateFactory.getInstance(libgcj.so.7rh) at javax.rmi.CORBA.Util.<clinit>(libgcj.so.7rh) at java.lang.Class.initializeClass(libgcj.so.7rh) at org.jacorb.util.ValueHandler.getRMIRepositoryID(ValueHandler.java:10) at org.jacorb.orb.CDROutputStream.write_value(CDROutputStream.java:2099) Caused by: java.lang.VerifyError: Incompatible types: In class gnu.javax.rmi.CORBA.RmiUtilities: org.omg.CORBA.WStringValueHelper is not assignable to org.omg.CORBA.portable.BoxedValueHelper at java.lang.Class.initializeClass(libgcj.so.7rh) ...10 more
Something somewhere probably needs to be rebuilt, but if I rebuild gnu.javax.rmi.CORBA.RmiUtilities and put it in a jar in the gcj-endorsed directory, I get "java.lang.VerifyError: verification failed at PC 92 in gnu.javax.rmi.CORBA.RmiUtilities:writeFields((Lorg.omg.CORBA.portable. OutputStream;Ljava.io.Serializable;)V): incompatible type on stack" instead, and I couldn't get that to go away.
I don't feel like hunting this mess any further right now. It works on the university machine using Sun Java.
Kevin Kofler
java-devel@lists.fedoraproject.org