We are trying to automate the Java Browser based application using BluePrism. I am using Internet explorer as application and enabled Java techniques in application moduler. I am able to spy the elements and able to perform operations like focus, write, read, select tree views etc. But some times Java application will hang and blue prism will not respond. So some of the operation will fail because of this i.e., Blueprism unable to select the country or state from the drop down. We are following all the best practices provided by blue prism but still we are facing this issues some times. Please let me know for any solution.
Even manually if we open the application we are getting the below error sometimes.
Note: Java application and BluePrism are hosted inside Azure VM
Log ID: F146EEDB78D9BFFE58B1EA1C8F8D8C44:138
CLIENT LOG:
NA,thread applet-com.application.gap.GTAppletStart.class-1,MESSAGE,NA,[12-15-20 15:52:01.897],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,,"Loaded schema cache in 890 ms"
NA,thread applet-com.application.gap.GTAppletStart.class-1,WARNING,NA,[12-15-20 15:52:03.081],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,,"Retrieving single value for table GT_USER_PREFS_TYPESAFE, column REDIRECT_USER_NAME, row 0"
NA,thread applet-com.application.gap.GTAppletStart.class-1,WARNING,NA,[12-15-20 15:52:03.114],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,,"Retrieving single value for table GT_USER_PREFS_TYPESAFE, column DEFAULT_ACCT_SG_NAME, row 0"
NA,thread applet-com.application.gap.GTAppletStart.class-1,WARNING,NA,[12-15-20 15:52:03.145],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,,"Retrieving single value for table GT_USER_PREFS_TYPESAFE, column DEFAULT_CUST_SG_NAME, row 0"
NA,thread applet-com.application.gap.GTAppletStart.class-1,MESSAGE,NA,[12-15-20 15:52:03.273],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,,"Automatic saving preference not set."
NA,AWT-EventQueue-2,ERROR,NA,[12-15-20 15:53:16.726],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,,"Connection reset"
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.access$100(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$8.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$8.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivilegedWithCombiner(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
at com.application.gap.util.GTUrlConnection.connect(GTUrlConnection.java:113)
at com.application.gap.db.GTDataProxy.doOperationBatch(GTDataProxy.java:279)
at com.application.gap.domain.GTDomain.load(GTDomain.java:236)
at com.application.gap.domain.GTDomain.getPresentationBatch(GTDomain.java:120)
at com.application.gap.domain.GTDomain.getPresentation(GTDomain.java:110)
at com.application.gap.selections.GTSelNavigationForm$DynamicNavAdapter.getBaseOperations(GTSelNavigationForm.java:244)
at com.application.gap.selections.GTSelNavigationManager$ListBaseNavAdapter.nodeListOperations(GTSelNavigationManager.java:1660)
at com.application.gap.gui.GTListview$ListMouseListener.maybeShowPopup(GTListview.java:584)
at com.application.gap.gui.GTListview$ListMouseListener.mouseReleased(GTListview.java:551)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.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.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(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)
NA,AWT-EventQueue-2,MESSAGE,NA,[12-15-20 15:53:16.727],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,,"Caught SocketException: retrying to connect 1"
NA,AWT-EventQueue-2,ERROR,NA,[12-15-20 15:55:11.705],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,,"Connection reset"
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.access$100(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$8.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$8.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivilegedWithCombiner(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
at com.application.gap.util.GTUrlConnection.connect(GTUrlConnection.java:113)
at com.application.gap.db.GTDataProxy.doOperationBatch(GTDataProxy.java:279)
at com.application.gap.selections.GTSelection.doDataOperationBatch(GTSelection.java:296)
at com.application.gap.selections.GTSelection.getTreeResults(GTSelection.java:413)
at com.application.gap.selections.GTSelectionRenderer.expandTree(GTSelectionRenderer.java:670)
at com.application.gap.selections.GTSelectionRenderer.expandTree(GTSelectionRenderer.java:585)
at com.application.aim.gui.AIMTaskChecklistTreeManager.nodeExpanding(AIMTaskChecklistTreeManager.java:608)
at com.application.gap.gui.GTTreeNodeFactory.getDynamicNodes(GTTreeNodeFactory.java:365)
at com.application.gap.gui.GTTreeNodeFactory.createChildNodes(GTTreeNodeFactory.java:148)
at com.application.gap.gui.GTTreeModel.getChildNodes(GTTreeModel.java:144)
at com.application.gap.gui.GTTreeModel.getChildCount(GTTreeModel.java:77)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.treeExpanded(Unknown Source)
at javax.swing.JTree.fireTreeExpanded(Unknown Source)
at javax.swing.JTree.setExpandedState(Unknown Source)
at javax.swing.JTree.expandPath(Unknown Source)
at com.application.gap.gui.GTJTreeHelper.expandPath(GTJTreeHelper.java:83)
at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.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.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(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)
NA,AWT-EventQueue-2,MESSAGE,NA,[12-15-20 15:55:11.706],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,,"Caught SocketException: retrying to connect 1"
NA,AWT-EventQueue-2,ERROR,NA,[12-15-20 15:55:54.713],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,,"Connection reset"
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.access$100(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$8.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$8.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivilegedWithCombiner(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
at com.application.gap.util.GTUrlConnection.connect(GTUrlConnection.java:113)
at com.application.gap.util.GTUrlConnection.connect(GTUrlConnection.java:144)
at com.application.gap.db.GTDataProxy.doOperationBatch(GTDataProxy.java:279)
at com.application.gap.selections.GTSelection.doDataOperationBatch(GTSelection.java:296)
at com.application.gap.selections.GTSelection.getTreeResults(GTSelection.java:413)
at com.application.gap.selections.GTSelectionRenderer.expandTree(GTSelectionRenderer.java:670)
at com.application.gap.selections.GTSelectionRenderer.expandTree(GTSelectionRenderer.java:585)
at com.application.aim.gui.AIMTaskChecklistTreeManager.nodeExpanding(AIMTaskChecklistTreeManager.java:608)
at com.application.gap.gui.GTTreeNodeFactory.getDynamicNodes(GTTreeNodeFactory.java:365)
at com.application.gap.gui.GTTreeNodeFactory.createChildNodes(GTTreeNodeFactory.java:148)
at com.application.gap.gui.GTTreeModel.getChildNodes(GTTreeModel.java:144)
at com.application.gap.gui.GTTreeModel.getChildCount(GTTreeModel.java:77)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.treeExpanded(Unknown Source)
at javax.swing.JTree.fireTreeExpanded(Unknown Source)
at javax.swing.JTree.setExpandedState(Unknown Source)
at javax.swing.JTree.expandPath(Unknown Source)
at com.application.gap.gui.GTJTreeHelper.expandPath(GTJTreeHelper.java:83)
at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.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.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(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)
NA,AWT-EventQueue-2,MESSAGE,NA,[12-15-20 15:55:54.714],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,,"Caught SocketException: retrying to connect 2"
NA,AWT-EventQueue-2,ERROR,NA,[12-15-20 15:56:37.718],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,,"Connection reset"
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.access$100(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$8.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$8.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivilegedWithCombiner(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
at com.application.gap.util.GTUrlConnection.connect(GTUrlConnection.java:113)
at com.application.gap.util.GTUrlConnection.connect(GTUrlConnection.java:144)
at com.application.gap.util.GTUrlConnection.connect(GTUrlConnection.java:144)
at com.application.gap.db.GTDataProxy.doOperationBatch(GTDataProxy.java:279)
at com.application.gap.selections.GTSelection.doDataOperationBatch(GTSelection.java:296)
at com.application.gap.selections.GTSelection.getTreeResults(GTSelection.java:413)
at com.application.gap.selections.GTSelectionRenderer.expandTree(GTSelectionRenderer.java:670)
at com.application.gap.selections.GTSelectionRenderer.expandTree(GTSelectionRenderer.java:585)
at com.application.aim.gui.AIMTaskChecklistTreeManager.nodeExpanding(AIMTaskChecklistTreeManager.java:608)
at com.application.gap.gui.GTTreeNodeFactory.getDynamicNodes(GTTreeNodeFactory.java:365)
at com.application.gap.gui.GTTreeNodeFactory.createChildNodes(GTTreeNodeFactory.java:148)
at com.application.gap.gui.GTTreeModel.getChildNodes(GTTreeModel.java:144)
at com.application.gap.gui.GTTreeModel.getChildCount(GTTreeModel.java:77)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.treeExpanded(Unknown Source)
at javax.swing.JTree.fireTreeExpanded(Unknown Source)
at javax.swing.JTree.setExpandedState(Unknown Source)
at javax.swing.JTree.expandPath(Unknown Source)
at com.application.gap.gui.GTJTreeHelper.expandPath(GTJTreeHelper.java:83)
at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.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.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(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)
NA,AWT-EventQueue-2,ERROR,NA,[12-15-20 16:03:46.012],0,username#ABC.com,GT_COMPLIANCE_LEVEL3,About menu,"Connection reset"
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.access$100(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$8.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$8.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivilegedWithCombiner(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
at com.application.gap.util.GTUrlConnection.connect(GTUrlConnection.java:113)
at com.application.gap.GTAbout.getProxyAbout(GTAbout.java:150)
at com.application.gap.GTAbout.<init>(GTAbout.java:53)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.application.gap.util.GTClassLoader.getClassInstance(GTClassLoader.java:56)
at com.application.gap.gui.GTGui.doLaunch(GTGui.java:606)
at com.application.gap.gui.GTGui$MenuItemListener.actionPerformed(GTGui.java:2003)
at com.application.gap.gui.GTControl.fireActionEvent(GTControl.java:120)
at com.application.gap.gui.GTMenuItem.actionPerformed(GTMenuItem.java:317)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
so here's the case... I try to create a class object (to use the method getDeclaredConstructors on it) out of a java file, I load the file with the help of the library net.openhft.compiler and the line looks like : Class<?> clazz = CompilerUtils.CACHED_COMPILER.loadFromJava(fileName, IOUtils.toString(new FileReader(file)));. When I run the app in Intellij it works completely fine but when i make a jar out of the app and try to do the same I get the Error Message:
Exception in thread "JavaFX Application Thread" java.lang.NoClassDefFoundError: net/openhft/compiler/CompilerUtils
at com.company.Modules.ChangeVariableNameModule.storeConstructors(ChangeVariableNameModule.java:530)
at com.company.Modules.ChangeVariableNameModule.changeVariableNames(ChangeVariableNameModule.java:85)
at com.company.Obfuscator.obfuscate(Obfuscator.java:53)
at com.company.View$7.handle(View.java:242)
at com.company.View$7.handle(View.java:210)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown
Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown
Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown
Source)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown
Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown
Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown
Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown
Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown
Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown
Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown
Source)
at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.event.Event.fireEvent(Unknown Source)
at javafx.scene.Node.fireEvent(Unknown Source)
at javafx.scene.control.Button.fire(Unknown Source)
at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown
Source)
at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(Unknown
Source)
at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(Unknown
Source)
at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown
Source)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown
Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown
Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown
Source)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown
Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown
Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown
Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown
Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown
Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown
Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown
Source)
at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.event.Event.fireEvent(Unknown Source)
at javafx.scene.Scene$MouseHandler.process(Unknown Source)
at javafx.scene.Scene$MouseHandler.access$1500(Unknown Source)
at javafx.scene.Scene.impl_processMouseEvent(Unknown Source)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown
Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown
Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(Unknown
Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown
Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown
Source)
at com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
at com.sun.glass.ui.View.notifyMouse(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source)
at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: net.openhft.compiler.CompilerUtils
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 52 more
I read some stuff about this Exception, do I have to set the classpath to the location where my app is? And if yes, is it possible to do this also in java? - Maybe something with Runtime.exec()?
Or is there a better way to do that? I tried already many ways but I just don't get how to solve this problem.
Thanks for your help!
I am having trouble using the JavaFx ImageView, it keeps giving me a NullPointerException everytime I try accessing it, here is what I did, firstly I set it it up in the FXML like
<ImageView fx:id="img_MainScreen" fitHeight="240.0" fitWidth="360.0" pickOnBounds="true"></ImageView> and in the ControllerClass I added the FXML tag and created its object like #FXML private ImageView img_MainScreen, after that I go in the initialize() and trying printing out its FitHeight and FitWidthand trying setting an Image to it because I understand the method is only called after all views have been initialized, so it I do it like
public void imageProcessor(ImageView screen)
{
Thread mainThread = new Thread (new Runnable()
{
#Override
public void run() {
// TODO Auto-generated method stub
try{
System.out.println("height of ImageView: "+screen.getFitHeight());
System.out.println("Width of ImageView: "+screen.getFitWidth());
}catch(Exception e)
{
e.printStackTrace();
}
}
});mainThread.start();
}
Jan 20, 2016 11:32:56 AM loginManager.LoginManager showMainView
SEVERE: null
javafx.fxml.LoadException:
/C:/xx/xx/xx/xx/xx/xxx/mainWindow.fxml
at javafx.fxml.FXMLLoader.constructLoadException(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml.FXMLLoader.load(Unknown Source)
at loginManager.LoginManager.showMainView(LoginManager.java:184)
at loginManager.LoginManager.authenticated(LoginManager.java:50)
at application.LoginController$1.handle(LoginController.java:67)
at application.LoginController$1.handle(LoginController.java:1)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.event.Event.fireEvent(Unknown Source)
at javafx.scene.Node.fireEvent(Unknown Source)
at javafx.scene.control.Button.fire(Unknown Source)
at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(Unknown Source)
at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(Unknown Source)
at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.event.Event.fireEvent(Unknown Source)
at javafx.scene.Scene$MouseHandler.process(Unknown Source)
at javafx.scene.Scene$MouseHandler.access$1500(Unknown Source)
at javafx.scene.Scene.impl_processMouseEvent(Unknown Source)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
at com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
at com.sun.glass.ui.View.notifyMouse(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.reflect.misc.Trampoline.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
... 58 more
Caused by: java.lang.NullPointerException
at application.MainViewController.initialize(MainViewController.java:73)
... 67 more
Your fxml can't be loaded.
Jan 20, 2016 11:32:56 AM loginManager.LoginManager showMainView
SEVERE: null
javafx.fxml.LoadException:
/C:/xx/xx/xx/xx/xx/xxx/mainWindow.fxml
Unless you provide the full code, especially how you load it, nobody can help you.
Hi I am using a JLayeredPane which has many JTextPanes, buttons, labels etc.
I am using Serialization to save it but gives non-serializable exception.
How do I actually save it?
This is the code where I am trying to serialize JLayeredPane
FileOutputStream fos = null;
ObjectOutputStream os = null;
try
{
fos = new FileOutputStream(file+".pd");
os = new ObjectOutputStream(fos);
os.writeObject(tempPane);
System.out.println("Saved Successfully");
}
catch (Exception ex)
{
ex.printStackTrace();
}
where tempPane is the JLayeredPane.
However, I am getting a java.io.NotSerializableException:
javax.swing.plaf.metal.MetalFileChooserUI
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at javax.swing.event.EventListenerList.writeObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at javax.swing.JComponent.writeObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at java.awt.Window.writeObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.awt.Window.writeObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at com.usefulsoftwares.pagedescriptors.SaveApplication.saveToPageDescriptorFormat(SaveApplication.java:28)
at com.usefulsoftwares.pagedescriptors.PageDescriptor$7.actionPerformed(PageDescriptor.java:325)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Actions.actionPerformed(Unknown Source)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
at javax.swing.JComponent.processKeyBinding(Unknown Source)
at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
at javax.swing.JMenuBar.processKeyBinding(Unknown Source)
at javax.swing.KeyboardManager.fireBinding(Unknown Source)
at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
at javax.swing.JComponent.processKeyBindings(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at javax.swing.JComboBox.processKeyEvent(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.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(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.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(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)`
I want to use JfileChooser to choose a file and writeObject to the selected file or readObject from the selected file. I have serialize my class but I don't know how to serialize this MetalFileChooserUI? Or do I need to do it? Thank you very much.
smiliar error message to mine
Can someone help me to find a solution to it? Thank you.
My Error message:
java.io.NotSerializableException: javax.swing.plaf.metal.MetalFileChooserUI
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at javax.swing.ArrayTable.writeArrayTable(Unknown Source)
at javax.swing.ActionMap.writeObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at javax.swing.JComponent.writeObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at javax.swing.JList.writeObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
at java.awt.Window.writeObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.awt.Window.writeObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at ver_2.sudoku_GUI.actionPerformed(sudoku_GUI.java:90)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.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.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(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)
If you do not actually want to serialize the JFileChooser but you simply have a reference to it in some class of yours (that you need to serialize) make that reference transient so the serialisation process will simply ignore it.
I'm not sure why you would want to serialize a file chooser as what would be the sense in this? I think that your best bet is to not serialize the gui portion of a program but rather the data held in the model (assuming an MVC structure) -- unless you have requirements that we need to know about.