12 Replies Latest reply on Feb 8, 2008 3:10 AM by svasilyev

    Possible X86-64 problem ?

    refon

      Hi,

      I purchased JBDS and installed it on a Linux box.


      Configuration

      OpenSuSE 10.3 running on x86-64 Intel core 2 duo
      JBDS runs using Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
      Projects make use of Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03) (required for TestNG...)


      Problem

      When the "JBoss Tools HTML Editor" is launched the following error is triggered:

      An error has occurred. See error log for more details.
      /usr/lib64/xulrunner-1.8.1.4/libjavaxpcomglue.so: /usr/lib64/xulrunner-1.8.1.4/libjavaxpcomglue.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
      


      Is this a known problem ?


        • 1. Re: Possible X86-64 problem ?
          maxandersen

          yes - the xulrunner does not yet exist in 64-bit linux edition.

          Run with a 32-bit JVM and it will work.

          • 2. Re: Possible X86-64 problem ?
            refon

            Thanks for lightening fast answer !

            I was indeed using a jdk1.5 for 64-bit architecture (although 1.6 was 32-bit), I moved to 32-bit jdk1.5 for both projects and JBDS execution but I still obtain the exact same error.

            Jdk used (now 32-bit)

            java version "1.5.0_14"
            Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
            Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)
            


            eclipse.ini
            -vm
            /usr/java/32bit/jdk1.5.0_14/bin/java
            -vmargs
            -Xms128m
            -Xmx512m
            -XX:MaxPermSize=128m
            


            Any other idea ?


            • 3. Re: Possible X86-64 problem ?
              maxandersen

              I've never seen the error before so can't help much ;(

              Its just weird it complains about 64bit when you are running it with 32-bit vm ;(

              • 4. Re: Possible X86-64 problem ?

                Could you please provide full output of 32-bit JVM?

                • 5. Re: Possible X86-64 problem ?
                  refon

                  Hi, here is what I obtained from .metadata/.log JBDS workspace while trying to edit an xhtml file with JBoss Tools HTML Editor. Fallback to standard HTML Editor triggers not error.

                  !SESSION 2008-01-08 11:02:06.070 -----------------------------------------------
                  eclipse.buildId=unknown
                  java.version=1.5.0_14
                  java.vendor=Sun Microsystems Inc.
                  BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=fr_FR
                  Command-line arguments: -os linux -ws gtk -arch x86
                  
                  !ENTRY org.eclipse.jface 4 2 2008-01-08 11:02:56.322
                  !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
                  !STACK 0
                  java.lang.UnsatisfiedLinkError: /usr/lib64/xulrunner-1.8.1.4/libjavaxpcomglue.so: /usr/lib64/xulrunner-1.8.1.4/libjavaxpcomglue.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
                   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
                   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
                   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
                   at java.lang.Runtime.load0(Runtime.java:769)
                   at java.lang.System.load(System.java:968)
                   at org.mozilla.xpcom.internal.JavaXPCOMMethods.registerJavaXPCOMMethods(JavaXPCOMMethods.java:57)
                   at org.mozilla.xpcom.internal.MozillaImpl.initialize(MozillaImpl.java:48)
                   at org.mozilla.xpcom.Mozilla.initialize(Mozilla.java:668)
                   at org.jboss.tools.vpe.xulrunner.browser.XulRunnerBrowser.initXulRunner(XulRunnerBrowser.java:115)
                   at org.jboss.tools.vpe.xulrunner.browser.XulRunnerBrowser.<init>(XulRunnerBrowser.java:90)
                   at org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor.<init>(XulRunnerEditor.java:109)
                   at org.jboss.tools.vpe.editor.mozilla.MozillaEditor$4.<init>(MozillaEditor.java:214)
                   at org.jboss.tools.vpe.editor.mozilla.MozillaEditor.createPartControl(MozillaEditor.java:214)
                   at org.jboss.tools.vpe.editor.VpeEditorPart.createPartControl(VpeEditorPart.java:518)
                   at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditorPart.addPage(JSPMultiPageEditorPart.java:82)
                   at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor.createPagesForWindows(JSPMultiPageEditor.java:399)
                   at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor.createPages(JSPMultiPageEditor.java:375)
                   at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditorPart.createPartControl(JSPMultiPageEditorPart.java:124)
                   at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661)
                   at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:426)
                   at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592)
                   at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:263)
                   at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2739)
                   at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2651)
                   at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:2643)
                   at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2595)
                   at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
                   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2590)
                   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2574)
                   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2565)
                   at org.eclipse.ui.ide.IDE.openEditor(IDE.java:644)
                   at org.eclipse.ui.ide.IDE.openEditor(IDE.java:603)
                   at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:286)
                   at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:139)
                   at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:194)
                   at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:175)
                   at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:268)
                   at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:244)
                   at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:316)
                   at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$5.open(PackageExplorerPart.java:613)
                   at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:820)
                   at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
                   at org.eclipse.core.runtime.Platform.run(Platform.java:857)
                   at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
                   at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)
                   at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:818)
                   at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1079)
                   at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1183)
                   at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:263)
                   at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:257)
                   at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:297)
                   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
                   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
                   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319)
                   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
                   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
                   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
                   at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
                   at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
                   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
                   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
                   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
                   at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
                   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
                   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
                   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
                   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
                   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:585)
                   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
                   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
                   at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
                   at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
                  





                  • 6. Re: Possible X86-64 problem ?
                    mareshkau

                    Looks like in system installed xulrunner x64 . Some jvm binaries can function in both 64-bit and 32-bit mode. For correct work of JBoss Tools HTML Editor you need:
                    1) 64 bit jvm;
                    2) 64 bit xulrunner;
                    3) in eclipse.ini specify -d64
                    For more information you can see:
                    http://forum.java.sun.com/thread.jspa?threadID=5072865 and
                    http://wiki.caucho.com/Wrong_ELF_class:_ELFCLASS64

                    • 7. Re: Possible X86-64 problem ?
                      maxandersen

                      ...or just let everything be 32bit vm, right ?

                      That works for me ;)

                      • 8. Re: Possible X86-64 problem ?
                        refon

                        Thanks for your input.

                        I quickly tried the -d64 without success. Although I have to dig a bit deeper before giving a valuable feedback.

                        I'll post back as soon as I have time to investigate further.

                        • 9. Re: Possible X86-64 problem ?
                          refon

                          I recently discovered I can now have all JBoss Tools graphical user interface display nicely :)

                          For this to happen I had the PATH variable redefined to first include the 32bit jdk bin directory. Something like:

                          export JAVA_HOME=/usr/java/32bit/jdk1.6.0_03
                          export PATH=${JAVA_HOME}/bin:$PATH
                          

                          Indeed by default the openSUSE 10.3 (X86-64) provides a 64bit jre which is defined in the path as /usr/lib64/jvm/jre/bin . This seems to have lead to the previous mentioned errors even though 32bit jdk was specified in eclipse.ini ...

                          In addition I can launch JBDS on my X86-64 box using 32bit jdk 1.5 or 1.6 with eclipse.ini as:

                          32bit jdk1.5
                          -vm
                          /usr/java/32bit/jdk1.5.0_14/bin/java
                          -vmargs
                          -Dfile.encoding=ISO-8859-1
                          -Xms128m
                          -Xmx512m
                          -XX:MaxPermSize=128m
                          


                          32bit jdk1.6
                          -vm
                          /usr/java/32bit/jdk1.6.0_03
                          -vmargs
                          -Dfile.encoding=ISO-8859-1
                          -Xms128m
                          -Xmx512m
                          -XX:MaxPermSize=128m
                          


                          Now it really rocks ! Dealing with JBPM in graphical mode is much more pleasant.


                          • 10. Re: Possible X86-64 problem ?
                            refon

                            Humm... sorry but I have to temper a bit the previous victory:

                            "JBoss Tools HTML Editor" still fails, same error...
                            although:
                            "JBPM Editor"
                            "Hibernate reverse engineering editor"
                            "Hibernate console"

                            all works correctly.


                            • 11. Re: Possible X86-64 problem ?
                              maxandersen

                              Yes, it is only the html editor that has an native dependency.

                              Are you sure you are running with 32-bit machine and are still getting complaints about 64 bit failing to load ?

                              • 12. Re: Possible X86-64 problem ?

                                Do you still have the same error log? Could you please attach the log and the environment variables one more time?