Problematic frame: # J java.nio.MappedByteBuffer.load()

Helo all...
I'm getting an error when generating a PDF using BIRT Framework in Eclipse. Nothing fancy, just compiling a simple report to pdf.
The problem is, the JVM crashes with the following error:
# A fatal error has been detected by the Java Runtime Environment:
# EXCEPTION_IN_PAGE_ERROR (0xc0000006) at pc=0x0190f0be, pid=5848, tid=2392
# JRE version: 7.0_09-b05
# Java VM: Java HotSpot(TM) Client VM (23.5-b02 mixed mode, sharing windows-x86 )
**# Problematic frame:
# J java.nio.MappedByteBuffer.load()Ljava/nio/MappedByteBuffer;**
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
# An error report file with more information is saved as:
# C:\Users\luis\Desktop\teste\birt\hs_err_pid5848.log
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
I already tried:
1. Run the program in another computers - it worked
2. Reinstall Java on the computer - It did nothing
3. I check the integrity of the disk C: - Nothing
I already spent two days trying to fix this and I don't have any progress. I can't find a solution on the web either.
Thanks in advance

Thanks for the help.
But it can not be related to BIRT because it works in every other computer that I tried so far. There is only one computer that not works properly.
If it were BIRT's fault, it wouldn't work in any computer.
Thanks again

Similar Messages

  • Performance of java nio with dd in linux.

    Hi
    I ran this code in java to dump 0s in a file of size 1gb and tried the same with dd in linux.
    Java code : I use a preinitialized array (the data) and fill a mappedbytebuffer with it.
    package filePersistence.test;
    import java.io.File;
    import java.io.RandomAccessFile;
    import java.nio.MappedByteBuffer;
    import java.nio.channels.FileChannel;
    public class TimeLineTest {
         private static final int BYTE_LENGTH = 1000;
         //this is the input
         static byte[] b = new byte[BYTE_LENGTH];
         public static void main(String[] arg) throws Exception
              //initializing the input
              for (int i=0;i<BYTE_LENGTH;i++)
                   b[i] = 0;
              File file = new File(arg[0]);
              RandomAccessFile raFile = new RandomAccessFile(file,"rw");
              FileChannel fChannel = raFile.getChannel();
              int loopCount = 1000000;
              MappedByteBuffer mbuffer = fChannel.map( FileChannel.MapMode.READ_WRITE ,0,loopCount * BYTE_LENGTH);
              //System.out.println(" going to fill in a file" + file.getName());
              long k = 0;
              long startTime = System.currentTimeMillis();
              for (int i=0;i<loopCount;i++)
         //populate the mapped buffer
                   mbuffer.put(b);
              //persist into the file
              mbuffer.force();
              long endTime = System.currentTimeMillis();
              System.out.println(" file filled size1 "+file.length());
              System.out.println(" time " + (endTime - startTime));
    On a linux machine this takes around 7 secs while dd used as
    "dd if=/dev/zero of=mytestfile.out bs=1000 count=1000000"
    1000000+0 records in
    1000000+0 records out
    1000000000 bytes (1.0 GB) copied, 4.618 seconds, 217 MB/s
    4.6 and 7 differ quite a lot. Is there a way the java code can be improved to match dd ?(-sever does not help)
    Thanks
    Sumanta

    Hi
    Can this be called a dd equivalent code ?
    package filePersistence.test;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.RandomAccessFile;
    import java.nio.MappedByteBuffer;
    import java.nio.channels.FileChannel;
    public class TimeLineTest {
         private static final int BYTE_LENGTH = 1000;
         //this is the input
         static byte[] b = new byte[BYTE_LENGTH];
         public static void main(String[] arg) throws Exception
              //initializing the input
              for (int i=0;i<BYTE_LENGTH;i++)
                   b[i] = 0;
              String srcFile = arg[0] + "_src";
              FileOutputStream fos = new FileOutputStream(srcFile);
              fos.write(b);
              fos.getFD().sync();
              fos.flush();
              fos.close();
              RandomAccessFile srcraFile = new RandomAccessFile(srcFile,"rw");
              FileChannel srcChannel = srcraFile.getChannel();
              File file = new File(arg[0]);
              RandomAccessFile raFile = new RandomAccessFile(file,"rw");
              FileChannel raChannel = raFile.getChannel();
              int loopCount = 1000000;
              //MappedByteBuffer mbuffer = fChannel.map( FileChannel.MapMode.READ_WRITE ,0,loopCount * BYTE_LENGTH);
              //System.out.println(" going to fill in a file" + file.getName());
              long startTime = System.currentTimeMillis();
              for (int i=0,position=0;i<loopCount;i++,position+=BYTE_LENGTH)
         //populate the mapped buffer
                   //mbuffer.put(b);
                   raChannel.position(position);
                   srcChannel.transferTo(0, BYTE_LENGTH, raChannel);
              //persist into the file
              //mbuffer.force();
              raFile.getFD().sync();
              raChannel.close();
              raFile.close();
              long endTime = System.currentTimeMillis();
              System.out.println(" file filled size1 "+file.length());
              System.out.println(" time " + (endTime - startTime));
    }

  • JVM Coredump with libengine.so as the problematic frame

    Hi Experts,
    Our application is running over Tuxedo 9.0, and JVM 1.5.0_07-b03 mixed mode. We are experiencing coredumps frequently in production environment.
    The hs_err file shows the following information:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # SIGSEGV (0xb) at pc=0x4aa0daa8, pid=21887, tid=45
    # Java VM: Java HotSpot(TM) Server VM (1.5.0_07-b03 mixed mode)
    # Problematic frame:
    # C [libengine.so.71+0x10daa8] gprematch+0x16c
    --------------- T H R E A D ---------------
    Current thread (0x006ce740): JavaThread "[ACTIVE] ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon [_thread_in_native, id=45]
    siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x3d22686b
    Registers:
    O0=0x4997d118 O1=0x4997d5ce O2=0x4a9ebc80 O3=0x02f7a7a0
    O4=0x0017969c O5=0x00000000 O6=0x4997c7f8 O7=0x4aa0d9a0
    G1=0x00efa000 G2=0x02f71dc8 G3=0x4997d07c G4=0x02f71dc8
    G5=0xff018640 G6=0x00000000 G7=0x4bbd5200 Y=0x00000008
    PC=0x4aa0daa8 nPC=0x4aa0daac
    Top of Stack: (sp=0x4997c7f8)
    0x4997c7f8: 00000000 00000000 00000000 02f71dc8
    0x4997c808: 0000478c 00004400 00004bc0 3d226869
    0x4997c818: 02f72838 4997d5ce 00000000 4ab59ebc
    0x4997c828: 3d22686b 02f71dc8 4997d0c8 4acc1714
    0x4997c838: 00000000 7465642f 00000000 752f7574
    0x4997c848: 66382f68 746d6c2f 00000000 02f71dc8
    0x4997c858: 6e742e6a 73700a2a 2a2a2045 4e442044
    0x4997c868: 45425547 20203230 31302d30 342d3031
    Instructions: (pc=0x4aa0daa8)
    0x4aa0da98: f0 27 6b 60 ee 07 bf ec b8 05 e0 02 f8 27 bf ec
    0x4aa0daa8: f2 0d e0 02 80 a6 60 03 12 80 00 09 d0 07 bf fc
    Stack: [0x49880000,0x49980000), sp=0x4997c7f8, free space=1009k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [libengine.so.71+0x10daa8] gprematch+0x16c
    C [libwsc.so.71+0x4171c] _tmtrace+0x340
    C [libwsc.so.71+0x108c8] tpalloc+0x144
    C [libtti_tuxedo_wsc.so+0x3330] Java_terrapin_tuxedo_TpType_tpalloc+0xc0
    j terrapin.tuxedo.TpType.tpalloc(Ljava/lang/String;Ljava/lang/String;I)J+1817098320
    j terrapin.tuxedo.TpType.tpalloc(Ljava/lang/String;Ljava/lang/String;I)J+0
    j terrapin.tuxedo.Fml32.<init>()V+13
    v ~C2IAdapter
    VM Arguments:
    jvm_args: -Dinfo=TC5.0.0.37_7003_/totalcarebin1/tcaredomain115 -Xms2048m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=512m -verbose:gc -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -Xloggc:/totalcarelog2/gc_20100401060835.log -XX:+UseParNewGC -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+UseCMSCompactAtFullCollection -verbose:jni -Xss1024K -da -Dplatform.home=/totalcarebin1/3p/bea/weblogic91 -Dwls.home=/totalcarebin1/3p/bea/weblogic91/server -Dwli.home=/totalcarebin1/3p/bea/weblogic91/integration -Dweblogic.management.discover=true -Dweblogic.ProductionModeEnabled=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/totalcarebin1/3p/bea/patch_weblogic910/profiles/default/sysext_manifest_classpath -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0 -Dweblogic.management.username=system -Dweblogic.management.password=systempass -Dweblogic.Name=tcareserver -Djava.security.policy=/totalcarebin1/3p/bea/weblogic91/server/lib/weblogic.policy -Djava.security.auth.login.config==/totalcarebin1/tcaredomain115/serverclasses/propfiles/totalcare_jaas.config
    java_command: weblogic.Server
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=/totalcarebin1/3p/jdk1.5.0_07
    PATH=.:/usr/dt/bin:/usr/ccs/bin:/usr/local/bin:/totalcarebin1/3p/jdk1.5.0_07/bin:/bin:/bin:/usr/bin:/usr/sbin:/etc:/usr/local/gnu/bin:/opt/SUNWste/bin:/usr/openwin/bin:/opt/SUNWspro/bin:/totalcarebin1/3p/tuxedo9/bin:/usr/ucb:/usr1/arbor/ccbin:/totalcarebin1/3p/bea/weblogic91/server/bin:/totalcarebin1/3p/jdk1.5.0_07/bin:/totalcarebin1/3p/bea/weblogic91/server/bin:/totalcarebin1/3p/jdk1.5.0_07/jre/bin:/totalcarebin1/3p/jdk1.5.0_07/bin:/u01/app/oracl1/product/10.2/cl_1/bin:/totalcarebin1/3p/perl/bin:/sbin:/usr/sbin:/totalcarebin1/3p/jdk1.5.0_07/bin:/totalcarebin1/tcaredomain115/util/unix:/totalcarebin1/3p/tuxedo9/bin:/usr/sfw/bin:/usr/local/bin:/usr/ccs/bin:/usr/local/sbin:/usr/ccs/bin:/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/ccs/bin:/opt/SUNWexplo/bin:/usr/sfw/bin:/usr/sfw/sbin:/usr/local/sbin:/usr/cluster/bin:/usr/cluster/sbin
    LD_LIBRARY_PATH=/totalcarebin1/3p/jdk1.5.0_07/jre/lib/sparc/server:/totalcarebin1/3p/jdk1.5.0_07/jre/lib/sparc:/totalcarebin1/3p/jdk1.5.0_07/jre/../lib/sparc:/usr/local/lib:/usr/lib:/usr/dt/bin:/totalcarebin1/3p/jdk1.5.0_07/lib:/usr/openwin/lib:/opt/SUNWspro/lib:/usr/atria/lib:/totalcarebin1/3p/tuxedo9/lib:/totalcarebin1/tcaredomain115/serverclasses/3p/terrapin/lib32:/totalcarebin1/3p/bea/weblogic91/server/lib/solaris:/totalcarebin1/3p/bea/weblogic91/server/native/solaris/sparc:/totalcarebin1/3p/bea/weblogic91/server/native/solaris/sparc64
    SHELL=/bin/ksh
    Signal Handlers:
    SIGSEGV: [libjvm.so+0x6f60b8], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
    SIGBUS: [libjvm.so+0x6f60b8], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
    SIGFPE: [libjvm.so+0x276398], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
    SIGPIPE: [libjvm.so+0x276398], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
    SIGILL: [libjvm.so+0x276398], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
    SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGUSR2: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGHUP: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGQUIT: [libjvm.so+0x66a38c], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
    SIGTERM: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
    --------------- S Y S T E M ---------------
    OS: Solaris 10 6/06 s10s_u2wos_09a SPARC
    Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
    Use is subject to license terms.
    Assembled 09 June 2006
    uname:SunOS 5.10 Generic_137111-03 sun4u (T2 libthread)
    rlimit: STACK 8192k, CORE infinity, NOFILE 65536, AS infinity
    load average:0.39 0.57 0.44
    CPU:total 2 has_v8, has_v9, has_vis1, has_vis2, is_ultra3
    Memory: 8k page, physical 16777216k(11833704k free)
    vm_info: Java HotSpot(TM) Server VM (1.5.0_07-b03) for solaris-sparc, built on May 3 2006 01:22:35 by unknown with unknown Workshop:0x550
    The PSTACK shows:
    core 'core.1stApril' of 21887:     /totalcarebin1/3p/jdk1.5.0_07/bin/java -Dinfo=TC5.0.0.37_7003_/totalca
    ----------------- lwp# 1 / thread# 1 --------------------
    ff2c6510 ___lwp_cond_wait (3bbf0, 3bbd8, 0, 0, 0, 1) + 8
    feab4f98 __1cNObjectMonitorEwait6MxipnGThread__v_ (136068, 94c8, 8c00, fefc4000, 3a950, 136088) + 59c
    feab61a8 __1cSObjectSynchronizerEwait6FnGHandle_xpnGThread__v_ (ffbfaeb0, 8784, 0, 3a950, 8400, fefc4000) + e8
    feab5e58 JVM_MonitorWait (0, 3b534, 3a950, ff018ffc, 0, 1) + 31c
    f900c280 * java/lang/Object.wait(J)V+99
    f900c224 * java/lang/Object.wait(J)V+0
    f9005764 * java/lang/Object.wait()V+2 (line 474)
    f9005764 * weblogic/t3/srvr/T3Srvr.waitForDeath()V+46 (line 729)
    f9005764 * weblogic/t3/srvr/T3Srvr.run([Ljava/lang/String;)I+120 (line 380)
    f90058b8 * weblogic/Server.main([Ljava/lang/String;)V+43 (line 67)
    f9000218 * StubRoutines (1)
    fe99add4 __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (1, 3a950, ffbfb1b8, ffbfb0e8, 4, ffbfb238) + 5a0
    feadf258 jni_CallStaticVoidMethod (ff018ffc, 3b52c, 3b128, 3a950, 3b120, 3ab20) + 500
    00012224 main     (3bb3c, 348da, ff0108a8, 1d8, fead497c, 1) + 115c
    000110b0 _start   (0, 0, 0, 0, 0, 0) + 108
    I appreciate your comments in advance, please let me know if you require further information.
    Thanks,
    Edited by: user3587921 on Apr 6, 2010 8:01 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    Unfortunately it appears you are calling Tuxedo from Java using JNI. Although that should work, it isn't something that Oracle supports. My guess is that you are experiencing memory corruption problems due to improper handling of allocated buffers. This is part of the reason we don't support JNI as the issues related to memory management can be very complex. My suggestion is that you go to whomever has provided you the JNI code for support (Comverse?). Alternatively you could look at the various Java integration products Oracle provides for Tuxedo. The Java integration to Tuxedo options are Jolt, WebLogic Tuxedo Connector (WTC - a component of WLS), and the new Tuxedo JCA Adapter. Although if you are using a packaged application like Comverse Total Care, you'll really need to talk with them as you're unlikely to be able to switch to an Oracle supported mechanism without their help or changes on their part.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • JVM crashed with Problematic frame: C  [libzip.so+0xbc53]

    Our production JVM (14.2-b01 mixed mode linux-x86 ) has been crashing daily recently.
    Below is the recent hotspot error on the x64 Linux host.
    I would really appreciate your feedback on the issue!
    Portion of hs_err_pid23314.log due to the posting size limit:
    ===========================================
    # A fatal error has been detected by the Java Runtime Environment:
    # SIGBUS (0x7) at pc=0xb73aac53, pid=23314, tid=1798790032
    # JRE version: 6.0_16-b01
    # Java VM: Java HotSpot(TM) Server VM (14.2-b01 mixed mode linux-x86 )
    # Problematic frame:
    # C [libzip.so+0xbc53]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    --------------- T H R E A D ---------------
    Current thread (0x6cf89000): JavaThread "Thread-1309" [_thread_in_native, id=3528, stack(0x6af8e000,0x6b376000)]
    siginfo:si_signo=SIGBUS: si_errno=0, si_code=2 (BUS_ADRERR), si_addr=0xb73c5e80
    Registers:
    EAX=0x08540bd0, EBX=0xb73af7bc, ECX=0xb73c4000, EDX=0x00e76000
    ESP=0x6b373ca8, EBP=0x6b373cd0, ESI=0xb73c5e63, EDI=0x6e60a7c8
    EIP=0xb73aac53, CR2=0xb73c5e80, EFLAGS=0x00210286
    Top of Stack: (sp=0x6b373ca8)
    0x6b373ca8: 00000030 6ca1db68 6ca1db70 6ca1df5c
    0x6b373cb8: 08540c78 b73af7bc b73aac0b b73af7bc
    0x6b373cc8: 08540fa4 00000000 6b373d00 b73ab00b
    0x6b373cd8: 08540bd0 08540fa4 00000000 00000000
    0x6b373ce8: 6b373d28 b43cb8a0 569a3b6c b73af7bc
    0x6b373cf8: 6b373d48 6cf89110 6b374170 b73a21f9
    0x6b373d08: 08540bd0 6b373d48 00000044 00000044
    0x6b373d18: 6b373d48 6cf89000 b77b3890 b77b3890
    Instructions: (pc=0xb73aac53)
    0xb73aac43: 8b 70 04 8b 45 08 8b 48 10 8b 50 1c 01 ce 29 d6
    0xb73aac53: 0f b6 46 1d 0f b6 56 1c c1 e0 08 09 c2 89 55 f0
    Stack: [0x6af8e000,0x6b376000], sp=0x6b373ca8, free space=3991k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [libzip.so+0xbc53]
    C [libzip.so+0xc00b] ZIP_GetEntry+0x10b
    C [libzip.so+0x31f9] Java_java_util_zip_ZipFile_getEntry+0xc9
    J java.util.zip.ZipFile.getEntry(JLjava/lang/String;Z)J
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    J java.util.zip.ZipFile.getEntry(JLjava/lang/String;Z)J
    J java.util.jar.JarFile.getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry;
    j java.util.jar.JarFile.getJarEntry(Ljava/lang/String;)Ljava/util/jar/JarEntry;+2
    j com.ibm.staf.service.STAFServiceJarClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class;+37
    J java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;
    j java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;+3
    j java.lang.ClassLoader.loadClassInternal(Ljava/lang/String;)Ljava/lang/Class;+2
    v ~StubRoutines::call_stub
    j com.vmware.qa.staf.vc.vm.VirtualMachine.registerVM(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;ZLcom/vmware/vcqa/ConnectAnchor;)Lcom/vmware/vc/ManagedObjectReference;+90
    j com.vmware.qa.staf.vc.vm.VMSTAFService.handleRegVM(Lcom/ibm/staf/service/STAFServiceInterfaceLevel30$RequestInfo;)Lcom/ibm/staf/STAFResult;+154
    j com.vmware.qa.staf.vc.vm.VMSTAFService.acceptRequest(Lcom/ibm/staf/service/STAFServiceInterfaceLevel30$RequestInfo;)Lcom/ibm/staf/STAFResult;+138
    j com.ibm.staf.service.STAFServiceHelper.callService(Ljava/lang/String;Lcom/ibm/staf/service/STAFServiceHelper$ServiceRequest;)Lcom/ibm/staf/STAFResult;+154
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    =>0x6cf89000 JavaThread "Thread-1309" [_thread_in_native, id=3528, stack(0x6af8e000,0x6b376000)]
    0x6e772c00 JavaThread "MultiThreadedHttpConnectionManager cleanup" daemon [_thread_blocked, id=23522, stack(0x6cbaf000,0x6cc00000)]
    0x08517800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=23331, stack(0x6f324000,0x6f375000)]
    0x08515c00 JavaThread "CompilerThread1" daemon [_thread_blocked, id=23330, stack(0x6f375000,0x6f3f6000)]
    0x08512c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=23329, stack(0x6f3f6000,0x6f477000)]
    0x08511400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=23328, stack(0x6f477000,0x6f4c8000)]
    0x084fdc00 JavaThread "Finalizer" daemon [_thread_blocked, id=23327, stack(0x6f6c8000,0x6f719000)]
    0x084fc400 JavaThread "Reference Handler" daemon [_thread_blocked, id=23326, stack(0x6f719000,0x6f76a000)]
    0x08414800 JavaThread "main" [_thread_in_native, id=23316, stack(0xb73f6000,0xb7447000)]
    Other Threads:
    0x084f9400 VMThread [stack: 0x6fa0b000,0x6fa8c000] [id=23325]
    0x08519800 WatcherThread [stack: 0x6f2a3000,0x6f324000] [id=23332]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    PSYoungGen total 89984K, used 66146K [0xad110000, 0xb4250000, 0xb42d0000)
    eden space 67072K, 75% used [0xad110000,0xb023d730,0xb1290000)
    from space 22912K, 68% used [0xb1290000,0xb21fb400,0xb28f0000)
    to space 22848K, 0% used [0xb2c00000,0xb2c00000,0xb4250000)
    PSOldGen total 116864K, used 74610K [0x742d0000, 0x7b4f0000, 0xad110000)
    object space 116864K, 63% used [0x742d0000,0x78bac930,0x7b4f0000)
    PSPermGen total 33408K, used 31487K [0x702d0000, 0x72370000, 0x742d0000)
    object space 33408K, 94% used [0x702d0000,0x7218fc00,0x72370000)
    OS:Red Hat Enterprise Linux Server release 5.4 (Tikanga)
    uname:Linux 2.6.18-164.el5PAE #1 SMP Tue Aug 18 15:59:11 EDT 2009 i686
    libc:glibc 2.5 NPTL 2.5
    rlimit: STACK 10240k, CORE 0k, NPROC 147456, NOFILE 1024, AS infinity
    load average:0.07 0.02 0.00
    CPU:total 8 (1 cores per cpu, 1 threads per core) family 6 model 29 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1
    Memory: 4k page, physical 8309404k(5573024k free), swap 1048568k(1048568k free)
    vm_info: Java HotSpot(TM) Server VM (14.2-b01) for linux-x86 JRE (1.6.0_16-b01), built on Jul 31 2009 06:03:51 by "java_re" with gcc 3.2.1-7a (J2SE release)
    time: Fri Jan 15 01:16:17 2010
    elapsed time: 97047 seconds

    I also got this error .
    # A fatal error has been detected by the Java Runtime Environment:
    # SIGBUS (0x7) at pc=0x00007f1d761ccf31, pid=7384, tid=139764528719632
    # JRE version: 6.0_20-b02
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.3-b01 mixed mode linux-amd64 )
    # Problematic frame:
    # C [libzip.so+0xaf31]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    --------------- T H R E A D ---------------
    Current thread (0x000000004091a800): JavaThread "main" [_thread_in_native, id=7411, stack(0x00007f1d77062000,0x00007f1d77163000)]
    siginfo:si_signo=SIGBUS: si_errno=0, si_code=2 (BUS_ADRERR), si_addr=0x00007f1d2dde01fe
    Registers:
    RAX=0x0000000000000000, RBX=0x00007f1d201737a4, RCX=0x00007f1d28000000, RDX=0x00007f1d28000020
    RSP=0x00007f1d7715f7c0, RBP=0x00007f1d2dde01e1, RSI=0x0000000000000040, RDI=0x00007f1d28000020
    R8 =0x0000000000000000, R9 =0x00007f1d28000040, R10=0x00007f1d77d0af18, R11=0x00007f1d77d0ec38
    R12=0x00007f1d280dab30, R13=0x00007f1d200b8ab0, R14=0x00007f1d7715f850, R15=0x0000000000000063
    RIP=0x00007f1d761ccf31, EFL=0x0000000000010206, CSGSFS=0x0000000000000033, ERR=0x0000000000000004
    TRAPNO=0x000000000000000e
    Top of Stack: (sp=0x00007f1d7715f7c0)
    0x00007f1d7715f7c0: 00007f1d7715f7e0 00007f1d201737a4
    0x00007f1d7715f7d0: 00007f1d200b8ab0 0000000000000000
    0x00007f1d7715f7e0: 00000000c0292954 00007f1d7715f850
    0x00007f1d7715f7f0: 0000000000000063 00007f1d761cd2ad
    0x00007f1d7715f800: 000000004091a800 00007f1d7715f850
    0x00007f1d7715f810: 000000004091a9b8 0000000000000063
    0x00007f1d7715f820: 00007f1d7715fd28 0000000000000063
    0x00007f1d7715f830: 0000000000000001 00007f1d761c5747
    0x00007f1d7715f840: 00007f1d7715f850 00007f1d200b8ab0
    0x00007f1d7715f850: 636170612f67726f 756f68616d2f6568
    0x00007f1d7715f860: 682f6874616d2f74 69732f706f6f6461
    0x00007f1d7715f870: 79746972616c696d 696d6953776f522f
    0x00007f1d7715f880: 6f4a79746972616c 7468676965572462
    0x00007f1d7715f890: 72727563634f6465 7265507365636e65
    0x00007f1d7715f8a0: 65526e6d756c6f43 6c632e7265637564
    0x00007f1d7715f8b0: 0000000200737361 00007f1d00000000
    0x00007f1d7715f8c0: 000000004091a9b8 000000004091b598
    0x00007f1d7715f8d0: 00007f1d00000000 000000004091b590
    0x00007f1d7715f8e0: 00007f1d77cf4170 000000004091b5a0
    0x00007f1d7715f8f0: 0000000077161060 00007f1d77161040
    0x00007f1d7715f900: 0000000000000000 00007f1d77724360
    0x00007f1d7715f910: 0000000000000000 00007f1d00000000
    0x00007f1d7715f920: 00007f1d7715f940 00007f1d5ff365e0
    0x00007f1d7715f930: 00007f1d620e8000 0000000000000000
    0x00007f1d7715f940: 00007f1d00010100 00007f1d777244cb
    0x00007f1d7715f950: 00007f1d7715f878 00007f1d7715f8b8
    0x00007f1d7715f960: 00007f1d7715f941 0000000800000002
    0x00007f1d7715f970: 0000000000000128 00007f1d7715f9f0
    0x00007f1d7715f980: 0000000040918610 000000004091b130
    0x00007f1d7715f990: 000000004091b140 000000004091b518
    0x00007f1d7715f9a0: 0000000040918530 00007f1d7715fa00
    0x00007f1d7715f9b0: 00007f1d7715fa40 000000004091a800
    Instructions: (pc=0x00007f1d761ccf31)
    0x00007f1d761ccf21: 28 00 00 00 00 8b 6b 04 49 03 6d 18 49 2b 6d 28
    0x00007f1d761ccf31: 0f b6 45 1d 0f b6 5d 1c 44 0f b6 75 1e 44 0f b6
    Stack: [0x00007f1d77062000,0x00007f1d77163000], sp=0x00007f1d7715f7c0, free space=3f50000000000000018k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [libzip.so+0xaf31]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j java.util.zip.ZipFile.getEntry(JLjava/lang/String;Z)J+0
    j java.util.zip.ZipFile.getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry;+31
    j java.util.jar.JarFile.getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry;+2
    j java.util.jar.JarFile.getJarEntry(Ljava/lang/String;)Ljava/util/jar/JarEntry;+2
    j sun.misc.URLClassPath$JarLoader.getResource(Ljava/lang/String;Z)Lsun/misc/Resource;+48
    j sun.misc.URLClassPath$JarLoader.findResource(Ljava/lang/String;Z)Ljava/net/URL;+3
    j sun.misc.URLClassPath$1.next()Z+42
    j sun.misc.URLClassPath$1.hasMoreElements()Z+1
    j java.net.URLClassLoader$3$1.run()Ljava/lang/Object;+7
    v ~StubRoutines::call_stub
    j java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+0
    j java.net.URLClassLoader$3.next()Z+24
    j java.net.URLClassLoader$3.hasMoreElements()Z+1
    j sun.misc.CompoundEnumeration.next()Z+33
    j sun.misc.CompoundEnumeration.hasMoreElements()Z+1
    j org.apache.hadoop.mapred.JobConf.findContainingJar(Ljava/lang/Class;)Ljava/lang/String;+42
    j org.apache.hadoop.mapred.JobConf.setJarByClass(Ljava/lang/Class;)V+1
    j org.apache.hadoop.mapreduce.Job.setJarByClass(Ljava/lang/Class;)V+5
    j org.apache.mahout.common.AbstractJob.prepareJob(Lorg/apache/hadoop/fs/Path;Lorg/apache/hadoop/fs/Path;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;)Lorg/apache/hadoop/mapreduce/Job;+74
    j org.apache.mahout.math.hadoop.similarity.RowSimilarityJob.run([Ljava/lang/String;)I+236
    j org.apache.hadoop.util.ToolRunner.run(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/util/Tool;[Ljava/lang/String;)I+38
    j org.apache.mahout.cf.taste.hadoop.item.RecommenderJob.run([Ljava/lang/String;)I+817
    j org.apache.hadoop.util.ToolRunner.run(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/util/Tool;[Ljava/lang/String;)I+38
    j org.apache.mahout.cf.taste.hadoop.item.RecommenderJob.main([Ljava/lang/String;)V+15
    v ~StubRoutines::call_stub
    j sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
    j sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
    j sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
    j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161
    j org.apache.hadoop.util.RunJar.main([Ljava/lang/String;)V+538
    v ~StubRoutines::call_stub

  • Java io and Java nio, which is faster to binary io?

    Anybody can advise me about java io and java nio ?
    I want to write the faster code to read and write binary files.
    I'm going to read/write
    - individual elements (int, double, etc)
    - arraylists
    - objects
    Also I'm going (or I'd want) to use seek functions.
    Thanks

    Anybody can advise me about java io and java nio ?
    I want to write the faster code to read and write binary files.Which is "faster" depends on exactly how you're using them. For example, a MappedByteBuffer is usually faster for random access than a RandomAccessFile, unless your files are so large (and your accesses so random) than you're constantly loading from disk. And it's not at all faster for linear uni-directional access than a simple FileInputStream.
    So, rather than expecting some random stranger telling you that one is faster than the other without knowing your project, perhaps you should tell us exactly how you plan to use IO, and why you think that one approach may be faster than the other.

  • Problematic frame: # V  [jvm.dll+0x51d46]

    I keep repeatably get this error. I changed my paths, system restored back to normal paths, reinstalled many many times, i dont know what else to do. If anyone knows what i can do to get this working i would appreciate it.
    # A fatal error has been detected by the Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006d841d46, pid=2680, tid=4704
    # JRE version: 6.0_16-b01
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (14.2-b01 mixed mode windows-amd64 )
    # Problematic frame:
    # V [jvm.dll+0x51d46]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x000000002a275000): JavaThread "CompilerThread0" daemon [_thread_in_native, id=4704, stack(0x000000002a8e0000,0x000000002a9e0000)]
    siginfo: ExceptionCode=0xc0000005, reading address 0x0000000000000000
    Registers:
    EAX=0x000000002c1b1ce0, EBX=0x000000002c157770, ECX=0x000000002c1b1cb0, EDX=0x000000002a9dc5a0
    ESP=0x000000002a9dc140, EBP=0x000000002d7e7b00, ESI=0x000000002a9dc5a0, EDI=0x000000002c1b1cb0
    EIP=0x000000006d841d46, EFLAGS=0x0000000000010202
    Top of Stack: (sp=0x000000002a9dc140)
    0x000000002a9dc140: 000000000000006a 000000006db67512
    0x000000002a9dc150: 000000002de24120 000000006db58ccf
    0x000000002a9dc160: 000000002a9dc5a0 0000000000000000
    0x000000002a9dc170: 0000000000000000 0000000000000000
    0x000000002a9dc180: 000000002df392d0 000000006dba9e95
    0x000000002a9dc190: 000000002c157770 0000000000000002
    0x000000002a9dc1a0: 000000002a9dc5a0 000000002c1b1cb0
    0x000000002a9dc1b0: 000000002a9dd9c0 0000000000000000
    0x000000002a9dc1c0: 000000002a9dc5a0 000000006dba90f4
    0x000000002a9dc1d0: 000000002c157770 0000000000000003
    0x000000002a9dc1e0: 000000002a9dc5a0 000000002c1b1cb0
    0x000000002a9dc1f0: 000000002a9dd9c0 000000002a274340
    0x000000002a9dc200: 000000002a9de370 000000006db1b728
    0x000000002a9dc210: 000000002c157770 0000000000000001
    0x000000002a9dc220: 000000002c157770 000000002a9dd9c0
    0x000000002a9dc230: 0000000000000000 0000000000f50000

    Dynamic libraries:
    0x0000000000400000 - 0x000000000042e000      C:\Windows\system32\java.exe
    0x0000000077030000 - 0x00000000771b0000      C:\Windows\system32\ntdll.dll
    0x0000000076e30000 - 0x0000000076f5b000      C:\Windows\system32\kernel32.dll
    0x000007fefdad0000 - 0x000007fefdbd8000      C:\Windows\system32\ADVAPI32.dll
    0x000007fefef10000 - 0x000007feff058000      C:\Windows\system32\RPCRT4.dll
    0x000000006d7f0000 - 0x000000006de4d000      C:\Program Files\Java\jre6\bin\server\jvm.dll
    0x0000000076f60000 - 0x000000007702d000      C:\Windows\system32\USER32.dll
    0x000007fefd770000 - 0x000007fefd7d3000      C:\Windows\system32\GDI32.dll
    0x000007fefb800000 - 0x000007fefb839000      C:\Windows\system32\WINMM.dll
    0x000007fefdbe0000 - 0x000007fefdc7c000      C:\Windows\system32\msvcrt.dll
    0x000007fefebf0000 - 0x000007fefedc8000      C:\Windows\system32\ole32.dll
    0x000007fefd9f0000 - 0x000007fefdac3000      C:\Windows\system32\OLEAUT32.dll
    0x000007fefb7b0000 - 0x000007fefb7ff000      C:\Windows\system32\OLEACC.dll
    0x000007fefdc80000 - 0x000007fefdcad000      C:\Windows\system32\IMM32.DLL
    0x000007feff060000 - 0x000007feff161000      C:\Windows\system32\MSCTF.dll
    0x000007fefdcb0000 - 0x000007fefdcbd000      C:\Windows\system32\LPK.DLL
    0x000007fefd7e0000 - 0x000007fefd87a000      C:\Windows\system32\USP10.dll
    0x000000006d760000 - 0x000000006d76e000      C:\Program Files\Java\jre6\bin\verify.dll
    0x000000006d3b0000 - 0x000000006d3d7000      C:\Program Files\Java\jre6\bin\java.dll
    0x000000006d310000 - 0x000000006d31a000      C:\Program Files\Java\jre6\bin\hpi.dll
    0x00000000771b0000 - 0x00000000771b9000      C:\Windows\system32\PSAPI.DLL
    0x000000006d7b0000 - 0x000000006d7c2000      C:\Program Files\Java\jre6\bin\zip.dll
    0x000000006d000000 - 0x000000006d1c1000      C:\Program Files\Java\jre6\bin\awt.dll
    0x000007fef8b30000 - 0x000007fef8b88000      C:\Windows\system32\WINSPOOL.DRV
    0x000007fefdf90000 - 0x000007fefebe2000      C:\Windows\system32\SHELL32.dll
    0x000007fefdea0000 - 0x000007fefdf13000      C:\Windows\system32\SHLWAPI.dll
    0x000007fefc040000 - 0x000007fefc239000      C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6001.18000_none_152e7382f3bd50c6\comctl32.dll
    0x000000006d600000 - 0x000000006d617000      C:\Program Files\Java\jre6\bin\net.dll
    0x000007fefee30000 - 0x000007fefee74000      C:\Windows\system32\WS2_32.dll
    0x000007fefdf20000 - 0x000007fefdf27000      C:\Windows\system32\NSI.dll
    0x000007fefcaf0000 - 0x000007fefcb3f000      C:\Windows\system32\mswsock.dll
    0x000007fefcb80000 - 0x000007fefcb87000      C:\Windows\System32\wship6.dll
    0x000007fefb6f0000 - 0x000007fefb703000      C:\Windows\system32\NLAapi.dll
    0x000007fefcde0000 - 0x000007fefce03000      C:\Windows\system32\IPHLPAPI.DLL
    0x000007fefcd90000 - 0x000007fefcdd5000      C:\Windows\system32\dhcpcsvc.DLL
    0x000007fefd0b0000 - 0x000007fefd0e9000      C:\Windows\system32\DNSAPI.dll
    0x000007fefd5c0000 - 0x000007fefd5dc000      C:\Windows\system32\Secur32.dll
    0x000007fefcd80000 - 0x000007fefcd8a000      C:\Windows\system32\WINNSI.DLL
    0x000007fefcd50000 - 0x000007fefcd7b000      C:\Windows\system32\dhcpcsvc6.DLL
    0x000007fef9870000 - 0x000007fef9883000      C:\Windows\system32\napinsp.dll
    0x000007fef9850000 - 0x000007fef9867000      C:\Windows\system32\pnrpnsp.dll
    0x000007fef9a10000 - 0x000007fef9a1b000      C:\Windows\System32\winrnr.dll
    0x000007fefdf30000 - 0x000007fefdf85000      C:\Windows\system32\WLDAP32.dll
    0x000007fefc750000 - 0x000007fefc757000      C:\Windows\System32\wshtcpip.dll
    0x000007fef9a40000 - 0x000007fef9a48000      C:\Windows\system32\rasadhlp.dll
    0x000007fefb130000 - 0x000007fefb141000      C:\Windows\system32\DWMAPI.DLL
    0x000007fefc3e0000 - 0x000007fefc431000      C:\Windows\system32\uxtheme.dll
    0x000000006d2a0000 - 0x000000006d30b000      C:\Program Files\Java\jre6\bin\fontmanager.dll
    0x000000006d620000 - 0x000000006d62b000      C:\Program Files\Java\jre6\bin\nio.dll
    VM Arguments:
    jvm_args: -Xmx500m
    java_command: EGUI
    Launcher Type: SUN_STANDARD
    Environment Variables:
    PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\
    USERNAME=bo
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 23 Stepping 6, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows Vista Build 6001 Service Pack 1
    CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 23 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3
    Memory: 4k page, physical 4157580k(2040844k free), swap 8545872k(6023212k free)
    vm_info: Java HotSpot(TM) 64-Bit Server VM (14.2-b01) for windows-amd64 JRE (1.6.0_16-b01), built on Jul 31 2009 05:24:11 by "java_re" with MS VC++ 8.0
    time: Sun Oct 11 11:26:44 2009
    elapsed time: 33 seconds

  • Java 6 segfaults loading net or j2gss library

    Hi,
    I have a one line program System.loadLibrary("net");. When I run it I get a segfault. It also segfaults if I load library "j2gss" but all other libraries in jre/lib load fine.
    I did an ldd on both libraries and loaded all the libraries they reference without problem.
    I checked the source code and looked at OnLoad methods for these libraries. The "net" OnLoad was in j2se/src/share/native/java/net/net_util.c and the "j2gss" one was in j2se/src/share/native/sun/security/jgss/wrapper/NativeUtil.c. The "net" OnLoad did quite a bit of stuff but the "j2gss" OnLoad was straightforward. It just caches a bunch of MIDs and FIDs.
    This is not a new installation of Java 6. I have been using it on FC6 x86_64 for several weeks. It was working fine yesterday. Today it is not. I update automatically via yum. Last night several packages were updated but none of them changed any libraries used by "net" or "j2gss".
    I have run out of ideas on what to check. Can anyone help me out?
    charlie
    Here is the error log:
    # An unexpected error has been detected by Java Runtime Environment:
    #  SIGSEGV (0xb) at pc=0x00002aaaaaab4202, pid=7650, tid=1076017472
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0-b105 mixed mode)
    # Problematic frame:
    # C  [ld-linux-x86-64.so.2+0x9202]
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    ---------------  T H R E A D  ---------------
    Current thread (0x0000000040111400):  JavaThread "main" [_thread_in_native, id=7651]
    siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x0000000000000000
    Registers:
    RAX=0x0000000000000000, RBX=0x00002aaaaacc55e8, RCX=0x0000000000000000, RDX=0x0000000000000000
    RSP=0x0000000040228f00, RBP=0x0000000040229040, RSI=0x0377cc14b1b73c55, RDI=0x00002aaad80acc55
    R8 =0x0000000000000000, R9 =0x00000000ffffffff, R10=0x0000000000000000, R11=0x00002aaaab8aa830
    R12=0x0000000000000000, R13=0x00000000b1b73c55, R14=0x00002aaad49d28a0, R15=0x0000000000000000
    RIP=0x00002aaaaaab4202, EFL=0x0000000000010246, CSGSFS=0x0000000000000033, ERR=0x0000000000000004
      TRAPNO=0x000000000000000e
    Top of Stack: (sp=0x0000000040228f00)
    0x0000000040228f00:   00002aaaaca3332e 0000000000000000
    0x0000000040228f10:   0000000000000000 00002aaac9deedf8
    0x0000000040228f20:   0000000000001fa0 0000000040228fc0
    0x0000000040228f30:   00002aaaabd0b498 0000000000000001
    0x0000000040228f40:   0000000040111400 00002aaaaca332a9
    0x0000000040228f50:   0000000040228ff0 0000000000000000
    0x0000000040228f60:   0000000000000000 00000000402290b0
    0x0000000040228f70:   00002aaaaacc55e8 00002aaad80acc55
    0x0000000040228f80:   0000000040229070 00002aaaab82d8e2
    0x0000000040228f90:   0000000000000001 0000000040111400
    0x0000000040228fa0:   0000000040228ff0 00000000402292e8
    0x0000000040228fb0:   0000000a00000000 00002aaaaca3fd00
    0x0000000040228fc0:   0000000040111400 00000000401106d0
    0x0000000040228fd0:   00002aaad47586c0 00002aaad4758890
    0x0000000040228fe0:   00002aaad47606a8 0000000040229980
    0x0000000040228ff0:   0000000000000000 0000000000000000
    0x0000000040229000:   00002aaaafb89ac0 00000000ffffffff
    0x0000000040229010:   00000000402295c0 00002aaaaacc55e8
    0x0000000040229020:   0000000000000000 00002aaaaacc4bc0
    0x0000000040229030:   00002aaad49d28a0 0000000040229640
    0x0000000040229040:   00002aaad80acc55 00002aaaab2f0845
    0x0000000040229050:   00002aaa00000003 0000000000000000
    0x0000000040229060:   00000000860afcd8 00000000402291f0
    0x0000000040229070:   0000000040229208 00002aaaab53efe8
    0x0000000040229080:   0000000000000000 00002aaad49d3118
    0x0000000040229090:   000000004010a4d0 00002aaad809d8a8
    0x00000000402290a0:   00002aaaab541970 00002aaad809c488
    0x00000000402290b0:   0000000000000000 00000001000000af
    0x00000000402290c0:   0000000040111590 0000000040229260
    0x00000000402290d0:   0000000040229260 00002aaaaafeb210
    0x00000000402290e0:   00002aaaabcfe1c0 00002aaad49d28a0
    0x00000000402290f0:   0000000040229640 00002aaaaafeb224
    Instructions: (pc=0x00002aaaaaab4202)
    0x00002aaaaaab41f2:   ff 02 00 00 48 8b 8d 20 ff ff ff 31 d2 45 31 d2
    0x00002aaaaaab4202:   48 8b 01 48 85 c0 0f 84 47 02 00 00 48 8b 9d 20
    Stack: [0x000000004012b000,0x000000004022c000),  sp=0x0000000040228f00,  free space=1015k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C  [ld-linux-x86-64.so.2+0x9202]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j  java.lang.ClassLoader$NativeLibrary.load(Ljava/lang/String;)V+0
    j  java.lang.ClassLoader.loadLibrary0(Ljava/lang/Class;Ljava/io/File;)Z+300
    j  java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)V+217
    j  java.lang.Runtime.loadLibrary0(Ljava/lang/Class;Ljava/lang/String;)V+54
    j  java.lang.System.loadLibrary(Ljava/lang/String;)V+7
    j  sun.security.action.LoadLibraryAction.run()Ljava/lang/Object;+4
    v  ~StubRoutines::call_stub
    j  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;+0
    j  java.net.InetAddress.<clinit>()V+55
    v  ~StubRoutines::call_stub
    j  java.lang.ClassLoader$NativeLibrary.load(Ljava/lang/String;)V+0
    j  java.lang.ClassLoader.loadLibrary0(Ljava/lang/Class;Ljava/io/File;)Z+300
    j  java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)V+217
    j  java.lang.Runtime.loadLibrary0(Ljava/lang/Class;Ljava/lang/String;)V+54
    j  java.lang.System.loadLibrary(Ljava/lang/String;)V+7
    j  FancyButton.main([Ljava/lang/String;)V+2
    v  ~StubRoutines::call_stub
    ---------------  P R O C E S S  ---------------
    Java Threads: ( => current thread )
      0x00002aaad49c0400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=7660]
      0x00002aaad49bd800 JavaThread "CompilerThread1" daemon [_thread_blocked, id=7659]
      0x00002aaad49bbc00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=7658]
      0x00002aaad49ba800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=7657]
      0x00002aaad4997400 JavaThread "Finalizer" daemon [_thread_blocked, id=7656]
      0x00002aaad4996400 JavaThread "Reference Handler" daemon [_thread_blocked, id=7655]
    =>0x0000000040111400 JavaThread "main" [_thread_in_native, id=7651]
    Other Threads:
      0x00002aaad47f6800 VMThread [id=7654]
      0x00002aaad49c2000 WatcherThread [id=7661]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    PSYoungGen      total 9408K, used 325K [0x00002aaac9db0000, 0x00002aaaca820000, 0x00002aaad4500000)
      eden space 8128K, 4% used [0x00002aaac9db0000,0x00002aaac9e01570,0x00002aaaca5a0000)
      from space 1280K, 0% used [0x00002aaaca6e0000,0x00002aaaca6e0000,0x00002aaaca820000)
      to   space 1280K, 0% used [0x00002aaaca5a0000,0x00002aaaca5a0000,0x00002aaaca6e0000)
    PSOldGen        total 21440K, used 0K [0x00002aaab4f00000, 0x00002aaab63f0000, 0x00002aaac9db0000)
      object space 21440K, 0% used [0x00002aaab4f00000,0x00002aaab4f00000,0x00002aaab63f0000)
    PSPermGen       total 21248K, used 2769K [0x00002aaaafb00000, 0x00002aaab0fc0000, 0x00002aaab4f00000)
      object space 21248K, 13% used [0x00002aaaafb00000,0x00002aaaafdb47d0,0x00002aaab0fc0000)
    Dynamic libraries:
    40000000-40009000 r-xp 00000000 fd:00 1966283                            /usr/java/jdk1.6.0/bin/java
    40108000-4010a000 rwxp 00008000 fd:00 1966283                            /usr/java/jdk1.6.0/bin/java
    4010a000-4012b000 rwxp 4010a000 00:00 0                                  [heap]
    4012b000-4012e000 ---p 4012b000 00:00 0
    4012e000-4022c000 rwxp 4012e000 00:00 0
    4022c000-4022d000 ---p 4022c000 00:00 0
    4022d000-4032d000 rwxp 4022d000 00:00 0
    4032d000-4032e000 ---p 4032d000 00:00 0
    4032e000-4042e000 rwxp 4032e000 00:00 0
    4042e000-4042f000 ---p 4042e000 00:00 0
    4042f000-4052f000 rwxp 4042f000 00:00 0
    4052f000-40532000 ---p 4052f000 00:00 0
    40532000-40630000 rwxp 40532000 00:00 0
    40630000-40633000 ---p 40630000 00:00 0
    40633000-40731000 rwxp 40633000 00:00 0
    40731000-40734000 ---p 40731000 00:00 0
    40734000-40832000 rwxp 40734000 00:00 0
    40832000-40835000 ---p 40832000 00:00 0
    40835000-40933000 rwxp 40835000 00:00 0
    40933000-40936000 ---p 40933000 00:00 0
    40936000-40a34000 rwxp 40936000 00:00 0
    40a34000-40a37000 ---p 40a34000 00:00 0
    40a37000-40b35000 rwxp 40a37000 00:00 0
    40b35000-40b36000 ---p 40b35000 00:00 0
    40b36000-40c36000 rwxp 40b36000 00:00 0
    2aaaaaaab000-2aaaaaac5000 r-xp 00000000 fd:00 16318467                   /lib64/ld-2.5.so
    2aaaaaac5000-2aaaaaac6000 rwxp 2aaaaaac5000 00:00 0
    2aaaaaac6000-2aaaaaac7000 r-xp 2aaaaaac6000 00:00 0
    2aaaaaac7000-2aaaaaac8000 rwxp 2aaaaaac7000 00:00 0
    2aaaaaad8000-2aaaaaad9000 rwxp 2aaaaaad8000 00:00 0
    2aaaaaad9000-2aaaaaae0000 r-xp 00000000 fd:00 1967264                    /usr/java/jdk1.6.0/jre/lib/amd64/native_threads/libhpi.so
    2aaaaaae0000-2aaaaabe1000 ---p 00007000 fd:00 1967264                    /usr/java/jdk1.6.0/jre/lib/amd64/native_threads/libhpi.so
    2aaaaabe1000-2aaaaabe3000 rwxp 00008000 fd:00 1967264                    /usr/java/jdk1.6.0/jre/lib/amd64/native_threads/libhpi.so
    2aaaaabe3000-2aaaaabe4000 rwxp 2aaaaabe3000 00:00 0
    2aaaaabe4000-2aaaaabec000 rwxs 00000000 fd:00 16523834                   /tmp/hsperfdata_charlie/7650
    2aaaaabec000-2aaaaac14000 rwxp 2aaaaabec000 00:00 0
    2aaaaacc4000-2aaaaacc5000 r-xp 00019000 fd:00 16318467                   /lib64/ld-2.5.so
    2aaaaacc5000-2aaaaacc6000 rwxp 0001a000 fd:00 16318467                   /lib64/ld-2.5.so
    2aaaaacc6000-2aaaaacdb000 r-xp 00000000 fd:00 16318499                   /lib64/libpthread-2.5.so
    2aaaaacdb000-2aaaaaeda000 ---p 00015000 fd:00 16318499                   /lib64/libpthread-2.5.so
    2aaaaaeda000-2aaaaaedb000 r-xp 00014000 fd:00 16318499                   /lib64/libpthread-2.5.so
    2aaaaaedb000-2aaaaaedc000 rwxp 00015000 fd:00 16318499                   /lib64/libpthread-2.5.so
    2aaaaaedc000-2aaaaaee0000 rwxp 2aaaaaedc000 00:00 0
    2aaaaaee0000-2aaaaaee7000 r-xp 00000000 fd:00 1967247                    /usr/java/jdk1.6.0/jre/lib/amd64/jli/libjli.so
    2aaaaaee7000-2aaaaafe8000 ---p 00007000 fd:00 1967247                    /usr/java/jdk1.6.0/jre/lib/amd64/jli/libjli.so
    2aaaaafe8000-2aaaaafea000 rwxp 00008000 fd:00 1967247                    /usr/java/jdk1.6.0/jre/lib/amd64/jli/libjli.so
    2aaaaafea000-2aaaaafed000 r-xp 00000000 fd:00 16318481                   /lib64/libdl-2.5.so
    2aaaaafed000-2aaaab1ec000 ---p 00003000 fd:00 16318481                   /lib64/libdl-2.5.so
    2aaaab1ec000-2aaaab1ed000 r-xp 00002000 fd:00 16318481                   /lib64/libdl-2.5.so
    2aaaab1ed000-2aaaab1ee000 rwxp 00003000 fd:00 16318481                   /lib64/libdl-2.5.so
    2aaaab1ee000-2aaaab1ef000 rwxp 2aaaab1ee000 00:00 0
    2aaaab1ef000-2aaaab333000 r-xp 00000000 fd:00 16318475                   /lib64/libc-2.5.so
    2aaaab333000-2aaaab533000 ---p 00144000 fd:00 16318475                   /lib64/libc-2.5.so
    2aaaab533000-2aaaab537000 r-xp 00144000 fd:00 16318475                   /lib64/libc-2.5.so
    2aaaab537000-2aaaab538000 rwxp 00148000 fd:00 16318475                   /lib64/libc-2.5.so
    2aaaab538000-2aaaab53e000 rwxp 2aaaab538000 00:00 0
    2aaaab53e000-2aaaabbb8000 r-xp 00000000 fd:00 1967281                    /usr/java/jdk1.6.0/jre/lib/amd64/server/libjvm.so
    2aaaabbb8000-2aaaabcba000 ---p 0067a000 fd:00 1967281                    /usr/java/jdk1.6.0/jre/lib/amd64/server/libjvm.so
    2aaaabcba000-2aaaabde6000 rwxp 0067c000 fd:00 1967281                    /usr/java/jdk1.6.0/jre/lib/amd64/server/libjvm.so
    2aaaabde6000-2aaaabe21000 rwxp 2aaaabde6000 00:00 0
    2aaaabe33000-2aaaabeb5000 r-xp 00000000 fd:00 16318483                   /lib64/libm-2.5.so
    2aaaabeb5000-2aaaac0b4000 ---p 00082000 fd:00 16318483                   /lib64/libm-2.5.so
    2aaaac0b4000-2aaaac0b5000 r-xp 00081000 fd:00 16318483                   /lib64/libm-2.5.so
    2aaaac0b5000-2aaaac0b6000 rwxp 00082000 fd:00 16318483                   /lib64/libm-2.5.so
    2aaaac0b6000-2aaaac0be000 r-xp 00000000 fd:00 16318503                   /lib64/librt-2.5.so
    2aaaac0be000-2aaaac2bd000 ---p 00008000 fd:00 16318503                   /lib64/librt-2.5.so
    2aaaac2bd000-2aaaac2be000 r-xp 00007000 fd:00 16318503                   /lib64/librt-2.5.so
    2aaaac2be000-2aaaac2bf000 rwxp 00008000 fd:00 16318503                   /lib64/librt-2.5.so
    2aaaac2bf000-2aaaac2d3000 r-xp 00000000 fd:00 16318485                   /lib64/libnsl-2.5.so
    2aaaac2d3000-2aaaac4d2000 ---p 00014000 fd:00 16318485                   /lib64/libnsl-2.5.so
    2aaaac4d2000-2aaaac4d3000 r-xp 00013000 fd:00 16318485                   /lib64/libnsl-2.5.so
    2aaaac4d3000-2aaaac4d4000 rwxp 00014000 fd:00 16318485                   /lib64/libnsl-2.5.so
    2aaaac4d4000-2aaaac4d6000 rwxp 2aaaac4d4000 00:00 0
    2aaaac4d6000-2aaaac4e0000 r-xp 00000000 fd:00 16318491                   /lib64/libnss_files-2.5.so
    2aaaac4e0000-2aaaac6df000 ---p 0000a000 fd:00 16318491                   /lib64/libnss_files-2.5.so
    2aaaac6df000-2aaaac6e0000 r-xp 00009000 fd:00 16318491                   /lib64/libnss_files-2.5.so
    2aaaac6e0000-2aaaac6e1000 rwxp 0000a000 fd:00 16318491                   /lib64/libnss_files-2.5.so
    2aaaac6e1000-2aaaac6ee000 r-xp 00000000 fd:00 1967257                    /usr/java/jdk1.6.0/jre/lib/amd64/libverify.so
    2aaaac6ee000-2aaaac7ed000 ---p 0000d000 fd:00 1967257                    /usr/java/jdk1.6.0/jre/lib/amd64/libverify.so
    2aaaac7ed000-2aaaac7f0000 rwxp 0000c000 fd:00 1967257                    /usr/java/jdk1.6.0/jre/lib/amd64/libverify.so
    2aaaac7f0000-2aaaac818000 r-xp 00000000 fd:00 1967275                    /usr/java/jdk1.6.0/jre/lib/amd64/libjava.so
    2aaaac818000-2aaaac918000 ---p 00028000 fd:00 1967275                    /usr/java/jdk1.6.0/jre/lib/amd64/libjava.so
    2aaaac918000-2aaaac91f000 rwxp 00028000 fd:00 1967275                    /usr/java/jdk1.6.0/jre/lib/amd64/libjava.so
    2aaaac91f000-2aaaac92d000 r-xp 00000000 fd:00 1967262                    /usr/java/jdk1.6.0/jre/lib/amd64/libzip.so
    2aaaac92d000-2aaaaca2f000 ---p 0000e000 fd:00 1967262                    /usr/java/jdk1.6.0/jre/lib/amd64/libzip.so
    2aaaaca2f000-2aaaaca32000 rwxp 00010000 fd:00 1967262                    /usr/java/jdk1.6.0/jre/lib/amd64/libzip.so
    2aaaaca32000-2aaaacca3000 rwxp 2aaaaca32000 00:00 0
    2aaaacca3000-2aaaafa33000 rwxp 2aaaacca3000 00:00 0
    2aaaafa33000-2aaaafa3d000 rwxp 2aaaafa33000 00:00 0
    2aaaafa3d000-2aaaafaf3000 rwxp 2aaaafa3d000 00:00 0
    2aaaafb00000-2aaab0fc0000 rwxp 2aaaafb00000 00:00 0
    2aaab0fc0000-2aaab4f00000 rwxp 2aaab0fc0000 00:00 0
    2aaab4f00000-2aaab63f0000 rwxp 2aaab4f00000 00:00 0
    2aaab63f0000-2aaac9db0000 rwxp 2aaab63f0000 00:00 0
    2aaac9db0000-2aaaca820000 rwxp 2aaac9db0000 00:00 0
    2aaaca820000-2aaad4500000 rwxp 2aaaca820000 00:00 0
    2aaad4500000-2aaad450b000 rwxp 2aaad4500000 00:00 0
    2aaad450b000-2aaad452a000 rwxp 2aaad450b000 00:00 0
    2aaad452a000-2aaad4535000 rwxp 2aaad452a000 00:00 0
    2aaad4535000-2aaad45d1000 rwxp 2aaad4535000 00:00 0
    2aaad45d1000-2aaad45d7000 rwxp 2aaad45d1000 00:00 0
    2aaad45d7000-2aaad4625000 rwxp 2aaad45d7000 00:00 0
    2aaad4625000-2aaad4631000 rwxp 2aaad4625000 00:00 0
    2aaad4631000-2aaad46ce000 rwxp 2aaad4631000 00:00 0
    2aaad46ce000-2aaad46d9000 rwxp 2aaad46ce000 00:00 0
    2aaad46d9000-2aaad46f8000 rwxp 2aaad46d9000 00:00 0
    2aaad46f8000-2aaad47f8000 rwxp 2aaad46f8000 00:00 0
    2aaad47f8000-2aaad4972000 r-xs 02c68000 fd:00 1968717                    /usr/java/jdk1.6.0/jre/lib/rt.jar
    2aaad4972000-2aaad4a93000 rwxp 2aaad4972000 00:00 0
    2aaad4a93000-2aaad7f91000 r-xp 00000000 fd:00 14038693                   /usr/lib/locale/locale-archive
    2aaad7f91000-2aaad7f99000 r-xp 00000000 fd:00 1967266                    /usr/java/jdk1.6.0/jre/lib/amd64/libj2gss.so
    2aaad7f99000-2aaad8099000 ---p 00008000 fd:00 1967266                    /usr/java/jdk1.6.0/jre/lib/amd64/libj2gss.so
    2aaad8099000-2aaad809a000 rwxp 00008000 fd:00 1967266                    /usr/java/jdk1.6.0/jre/lib/amd64/libj2gss.so
    2aaad809a000-2aaad809b000 rwxp 2aaad809a000 00:00 0
    2aaad809b000-2aaad80ae000 r-xp 00000000 fd:00 1967251                    /usr/java/jdk1.6.0/jre/lib/amd64/libnet.so
    2aaad80ae000-2aaad81af000 ---p 00013000 fd:00 1967251                    /usr/java/jdk1.6.0/jre/lib/amd64/libnet.so
    2aaad81af000-2aaad81b2000 rwxp 00014000 fd:00 1967251                    /usr/java/jdk1.6.0/jre/lib/amd64/libnet.so
    7fffc9256000-7fffc926b000 rwxp 7fffc9256000 00:00 0                      [stack]
    ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso]
    VM Arguments:
    java_command: FancyButton
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=/usr/java/jdk1.6
    PATH=/home/charlie/bin:/home/charlie/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/java/jdk1.6/bin:/opt/apache-ant/bin:.:/usr/java/jdk1.6/bin:/opt/apache-ant/bin:.
    USERNAME=charlie
    LD_LIBRARY_PATH=/usr/java/jdk1.6.0/jre/lib/amd64/server:/usr/java/jdk1.6.0/jre/lib/amd64:/usr/java/jdk1.6.0/jre/../lib/amd64
    SHELL=/bin/bash
    DISPLAY=:0.0
    Signal Handlers:
    SIGSEGV: [libjvm.so+0x5f45b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGBUS: [libjvm.so+0x5f45b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGFPE: [libjvm.so+0x4b2c20], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGPIPE: [libjvm.so+0x4b2c20], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGILL: [libjvm.so+0x4b2c20], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGUSR2: [libjvm.so+0x4b4e20], sa_mask[0]=0x00000000, sa_flags=0x10000004
    SIGHUP: [libjvm.so+0x4b4760], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGINT: [libjvm.so+0x4b4760], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGQUIT: [libjvm.so+0x4b4760], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGTERM: [libjvm.so+0x4b4760], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGUSR2: [libjvm.so+0x4b4e20], sa_mask[0]=0x00000000, sa_flags=0x10000004
    ---------------  S Y S T E M  ---------------
    OS:Fedora Core release 6 (Zod)
    uname:Linux 2.6.18-1.2869.fc6 #1 SMP Wed Dec 20 14:51:34 EST 2006 x86_64
    libc:glibc 2.5 NPTL 2.5
    rlimit: STACK 10240k, CORE 0k, NPROC 16374, NOFILE 1024, AS infinity
    load average:0.30 0.06 0.02
    CPU:total 2 em64t ht
    Memory: 4k page, physical 2054756k(438236k free), swap 2031608k(2031608k free)
    vm_info: Java HotSpot(TM) 64-Bit Server VM (1.6.0-b105) for linux-amd64, built on Nov 29 2006 01:44:03 by "uucp" with gcc 3.2.2 (SuSE Linux)

    An update. It appears that it is only the "net" library that is causing the problems. Loading the "j2gss" library loads the "net" library as a side effect, which causes the segfault.

  • Java.nio and databases

    Please, need help.
    I'm using java.nio to get large files contents (txt) and need to put these data into MSSQL SERVER 2000 database tables. NIO have capabilityies to get data and transfer directly to the tables? If so, how can i do it?
    Thanks a lot
    Aloisio

    ChuckBing, i'm connected with database trough JDBC yet and i can retrieve data meaning my connection is OK.
    I'm able to read data from a txt file (250mb large) trough MappedByteBuffer and write into another with the same size and content. It's working fine.
    My question is if i can read the txt file and, instead write the data into another txt file, put these data into a table.
    Thanks for your reply

  • Java NIO - copy-on-write buffer

    This is regarding peculiar behavior of a Java program on Linux-IA64 platform.
    I have a Java program that uses MappedByteBuffer. For the same file, there are three buffers - read only, read/write and copy-on-write (cow)
    First, change contents of cow buffer and print all buffers. The change is reflected only in cow buffer (not in ro or rw) - as expected.
    Then, change contents of r/w buffer and print all buffers. The change is NOT observed in cow buffer, but reflected in ro and rw buffers (for Linux-IA64). I tried the same program in Linux-X86 and the change is reflected in all buffers (including cow buffer).
    I used JDK 1.4.2_03 for compiling and running. The doc for MappedByteBuffer says
    "The content of a mapped byte buffer can change at any time, for example if the content of the corresponding region of the mapped file is changed by this program or another. Whether or not such changes occur, and when they occur, is operating-system dependent and therefore unspecified."
    Is this behaviour acceptable? Is this observed in any other platform?
    I think Java NIO leaves it to the O/S and JVM is not doing anything here (as different from java.io). This could probably result in inconsistent behaviour across platforms (though it improves performance)
    Please let me know your thoughts.

    My thought is that you have posted this to the wrong forum.

  • Using a java program to load up a webpage.

    I am trying to configure a java application to load up a small webpage that i will use to make updates to a current software project.. however I can't get it to load up the html.. I have tried coding in new conversions and such but still having a great deal of difficulty.
    I am trying to add in 2 tabs...
    update
    info
    in which those 2 tabs will lead 2 "2" different things...
    update will lead to a loaded webpage off the web. while info will load up an image.. I am having trouble getting the info to work in the compiler i am using.. Metrowerks CodeWarrior.. heh.. if anyone could please help me or tell me exactly what i am doing wrong I would be happy :D.. I can't really post my source.. because its not much just defines the tabbed pane and main frame .. etc.. so its not much to look at..

    I am wanting to load up a webpage from the www aka worldwide web its an http address.. I want to do this using some sort of pane..
    and well
    ok let me explain it in further detail.
    I have a tab pane to the left I have 2 buttons on it.. on one button I want to load up a page from the www(world wide web) when you click it.. and the other I want to display a image (i know i think i can use jlabel) of the info on our staff and etc..
    so overview
    2 tabbed buttons on a tabbed pane in a frame..
    I am wanting to load up a website when you click update..
    and i want to load up an image when you click info..
    in which these 2 resources will be displayed on a pane to the right of the screen where you clicked the tab..
    thank you that is all heh

  • Java.nio select() method return 0 in my client application

    Hello,
    I'm developing a simple chat application who echo messages
    But my client application loop because the select() method return 0
    This is my code
    // SERVER
    package test;
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.nio.channels.SelectionKey;
    import java.nio.channels.Selector;
    import java.nio.channels.ServerSocketChannel;
    import java.nio.channels.SocketChannel;
    import java.util.Iterator;
    import java.util.Set;
    public class Server {
         private int port = 5001;
         public void work() {               
              try {
                   ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
                   serverSocketChannel.configureBlocking(false);
                   InetSocketAddress isa = new InetSocketAddress(port);               
                   serverSocketChannel.socket().bind(isa);
                   Selector selector = Selector.open();
                   serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);
                   System.out.println("Listing on "+port);
                   while(selector.select()>0) {
                        Set keys = selector.selectedKeys();
                        for(Iterator i = keys.iterator(); i.hasNext();) {
                             SelectionKey key = (SelectionKey) i.next();
                             i.remove();
                             if (key.isAcceptable()) {
                                  ServerSocketChannel keyChannel = (ServerSocketChannel)key.channel();                              
                                  SocketChannel channel = keyChannel.accept();
                                  channel.configureBlocking(false);                              
                                  channel.register(selector, SelectionKey.OP_READ );
                             } else if (key.isReadable()) {
                                  SocketChannel keyChannel = (SocketChannel) key.channel();
                                  String m = Help.read(keyChannel );
                                  Help.write(m.toUpperCase(), keyChannel );
              } catch (IOException e) {                                             
                   e.printStackTrace();                         
         public static void main(String[] args) {
              Server s = new Server();
              s.work();
    // CLIENT
    package test;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.nio.channels.SelectionKey;
    import java.nio.channels.Selector;
    import java.nio.channels.SocketChannel;
    import java.util.Iterator;
    import java.util.Set;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    public class Client extends JFrame  {
         private String host = "localhost";
         private int port = 5001;
         private SocketChannel socketChannel;
         private Selector selector;
         public void work() {               
              try {
                   socketChannel = SocketChannel.open();
                   socketChannel.configureBlocking(false);
                   InetSocketAddress isa = new InetSocketAddress(host, port);               
                   socketChannel.connect(isa);
                   selector = Selector.open();
                   socketChannel.register(selector, SelectionKey.OP_CONNECT | SelectionKey.OP_READ );
                   while(true) {
                        selector.select();
                        Set keys = selector.selectedKeys();
                        for(Iterator i = keys.iterator(); i.hasNext();) {
                             SelectionKey key = (SelectionKey) i.next();
                             i.remove();
                             if (key.isConnectable()) {
                                  SocketChannel keyChannel = (SocketChannel) key.channel();
                                  if (keyChannel.isConnectionPending()) {
                                       System.out.println("Connected "+keyChannel.finishConnect());                                                                           
                             } else if (key.isReadable()) {                                                                                                                                                           
                                  SocketChannel keyChannel = (SocketChannel) key.channel();                                             
                                  String m = Help.read(keyChannel);
                                  display(m);                                                                                                                                                                                                                   
              } catch (IOException e) {                                             
                   e.printStackTrace();                         
         private void display(final String m) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        area.append(m+"\n");
                        textFieed.setText("");
         private void sendMessage(final String m) {
              Thread t = new Thread(new Runnable() {               
                   public void run() {                                                                                
                        try {                         
                             Help.write(m, socketChannel);
                        } catch (IOException e) {               
                             e.printStackTrace();
              t.start();                    
         public Client() {
              addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(1);
              textFieed.addKeyListener(new KeyAdapter() {
                   public void keyPressed(KeyEvent e) {
                        if (e.getKeyCode()== KeyEvent.VK_ENTER) {
                             String m = textFieed.getText();
                             sendMessage(m);     
              area.setEditable(false);
              getContentPane().add(textFieed, "North");
              getContentPane().add(new JScrollPane(area));
              setBounds(200, 200, 400, 300);
              show();
         private String messageToSend;
         private JTextArea area = new JTextArea();
         JTextField textFieed = new JTextField();
         public static void main(String[] args) {
              Client s = new Client();
              s.work();
    // HELPER CLASS
    package test;
    import java.io.IOException;
    import java.nio.ByteBuffer;
    import java.nio.CharBuffer;
    import java.nio.channels.SocketChannel;
    import java.nio.charset.Charset;
    import java.nio.charset.CharsetDecoder;
    import java.nio.charset.CharsetEncoder;
    public class Help {
         private static Charset charset = Charset.forName("us-ascii");
         private static CharsetEncoder enc = charset.newEncoder();
         private static CharsetDecoder dec = charset.newDecoder();
         private static void log(String m) {
              System.out.println(m);
         public static String read(SocketChannel channel) throws IOException {
              log("*** start READ");                              
              int n;
              ByteBuffer buffer = ByteBuffer.allocate(1024);
              while((n = channel.read(buffer)) > 0) {
                   System.out.println("     adding "+n+" bytes");
              log("  BUFFER REMPLI : "+buffer);
              buffer.flip();               
              CharBuffer cb = dec.decode(buffer);          
              log("  CHARBUFFER : "+cb);
              String m = cb.toString();
              log("  MESSAGE : "+m);          
              log("*** end READ");
              //buffer.clear();
              return m;                    
         public static void write(String m, SocketChannel channel) throws IOException {          
              log("xxx start WRITE");          
              CharBuffer cb = CharBuffer.wrap(m);
              log("  CHARBUFFER : "+cb);          
              ByteBuffer  buffer = enc.encode(cb);
              log("  BUFFER ALLOUE REMPLI : "+buffer);
              int n;
              while(buffer.hasRemaining()) {
                   n = channel.write(buffer);                         
              System.out.println("  REMAINING : "+buffer.hasRemaining());
              log("xxx end WRITE");

    Here's the fix for that old problem. Change the work method to do the following
    - don't register interest in things that can't happen
    - when you connect register based on whether the connection is complete or pending.
    - add the OP_READ interest once the connection is complete.
    This doesn't fix all the other problems this code will have,
    eg.
    - what happens if a write is incomplete?
    - why does my code loop if I add OP_WRITE interest?
    - why does my interestOps or register method block?
    For code that answers all those questions see my obese post Taming the NIO Circus
    Here's the fixed up Client code
    // CLIENT
    package test
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.nio.channels.SelectionKey;
    import java.nio.channels.Selector;
    import java.nio.channels.SocketChannel;
    import java.util.Iterator;
    import java.util.Set;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    public class Client extends JFrame  {
         private String host = "localhost";
         private int port = 5001;
         private SocketChannel socketChannel;
         private Selector selector;
         public void work() {
              try {
                   socketChannel = SocketChannel.open();
                   socketChannel.configureBlocking(false);
                   InetSocketAddress isa = new InetSocketAddress(host, port);
                   socketChannel.connect(isa);
                   selector = Selector.open();
                   int interest = 0;
                   if(socketChannel.isConnected())interest = SelectionKey.OP_READ;
                   else if(socketChannel.isConnectionPending())interest = SelectionKey.OP_CONNECT;
                   socketChannel.register(selector, interest);
                   while(true)
                        int nn = selector.select();
                        System.out.println("nn="+nn);
                        Set keys = selector.selectedKeys();
                        for(Iterator i = keys.iterator(); i.hasNext();)
                             SelectionKey key = (SelectionKey) i.next();
                             i.remove();
                             if (key.isConnectable())
                                  SocketChannel keyChannel = (SocketChannel) key.channel();
                                  System.out.println("Connected "+keyChannel.finishConnect());
                                  key.interestOps(SelectionKey.OP_READ);
                             if (key.isReadable())
                                  SocketChannel keyChannel = (SocketChannel) key.channel();
                                  String m = Help.read(keyChannel);
                                  display(m);
              } catch (IOException e) {
                   e.printStackTrace();
         private void display(final String m) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        area.append(m+"\n");
                        textFieed.setText("");
         private void sendMessage(final String m) {
              Thread t = new Thread(new Runnable() {
                   public void run() {
                        try {
                             Help.write(m, socketChannel);
                        } catch (IOException e) {
                             e.printStackTrace();
              t.start();
         public Client() {
              addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(1);
              textFieed.addKeyListener(new KeyAdapter() {
                   public void keyPressed(KeyEvent e) {
                        if (e.getKeyCode()== KeyEvent.VK_ENTER) {
                             String m = textFieed.getText();
                             sendMessage(m);
              area.setEditable(false);
              getContentPane().add(textFieed, "North");
              getContentPane().add(new JScrollPane(area));
              setBounds(200, 200, 400, 300);
              show();
         private String messageToSend;
         private JTextArea area = new JTextArea();
         JTextField textFieed = new JTextField();
         public static void main(String[] args) {
              Client s = new Client();
              s.work();

  • Error Message - java.lang.LinkageError: loader constraint violation

    Hi
    I get the following errormessage if I try to apply a more recent build of the JPA Toplink Essentials.
    If I use the glassfish-persistence-installer-v2-b45.jar all things work fine, but if a try to upgrade my program will fail. I tried the glassfish-persistence-installer-v2-b54.jar, all also tried all builds between?!
    I have no idea how I may resolve the problem?!
    Any ideas?
    Thanks
    Marcel
    (I am using Java 6, Netbeans 5.5)
    Exception in thread "AWT-EventQueue-0" java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "DatenStruktur.ConditionBasic.getCouplingElement()LDatenStruktur/CouplingElement;" the class loader (instance of oracle/toplink/essentials/internal/ejb/cmp3/JavaSECMPInitializer$TempEntityLoader) of the current class, DatenStruktur/ConditionBasic, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for interface DatenStruktur/Conditionable have different Class objects for the type DatenStruktur/CouplingElement used in the signature
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
    at java.lang.Class.getDeclaredFields(Class.java:1743)
    at oracle.toplink.essentials.internal.security.PrivilegedAccessHelper.getDeclaredFields(PrivilegedAccessHelper.java:204)
    at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataHelper.getFields(MetadataHelper.java:443)
    at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataDescriptor.usesPropertyAccess(MetadataDescriptor.java:1081)
    at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.processAccessors(ClassAccessor.java:564)
    at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.process(ClassAccessor.java:498)
    at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.MetadataAccessor.processAccessor(MetadataAccessor.java:514)
    at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.processTableAndInheritance(ClassAccessor.java:1388)
    at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.process(ClassAccessor.java:484)
    at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processAnnotations(MetadataProcessor.java:240)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:370)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:600)
    at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.callPredeploy(JavaSECMPInitializer.java:169)
    at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:237)
    at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:253)
    at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:140)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java):96)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java):73)
    at MainProgramManagement.ProgramMain.getEntityManagerFactory(ProgramMain.java:347)
    at MainProgramManagement.ProgramMain.persistData(ProgramMain.java:788)

    upgrade to cf8, which supports jdk 1.6.
    mx7 does not support 1.5 or 1.6
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Windows Vista "java.lang.ClassNotFoundException: loader.class" error.

    Hello,
    Whenever I try to visit websites that have a java applet I get a dialogue with the following error:
    java.lang.ClassNotFoundException: loader.class.
    I have tried uninstalling/reinstalling java, and also adding the -xmx and -xms parameters for java applet runtime setting in control panel with various values from 128m to 1g.
    The applet at http://www.java.com/en/download/installed.jsp?detect=jre&try=1 does work and reports "CONGRATULATIONS, you have the Latest version of Java!", "Java Runtime Version 1.6.0."
    I have been experiencing this problem ever since I installed Windows Vista Home Premium a day or two ago. Any help is appreciated.
    Regards
    Greg
    =====================================
    Full output from Java Console
    =====================================
    Java Plug-in 1.6.0
    Using JRE version 1.6.0 Java HotSpot(TM) Client VM
    User home directory = C:\Users\Greg Taylor
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    load: class loader.class not found.
    java.lang.ClassNotFoundException: loader.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    java.lang.ClassNotFoundException: loader.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more

    ive been having the same problems, if youve resolved this problem, please tell me.
    all help is appreciated

  • Java NIO locking and NTFS network resources

    Hi all - just ran into a really nasty situation and I was wondering if anyone else has hit it and might have some suggestions.
    Platform: JRE 1.4_02 on a Win XP machine
    The following test code locks a file, then copies it to another location using NIO.
    When I run it with source path on my local drives (C), it works fine. If I run it with source path on a network shared resource, it fails with an IOException with description 'Error performing inpage operation'.
    If I disable the lock immediately before the copy operation, it works fine.
    My conclusion is that there is something about the NIO locking implementation that prevents it from working properly with NTFS volumes on other hosts. Can this be right? I've found the following bug report:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4774175
    but this seems like a huge problem that would prevent folks from using NIO in many, many applications. Maybe I'm wrong on something here...
    Anyway, here's the test code:
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    import java.nio.channels.FileChannel;
    import java.nio.channels.FileLock;
    * Created on May 28, 2004
    * (c) 2004 Trumpet, Inc.
    * @author kevin
    public class test {
         private void createFile(File f) throws IOException{
              FileOutputStream os = new FileOutputStream(f);
              for(int i = 0; i < 10; i++){
                   os.write(i);
              os.close();
         public test() {
              boolean testWithReleasingLockPriorToCopy = false;
              final File f1= new File("w:/temp/test2.lok");
              final File f2 = new File("w:/temp/test.lok");
              f1.delete();
              f2.delete();
              try {
                   createFile(f1);
                   RandomAccessFile raf1 = new RandomAccessFile(f1, "rw");
                   RandomAccessFile raf2 = new RandomAccessFile(f1, "rw");
                   FileChannel ch1 = raf1.getChannel();
                   FileChannel ch2 = raf2.getChannel();
                   FileLock flock1 = ch1.lock();
                  if (!f2.getParentFile().exists() && !f2.getParentFile().mkdirs())
                       throw new IOException("Unable to create directories for destination file '" + f2 + "'");
                  if (testWithReleasingLockPriorToCopy)
                       flock1.release();
                   ch1.transferTo(0, raf1.length(), ch2);
                   raf1.close();
                   raf2.close();
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         public static void main(String[] args) {
              test t = new test();
    }Does anyone have any pointers here? I need to be able to exclusively lock a file on a network drive (preventing any other applications from opening it), then make a copy of it. I can't use regular stream operations, because the lock prevents them from working properly (it appears that, once you grab a file lock using NIO, the only way your application can use the file is via the NIO operations - using stream operations fails...).
    Thanks in advance for any help!
    - Kevin

    i've run into the same problem recently, channels working fine for local file locking, but when you turn to the network, they fail to accurately handle locks.
    i ended up writing a jni utility to ship with my java application that locks files using native windows calls.
    my .c file ends up looking something like this:
    JNIEXPORT jint JNICALL Java_Mapper_NativeUtils_LockFile
    (JNIEnv *env, jobject obj, jstring filename)
    const char* ntvFilename = (*env)->GetStringUTFChars(env, filename, 0);
    int retVal = (int)CreateFile
    ntvFilename
    , GENERIC_WRITE
    , FILE_SHARE_READ
    , 0
    , OPEN_EXISTING
    , FILE_FLAG_SEQUENTIAL_SCAN
    , 0
    //add code to throw java exceptions based on retVal
    if (retVal == (int)INVALID_HANDLE_VALUE)
    return retVal;
    (*env)->ReleaseStringUTFChars(env, filename, ntvFilename);
    return retVal;
    JNIEXPORT jboolean JNICALL Java_Mapper_NativeUtils_UnlockFile
    (JNIEnv *env, jobject obj, jint handle)
         CloseHandle((void *)handle);
    return 1;
    it's a little shy on the error checking side, but it provides support for network file locking that java seems to lack.

  • Converting from CP1252 (Windows) to ISO 8859-1 doesn't work with java.nio?

    Hi
    I'm trying to write some code that checks whether an InputStream contains only characters with a given encoding. I'm using java.nio for that. For tests, I downloaded some character set examples from http://www.columbia.edu/kermit/csettables.html
    When creating the CharsetDecoder, I want to get all errors:
        Charset charset = Charset.forName( encoding );
        CharsetDecoder decoder = charset.newDecoder();
        decoder.onMalformedInput( CodingErrorAction.REPORT );
        decoder.onUnmappableCharacter( CodingErrorAction.REPORT );I then read an InputStream and try to convert it. If that fails, it can't contain the desired encoding:
        boolean isWellEncoded = true;
        ByteBuffer inBuffer = ByteBuffer.allocate( 1024 );
        ReadableByteChannel channel = Channels.newChannel( inputStream );
        while ( channel.read( inBuffer ) != -1 )
          CharBuffer decoded = null;
          try
            inBuffer.flip();
            decoded = decoder.decode( inBuffer );
          catch ( MalformedInputException ex )
            isWellEncoded = false;
          catch ( UnmappableCharacterException ex )
            isWellEncoded = false;
          catch ( CharacterCodingException ex )
            isWellEncoded = false;
          if ( decoded != null )
            LOG.debug( decoded.toString() );
          if ( !isWellEncoded )
            break;
          inBuffer.compact();
        channel.close();
        return isWellEncoded;Now I want to check whether a file containing Windows 1252 characters is ISO-8859-1. From my point of view, the code above should fail when it gets to the Euro symbol (decimal 128), since that's not defined in ISO-8859-1.
    But all I get is a ? character instead:
    (})  125  07/13  175  7D                 RIGHT CURLY BRACKET, RIGHT BRACE
    (~)  126  07/14  176  7E                 TILDE
    [?]  128  08/00  200  80  EURO SYMBOL
    [?]  130  08/02  202  82  LOW 9 SINGLE QUOTEI also tried to replace the faulty character, using
        decoder.onUnmappableCharacter( CodingErrorAction.REPLACE );
        decoder.replaceWith("!");but I still get the question marks.
    I'm probably doing something fundamentally wrong, but I dont get it :-)
    Any help is greatly appreciated!
    Eric

    As a suggestion....create a complete example demonstrating the problem. It shouldn't have channel in it since that wouldn't appear to be the problem (decoding is.) You should create the byte array in the example code - populate it with the byte sequence that you think should work. And your code should then demonstrate that it doesn't. Then post that.

Maybe you are looking for

  • Several JVM s with RMI?

    Hi, As you can guess, my Java program needs more and more memory as users connections grow. We are of course trying to optimize the way it’s running but looks like we will anyway soon need to increase ressources of our JVM. We first thought to increa

  • I cannot install iTunes on Windows 7 I receive the Error 7 (Windows Error 193).

    I cannot install iTunes on Windows 7 I receive the Error 7 (Windows Error 193).  I have uninstalled and reinstalled a few times but with no luck.  Does anyone have another option?

  • Lenovo support - options for recovering Windows 8 on new X230

    Hello, I recently purchased x230 with Windows 8. I installed Ubuntu 12.0 (attempting to dual boot).  Unfortuantely, Windows 8 is no longer accessible(UEFI error comes up on boot), the restore partition is also corrup ("required partition cannot be fo

  • Won't go into disk mode

    My ipod has the sad face on it, but it also indicates low battery. It won't charge, so I can't put it into disk mode to fix it. Do I need a new battery??

  • Installation of labview 2014 SP1 (32 bit)

    Trying to install labview and when I open labview it immediately crashes after about 5 seconds and a crash report pops out with the below message: Exception: Access violation (0xC0000005) at EIP=0x04FDBC56 Version: 14.01.1 (32-bit) Report ID: cee51a3