Probable bug in Kodo class handling code (Beta 2.2)

I have a test class "Widget" that has two attributes, name and
mark. I am encountering a curious error in the no-args
constructor under some circumstances that looks like a bug.
public class Widget
private static Random random = new Random();
private String name;
private int mark;
private Widget()
public Widget(String name)
this.name = name;
mark = random.nextInt(1000);
Typically, the test application constructs Widgets with a name.
But since I believe that it is good practice for the application
to define the no-args constructor even when it is only for the
use of JDO, I have a private no-args constructor. As the class
stands above, it compiles, enhances, and runs just fine.
But if I copy the line "mark = random.nextInt(1000);" into the
no-args constructor, the code compiles and enhances just fine,
but bombs on running with the following error:
javax.jdo.JDOFatalDataStoreException:
The registered class "com.ysoft.jdo.book.widget.Widget"
is not compiled or not longer exists. If the class has been deleted,
unregister it before proceeding.
NestedThrowables:
java.lang.ExceptionInInitializerError
     at
com.solarmetric.kodo.impl.jdbc.schema.DB.getPersistentTypes(DB.java:270)
     at com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.setup
(JDBCPersistenceManagerFactory.java:170)
     at
com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.privateSetup
(PersistenceManagerFactoryImpl.java:501)
     at
com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceManager
(PersistenceManagerFactoryImpl.java:61)
     at
com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceManager
(PersistenceManagerFactoryImpl.java:50)
     at
com.ysoft.jdo.book.widget.WidgetHandler.<init>(WidgetHandler.java:43)
     at com.ysoft.jdo.book.test.widget.TestWidget.main(TestWidget.java:18)
Exception in thread "main"
Using the schematool for -action refresh will yield a null pointer
exception at the no-args constructor line that is setting the
value of mark.
After initially having the mark initialization code in the
no-args constructor and puzzling over the error, I realized that
it didn't make sense to set the value of mark in the no-args
constructor, since JDO would later set it to whatever the value
in the database was. But it seems to me that there should be no
great harm in it, either. If mark is initialized with the value
"42" instead of "random.nextInt(1000)", there are no problems.
Any insights?
David Ezzio
Yankee Software

David,
I'm not quite sure what to do about this. I'll have to dig into the spec
and get back to you.
Here's what's happening:
Upon compilation, your initialization of the static field 'random' is
inserted into a 'static' block.
Upon bytecode enhancement, a good deal of code is added to the 'static'
block. This code is responsible for registering the class with the JDO
system.
One step of this registration process involves instantiating an object
of type 'Widget' and passing it to JDOImplHelper.registerClass().
This step is inserted into the static block before the initialization
of 'random'.
So, when the no-args constructor is invoked in preparation for the call
to registerClass(), 'random' is still null. Hence the null pointer
instruction.
As a temporary workaround, move the 'random' initialization code into an
init () method that is invoked from the constructors, and which
initializes 'random' if it is null. Or just don't perform the
initialization in the no-args constructor.
-Patrick Linskey

Similar Messages

  • Kodo class/resource loading approach will be a problem in managed environment.

    Hello,
    Kodo does not work with Apache Tomcat 3 and 4 unless Kodo jars and my
    persistent classes loaded by the same class loader. Kodo uses
    Class.forName() and class.getResources() on class loader which loaded Kodo
    classes thus it is not able to find system.prefs or package.jdo (and even if
    it was able to find system.prefs how would it handle multiple system.prefs
    from multiple contexts each managed by its own class loader?)
    The problem as I see it is that web containers usually have container
    classloader(s) and a class loader per web context. Desired configuration
    would be to share Kodo classes among all contexts and implement jndi factory
    to provide PersistentManagerFactory lookup in each web container
    environment. According to Tomcat specs I placed Kodo jars in
    $tomcat_home/lib (class loader shared among all contexts) and deployed my
    persistent classes along with system.prefs and *.jdo files to my context
    WEB-INF/lib directory. As a result Kodo would not find system.prefs resource
    and eventually fail with error - required resource db/url could not be
    loaded. I tried to place Kodo jars into together with my persistent classes
    in WEB-INF/lib it did not help (this was really strange since all classes
    should have been loaded by the same context class loader) The only
    configuration that works is when I put Kodo and my persistent classes in
    tomcat's common directory or on system class path. Which is of course not a
    right way to go as context specific classes such as my persistent classes
    should be shared
    Without source code it is hard to figure out what is going on and how
    resources get loaded, so could somebody look into it. It is quite important
    for us to resolve this issue as we are planning to use Kodo with tomcat.
    Also I am not sure that system.prefs is a good idea. As I mentioned when
    integrated with appserver/web container environment jndi it is up to jndi
    factory to create and configure PersistentManagerFactories. Different
    PersistentManagerFactories will be bound to different jndi names often in
    different contexts under common or separate class loaders and they should
    not be in my opinion dependent on common system.prefs
    I would greatly appreciate your suggestion on proper use of Kodo in web
    container environment
    Thank you very much in advance
    Alex Roytman

    I want to add that even if we put both Kodo jars and persistent classes jar
    in WEB-INF/lib to be loaded by context class loader it does not work due to
    following piece of code in Prefs.java:
    private static synchronized void loadSystem() {
    try {
    Enumeration enumeration =
    (com.techtrader.util.app.Prefs.class).getClassLoader().getResources("system.
    prefs");
    Object obj = null;
    Object obj1 = null;
    InputStream inputstream;
    for (; enumeration.hasMoreElements(); inputstream.close()) {
    URL url = (URL)enumeration.nextElement();
    inputstream = url.openStream();
    _cache.parse(inputstream, url.toString(), "");
    catch (Exception exception) {
    throw new ParseException(exception);
    however if we replace it with following it will work:
    private static synchronized void loadSystem() {
    try {
    Object obj = null;
    Object obj1 = null;
    URL url =
    (com.techtrader.util.app.Prefs.class).getClassLoader().getResource("system.p
    refs");
    InputStream inputstream = url.openStream();
    _cache.parse(inputstream, url.toString(), "");
    inputstream.close();
    catch (Exception exception) {
    throw new ParseException(exception);
    "Alex Roytman" <[email protected]> wrote in message
    news:[email protected]...
    Hello,
    Kodo does not work with Apache Tomcat 3 and 4 unless Kodo jars and my
    persistent classes loaded by the same class loader. Kodo uses
    Class.forName() and class.getResources() on class loader which loaded Kodo
    classes thus it is not able to find system.prefs or package.jdo (and evenif
    it was able to find system.prefs how would it handle multiple system.prefs
    from multiple contexts each managed by its own class loader?)
    The problem as I see it is that web containers usually have container
    classloader(s) and a class loader per web context. Desired configuration
    would be to share Kodo classes among all contexts and implement jndifactory
    to provide PersistentManagerFactory lookup in each web container
    environment. According to Tomcat specs I placed Kodo jars in
    $tomcat_home/lib (class loader shared among all contexts) and deployed my
    persistent classes along with system.prefs and *.jdo files to my context
    WEB-INF/lib directory. As a result Kodo would not find system.prefsresource
    and eventually fail with error - required resource db/url could not be
    loaded. I tried to place Kodo jars into together with my persistentclasses
    in WEB-INF/lib it did not help (this was really strange since all classes
    should have been loaded by the same context class loader) The only
    configuration that works is when I put Kodo and my persistent classes in
    tomcat's common directory or on system class path. Which is of course nota
    right way to go as context specific classes such as my persistent classes
    should be shared
    Without source code it is hard to figure out what is going on and how
    resources get loaded, so could somebody look into it. It is quiteimportant
    for us to resolve this issue as we are planning to use Kodo with tomcat.
    Also I am not sure that system.prefs is a good idea. As I mentioned when
    integrated with appserver/web container environment jndi it is up to jndi
    factory to create and configure PersistentManagerFactories. Different
    PersistentManagerFactories will be bound to different jndi names often in
    different contexts under common or separate class loaders and they should
    not be in my opinion dependent on common system.prefs
    I would greatly appreciate your suggestion on proper use of Kodo in web
    container environment
    Thank you very much in advance
    Alex Roytman

  • Is it flash bug? Tween Class

    I've been working on a bit big project. I've some components on the stage. There are basically 4 frames. Each frame has some components. What I've done is, I've used tween class. Workflow is something like this:
    Frame 1:
    --used Tween class to get fade effect for List component.
    --used Tween.MOTION_FINISH event to fire an event when it is finished.
    --when it is finished, applied eventListener
    --on Change event, remove eventListeners and use Tween class again to get reverse fade effect.
    --again used Tween.MOTION_FINISH event to fire an event when finished.
    --in that evenHandler, gotoAndStop(2);
    Frame 2:
    //similar
    Frame 3:
    //similar
    and so on.. now, what happens, is, if i play with my scene, sometimes tween class failed to work. sometimes it does not display List component, sometimes it displays List component with alpha 0.2. sometimes it happens with movieClip also. Is it flash bug or problem with my code?

    probably a coding problem.  the most common error that seems like a flash bug would be to define a tween within a function body allowing flash to gc that tween, possibly before it starts and/or completes.

  • What event handling code do I need to access a web site ?

    Hello
    I am doing a GUI program that would go to a program or a web site when a button is clicked. What event handling code do I need to add to access a web site ?
    for instance:     if (e.getSource() == myJButtonBible)
              // go to www.nccbuscc.org/nab/index.htm ? ? ? ? ? ? ?
            } below is the drive class.
    Thank you in advance
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import javax.swing.JEditorPane.*;
    public class TryGridLayout
      public TryGridLayout() {
        JFrame myJFrame = new JFrame("Choose your program");
        Toolkit myToolkit = myJFrame.getToolkit();
        Dimension myScreenSize = myToolkit.getDefaultToolkit().getScreenSize();
        //Center of screen and set size to half the screen size
        myJFrame.setBounds(myScreenSize.width / 4, myScreenSize.height / 4,
                           myScreenSize.width / 2, myScreenSize.height / 2);
        //change the background color
        myJFrame.getContentPane().setBackground(Color.yellow);
        //create the layout manager
        GridLayout myGridLayout = new GridLayout(2, 2);
        //get the content pane
        Container myContentPane = myJFrame.getContentPane();
        //set the container layout manager
        myContentPane.setLayout(myGridLayout);
        //create an object to hold the button's style
        Border myEdge = BorderFactory.createRaisedBevelBorder();
        //create the button size
        Dimension buttonSize = new Dimension(190, 100);
        //create the button's font object
        Font myFont = new Font("Arial", Font.BOLD, 18);
        //create the 1st button's object
        JButton myJButtonCalculator = new JButton("Calculator");
        myJButtonCalculator.setBackground(Color.red);
        myJButtonCalculator.setForeground(Color.black);
        // set the button's border, size, and font
        myJButtonCalculator.setBorder(myEdge);
        myJButtonCalculator.setPreferredSize(buttonSize);
        myJButtonCalculator.setFont(myFont);
        //create the 2nd button's object
        JButton myJButtonSketcher = new JButton("Sketcher");
        myJButtonSketcher.setBackground(Color.pink);
        myJButtonSketcher.setForeground(Color.black);
    // set the button's border, size, and font
        myJButtonSketcher.setBorder(myEdge);
        myJButtonSketcher.setPreferredSize(buttonSize);
        myJButtonSketcher.setFont(myFont);
        //create the 3rd button's object
        JButton myJButtonVideo = new JButton("Airplane-Blimp Video");
        myJButtonVideo.setBackground(Color.pink);
        myJButtonVideo.setForeground(Color.black);
    // set the button's border, size, and font
        myJButtonVideo.setBorder(myEdge);
        myJButtonVideo.setPreferredSize(buttonSize);
        myJButtonVideo.setFont(myFont);
        //create the 4th button's object
        JButton myJButtonBible = new JButton("The HolyBible");
        myJButtonBible.setBackground(Color.white);
        myJButtonBible.setForeground(Color.white);
    // set the button's border, size, and font
        myJButtonBible.setBorder(myEdge);
        myJButtonBible.setPreferredSize(buttonSize);
        myJButtonBible.setFont(myFont);
        //add the buttons to the content pane
        myContentPane.add(myJButtonCalculator);
        myContentPane.add(myJButtonSketcher);
        myContentPane.add(myJButtonVideo);
        myContentPane.add(myJButtonBible);
        JEditorPane myJEditorPane = new JEditorPane();
        //add behaviors
        ActionListener myActionListener = new ActionListener() {
          public void actionPerformed(ActionEvent e) throws Exception
            /*if (e.getSource() == myJButtonCalculator)
              new Calculator();
            else
            if (e.getSource() == myJButtonSketcher)
              new Sketcher();
            else
            if (e.getSource() == myJButtonVideo)
              new Grass();
            else*/
            if (e.getSource() == myJButtonBible)
               // Go to http://www.nccbuscc.org/nab/index.htm
        }; // end of actionPerformed method
        //add the object listener to listen for the click event on the buttons
        myJButtonCalculator.addActionListener(myActionListener);
        myJButtonSketcher.addActionListener(myActionListener);
        myJButtonVideo.addActionListener(myActionListener);
        myJButtonBible.addActionListener(myActionListener);
        myJFrame.setVisible(true);
      } // end of TryGridLayout constructor
      public static void main (String[] args)
        new TryGridLayout();
    } // end of TryGridLayout class

    Hello
    I am doing a GUI program that would go to a program or a web site when a button is clicked. What event handling code do I need to add to access a web site ?
    for instance:     if (e.getSource() == myJButtonBible)
              // go to www.nccbuscc.org/nab/index.htm ? ? ? ? ? ? ?
            } below is the drive class.
    Thank you in advance
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import javax.swing.JEditorPane.*;
    public class TryGridLayout
      public TryGridLayout() {
        JFrame myJFrame = new JFrame("Choose your program");
        Toolkit myToolkit = myJFrame.getToolkit();
        Dimension myScreenSize = myToolkit.getDefaultToolkit().getScreenSize();
        //Center of screen and set size to half the screen size
        myJFrame.setBounds(myScreenSize.width / 4, myScreenSize.height / 4,
                           myScreenSize.width / 2, myScreenSize.height / 2);
        //change the background color
        myJFrame.getContentPane().setBackground(Color.yellow);
        //create the layout manager
        GridLayout myGridLayout = new GridLayout(2, 2);
        //get the content pane
        Container myContentPane = myJFrame.getContentPane();
        //set the container layout manager
        myContentPane.setLayout(myGridLayout);
        //create an object to hold the button's style
        Border myEdge = BorderFactory.createRaisedBevelBorder();
        //create the button size
        Dimension buttonSize = new Dimension(190, 100);
        //create the button's font object
        Font myFont = new Font("Arial", Font.BOLD, 18);
        //create the 1st button's object
        JButton myJButtonCalculator = new JButton("Calculator");
        myJButtonCalculator.setBackground(Color.red);
        myJButtonCalculator.setForeground(Color.black);
        // set the button's border, size, and font
        myJButtonCalculator.setBorder(myEdge);
        myJButtonCalculator.setPreferredSize(buttonSize);
        myJButtonCalculator.setFont(myFont);
        //create the 2nd button's object
        JButton myJButtonSketcher = new JButton("Sketcher");
        myJButtonSketcher.setBackground(Color.pink);
        myJButtonSketcher.setForeground(Color.black);
    // set the button's border, size, and font
        myJButtonSketcher.setBorder(myEdge);
        myJButtonSketcher.setPreferredSize(buttonSize);
        myJButtonSketcher.setFont(myFont);
        //create the 3rd button's object
        JButton myJButtonVideo = new JButton("Airplane-Blimp Video");
        myJButtonVideo.setBackground(Color.pink);
        myJButtonVideo.setForeground(Color.black);
    // set the button's border, size, and font
        myJButtonVideo.setBorder(myEdge);
        myJButtonVideo.setPreferredSize(buttonSize);
        myJButtonVideo.setFont(myFont);
        //create the 4th button's object
        JButton myJButtonBible = new JButton("The HolyBible");
        myJButtonBible.setBackground(Color.white);
        myJButtonBible.setForeground(Color.white);
    // set the button's border, size, and font
        myJButtonBible.setBorder(myEdge);
        myJButtonBible.setPreferredSize(buttonSize);
        myJButtonBible.setFont(myFont);
        //add the buttons to the content pane
        myContentPane.add(myJButtonCalculator);
        myContentPane.add(myJButtonSketcher);
        myContentPane.add(myJButtonVideo);
        myContentPane.add(myJButtonBible);
        JEditorPane myJEditorPane = new JEditorPane();
        //add behaviors
        ActionListener myActionListener = new ActionListener() {
          public void actionPerformed(ActionEvent e) throws Exception
            /*if (e.getSource() == myJButtonCalculator)
              new Calculator();
            else
            if (e.getSource() == myJButtonSketcher)
              new Sketcher();
            else
            if (e.getSource() == myJButtonVideo)
              new Grass();
            else*/
            if (e.getSource() == myJButtonBible)
               // Go to http://www.nccbuscc.org/nab/index.htm
        }; // end of actionPerformed method
        //add the object listener to listen for the click event on the buttons
        myJButtonCalculator.addActionListener(myActionListener);
        myJButtonSketcher.addActionListener(myActionListener);
        myJButtonVideo.addActionListener(myActionListener);
        myJButtonBible.addActionListener(myActionListener);
        myJFrame.setVisible(true);
      } // end of TryGridLayout constructor
      public static void main (String[] args)
        new TryGridLayout();
    } // end of TryGridLayout class

  • [svn:fx-trunk] 14139: Fix for Player classes not code hinting  to framework FB projects.

    Revision: 14139
    Revision: 14139
    Author:   [email protected]
    Date:     2010-02-11 16:36:39 -0800 (Thu, 11 Feb 2010)
    Log Message:
    Fix for Player classes not code hinting  to framework FB projects. Changed all the $ tokens to use $ instead. While the compiler understands $, Flash Builder's code model does not.
    No code changes.
    QE notes: N/A
    Doc notes: N/A
    Bugs: None
    Reviewer: Pete
    Tests run: checkintests
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/airframework/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/airspark/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/flex/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/framework/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/osmf/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/rpc/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/spark/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/sparkskins/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/textLayout/.actionScriptProperties
        flex/sdk/trunk/frameworks/projects/wireframe/.actionScriptProperties

  • Activation problem: Adobe DRM Error System: 8 State: 4 Class: 65 Code: 59 Message: VE error 59

    Hi,
    I bought a book yesterday and I was able to open it in my vista machine. I have a second computer and I can't open my book there. I get this error:
    Adobe DRM Error
    System: 8
    State: 4
    Class: 65
    Code: 59
    Message:
    VE error 59
    --- end ---
    I already downloaded Adobe Digital Editions 1.5 beta 2, and went back to acrobat reader 6, activate from aractivate.adobe.com, but nothing seems to work. What can I do?

    System 7, code 31 is always a networking problem. Meaning something on your network is preventing the book information from getting to the rights-management server (or from the rights-management information getting sent back)
    You can check firewalls, security software, etc to see where the blockage might be, or work with your network admins if you have them. See 'Error "Adobe DRM Error" when you activate Digital Editions or access an eBook" at http://www.adobe.com/go/kb402747
    Regards,
    Bentley Wolfe
    Senior Support Engineer, Flash/Flash Player/Digital Editions
    Adobe

  • Cant save rule in Syclo class handler security -SAP Round Manager

    Guys,
    I am not able to make any changes in Syclo class handler security in SAP-Syclo configuration panel .Although I can make changes in MDO and BAPI wrapper .Is there any special security authorization or any role needed to make the changes in Syclo class handler security? I am able to do the changes in system security and product security although .
    Tags edited by: Michael Appleby

    In /syclo/Admin transaction code where I should look for to get the access for saving the data of Security settings and syclo class handler security ?

  • Should web images be sharpened or does Photoshop just "handle" jpegs better now & it's unnecessary

    We have between 3-4MB "full size" print-quality product images that get downsized to about 204px wide x 300, and then proportionally smaller yet to 135 wide and 100 wide for our website.
    The graphic designers I work with say there's no need to be sharpening these web-destined images--that "Photoshop handles jpegs better now and there's no point in sharpening at all." (This was in response to them providing images that are oversharpened and my asking them to adjust their settings.)
    I'm only a "nonprofessional" photoshop user--but that just doesn't sound right to me (unless we don't want crisp images on our website).
    Can anyone enlighten me if I am out of date and it's true no sharpening is needed?
    Or if sharpening would be of value, provide a constructive response I could share with them and even an article I could direct them to with information/guidance on finding a good "bulk" way to do some sharpening (expecting the 3 sizes to be done by hand for the 50 or so product images a month isn't an option)?

    It depends. I'd say 300 pixels is so small that sharpening may be counter-productive - the pixels may just get in the way.
    Around 800-1000 pixels or up I always sharpen, and I have a couple of actions for it. Personally I don't like the "Bicubic Sharper (reduction)" algorithm, I think it overdoes it, and in the wrong way, giving just that oversharpened look. I prefer "Bicubic Smoother" and sharpen afterwards.
    Confining sharpening to midtones, fading out high and low, always helps to reduce halos. There's a section of about 20 steps in my actions that does just that, trouble is I can't remember what they were...

  • It takes long time to invoke the Exception handler code

    In our setup there is firewall between the Appserver that is using toplink and the database.The firewall terminates idle connection on any port if the connection is idle for 1 hr.So i have implemented an exception handler to reconnect when the connection is broken.The code works fine but It takes 15 mins for the exception handler code to be invoked.
    The database is Oracle and the driver is thin driver,OS is solaris.No external connection pool
    I had registered the exceptionhandler to the serversession,should i register it with each ClientSession?

    yes ,15 mins is the time taken before the server session's exception handler code is invoked.
    The following is the exception handler code on the sever session.Any thing wrong?
    server.setExceptionHandler(new ExceptionHandler()
    public Object handleException(RuntimeException ex)
    {//This method is executed only after 15 min ,if the connection is broken
    String mess=ex.getMessage();
    System.out.println("In handler excep mess is "+mess);
    if ((ex instanceof DatabaseException) && (mess.equals("connection reset by peer.")||(mess.indexOf("IOException :Broken pipe")!=-1)))
    DatabaseException dbex = (DatabaseException) ex;
    dbex.getAccessor().reestablishConnection (dbex.getSession());
    return dbex.getSession().executeQuery(dbex.getQuery());
    return null;
    What could be wrong ?
    I tried Oracle's connection cache Impl created a connection pool using the same thin driver and on the same env.SQLException is thrown immediately on using the broken connection.so I feel the driver is not causing any problem.
    Is there any way in toplink to keep the connections active?or Is there any way to poll all connections in the connection pool and check If they are connected instead of waiting until the exception gets thrown and handle it?

  • I think this is a Bug of String class

    I think this is a Bug of String class, do you agree with me ?
    String s = "1234........"; // when "1234........". length() > 65535, there will be wrong, but
    char[] c = new char[88888];...
    String s = new String(c);even if c.length >65535�Cevery thing is ok.
    so I think is a bug. Somebody give me a answer, thanks

    below is the two Constructors Of String
        public String(String original) {
         int size = original.count;
         char[] originalValue = original.value;
         char[] v;
           if (originalValue.length > size) {
             // The array representing the String is bigger than the new
             // String itself.  Perhaps this constructor is being called
             // in order to trim the baggage, so make a copy of the array.
             v = new char[size];
             System.arraycopy(originalValue, original.offset, v, 0, size);
         } else {
             // The array representing the String is the same
             // size as the String, so no point in making a copy.
             v = originalValue;
         this.offset = 0;
         this.count = size;
         this.value = v;
        }=====================
        public String(char value[]) {
         int size = value.length;
         char[] v = new char[size];
         System.arraycopy(value, 0, v, 0, size);
         this.offset = 0;
         this.count = size;
         this.value = v;
        }I don't know where has the problem.

  • [ASK]Bugs of Java or Wrong Code?

    Dear All,
    What this is bugs of Java or me not to understand java programming, this my piece code :
    String kode = txtKode.getText();
            String nama = inputNama.getText();
            String keterangan = inputKeterangan.getText();
            try {
                Connection c = KoneksiMySql.getKoneksi();
                String sql = "UPDATE UNIT SET NAMA=?, KETERANGAN=?, WKT_INPUT=now() WHERE KODE=?";
                PreparedStatement p = c.prepareStatement(sql);
                p.setString(1, nama);
                p.setString(2, keterangan);
                p.setString(3, kode);
                p.executeUpdate();
                p.close();
                JOptionPane.showMessageDialog(null, "Data Berubah",
                        "Pemberitahuan", JOptionPane.INFORMATION_MESSAGE);
            } catch(SQLException e) {
                System.out.println("Error : " + e);
                JOptionPane.showMessageDialog(null, "Proses Rubah Unit Gagal",
                        "Pesan Error", JOptionPane.ERROR_MESSAGE);      
            }finally {
            inputNama.setText(null);
            inputKeterangan.setText(null);
                btnTambah.setEnable(true);
                btnHapus.setEnabled(false);
                btnRubah.setEnabled(false);
                inputNama.requestFocus();
    JOptionPane is Show and no error appears but data in database does not change, and code in block finally not executed.
    i'm use jInternalFrame, first run Only 'Add Button, Search Button' enable and other button are disable, then when 'Search Button' is clicked and open other jInternalFrame and get data form database, 'Add button' Disable and 'Delete Button, Change Button' are Enable. that my piece code on Change Button ActionPerformed.
    Please it's support.
    Thanks,
    Best & Regrads.

    Cross posted
    [ASK]Bugs of Java or Wrong Code?
    [HELP]Bugs of Java or Wrong Code?
    db

  • C5 - Two probably bugs (sms & white screen)

    I have a C5-00 it works very well and I really appreciate it. I have update the firmware to 065.001.
    But I found two probably bugs:
    1) when I open a received sms, then go to the previous one moving with the "joypad" (i.e. without returning to the list of received sms) and then return to the first one sms the last two lines of the sms are disappeared! I have to exit to the list of sms' then re-open the sms to see the sms entirely, i.e with all the lines.
    2) The battery recharger is attached to the phone. Then the alarm clock of the phone rings and I shut down the ring. I try to switch on the phone: the monitor became completely white (neither the symbol of the charged battery appear). I have to disconnect the battery to switch on again the phone.
    Do somebody experienced the same issues?
    I hope Nokia can explain why they happen and, if the case, correct this issues/bugs.
    Thanks,
    alemanowar

    Hi, Exactly the same bug here. A possible workaround is to switch between two SMS or scroll down to see the whole text. @vijayt It IS a bug, because it worked well with 032.xxx. I dont wont to scroll down to see the text - the display is big enough to show the whole message. I will collect here the other posts for the same topic: * /t5/Nseries-and-S60-Smartphones/6700-slide-truncated-sms-after-upgrade/m-p/937351/highlight/true#M25... * /t5/Cseries/Nokia-C5-Texts-are-half/m-p/934725/highlight/true#M13715 So I hope this will be fixed in 062.005, which is still not available for my phone :-( Is there a "real" bugtracking system one (not developer) can use? Regards, Christoph

  • I can't Enter User Fields in Asset Class (t.code S_ALR_87009007)

    Hi All,
    In customizing I've to "Enter Your User Fields in Asset Class" (t.code S_ALR_87009007).
    SAP doesn't allow me to change the filling in the view, I only can display them.
    What cuold it depend on.
    Thanks for your help.
    G.

    Hi Rossi,
    This is not an authorisation issue at all.
    S_ALR_87009007, this tcode can be used to maintain a default Eval Group for asset master creation with the specified asset class.
    If your Maintainace Level at CLASS is not maintained for any evaluation group, you can edit the values over thers.
    SPRO-> FA-> AA ->Master Data -> Screen Layout -> Define Screen Layout for Asset Master Data -> Define Screen Layout for Asset Master Data....here select your screen layout, which is assigned to your questioned asset class on OAOA and click on logical field groups -> Allocations -> Field Group rules.
    Here for all eval groups, make the field status to optional and select check boxes CLASS, MNNO, SBNO and SAVE.
    Now check with S_ALR_87009007, here you will be able to edit the inputs.
    Hope this will resolve your issue.
    Regards,
    Srinu

  • [svn:osmf:] 16206: Fix bug in inclusion of ASDoc code sample, caused by ASDoc comment.

    Revision: 16206
    Revision: 16206
    Author:   [email protected]
    Date:     2010-05-18 17:42:03 -0700 (Tue, 18 May 2010)
    Log Message:
    Fix bug in inclusion of ASDoc code sample, caused by ASDoc comment.
    Modified Paths:
        osmf/trunk/docs/examples/org/osmf/logging/ExampleLogger.as
        osmf/trunk/docs/examples/org/osmf/logging/ExampleLoggerFactory.as
        osmf/trunk/docs/examples/org/osmf/logging/LoggerExample.as

    Tks for posting the resolution, it solve my problem too.
    keywords:
    ECLIPSE SSL ERROR "could not generate secret" TOMCAT 8
    java.security.NoSuchAlgorithmException: Algorithm DiffieHellman not available
    SOLUTION, In my case: REBUILD JDK over TOMCAT 8 configuration

  • Kodo 3.4.0 Beta 1 Available

    All,
    Kodo 3.4.0 Beta 1 is now available. Feel free to download it at:
    http://www.solarmetric.com/Software/beta/3.4.0b1/
    There are a number of exciting new features in 3.4.0 Beta 1:
    * Query cache now caches aggregates and projections, including queries
    that use grouping
    * Added support for savepoints, with both in-memory and JDBC3 plugins.
    * Added support for Oracle Object fields through JDBC SQLData interfaces.
    * Improved thread and socket support for TCP RemoteCommitProvider
    * Better support for large transactions, including several optimizations
    in the datastore cache when using large transactions
    You can find the release notes at:
    http://solarmetric.com/Software/Documentation/3.4.0b1/docs/relnotes.html
    The full documentation can be found in the distribution, and also at:
    http://solarmetric.com/Software/Documentation/3.4.0b1/docs/index.html
    As this is a beta release, please report any issues that you find to the
    Kodo beta newsgroup (solarmetric.kodo.beta).
    Good luck, and enjoy!
    -Greg
    SolarMetric
    www.solarmetric.com

    Savepoints:
    It would be very convinient if Kodo provided parameterless
    rollbackSavepoint() and releaseSavepoint() - they should rollback/release
    latest savepoin
    Thanks
    Alex
    "Greg Campbell" <[email protected]> wrote in message
    news:dbgseo$m66$[email protected]..
    All,
    Kodo 3.4.0 Beta 1 is now available. Feel free to download it at:
    http://www.solarmetric.com/Software/beta/3.4.0b1/
    There are a number of exciting new features in 3.4.0 Beta 1:
    * Query cache now caches aggregates and projections, including queries
    that use grouping
    * Added support for savepoints, with both in-memory and JDBC3 plugins.
    * Added support for Oracle Object fields through JDBC SQLData interfaces.
    * Improved thread and socket support for TCP RemoteCommitProvider
    * Better support for large transactions, including several optimizations
    in the datastore cache when using large transactions
    You can find the release notes at:
    http://solarmetric.com/Software/Documentation/3.4.0b1/docs/relnotes.html
    The full documentation can be found in the distribution, and also at:
    http://solarmetric.com/Software/Documentation/3.4.0b1/docs/index.html
    As this is a beta release, please report any issues that you find to the
    Kodo beta newsgroup (solarmetric.kodo.beta).
    Good luck, and enjoy!
    -Greg
    SolarMetric
    www.solarmetric.com

Maybe you are looking for