Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
is java not working ? [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Sat Nov 10, 2007 8:01 pm    Post subject: is java not working ? [solved] Reply with quote

hi,
about jedit i read "Gentoo Linux users can install jEdit from the portage tree by running emerge jedit"

i emerge virtual/jdk (1.5 and 1.4, downloading binaries from ibm-web as requested by the ebuild)
then i emerge dev-java/kaffe
the emerge ended well
so i checked the java-environment
Code:

java-check-environment

 === Java Environment Checker ===
The purpose of this script is to check the sanity of your Java Environment.
We have significantly changed and improved the way Java is handled in many
respects.
Please refer to our upgrade guide for details:
   http://www.gentoo.org/proj/en/java/java-upgrade.xml

Checking fastjar ...ok
Checking vm_environment_files ...ok
Checking user_settings ...ok
Running as root. Don't need to check user settings...ok
Checking generation_1_system_vm ...ok
Checking virtual_provides ...ok
Checking overlays_eclasses ...ok
Checking package_env ...ok
Java environment is sane. Congratulations!


i tested java compiling the classic hello-world

Code:

public class Hello { 

    public static void main(String[] args) {

   System.out.println("Hello, World!");

    }

}


Code:

javac Hello.java
java Hello

Hello, World!


it works: it prints "Hello, World!" on the screen

ok, assuming java is working, i emerge jedit
it compiles fine, but it doesn't work with the following JavaVMs

Code:

java-config -L
The following VMs are available for generation-2:
1)   IBM JDK 1.4.2.9 [ibm-jdk-bin-1.4]
2)   IBM JDK 1.5.0.5a [ibm-jdk-bin-1.5]
*)   Kaffe 1.1.7 [kaffe]



with java-config --set-system-vm kaffe
jedit ends with this error

Quote:


(.:30506): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
java.lang.InternalError: Pango: Invalid UTF-8 string passed to pango_layout_set_text()
at java.lang.VMThrowable.fillInStackTrace (VMThrowable.java:native)
at java.lang.VMThrowable.fillInStackTrace (VMThrowable.java:79)
at java.lang.Throwable.fillInStackTrace (Throwable.java:498)
at java.lang.Throwable.<init> (Throwable.java:159)
at java.lang.Error.<init> (Error.java:81)
at java.lang.VirtualMachineError.<init> (VirtualMachineError.java:71)
at java.lang.InternalError.<init> (InternalError.java:70)
at gnu.java.awt.peer.gtk.GdkFontPeer.getTextMetrics (GdkFontPeer.java:native)
at gnu.java.awt.peer.gtk.GdkFontMetrics.stringWidth (GdkFontMetrics.java:99)
at gnu.java.awt.peer.gtk.GdkFontMetrics.charWidth (GdkFontMetrics.java:105)
at java.awt.FontMetrics.getWidths (FontMetrics.java:272)
at org.gjt.sp.jedit.textarea.TextAreaPainter.getCharWidth (TextAreaPainter.java:879)
at org.gjt.sp.jedit.textarea.TextAreaPainter.setStyles (TextAreaPainter.java:218)
at org.gjt.sp.jedit.EditPane.propertiesChanged (EditPane.java:453)
at org.gjt.sp.jedit.EditPane.<init> (EditPane.java:358)
at org.gjt.sp.jedit.View.createEditPane (View.java:1547)
at org.gjt.sp.jedit.View.restoreSplitConfig (View.java:1393)
at org.gjt.sp.jedit.View.<init> (View.java:1197)
at org.gjt.sp.jedit.jEdit.newView (jEdit.java:2141)
at org.gjt.sp.jedit.jEdit.newView (jEdit.java:2117)
at org.gjt.sp.jedit.jEdit.newView (jEdit.java:2097)
at org.gjt.sp.jedit.jEdit$5.run (jEdit.java:3455)
at java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:200)
at java.awt.EventQueue.dispatchEvent (EventQueue.java:465)
at java.awt.EventDispatchThread.run (EventDispatchThread.java:75)
at java.lang.VMThread.run (VMThread.java:123)
/usr/bin/jedit: line 2: 30506 Aborted java -jar /usr/share/jedit/jedit.jar "${@}"


with java-config --set-system-vm ibm-jdk-bin-1.4 or java-config --set-system-vm ibm-jdk-bin-1.5
jedit ends with this error log


any idea ?


Last edited by ddc on Mon Nov 26, 2007 7:50 pm; edited 2 times in total
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1609
Location: U.S.A.

PostPosted: Mon Nov 12, 2007 1:10 pm    Post subject: Reply with quote

Java's working for me, but I don't use kaffe or jedit.
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Mon Nov 12, 2007 8:10 pm    Post subject: Reply with quote

BoneKracker wrote:
Java's working for me, but I don't use kaffe or jedit.


what have you tested ?
also, as you can see i installed kaffe,and ibm-jdk-1.5,ibm-jdk-1.4
what are you using ?


Last edited by ddc on Mon Nov 12, 2007 11:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1609
Location: U.S.A.

PostPosted: Mon Nov 12, 2007 9:40 pm    Post subject: Reply with quote

ibm-jdk-1.5 (as system vm)
ibm-jdk-1.4.2.9 (as "generation-1" vm)

I do not have kaffe or other vm installed.

I have done some manual java app coding (using vim), compiled, run.

I have installed NetBeans and used it for a couple of projects (including running "javadb", tomcat, etc.).

I installed an ran Eclipse, but had problems with the latest version making certain text invisible (problem unrelated to Java) so I uninstalled it.
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Tue Nov 13, 2007 6:25 am    Post subject: Reply with quote

I use jedit and it works fine so at least I can tell you that you should be able to make it work. I use ibm-jdk-1.5. I don't have kaffe installed. My hardware is a 12inch ibook G4 in case it matters.


cheers
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Tue Nov 13, 2007 8:43 am    Post subject: Reply with quote

ok, how have you installed java ?
on what release of gentoo ? i' m on 2007.0
could you tell me the version of pango ? mine is pango-2.16.5

i followed the doc (i emerge java with emerge virtual/jdk, that emerges ibm-jdk-1.5 )
i have the issues i posted: they seems related to pango

however, my personal java coding is well working (i'm coding easy programs working without any graph support, i mean i code just text applications)

i mean i find isses with jedit and with graphical apps like it, but not with java text applications


invoking jedit with ibm-jdk-bin-1.4 has this error message
Code:

java: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.
JVMDG217: Dump Handler is Processing Signal 6 - Please Wait.
JVMDG303: JVM Requesting Java core file
JVMDG304: Java core file written to /root/java-error/javacore.20071113.143043.10890.txt
JVMDG215: Dump Handler has Processed Error Signal 6.
/usr/bin/jedit: line 2: 10890 Aborted                 java -jar /usr/share/jedit/jedit.jar "${@}"


could this help to understand what is problem ?

regards
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1609
Location: U.S.A.

PostPosted: Tue Nov 13, 2007 1:53 pm    Post subject: Reply with quote

x11-libs/pango-1.16.5
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Tue Nov 13, 2007 2:23 pm    Post subject: Reply with quote

BoneKracker wrote:
x11-libs/pango-1.16.5


1.16.5 as mine ...

have you emerged virtual/jdk ?
have you modified/installed/patched something/something-else ?
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1609
Location: U.S.A.

PostPosted: Tue Nov 13, 2007 6:28 pm    Post subject: Reply with quote

Standard gentoo java (virtual/jdk-1.4, virtual/jdk-1.5).

The only thing I modified was /opt/ibm/jdk-bin/1.5.0.5.a/jre/lib/jaxp.properties as follows:
Code:
#javax.xml.datatype.DatatypeFactory=org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl
javax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.TransformerFactoryImpl


Which was to get NetBeans 5.5 xml processing working properly to build correct ant scripts, but I don't think that is related to your problem.

I really lack the knowledge to help you troubleshoot this.

I do know that one other difference between ibm-jdk and sun is the just-in-time compiler. You can turn that off with a command-line flag "-nojit" I think. But that is a stab in the dark.

My strategy for resolving problems with Java has been:
(1) Google
(2) Sun documentation and IBM documentation
(3) Documentation/forum/wiki for product in question

My instincts tell me that since your Java seems to be installed and working correctly, then your Jedit install may be misconfigured somehow.

Hopefully someone who knows more about Java and Jedit will provide additional help here. :)
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Tue Nov 13, 2007 8:03 pm    Post subject: Reply with quote

it seems a bug related to x11lib (not to pango) and it has been posted on bugs.gentoo.org
https://bugs.gentoo.org/show_bug.cgi?id=156353 and other


it seems this bug makes issues with particular USE flags, for example with/without xcb

Quote:

"Subject: [Bug 156353] dev-java/sun-jdk-1.5* and dev-java/sun-jre-1.5* do not work if libX11 and mesa are compile with USE="xcb
(In reply to comment #34)
> Disable "xcb" use flag.
>
> emerge --newuse world
>
> Problem solved.

workaround != solution"


i have to read more, and to understand what is the best to fix my system
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Tue Nov 13, 2007 11:09 pm    Post subject: Reply with quote

https://bugzilla.novell.com/show_bug.cgi?id=252510

have you compiled x11lib & x11xcb with "xcb" in your USE flag ?
are exporting LIBXCB_ALLOW_SLOPPY_LOCK=1 before starting jedit ?

here it is not working, but it should ...
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Tue Nov 13, 2007 11:30 pm    Post subject: Reply with quote

about the error message

Quote:

java: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.


http://lists.debian.org/debian-devel-announce/2006/11/msg00010.html

Quote:

xcb_xlib.c:41: xcb_xlib_lock: Assertion `!c->xlib.lock' failed.
xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.

Both of these represent bugs in a caller of libX11, and *not* in libX11
or libxcb. The first assertion means that a caller attempted to lock
the display while already locked. The second assertion means that a
caller attempted to unlock the display without having it locked. If you
encounter such bugs, please report a bug against the offending software
(*not* libx11-6 or libxcb), provide a backtrace, and X-Debbugs-CC
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Wed Nov 14, 2007 2:11 am    Post subject: Reply with quote

Quote:
have you compiled x11lib & x11xcb with "xcb" in your USE flag ?
are exporting LIBXCB_ALLOW_SLOPPY_LOCK=1 before starting jedit ?



No to both questions... The only thing I notice java-related on my install is that I have the unstable version of aspectwerkz installed with java5 USE-flag set. But I think this was to get jabref working. I doubt it has anything to do jedit.
Back to top
View user's profile Send private message
ndansmith
n00b
n00b


Joined: 01 Aug 2005
Posts: 60

PostPosted: Wed Nov 14, 2007 2:17 am    Post subject: Reply with quote

Note sure about why that is happening with IBM's jdk, but Kaffee is not typically considered a sane system VM and many many applications do not work with it.
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Wed Nov 14, 2007 11:15 am    Post subject: Reply with quote

i also installed kaffe 'cause kaffe is provided with sources, and i like to read sources
to do my java serious job i planned to use ONLY the ibm-jdk (v1.4)

however, actually the ibm-jdk (1.4/1.5) is not working, 'cause the the xcb bug

try this java code

Code:

import java.awt.*;

public class hallo_crash extends Frame {
  public static void main(String argv[])
  {
    new hallo_crash();
  }
  hallo_crash() {
    Label hello = new Label("hallo World, have you crashed today ?");
    //add(hello, "Center");
    //setSize(200, 200);
    //setVisible(true);
  }
}

//
// the correct way to write "hello" is e {H,E,L,L,O}
// but on the oxford dictionary you can also find "hAllo"
// ----------------
// # javac hallo_crash.java
// # java hallo_crash
//
 // if you see
// ------ java: xcb_xlib.c:52: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.
// ------ Aborted
// you have the libxcb bug
//




are you bug-free running it ? are you bugged with the "c->xlib.lock' failed" ?
if you are bug-free, have you recompiled x11lib,libxcb with xcb in your USE flag ?
have you emerge the libxcb-1.1 (~ppc) ?
have you patched something ?

i mean, installing a clean gentoo 2007.0 (as i did), then emerging java has this bug as default
if you have solve this problem, could you let me know how you fixed it ?

regards
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Wed Nov 14, 2007 11:30 am    Post subject: Reply with quote

personally i find a workaround to this bug

1) adding xcb to the USE flag
2) recompiling x11lib
3) emerging xcblib-1.1 (it is ~ppc)


jedit is really working. When invoked it shows these lines

Quote:

Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xec9f9d4]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x40) [0xec9fb40]
#2 /usr/lib/libX11.so.6(_XReply+0x160) [0xed6c26c]
#3 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/xawt/libmawt.so(XineramaQueryScreens+0x100) [0xee80834]
#4 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/xawt/libmawt.so(xineramaInit+0x74) [0xee6660c]
#5 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/xawt/libmawt.so(awt_init_Display+0x13c) [0xee667bc]
#6 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x10) [0xee669e8]
#7 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9vm23.so [0xfa9ad30]
#8 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libjclscar_23.so [0xf15e64c]
#9 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libjclscar_23.so [0xf1672e4]
#10 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libjclscar_23.so [0xf15e64c]
#11 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libjclscar_23.so [0xf1672e4]
#12 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9vm23.so [0xfabf108]
#13 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9vm23.so [0xfabdda8]
#14 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9prt23.so [0xfa151ac]
#15 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9vm23.so [0xfabf55c]
#16 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9vm23.so [0xfac0bc4]
#17 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9vm23.so [0xfabc170]
#18 /usr/lib/jvm/ibm-jdk-bin-1.5/bin/java [0x100017a4]
#19 /lib/libc.so.6 [0xfe1d9e0]
Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xec9f9d4]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x3c) [0xec9faa4]
#2 /usr/lib/libX11.so.6 [0xed6b480]
#3 /usr/lib/libX11.so.6(XGetVisualInfo+0x8c) [0xed61070]
#4 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/xawt/libmawt.so [0xee65a8c]
#5 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/xawt/libmawt.so [0xee65ca4]
#6 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/xawt/libmawt.so(awt_init_Display+0x1d8) [0xee66858]
#7 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x10) [0xee669e8]
#8 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9vm23.so [0xfa9ad30]
#9 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libjclscar_23.so [0xf15e64c]
#10 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libjclscar_23.so [0xf1672e4]
#11 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libjclscar_23.so [0xf15e64c]
#12 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libjclscar_23.so [0xf1672e4]
#13 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9vm23.so [0xfabf108]
#14 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9vm23.so [0xfabdda8]
#15 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9prt23.so [0xfa151ac]
#16 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9vm23.so [0xfabf55c]
#17 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9vm23.so [0xfac0bc4]
#18 /opt/ibm-jdk-bin-1.5.0.5a/jre/bin/libj9vm23.so [0xfabc170]
#19 /usr/lib/jvm/ibm-jdk-bin-1.5/bin/java [0x100017a4]



issue solved ?
i have to hardly test other java application, and hardly test jedit before answer yes/no to this question


regards
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Sun Nov 25, 2007 7:13 pm    Post subject: Reply with quote

after testing a lot of java apps, now i can really say YES: issue solved
Back to top
View user's profile Send private message
Hwoarang
Retired Dev
Retired Dev


Joined: 24 Feb 2007
Posts: 701
Location: Leeds, UK

PostPosted: Sun Nov 25, 2007 10:05 pm    Post subject: Reply with quote

I have the same bug and I cant find the x11lib or xcblib packages on my AMD64 Gentoo :roll: :roll:
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Mon Nov 26, 2007 10:05 am    Post subject: Reply with quote

Hwoarang wrote:
I have the same bug and I cant find the x11lib or xcblib packages on my AMD64 Gentoo :roll: :roll:
I am pretty sure ddc meant libX11 and libxcb notice that lib is in front not at the back.
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Mon Nov 26, 2007 6:27 pm    Post subject: Reply with quote

yes, sorry for the mistake
1) add "xcb" to the USE flag
2) recompile "x11-libs/libX11"
3) emerge "x11-libs/libxcb-1.1"

(note: you need the libxcb-1.1, the libxcb-1.0 will not fix the problem)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum