Weird Swing Error!

With J2SE 1.4.2 (PREVIOUS VERSIONS DID NOT DO THIS) JDK i RANDOMLY get :
java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(Unknown Source)
at javax.swing.ImageIcon.<init>(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI$ShortCutPanel.<init>(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponents(Unknown Source)
at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(Unknown Source)
at javax.swing.JComponent.setUI(Unknown Source)
at javax.swing.JFileChooser.updateUI(Unknown Source)
at javax.swing.JFileChooser.setup(Unknown Source)
at javax.swing.JFileChooser.<init>(Unknown Source)
at javax.swing.JFileChooser.<init>(Unknown Source)
at MMCDCatalog.openDB(MMCDCatalog.java:570)
at MMCDCatalog.access$200(MMCDCatalog.java:77)
at MMCDCatalog$OpenFileAction.actionPerformed(MMCDCatalog.java:1023)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
with code
JFileChooser fc;
MMCDFileFilter ff;
int dialogReturnVal;
String nameChosen;
//Create a file chooserfc = new JFileChooser();
fc.setMultiSelectionEnabled(false);
fc.setDragEnabled(false);
//Create a new FileFilter
ff = new MMCDFileFilter();
//Add this filter to our File chooser.
fc.addChoosableFileFilter(ff);
fc.setFileFilter(ff);
dialogReturnVal = fc.showOpenDialog(mainFrame);
if (dialogReturnVal == JFileChooser.APPROVE_OPTION) {  
   nameChosen = fc.getSelectedFile().getAbsolutePath();
}which is in my openDB() method, which is called from an actionPerformed() somewhere else that does nothing except calling openDB()
IS THIS A BUG IN SWING 1.4.2??????????????
AH! thought this would be relevant. I also execute the code (when building my GUI) :
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception ex) {
    JOptionPane.showMessageDialog(mainFrame, "Could not load the look and feel", "Error", JOptionPane.ERROR_MESSAGE);
} and i'm running Windows XP Pro SP1... since 1.4.2 added the new "Windows XP" look, is it a new introduced bug???? that's why i'm asking :P

1) cross posts are annoying
2) have you tried the same code built on the same Java SDK on a system running Win2000 or Solaris
3) with the honorific "Mastermind" I'm sure you can figure it out.
4) is the line new
//Create a file chooserfc = new JFileChooser(); one line or two? Should it be
//Create a file chooser
fc = new JFileChooser();

Similar Messages

  • Really weird quicktime error - showing stuff beneath it?

    I'm getting a really weird quicktime error like something I've never seen before. It's been happening for a few weeks now I guess, but I don't recall quite when it began.
    Basically, almost any video I open in it ends up splicing into fragments. The audio works fine, but the video shows part of the video, then part of the windows behind it, then the desktop, then the video, and cycling back again and splicing through.
    I'm up to date on everything and I ran disk permissions and I can't figure out what's going on. It's definitely quicktime though - it's affecting my iTunes and my Finder video previews as well, across a whole range of codecs. It doesn't affect VLC or mPlayer.
    Any idea what to do?

    A&I reinstalls the OS over the existing OS (to the version on your install DVD that came with the MacBook) but leaves user files and installed applications intact. You should still do a clone on an external drive first though. Or at least backup all your data files.
    After A&I you then use the downloadable combo updater for OSX and the latest QT for QT, and then after reboot repair permissions. You can then run Software Update for the other updates like iLife etc.
    If your install DVD was for 10.4.X and you are not on 10.5 then don't use the original DVD use the 10.5 retail disk instead.

  • Swing Error while trying to set libraries on a new Project.

    I am running JDeveloper Version 10.1.2.1.0 (Build 1913) -- on a machine running Windows XP SP2
    Initially I tried with the basic version (without JDK) and configured by local install of j2sdk1.4.2_05.
    Then later I tried downloading the full version and used the java.version 1.4.2_06 which comes with it. In both cases I get a NPE while performing the following steps.
    Created a WorkSpace
    Created an Empty Project in it
    Go to Project Properties
    Click on "libraries"
    I get the following Error
    java.lang.NullPointerException
         at oracle.jdevimpl.config.JProjectLibrariesPanel.loadFrom(JProjectLibrariesPanel.java:134)
         at oracle.jdevimpl.config.JProjectLibrariesPanel.onEntry(JProjectLibrariesPanel.java:95)
         at oracle.ide.panels.MDDPanel.enterTraversableImpl(MDDPanel.java:841)
         at oracle.ide.panels.MDDPanel.enterTraversable(MDDPanel.java:815)
         at oracle.ide.panels.MDDPanel.access$7000871(MDDPanel.java:90)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelectedNavigable(MDDPanel.java:1206)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelection(MDDPanel.java:1074)
         at oracle.ide.panels.MDDPanel$Tsl.actionPerformed(MDDPanel.java:1068)
         at javax.swing.Timer.fireActionPerformed(Timer.java:271)
         at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)
         at java.awt.Dialog$1.run(Dialog.java:540)
         at java.awt.Dialog.show(Dialog.java:561)
         at java.awt.Component.show(Component.java:1133)
         at java.awt.Component.setVisible(Component.java:1088)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)
         at oracle.ide.panels.TDialogLauncher.showDialog(TDialogLauncher.java:276)
         at oracle.jdeveloper.model.JProjectSettingsPanel.showDialog(JProjectSettingsPanel.java:185)
         at oracle.jdeveloper.model.JProjectSettingsPanel.showDialog(JProjectSettingsPanel.java:110)
         at oracle.jdeveloper.model.JProjectSettingsPanel.showDialog(JProjectSettingsPanel.java:101)
         at oracle.jdeveloper.model.JProjectStructureController.handleEvent(JProjectStructureController.java:342)
         at oracle.ide.IdeAction.performAction(IdeAction.java:649)
         at oracle.ide.IdeAction$1.run(IdeAction.java:857)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    Beyond this the JDev becomes practically unusable, as if I try clicking on any thing else I get the error, "The J2SE version must be specified"
    Only way to recover from the error is to close Jdev and re open the same. But even then I am not able to change any library setting for the project.
    Any suggestions on how to get around the problem?

    I believe I figured it out .. thanks

  • New to swing: Error while using getText() in ActionPerformed

    Hi there!
    I'm fairly new to java and swing, and this problem I'm having drives me nuts!
    // Imports //
    public class Generator extends JFrame {
         // Graphical components
         private JTextField nr1;
         private JTextField nr2;
         // Constructor
         public Generator() {
              // Call superclass
                    // Init variables
              JTextField nr1 = new JTextField(2);
              JTextField nr2 = new JTextField(2);
              nr1.setVisible(true);
              nr2.setVisible(true);
              // Layout stuff..
              // Create listner-object for event handeling
              Lyssnare minLyssnare = new Lyssnare();
              playerName.addActionListener(minLyssnare);
              clear.addActionListener(minLyssnare);
              shuffle.addActionListener(minLyssnare);
              // closing of window
              // Pack
              // Visible
         // Action Listener
         class Lyssnare implements ActionListener {
              public void actionPerformed(ActionEvent ae) {
                   // Some other actions...
                            // Shuffle
                   else if(ae.getSource() == shuffle) {
                        String teams = nr1.getText();
                        String players = nr2.getText();
                        Shuffle.shuffle(name);
                        playerArea.setVisible(false);
                        int teamsint = Integer.parseInt(teams);
                        int playersint = Integer.parseInt(players);
                        error1.setVisible(true);
         }The error I get is after "else if(ae.getSource() == shuffle) {"
    something on the next line (and the line after that) is the one who gives the error...
    I Get this (during running, compile works fine..):
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    AFAIK that means I'm reffering to something that is null... but how can that be when all the textfields are initialised? do I have to make does fields global in some way?
    Grateful for any help!

    Your inner class does not have access to nr1 and nr2 because they are not final variables.
    Instead of creating an inner class Lyssnare, you can have your Generator class implement the ActionListener and add the actionPerformed method inside Generator class as follows:
    public class Generator extends JFrame implements ActionListener {
         // Graphical components
         private JTextField nr1;
         private JTextField nr2;
         // Constructor
         public Generator() {
              // Call superclass
                    // Init variables
              JTextField nr1 = new JTextField(2);
              JTextField nr2 = new JTextField(2);
              nr1.setVisible(true);
              nr2.setVisible(true);
              // Layout stuff..
              // Create listner-object for event handeling
              //Lyssnare minLyssnare = new Lyssnare();
              playerName.addActionListener(this);
              clear.addActionListener(this);
              shuffle.addActionListener(this);
              // closing of window
              // Pack
              // Visible
    public void actionPerformed(ActionEvent ae) {
                   // Some other actions...
                            // Shuffle
                   else if(ae.getSource() == shuffle) {
                        String teams = nr1.getText();
                        String players = nr2.getText();
                        Shuffle.shuffle(name);
                        playerArea.setVisible(false);
                        int teamsint = Integer.parseInt(teams);
                        int playersint = Integer.parseInt(players);
                        error1.setVisible(true);
              }

  • Weird CS4 error when saving eps files on a Mac: "...specified files already exist in the target location"

    Hi There,
    All 3 workstations in our studio are experiencing weird file behavior when re-saving eps files from Illustrator.
    Basically Illustrator creates a new file in addition to the original and adds a "-01.eps" onto the file name. If you re-save your original, Illustrator brings up a dialogue box that states:
    Some of the specified files already exist in the target location. The files marked below will be replaced:
    filename.eps
    filename-01.eps
    We've been deleting the "-01.eps" files each time but it's becoming tedious. The behaviour occurs when re-saving an eps file to a server or the desktop.
    All machines are new Quad-core MacPros running:
    - Leopard 10.5.8
    - Illustrator CS4 14.0.0
    We've checked for Illustrator updates from within Illustrator but we seem to be running the latest version.
    Is anyone else experiencing this behavior?
    Any help or pointers in the right direction would be much appreciated.
    Cheers
    Ben

    Thanks for the reply.
    The error occurs when we save the document but if we choose save as, "Use Artboards" seems to be unchecked so not sure if this issue is related or not. Will re-save the document using save as then see if the issue persists.
    Why do we still use eps?
    Basically because we've found it to be much more compatible. Our entire logo library is in eps format (18 years worth) partly because it was previously the only format to use and partly because it allows account managers to send logos to clients, printers, TV stations etc and not involve the studio (saving out an eps version).
    Although "Create PDF compatible file" is a good idea, we've encountered costly issues with colours and images - especially if the recipient is using old CS software, non-Adobe software or is using some kind of hardware RIP. We now just go with what we know works.
    But I do find saving eps versions of everything to be a bit painful. In fact, I've always found Illustrator in general to be a bit painful when compared with Photoshop or AfterEffects. Illustrator seems like it's been developed by a different company some times!
    Cheers, and thanks for the help.

  • Weird Runtime error, please help.

    I recently started teaching myself java from a book, I liked it so I continued reading the book etc. I got to the chapter where it starts to talk about swing classes. The examples previous to this chapter compiled and worked great. Althoug in the swing class chapter none of the examples compile, well I shouldn't say that. They do "compile" but when I try to run them I get this error....
    Here it is in full:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D00FA9B
    Function=[Unknown.]
    Library=(N/A)
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
         at sun.java2d.loops.Blit.Blit(Native Method)
         at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:627)
         at sun.java2d.pipe.DrawImage.renderSurfaceData(DrawImage.java:355)
         at sun.java2d.pipe.DrawImage.clipAndRenderSurfaceData(DrawImage.java:333)
         at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:64)
         at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:48)
         at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:715)
         at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:147)
         at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2782)
         at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2772)
         at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4745)
         at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4688)
         at javax.swing.JComponent._paintImmediately(JComponent.java:4632)
         at javax.swing.JComponent.paintImmediately(JComponent.java:4464)
         at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:404)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:443)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
    Dynamic libraries:
    0x7D750000 - 0x7D76D000      C:\WINDOWS\SYSTEM\IMAGEHLP.DLL
    Local Time = Thu Mar 21 20:50:59 2002
    Elapsed Time = 7
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.0-b92 mixed mode)
    If anyone knows how to fix this I would really appreciate the help.
    Thanks in advance,
    Tuskony

    Your right, I am using JDK 1.4.0, on Windows 98.
    Here is a shortened down version of the code:
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.Toolkit;
    import java.awt.event.*;
    public class JTextFieldExample extends JPanel
    JLabel lblName = new JLabel( "Name:", JLabel.RIGHT );
    JTextArea txtName = new JTextArea( 40, 40 );
    public JTextFieldExample()
    setLayout( new GridLayout( 2, 2 ) );
    add( txtName );
    public static void main( String[] args )
    JFrame frame = new JFrame();
    JTextField example = new JTextField();
    frame.getContentPane().add( example, BorderLayout.CENTER );
    frame.setSize( 200, 200 );
    frame.setVisible( true );
    frame.addWindowListener
    new WindowAdapter()
    public void WindowClosing( WindowEvent e )
    System.exit( 0 );

  • JPA Metadata issue/ Weird Column error or bug in openjpa ...?

    Hi All,
    I am getting the following exception when using openjpa in my project.
    The line of code that throws the error is also mentioned
    The latter error shows a column mismatch error which i am not sure is correct since the db i am using is Oracle 10g and the datatypes for the column are varchar2.
             BcsPort bcsPort=em.find(BcsPort .class, port);   //Error after this call.
    EJB Exception: : &lt;openjpa-1.1.1-SNAPSHOT-r422266:965591 fatal user error&gt; org.apache.openjpa.per
    sistence.ArgumentException: Errors encountered while resolving metadata.  See nested exceptions for details.
            at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:567)
            at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:308)
            at org.apache.openjpa.kernel.BrokerImpl.newObjectId(BrokerImpl.java:1121)
            at org.apache.openjpa.kernel.DelegatingBroker.newObjectId(DelegatingBroker.java:268)
            at org.apache.openjpa.persistence.EntityManagerImpl.find(EntityManagerImpl.java:451)
            at sun.reflect.GeneratedMethodAccessor472.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:93)
            at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:91)
            at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:80)
            at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:26)
            at $Proxy76.find(Unknown Source)
           .... so onFollowed by this as the cause from what i can make
    Caused by: &lt;openjpa-1.1.1-SNAPSHOT-r422266:965591 fatal user error&gt; org.apache.openjpa.persistence.ArgumentException: "
    com.test.domain.BcsNe.ne" declares a column that is not compatible with the expected type "varchar".  Column detail
    s:
    Full Name: bcsne.ne
    Type: blob
    Size: 0
    Default: null
    Not Null: false
            at org.apache.openjpa.jdbc.meta.MappingInfo.mergeColumn(MappingInfo.java:660)
            at org.apache.openjpa.jdbc.meta.MappingInfo.createColumns(MappingInfo.java:518)
            at org.apache.openjpa.jdbc.meta.ValueMappingInfo.getColumns(ValueMappingInfo.java:143)
            at org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy.map(StringFieldStrategy.java:79)
            at org.apache.openjpa.jdbc.meta.FieldMapping.setStrategy(FieldMapping.java:120)
            at org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStrategy(RuntimeStrategyInstaller.java:80)
            at org.apache.openjpa.jdbc.meta.FieldMapping.resolveMapping(FieldMapping.java:438)
            at org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java:403)
            at org.apache.openjpa.jdbc.meta.ClassMapping.resolveNonRelationMappings(ClassMapping.java:834)
            at org.apache.openjpa.jdbc.meta.MappingRepository.prepareMapping(MappingRepository.java:324)
            at org.apache.openjpa.meta.MetaDataRepository.preMapping(MetaDataRepository.java:667)
            at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:549)
            ... 78 moreI have seen this link https://issues.apache.org/jira/browse/OPENJPA-1481
    Can anyone help me out on this as i cannot make out if this is a problem in openjpa or the weblogic server 10.0 server
    that i am using to make the call..
    Any inputs on this highly appraciated

    gimbal2 wrote:
    That link seems to deal with a bug relating to a one to many mapping. I don't see anywhere in your post that you are dealing with the same thing.
    Actually i am using Many to One mapping as you can see from the code excerpt
    BcsPort
    @ManyToOne(optional=false, cascade=CascadeType.ALL, fetch=FetchType.EAGER)
         @JoinColumn(name="ne",referencedColumnName="ne")
         private BcsNe bcsNe;Why i posted the link was that it seems to throw the same weird column exception that i got and more googling revelead that it was indeed some issue between the way the oracle varchar2 field is being handled by openjpa.
    so just needed to confirm if this was a widely faced issue and a possible fix to the same
    Is there a particular reason why you are using openjpaActually it's been added recenlty to the system as before it was using normal JDBC Code...
    In stead of the persistence provider shipped with your JEE container anyway?Do you mean that i should use the Oracle Weblogic 10.3 persistence provider...?
    kindly suggest...
    thanks

  • JPA Weird Transaction error ... ?

    Hi All,
    For this code i am getting a weird exception which follows the code block..
    i have started a Transaction but still openjpa gives this exception
      public static void deletePort(String port){
           BcsPort bPort=em.find(BcsPort.class, port);
           try{
                   EntityTransaction tx= em.getTransaction();
                   tx.begin();
                   System.out.println("Active:" +tx.isActive()); //*Prints True*
                   em.remove(bPort);
                   tx.commit();
           if(em.isOpen())
                em.flush();
           em.clear();
           }catch (Exception e) {
                e.printStackTrace();
    Exception Stack Trace
    ERROR:  Can only perform operation while a transaction is active.
    <openjpa-1.0.0-r420667:568756 nonfatal user error> org.apache.openjpa.persistence.TransactionRequiredException: Can only perform operation while a transaction is active.
         at org.apache.openjpa.kernel.BrokerImpl.assertActiveTransaction(BrokerImpl.java:4301)
         at org.apache.openjpa.kernel.DelegatingBroker.assertActiveTransaction(DelegatingBroker.java:1314)
         at org.apache.openjpa.persistence.EntityManagerImpl.flush(EntityManagerImpl.java:487)
         at com.test.local.EntityManagerTester.deletePort(EntityManagerTester.java:180)
         at test.TestJPA.JPAInit(TestJPA.java:100)
         at test.TestJPA.testMutiple(TestJPA.java:152)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at junit.framework.TestCase.runTest(TestCase.java:168)
         at junit.framework.TestCase.runBare(TestCase.java:134)Help on this please
    Thanks..

    >
              tx.commit();
         if(em.isOpen())
              em.flush();
         em.clear();
         }catch (Exception e) {
              e.printStackTrace();
    sry my bad ... em.flush() is the culprit

  • Weird Pacman Error! [solved]

    Since last night, I've been getting this weird error when I run 'pacman -Syu' as root. What's going on?
    :: Synchronizing package databases...
    current 71.2K 143.5K/s 00:00:00 [#####################] 100%
    extra is up to date
    community 274.6K 339.7K/s 00:00:01 [#####################] 100%
    :: Starting full system upgrade...
    resolving dependencies... done.
    looking for inter-conflicts... done.
    Targets: gd-2.0.35-1 gstreamer0.10-good-0.10.6-1 gstreamer0.10-flac-0.10.6-1
    gstreamer0.10-gconf-0.10.6-1
    Total Package Size: 0.84 MB
    Proceed with installation? [Y/n]
    :: Retrieving packages from current...
    gd 175.9K 627.3K/s 00:00:00 [#####################] 100%
    checking package integrity... done.
    cleaning up... done.
    (4/4) checking for file conflicts [#####################] 100%
    error: could not prepare transaction
    error: failed to commit transaction (conflicting files)
    gstreamer0.10-good: /usr/lib/gstreamer-0.10/libgstqtdemux.so exists in filesystem
    gstreamer0.10-good: /usr/lib/gstreamer-0.10/libgstvideocrop.so exists in filesystem
    errors occurred, no packages were upgraded.
    Any ideas, anyone?
    Last edited by tony5429 (2007-06-29 22:38:16)

    @ tony5429
    I was running in a semilar problem!
    I forced the update from gstreamer0.10-good with
    pacman -Syf gstreamer0.10-good
    after then I run again
    pacman -Syu
    and all run normal.
    You can also read here in this topic about it
    http://bbs.archlinux.org/viewtopic.php?id=34669
    the arch developmer tomk wrote
    tomk wrote:If you're not in a hurry, wait for the -bad package upgrade. Otherwise, I'd suggest -Syf for the -good package, followed by -Su for everything else.
    cheers
    JaDa

  • Swing Error

    Get the following error:
    package javax.swing not found in import
    I am using jdk1.3.1
    Here is my code
    import java.awt.*;
    import javax.swing.*;
    public class Notepad1 extends JFrame {
         public Notepad1() {
              setSize(300, 400);
              show();
         public static void main(String[] args) {
              Notepad1 npad = new Notepad1();

    Your JDK installation is probably broken, try reinstalling.

  • Weird ESB Error - "newly created file vanished" !

    I'm trying to register a really simple ESB project - 2x Db adapters that each call a stored procedure. I've done it dozens of times before without any problems but now I'm getting this weird error message in JDev when registering the services:-
    error code: 0 : 10
    summary: An unhandled exception has been thrown in the ESB system. The exception reported is: "java.io.IOException: Service TxXMLFileDescriptorsStore at C:\product\10.1.3.1\OracleAS_2\integration\esb/oraesb/artifacts/store/metadata working on C:\product\10.1.3.1\OracleAS_2\integration\esb/oraesb/artifacts/work/metadata access error : Newly created file vanished
         at oracle.tip.esb.server.bootstrap.ESBBaseResourceAdapter.createIOException(Unknown Source)
         at oracle.tip.esb.server.bootstrap.ESBBaseResourceAdapter.access$100(Unknown Source)
         at oracle.tip.esb.server.bootstrap.ESBBaseResourceAdapter$1.createDirectory(Unknown Source)
         at oracle.tip.esb.lifecycle.AuxiliaryFileHandler.copyToRepository(Unknown Source)
         at oracle.tip.esb.lifecycle.AuxiliaryFileHandler.copyToRepository(Unknown Source)
         at oracle.tip.esb.lifecycle.AuxiliaryFileHandler.copyToRepository(Unknown Source)
         at oracle.tip.esb.console.XMLConsoleManagerImpl.commit(Unknown Source)
         at oracle.tip.esb.configuration.deployment.JDevDeploymentManager.deploy(Unknown Source)
         at oracle.tip.esb.configuration.deployment.DeploymentServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: org.apache.slide.common.ServiceAccessException: Service TxXMLFileDescriptorsStore at C:\product\10.1.3.1\OracleAS_2\integration\esb/oraesb/artifacts/store/metadata working on C:\product\10.1.3.1\OracleAS_2\integration\esb/oraesb/artifacts/work/metadata access error : Newly created file vanished
         at org.apache.slide.store.txfile.AbstractTxFileStoreService.throwInternalError(AbstractTxFileStoreService.java:357)
         at org.apache.slide.store.txfile.TxXMLFileDescriptorsStore.createObject(TxXMLFileDescriptorsStore.java:134)
         at org.apache.slide.store.AbstractStore.createObject(AbstractStore.java:670)
         at org.apache.slide.store.ExtendedStore.createObject(ExtendedStore.java:602)
         at org.apache.slide.structure.StructureImpl.create(StructureImpl.java:354)
         at oracle.tip.esb.server.bootstrap.slide.CreateFolder.createFolder(Unknown Source)
         at oracle.tip.esb.server.bootstrap.slide.CreateFolder.executeRequest(Unknown Source)
         at oracle.tip.esb.server.bootstrap.slide.AbstractSlideMethod.execute(Unknown Source)
         at oracle.tip.esb.server.bootstrap.slide.SlideHandler.createFolder(Unknown Source)
         at oracle.tip.esb.server.bootstrap.slide.SlideHandler.createFolder(Unknown Source)
         ... 23 more
    Fix: - "
    I've restarted SOA Suite but it made no difference. Has anyone seen this before?
    (I'm running JDev 10.1.3.2 and SOA Suite 10.1.3.1 - I'm also using a default install of Oracle XE as the dehydration store - but this has been running fine for almost 2 weeks now).
    Message was edited by:
    gnewtonaus

    Hmmm have restarted SOA Suite - no go, so restarted the whole server it's running on - still no go. Have tried rebuilding the ESB project from scratch using JDev 10.1.3.3 - no go.
    On subsequent tries (registering the the ESB services from JDev) I'm getting a different error message now:-
    error code: 0 : 10
    summary: An unhandled exception has been thrown in the ESB system. The exception reported is: "javax.transaction.NotSupportedException
         at org.apache.slide.transaction.SlideTransactionManager.begin(SlideTransactionManager.java:129)
         at org.apache.slide.common.NamespaceAccessTokenImpl.begin(NamespaceAccessTokenImpl.java:391)
         at oracle.tip.esb.console.XMLConsoleManagerImpl.commit(Unknown Source)
         at oracle.tip.esb.configuration.deployment.JDevDeploymentManager.deploy(Unknown Source)
         at oracle.tip.esb.configuration.deployment.DeploymentServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Fix: -
    Equally as confusing! - have I broken my ESB and need to reinstall SOA Suite?

  • Weird RecordStore error - help...anybody?

    I am receiving an error from a command of the following form:
    setRecord(1, data, 0, data.length)
    where data is a byte array (defined by a toByteArray() from a ByteArrayOutputStream).
    The error states:
    javax:microedition.rms.RecordStoreException: Error setting record data: java.io.IOException: write exceeds maximum file size.
    The thing I find weird is that, when I display the getSize() and getSizeAvailable() on the RecordStore, I get really big numbers, like:
    size is 62200
    size available is 546972
    while my data is small,
    data.length = 9536
    So I am confused by the "exceeds maximum file size" notice. The data is definitely small enough to fit in what memory I have available. And...Is there a file involved or is something not quite right with the message, which also appears to have the form of two error messages merged as one.
    Does anyone have any ideas as to what I am encountering here? Would anyone know of anyway I can track down such a problem? I'm a bit lost as to how to debug this since it seems like there isn't much I can play around with given the somewhat limited amount of things I can do (and mess up) with RecordStores. Could it be a memory leak/overwrite? (I'm not sure that that is too likely, particularly in Java, but I'm at a bit of a loss as to where to find problems to try to get my hands on.)
    Thanks for any help, advice or thoughts!

    Hi, I'm writing app, which saves images to RS.
    public void saveImage(String path) {
            RecordStore rs = null;    // Record store
            String RECORD_STORE = path; // Name of record store
            addImageName(path);
            try {
                rs = RecordStore.openRecordStore(RECORD_STORE, true );
                rs.addRecord(data, 0, data.length);
                System.out.println("data lenght : " + data.length);
                System.out.println("writing finished");
                rs.closeRecordStore();
            catch (Exception e) {
            dpy.setCurrent(l);
        }this works...this methos saved even 25kB...

  • Weird Code Error

    tables: mara,eina.
    DATA: ze1edp19 like e1edp19 occurs 0 with header line.
    DATA: begin of zinteina occurs 0,
          matnr like mara-matnr,
          idnlf like eina-idnlf,
          end of zintEINA.
    data: i_mara like mara occurs 0.
    CLEAR ZE1EDP19.
    clear zinteina.
    MOVE segment-SDATA TO ZE1EDP19.
    etc......
    Wrote that code in the user exit of INPUT_IDOC_ORDERS.
    No syntax error... but in debugging, the system does not recognize the inernal table zinteina nor i_mara but it recognizes ZE1EDP19.

    I dono't if there is something like system refresh for user exits but the code started working after couple of hours. Weird!

  • Weird transport error

    All,
       I'm trying to move an update rule from my D system to my Q system.  It failed with a 'Unspecified error in the update...Message no. RSAU114'.  It gives a RC=8.
       Anyone ever seen this before?  I do a check on the update rules in Q, but they are fine.  The weird thing is, I opened my Q system to activate manually, and it failed with the same message...
       Thanks.
    Dave

    Hi David,
    You you have any start routine in the update rule...can you do the syntax check for that to see if it is okay.

  • Weird Swing animation behaviour

    Hi,
    I just want to have a small animation of a sinus curve and wrote the following code:
    package com.mlesniak;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class Main {
         JFrame frame;
         Panel  panel;
         public static void main(String[] args) {
              new Main();
         public Main() {
              frame = new JFrame("Test for Java2D animations");          
              panel = new Panel();
              frame.setSize(640, 380);
              frame.setVisible(true);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setContentPane(panel);
    class Panel extends JPanel implements ActionListener {
        int dx = 0;
        final double c = (4 * Math.PI) / 640;
        public Panel() {
            super(true);
            new Timer(1000/100, this).start();
        public void paintComponent(Graphics _g) {
            super.paintComponent(_g);
            Graphics2D g = (Graphics2D)_g;
            drawSinus(g);
        public void actionPerformed(ActionEvent ae) {
             logic();
             repaint();
        private void logic() {
            dx += 5;
        private void drawSinus(Graphics2D g) {
             int y;
            double p;
            g.setColor(Color.BLACK);
            for(int i = 0; i < 640; i += 5) {
                p = (c * (i + dx));
                y = (int)(Math.sin(p) * 50) + 160;
                g.fillRect(i, y, 2, 2);
    }The problem is, that the animation is flickering a lot, except when I move the mouse randomly or press some keys, i.e. additional events are generated. Then the animation is quite smooth.
    How do I make the animation smoother in general? I think I have a fundamental error, but can't find it.
    Thanks in advance for any comments,
    Michael

    Here's my code using a BufferedImage, hopefully I'm using it right:Almost :-) You should call drawSinus (...) from logic () or actionPerformed (...), not from paintComponent.
    The idea is to keep the paintComponent override as lean as possible. Here, since you are painting the entire panel with the BufferedImage, even the call to super.paintComponent is redundant.
    But no optimization can do away with the fact that you are translating the animation by 5 pixels per frame, and that is never going to look perfectly smooth.
    FWIW, here's your code with the changes I've made:import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.RenderingHints;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.image.BufferedImage;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.Timer;
    public class AnimSine {
       JFrame frame;
       Panel  panel;
       public static void main (String[] args) {
          new AnimSine ();
       public AnimSine () {
          frame = new JFrame ("Test for Java2D animations");
          panel = new Panel ();
          frame.setSize (640, 380);
          frame.setVisible (true);
          frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
          frame.getContentPane ().add (panel);
    class Panel extends JPanel implements ActionListener {
       int dx = 0;
       final double c = (4 * Math.PI) / 640;
       BufferedImage bi;
       Graphics2D g2;
       public Panel () {
          super (true);
          bi = new BufferedImage (640, 380, BufferedImage.TYPE_INT_RGB);
          g2 = bi.createGraphics ();
          new Timer (1000/100, this).start ();
       public void paintComponent (Graphics _g) {
          //super.paintComponent(_g);
          //Graphics2D g = (Graphics2D)_g;
          //drawSinus(g2);
          _g.drawImage (bi, 0, 0, null);
       public void actionPerformed (ActionEvent ae) {
          logic ();
          drawSinus (g2);
          repaint ();
       private void logic () {
          dx += 5;
       private void drawSinus (Graphics2D g) {
          int y;
          double p;
          g.clearRect (0, 0, 640, 380);
          g.setColor (Color.WHITE);
          for(int i = 0; i < 640; i++) {
             p = (c * (i + dx));
             y = (int)(Math.sin (p) * 50) + 160;
             g.fillRect (i, y, 2, 2);
    }db

Maybe you are looking for

  • Oracle 8.1.7.4 / Redhat 7.3 : tablespace creation never ends

    Hi, We're running Oracle 8.1.7.4 on Redhat 7.3. System memory is 256 MB (2x128). After increasing memory to 1Go (2x512) we're facing a strange problem. Tablespaces re-creation hangs, we first drop and then create tablespaces reusing datafiles : DROP

  • Unable to Import .MOTN Files into DVDPro4

    I am going thgough the tutorial video that comes with DVDPro4. It says to import all of the files in the Training DVD's Assetts Folder. Everything is imported, except for the two .MOTN files. It says "Cannot import 2 files. The files' formats are not

  • Event handling for loop??

    Hi all, Been busy making this budget applet and have run into some trouble with my JTable. Each time a user inputs a selection, it is supposed to return values in the first column only. The next time a user inputs an amount, it should go into the nex

  • X-Fi Xtreme Gamer Fatality Pro doesn't work anymore?

    So a few days ago I re-formatted my computer (with Windows Vista). The sound drivers installed fine, and everything was good. Fast forward to today. Sound was working, but after a restart my sound only comes through my headset. From checking in contr

  • Can no longer "mark all as read"

    Just updated the software on my Q10 and now the feature to mark a group of emails as "read" seems to have disappeared. Does anyone know if it is somewhere else now? Thank you.