A Java Bug

I am getting this error while i am trying to run one client program
HotSpot Virtual Machine Error, Internal Error
Please report this error at
http://java.sun.com/cgi-bin/bugreport.cgi
Java VM: Java HotSpot(TM) Client VM (1.4.0_03-b04 mixed mode)
Error ID: 43113F32554E54494D45110E435050034A
Problematic Thread: prio=5 tid=0x0B4CFB70 nid=0x8dc runnable
People please help me how to resolve this error

In my colleague machine this error is not being thrown and i am not using JNI here.
The application is actually Adapters where i am having a mainframe server and the server screens are replicated on Mitem Interface and from a JUnit client test case i am trying to connect to that server.

Similar Messages

  • Java Bug? Centering a JLable with just an icon in a JScrollPane

    Hi,
    I'm attempting to write a image viewing program. I would like the image centered on the window displaying them, but because some images are larger than the window, I would like the image to be in the upper left hand coner of the window with scroll bars to allow you to view the rest of the image.
    I have attempted to implement this by placing a JScrollPane on a JFrame, and then placing a JLabel in the JScrollPane's Viewport. I set the Label's text to blank, and then set the image, wraped in an InageIcon, as the JLabel's Icon.
    To center the JLabel, I have tried to set the JScrollPane's Viewport's LayoutManager to two different layout managers, but I've found buggy operation with each. The Layout I've tried are the following:
    1. a GridLayout(1,1,0,0); - this works fine when the image is smaller that the available area of the JScrollPane. However, if the window is resized so that the image more than totally fills the JScrollPane, the image gets cut off. What happens is that the image is centered in the available scrollpane view, meaning the uper and left edges of the image get cut off. Scroll bars appear to let you view the lower and righer edges of the image, however, when you scroll, the newly uncovered areas of the image never get drawn, so you can't get to see the lower or right edges of the image either.
    2. a GridbagLayout with one row, and one column each with a weight of 100, centered and told to fill both horizontally and vertically. Again, this correctly centers the JLabel when th eimage is smaler than the available space in the JScrollPane. Once the window is resized so that the image is bigger than the space to view the image in, strange problems occur. This time it seems that the JScrollPane's scrollbars show that there should be enough room to show the image if the image was in the upper left corner, however, the image isn't in the upper left corner, it is offset down and to the right if the upper left corner by an amount that appears equal to the amount of extra space needed to display the image. For example, if the image is 200x300 and the view area is 150x200, ite image is offest by 50 horizontally and 100 vertically. This results in the bottom and right edges of the image getting cut off because the scrollbars only scroll far enough to show the image if the image was placed at 0,0 and not at the offset location that it is placed at.
    You may not understand what I'm trying to say from my description, but below is code that can reproduce the problem.
    Questions. Am I doing anything wrong that is causing this problem? Is that another, better way to center the JLabel that doesn't have these problems? Is this a JAVA Bug in either the layoutmanagers, JScrollPane or JLabel when it only contains an icon and no text?
    Code:
    this is the class that creates and lays out the JFrame. It currently generates a 256x256 pixel image. By changing the imagesize variable to 512, you can get a larger image to work with which will make the bug more obvious.
    When first run the application will show what happens when using the GridLayout and described in 1. There are two commented out lines just below the GridLayout code that use a GridbagLayout as descriped in method 2. Comment out the GridLayout code when you uncomment the GridBageLayout code.
    package centertest;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.image.*;
    public class Frame1 extends JFrame {
        JPanel contentPane;
        BorderLayout borderLayout1 = new BorderLayout();
        JScrollPane jScrollPane1 = new JScrollPane();
        JLabel jLabel1 = new JLabel();
        static final int imagesize=256;
        //Construct the frame
        public Frame1() {
            enableEvents(AWTEvent.WINDOW_EVENT_MASK);
            try {
                jbInit();
            catch(Exception e) {
                e.printStackTrace();
        //Component initialization
        private void jbInit() throws Exception  {
            contentPane = (JPanel) this.getContentPane();
            contentPane.setLayout(borderLayout1);
            this.setSize(new Dimension(400, 300));
            this.setTitle("Frame Title");
            //setup label
            jLabel1.setIconTextGap(0);
            jLabel1.setHorizontalAlignment(JLabel.CENTER);
            jLabel1.setVerticalAlignment(JLabel.CENTER);
            jLabel1.setVerticalTextPosition(JLabel.BOTTOM);
            //create image and add it to the label as an icon
            int[] pixels = new int[imagesize*imagesize];
            for(int i=0;i<pixels.length;i++){
                pixels=i|(0xff<<24);
    MemoryImageSource mis = new MemoryImageSource(imagesize, imagesize,
    pixels, 0, imagesize);
    Image img = createImage(mis);
    jLabel1.setIcon(new ImageIcon(img));
    jLabel1.setText("");
    contentPane.add(jScrollPane1, BorderLayout.CENTER);
    //center image using a GridLayout
    jScrollPane1.getViewport().setLayout(new GridLayout(1,1,0,0));
    jScrollPane1.getViewport().add(jLabel1);
    //Center the image using a GridBagLayout
    /*jScrollPane1.getViewport().setLayout(new GridBagLayout());
    jScrollPane1.getViewport().add(jLabel1,
    new GridBagConstraints(0, 0, 1, 1, 100.0, 100.0,
    GridBagConstraints.CENTER, GridBagConstraints.BOTH,
    new Insets(0, 0, 0, 0), 0, 0));
    //Overridden so we can exit when window is closed
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    and here is an application with which to launch the frame
    package centertest;
    import javax.swing.UIManager;
    import java.awt.*;
    public class Application1 {
        boolean packFrame = false;
        //Construct the application
        public Application1() {
            Frame1 frame = new Frame1();
            //Validate frames that have preset sizes
            //Pack frames that have useful preferred size info, e.g. from their layout
            if (packFrame) {
                frame.pack();
            else {
                frame.validate();
            //Center the window
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            Dimension frameSize = frame.getSize();
            if (frameSize.height > screenSize.height) {
                frameSize.height = screenSize.height;
            if (frameSize.width > screenSize.width) {
                frameSize.width = screenSize.width;
            frame.setLocation( (screenSize.width - frameSize.width) / 2,
                              (screenSize.height - frameSize.height) / 2);
            frame.setVisible(true);
        //Main method
        public static void main(String[] args) {
            try {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            catch (Exception e) {
                e.printStackTrace();
            new Application1();
    }I'm running Java 1.4.1 build 21 on Windows 98. I used JBuilder8 Personal to write this code.

    Hmmm,
    You are correct. Not setting a layout for the scrollpane's viewport (using the default of javax.swing.ViewportLayout) results in the positioning of the image tat I want (center the image if image is smaller than the scrollpane, if the image is larger, place it in the upper-left corener and enable the scrollbars to scroll to see the rest of the image).
    Anyone have any idea why the GridLayout and GridBagLayout act as they do? I gues it isn't that important tomy program, but I'm still not sure that they are operating correctly. (Specifically, GridLayout sha scrollbars, but when you scroll, no new parts of the image are revealed.)

  • Problem with JMenus that Persist - Is this a Java bug?

    I am having a problem with JMenus that persist. By this I mean
    that my drop down menus persist on the screen even after they have
    been selected.
    I've checked the Java bug database, and the following seems
    to come closest to my problem:
    Bug ID: 4235188
    JPopupMenus and JMenus persist when their JFrame becomes visible
    State: Closed, not a bug
    http://developer.java.sun.com/developer/bugParade/bugs/4235188.html
    This page says that the matter is closed and is not a bug. The
    resolution of this matter printed at the bottom of the page
    is completely abstruse to me and I would appreciate any
    comments to understand what they are talking about.
    The code at the end of my message illustrates my problem.
    1. Why should paintComponent() make any difference to
    Menu behavior?
    2. Is this a bug?
    3. What's the workaround if I have to paint() or repaint()?
    Thanks
    Tony Lin
    // Example of Menu Persistence Problem
    // Try running this with line 41, paintComponent(), and without line 41
    // Menus behave normally if line 41 is commented out
    // If line 41 exists, menus will persist after they have been selected
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class P2 extends JPanel {
    JMenuItem[] mi;
    public P2() {
    JFrame thisFrame = new JFrame();
    thisFrame.getContentPane().add(this);
    JMenu menu = new JMenu("My Menu");
    JMenuBar mb = new JMenuBar();
    mi = new JMenuItem[4];
    for (int i=0; i<mi.length; i++) {
    mi[i] = new JMenuItem("Menu Item " + String.valueOf(i));
    menu.add(mi);
    mb.add(menu);
    thisFrame.setJMenuBar(mb);
    thisFrame.setSize(400,200);
    thisFrame.setLocation(150,200);
    thisFrame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent we) {
    System.exit(0);
    thisFrame.setVisible(true);
    public void paintComponent(Graphics g) {} //Affects menu behavior!
    public static void main(String[] args) {
    new P2();

    Well, my understanding of the way painting works is that a component doesn't UNPAINT itself. Instead a message is sent to the component under the coordinates of the menu to REPAINT itself.
    In your demo program the JFrame is the component under the JMenu. The paintComponent() method of JFrame is empty, so nothing gets repainted.
    I added super.paintComponent(g); to the method and everything works fine.

  • How to vote, add to watch list or comment on a bug in the Java Bug Database

    Sorry, could not fine a better place where to post this question.
    I'm successfully logged-in but I cannot add a particular bug to my bug watch list, comment on it or vote for it (ok, here I may have already used all my 3 votes but I could also not find where to check this in my profile).
    I am particular interested in this bug #4787931:
    http://bugs.sun.com/view_bug.do?bug_id=4787931
    Thanks for you support!

    The Java bug DB was a Sun-time idea. Oracle hasn't put much effort into it since the merger:
    - the performance has been horrible, see e.g. {thread:id=2173553}), and it is not clear whether they intend to keep maintaining it as such (open, vote-able,...)
    - the "recently closed bugs" page (http://bugs.sun.com/recently_closed.do) seems out of date
    - At the time of this writing, I cannot even find a link to log on it from the welcome page http://bugs.sun.com/ :(
    Until Oracle openly declares that they will maintain this resource, I wouldn't put much hope nor effort into it...
    Much luck,
    J.
    Edited by: jduprez on Sep 17, 2012 11:59 AM

  • How to find my submitted bug report in Java bug database

    I just submitted a bug report in Java bug database and it told me that the submission is successful without its bug ID and no email notification is received from Oracle.
    And I cannot find the bug in bug database with the title I submitted.
    The bug's product/category is Java Plug-in in JRE7
    So how could I get the bug status? Will it be fixed and how is it going on?

    I just submitted a bug report in Java bug database and it told me that the submission is successful without its bug ID and no email notification is received from Oracle.Last time I did that it also said it wouldn't appear straight away. They have to qualify bugs you know.
    And I cannot find the bug in bug database with the title I submitted.How long ago?
    So how could I get the bug status?Wait till it turns up?
    Will it be fixed and how is it going on?How would anyone on this forum know?

  • I know there is a bug with the new firefox 3.6.14 and how Java operates. I've un-installed 3.6.14 and re-installed 3.6.13 Does the Firefox Beta 4 have the prob that 3.6.14 has? When will firefox updates fix this Java bug?

    Under tools options for the 3.6.14 there is no tab to enable java, only java scripts. There was an add- on for Java that automatically downloaded that may be part of the problem. I' also updated to Java 1.6.0.24,- is that may be part of problem. The Pogo.com website will not load certain games.
    My biggest question is whether the Firefox beta 4 is safe(er) to use, and/or does it have other and perhaps worse bugs that have not been worked out.

    Firefox 3.6.15 fixes that problem with Java.
    Use Help > '''Check for Updates''' to get 3.6.15.

  • XML Schema for Java Bugs

    I've just downloaded your XML Schema for Java software are have been systematically testing it with a relatively simple document. A few bugs:
    1. the use="required" attribute of the attribute element doesn't have any effect (doesn't show any error message or throw any exceptions) when the required attribute is omitted.
    2. If I declare an element like:
    <element name="age">
    <simpleType>
    <restriction base="positiveInteger">
    <maxInclusive value="100"/>
    </restriction>
    </simpleType>
    </element>
    Then, if I modify my xml document instance to say:
    <age pointless="true">26</age>
    This will throw a non-parser exception with a message of null, instead of saying "Attribute 'pointless' not expected", as it does if I redefine the schema declaration as:
    <element name="age">
    <complexType>
    <simpleContent>
    <extension base="my:ageType"/>
    </simpleContent>
    </complexType>
    </element>
    Will Allan
    null

    I'm glad someone else has noticed that unique keyref and key don't seem to be working with the Dom Parser. If they don't work WHY ARE THEY (key, keyref, unique) IN THE EXAMPLE'S THAT ARE DOWNLOADED WITH THE SCHEMA PARSER. In report.xsd, a file downloaded with the example, it makes clear usage of unique, key, and key ref. But if you violate the schema definitions in the corresponding file report.xml the parser doesn't complain whatsoever. The only time it barfs is if you change the keyref refer attribute to something other than "pNumKey". It obviously has to work. No bone head would send example files along with their product that didn't work.
    So, if anyone at ORACLE or elsewhere has figured out how to use unique, key, or keyref please respond with an explination of how to correctly use them with the parser. Your name will be blessed throughout the ages as a most kind and venerable person. You will be a hallmark, a standard, a shining light for all future generations of what a human being should be! Okay maybe I'm going a little overboard but I'm DESPERATE. With no books or collateral on how this stupid thing works all I can do is hack.
    -Thanks

  • Unicode line-drawing characters - possible Java bug?

    Hi all, I am trying to draw a box using line drawing characters in UTF-8. I make the UTF-8 box file in Microsoft Word where it looks aligned. However, when I run my Java program to display the box in a JTextArea, it is all out of alignment like below. Is this a bug in Java that prevents it from displaying aligned line-drawing characters? I am tearing my hair out over this so your help is much appreciated.
    Regards,
    Rianmal.
    &#9556;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9559;
    &#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;
    &#9553; &#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;
    &#9562;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9565;

    sabre,
    Looks like monospaced isn't found on windows (vista)... So I used "Courier New" instead.
    Sabre20090412a.java is saved with encoding=UTF-8 (i.e. CP1252) instead of the default ASCII, which doesn't support the extended characters.
    package forums;
    import java.awt.Font;
    import javax.swing.JFrame;
    import javax.swing.JTextArea;
    public class Sabre20090412a
      private static final String text;
      static {
        String t;
        t =  "&#9556;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9559;\n"; // LINE 12
        t += "&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;&#9553;\n";
        t += "&#9553;                   &#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9553;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#8729;&#9553;\n";
        t += "&#9562;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9565;\n"; // LINE 23
        text = t;
      public static void createAndShowGUI() {
        final JFrame frame = new JFrame("Test");
        final JTextArea ta = new JTextArea();
        ta.setFont(new Font("Courier New", Font.PLAIN, 14)); // <<<<< Note font-name="Courier New"
        ta.setText(text);
        frame.setContentPane(ta);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      public static void main(String[] args) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            createAndShowGUI();
    build (NOTE the -encoding utf-8)*
    cd /d C:\Java\home\src\forums
    "C:\Program Files\Java\jdk1.6.0_12\bin\javac.exe" -encoding utf-8 -Xlint -d C:\Java\home\classes -cp c:\java\home\src;.;C:\Java\home\classes C:\Java\home\src\forums\Sabre20090412a.java
    run
    cd /d C:\Java\home\src\forums
    "C:\Program Files\Java\jdk1.6.0_12\bin\java.exe" -cp C:\Java\home\classes forums.Sabre20090412a
    References:
    http://www.google.com/search?q=warning%3A+unmappable+character+for+encoding+Cp1252&hl=en
    http://en.wikipedia.org/wiki/Windows-1252 #says 1252== IANIA UTF-8 except
    http://www.utf8-chartable.de/unicode-utf8-table.pl #page for 2500 onwards
    http://forums.sun.com/thread.jspa?threadID=5185338 #-encoding
    http://www.java2s.com/Code/Java/2D-Graphics-GUI/Listallavailablefontsproviedinthesystem.htm
    Roedy Green rocks!
    http://mindprod.com/jgloss/font.html#AVAILABLEJ
    http://mindprod.com/applet/fontshower.html
    Thanx for the fish!
    Cheers. Keith.

  • Is this really a java  bug?

    # An unexpected error has been detected by HotSpot Virtual Machine:
    # SIGSEGV (0xb) at pc=0x8d22d623, pid=12929, tid=2293337008
    # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode)
    # Problematic frame:
    # [thread 2106588080 also had an error]
    C [libocijdbc10.so+0x12623]
    [thread -2127164496 also had an error]
    [thread 2117065648 also had an error]
    Rset -->spsingh0
    # An error report file with more information is saved as [thread 2117065648 also had an error]
    [thread -2050204752 also had an error]
    [thread 2041535408 also had an error]
    [thread 1980222384 also had an error]
    [thread 2144336816 also had an error]
    [thread 1984424880 also had an error]
    [thread -2090341456 also had an error]
    [thread -2096682064 also had an error]
    [thread 1920981936 also had an error]
    [thread 2116537264 also had an error]
    [thread -2123084880 also had an error]
    [thread -2022728784 also had an error]
    [thread -2027484240 also had an error]
    [thread -2117076048 also had an error]
    [thread 2011167664 also had an error]
    [thread 2042063792 also had an error]
    [thread -2061300816 also had an error]
    [thread 1996430256 also had an error]
    [thread -2024313936 also had an error]
    [thread 1994845104 also had an error]Rset -->spsingh0
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    [thread -2085139536 also had an error]
    [thread -2092983376 also had an error]
    [thread -2121970768 also had an error]
    [thread 2130369456 also had an error]
    [thread -2079855696 also had an error]

    multiple threads on same subject!
    Dave's right, it's almost certainly a compatibility problem with your JDBC driver

  • Errors with partitioning by callback or keys (JNI/Java), bug?

    Hello,
    Just upgraded to 4.8, to test new partitioning features. Seems to be not working for me, or maybe I'm doing something wrong?
    Vista 64-bit, Java 1.6.0_16 32-bit, BDB 4.8.24 32-bit.
    Callback-based partitioning:
    public class InfoDataPartitionHandler implements PartitionHandler {
    @Override
    public int partition(Database db, DatabaseEntry key) {
         return 0; // just testing
    DatabaseConfig cfg = new DatabaseConfig();
    cfg.setAllowCreate(true);
    cfg.setPartitionByCallback(4, new InfoDataPartitionHandler());
    cfg.setType(DatabaseType.BTREE);
    Database db = env.openDatabase(null,"test",null,cfg);
    And this is what I get when running, looks like a bug actually:
    Exception in thread "main" java.lang.IllegalArgumentException: DatabaseEntry must not be null
    at com.sleepycat.db.internal.db_javaJNI.Db_set_partition(Native Method)
    at com.sleepycat.db.internal.Db.set_partition(Db.java:497)
    at com.sleepycat.db.DatabaseConfig.configureDatabase(DatabaseConfig.java:2206)
    at com.sleepycat.db.DatabaseConfig.openDatabase(DatabaseConfig.java:2105)
    at com.sleepycat.db.Environment.openDatabase(Environment.java:314)
    Key-based partitioning
    Things are even worse.
    DatabaseEntry k1 = new DatabaseEntry();
    StringBinding.stringToEntry("111111111111111111111111", k1);
    int sz = k1.getSize();
    MultipleDataEntry keys = new MultipleDataEntry(new byte[sz]);
    keys.append(k1);
    DatabaseConfig cfg = new DatabaseConfig();
    cfg.setAllowCreate(true);
    cfg.setPartitionByRange(2, keys);
    cfg.setType(DatabaseType.BTREE);
    Database db = new Database("/tmp/test.db", null, cfg);
    db.close();
    Exception in thread "main" com.sleepycat.db.DatabaseException: DB_NOTFOUND: No matching key/data pair found: DB_NOTFOUND: No matching key/data pair found
    at com.sleepycat.db.internal.db_javaJNI.Db_open(Native Method)
    at com.sleepycat.db.internal.Db.open(Db.java:449)
    at com.sleepycat.db.DatabaseConfig.openDatabase(DatabaseConfig.java:2106)
    at com.sleepycat.db.Database.<init>(Database.java:103)
    at Temp.main(Temp.java:23)
    Please help.

    Hello. Thanks for this report, both situations you've reported are bugs in Berkeley DB. We are currently validating patches internally.
    Please contact me directly at ben dot schmeckpeper at the obvious domain.
    Thanks,
    Ben

  • The best way to remove any " Fake java bug" from the Mac  ??

    I upgraded my OS to "yosemite" from Mavericks, simultaneously a java upgrade requirement started to pop up, i upgraded that very java update & since then continuously receiving the very same update again & again.. which will be the best way to remove that bug, if it is one.....!!!!!! ??

    Java for OS X 2014-001

  • Is this a Java bug?

    I am confused. Here is the story. I have the following drive and directory structure:
    c:\MyDir\check
    I have the following two files (mine.java and test.java) in C:\MyDir directory.
    package check;
    public class mine
    public int x = 9;
    import check.*;
    public class test
    public static void main(String[] args)
    mine m = new mine();
    Here are the steps:
    set classpath=.;c:\MyDir;
    javac mine.java
    move mine.class check (placing the .class file in check directory)
    javac test.java
    test.java:6: cannot resolve symbol
    symbol : constructor mine ()
    location: class mine
    mine m = new mine();
    ^
    1 error
    My solution is when I move mine.java out of c:\MyDir then everything works fine.
    Why???

    I think it will also work if you change "import check.*;" to "import check.mine;"
    The javac compiler automatically compiles dependent classes. Normally this is a helpful feature. In the test class, you reference a class named mine. The compiler doesn't know you mean check.mine because you used the wildcard import statement. So the compiler looks thru the Classpath directories for mine.class or mine.java files. It finds mine.java first and tries to compile it. But, as it compiles, it finds the class is check.mine, not plain mine. So you get an error.
    Unfortunately, the error message is somewhat confusing. But, it makes sense to me that you can expect errors if you are going to keep your source code separate from the compiled code, and the source code is in directories where the compiler can find it.

  • Java bug in a multi monitor application

    Hi,
    I am developing an application using three monitors on windows platform. I am using a NVidia GeForce 4 card to derive the monitors. My application opens up in a secondary monitor, It consists of a Canvas whose parent is a JScrollPane, a JTree whose parent is another JScrollPane. The problem is if I load an image on the canvas and slide the scrollbars attached to the canvas, The canvas does not repaint itself, for which I had to add a listener which repaints the canvas each time the scrollbars are slided. Similar problem is with the JTree scroller, so I call the UpdateUI for the jtree each time the scroller is slided. A few days ago I added a JCombobox to my application. When i click it, obviously a dropdown menu appears with a slider. When i move the slider, the JComboBox does not repaint and I am having difficulty capturing the combobox's slider event. That's not all, I also experienced the repaint problem with other swing components for which I have to explicitly call the UpdateUI method. I got to a point that I had to literally call the update method for every swing component I am using which is dropping my applications efficiency. So I changed my monitor's setting and assigned my secondary monitor as the primary monitor using the windows display properties and it worked. The scrollbars work, and everything is repainting. So the solution is to change my display setting programatically so that the secondary monitors becomes the primary monitor, but I am not able to do that. I need some help regarding this.
    If I have three monitors on a single computer, and I want to change the secondary monitor to primary, how can I do it using Java?
    I hope I explained the problem. I hope someone has an answer.
    Babar Noor

    Using Java:
    java version "1.5.0_02"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
    Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode)
    When working in a multiscreen environment using NVIDIA Quadro PCI-E Series' Quadro NVS 280 PCI-E, with two screens (1024x768 display) , DirectX 9.0. One screen is oriented as portrait (secundary screen), the other a landscape (primary screen).
    I run my Swing application, move the frame to the portrait oriented screen,
    The gui has a default JScrollPane, then when I maximize the gui, I get a horizontal and vertical scrollbar. Moving the horizontal scrollbar , the default viewport fails to repaint the screen correctly.
    The solution that worked for me was to set the ViewPort's scrollMode:
    scrollpane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE);
    as suggested in
    http://forum.java.sun.com/thread.jspa?messageID=3625667&#3625667

  • Here's a good stumper. Any ideas? Java BUG?

    public class Test {
        //A static value we will set later -- this is legal
        static final int INT_VALUE;
        static {
            //try to set the value..
            //note that an exception *could* be thrown BEFORE the value is set
            try {
                if (getValue()>50)
                    INT_VALUE = 50;
                else
                    INT_VALUE = 5;
            } catch (Exception ex) {
                //if there was an exception, the value wasn't set, so we do it now
                INT_VALUE = 1; // <-- javac will complain about this. why?
        static int getValue() throws Exception {
            throw new Exception("whoops");
    }If you compile this, javac tells you the line
    INT_VALUE = 1; is bad because the valriable might have been assigned to.
    What order of operations could throw the exception and assign the value before the
    INT_VALUE = 1; line is reached?

    If you compile this, javac tells you the line
    INT_VALUE = 1; is bad because the
    valriable might have been assigned to.
    What order of operations could throw the exception
    and assign the value before the
    INT_VALUE = 1; line is reached?The person who said the java compiler is dumb is just about right. The complaint that the compiler gives is that the value might be assigned already. This is beacuse the INT_VALUE varible has a chance to be assigned in the try block.
    In your code you force a deterministic error which is usually not the case so the compiler doesn't search for it. Hence the compiler says that there is a chance that the value ha already been assigned. This is also because the value assignement, if it happened, will stay past the try block and the catch will try to reassign the final.
    So the compiler just plays it safe and says the variable might have already been assigned rather than searching for possible exceptions and determining if the variable gets set to a value or not (remember your code is exceptionally deterministic with respect to the runtime error being thrown.)

  • SQL Query problems with Mysql - possible Java bug

    I have a query that works fine on mysql, but does not work in my jsp page.... my db connection and all that jazz is fine.
    select somefields from table order by (integerfield / doublefield)
    two notes... the query works without the order by. And the query works with the order by when I'm working directly with the db. Any ideas? This is driving me nuts!!!!
    Thanks,
    Tyson

    Nevermind, just a dumb mistake... finally figured it out.

Maybe you are looking for

  • Help! hyperlink to email

    Hi, I'm trying to write a resume on Appleworks 6. I've been really frustrated with it, I cannot get my contact info right because I can't make my email address into an email hyperlink. Is this possible with AW? All I see are options for internet or d

  • Mediaplayer plugin not work at FF 4.0.

    Had to download the mediaplayer plugin from port25, frist time. as i used FF 3.x it was not needed. the site tvthek.orf.at worked fine, befor i upgraded to FF 4.0. now i allways get the message when i want to see the a video there, please get the plu

  • Parsing an HTML document

    I want to parse an html document and replace anchor tags with mines on the fly. Can anybody suggest how to do it Please? Ajay

  • Where should RequestDispatcher.include() be used ?

    Hello again, I could not get the expected result from RequestDispatcher.include(). First, I cannot use it to include static content; second, it does not include the dynamic contents in proper order. Now my question is, where can I use RequestDispatch

  • The screen of my iphone 4s sometimes turns blue or green with vertical lines that do?

    yesterday after noon i was able to charge my iphone in my back to remove the charger the screen was green and sometimes even blue with lines and after  some minutes the screen is back to normal again and again the same problem with the blue or green