System.InvalidCastException: Unable to cast object of type 'java.lang.Object' to type 'java.lang.StackTraceElement'. at net.sf.jni4net.utils.Convertor.StrongJ2Cp(JNIEnv env, JniLocalHandle obj) at net.sf.jni4net.utils.Convertor.ArrayStrongJ2Cp(JNIEnv env, Jni LocalHandle array) at java.lang.Throwable.getStackTrace() at java.lang.Throwable.get_StackTrace() at net.sf.robocode.io.LoggerN.logError(Exception t) at net.sf.robocode.dotnet.host.seed.HostingSeed.Construct() at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate) at net.sf.robocode.dotnet.host.seed.HostingShell..ctor(IRobotRepositoryItem i temSpecification, IHostManager hostManager, IRobotPeer peer, IRobotStatics jstat ics, String dllFileName) at net.sf.robocode.dotnet.host.DotnetHost.createRobotProxy(IHostManager hostM anager, Object robotSpecification, IRobotStatics statics, IRobotPeer peer) at net.sf.robocode.dotnet.host.__DotnetHost.createRobotProxy0(IntPtr __envp, JniLocalHandle __obj, JniLocalHandle par0, JniLocalHandle par1, JniLocalHandle p ar2, JniLocalHandle par3)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via robocode by zf0rce
, 1 year ago
net.sf.robocode.dotnet.host.DotnetHost.createRobotProxy(IHostManager hostM anager, Object robotSpecification, IRobotStatics statics, IRobotPeer peer) at net.sf.robocode.dotnet.host.__DotnetHost.createRobotProxy0(IntPtr __envp, JniLocalHandle __obj, JniLocalHandle par0, JniLocalHandle par1, JniLocalHandle p ar2, JniLocalHandle par3)
System.InvalidCastException: Unable to cast object of type 'java.lang.Object' to type 'java.lang.StackTraceElement'. at net.sf.jni4net.utils.Convertor.StrongJ2Cp(JNIEnv env, JniLocalHandle obj) at net.sf.jni4net.utils.Convertor.ArrayStrongJ2Cp(JNIEnv env, Jni LocalHandle array) at java.lang.Throwable.getStackTrace() at java.lang.Throwable.get_StackTrace() at net.sf.robocode.io.LoggerN.logError(Exception t) at net.sf.robocode.dotnet.host.seed.HostingSeed.Construct() at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate) at net.sf.robocode.dotnet.host.seed.HostingShell..ctor(IRobotRepositoryItem i temSpecification, IHostManager hostManager, IRobotPeer peer, IRobotStatics jstat ics, String dllFileName) at net.sf.robocode.dotnet.host.DotnetHost.createRobotProxy(IHostManager hostM anager, Object robotSpecification, IRobotStatics statics, IRobotPeer peer) at net.sf.robocode.dotnet.host.__DotnetHost.createRobotProxy0(IntPtr __envp, JniLocalHandle __obj, JniLocalHandle par0, JniLocalHandle par1, JniLocalHandle p ar2, JniLocalHandle par3)
at net.sf.robocode.dotnet.host.DotnetHost.createRobotProxy(Native Method)
at net.sf.robocode.host.HostManager.createRobotProxy(HostManager.java:98)
at net.sf.robocode.host.HostManager.createRobotProxy(HostManager.java:34)
at net.sf.robocode.battle.peer.RobotPeer.(RobotPeer.java:217)
at net.sf.robocode.battle.Battle.createPeers(Battle.java:296)
at net.sf.robocode.battle.Battle.setup(Battle.java:184)
at net.sf.robocode.battle.BattleManager.startNewBattleImpl(BattleManager.java:177)
at net.sf.robocode.battle.BattleManager.startNewBattle(BattleManager.java:130)
at net.sf.robocode.ui.dialog.NewBattleDialog.finishButtonActionPerformed(NewBattleDialog.java:118)
at net.sf.robocode.ui.dialog.WizardController.finishButtonActionPerformed(WizardController.java:68)
at net.sf.robocode.ui.dialog.WizardController.access$100(WizardController.java:32)
at net.sf.robocode.ui.dialog.WizardController$EventHandler.actionPerformed(WizardController.java:45)
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.plaf.basic.BasicButtonListener.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.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(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$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.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$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.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(Unknown Source)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at net.sf.robocode.ui.dialog.WindowUtil.packCenterShow(WindowUtil.java:143)
at net.sf.robocode.ui.WindowManager.showNewBattleDialog(WindowManager.java:383)
at net.sf.robocode.ui.dialog.MenuBar.battleNewActionPerformed(MenuBar.java:237)
at net.sf.robocode.ui.dialog.MenuBar.access$100(MenuBar.java:59)
at net.sf.robocode.ui.dialog.MenuBar$EventHandler.actionPerformed(MenuBar.java:111)
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(UnknownSource)
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$000(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$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.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$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)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.