Error whenever I call A3CDiscreteDense().train();
Exception in thread "Thread-7" java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.elementData(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.deeplearning4j.rl4j.learning.async.a3c.discrete.AdvantageActorCriticUpdateAlgorithm.computeGradients(AdvantageActorCriticUpdateAlgorithm.java:63)
at org.deeplearning4j.rl4j.learning.async.a3c.discrete.AdvantageActorCriticUpdateAlgorithm.computeGradients(AdvantageActorCriticUpdateAlgorithm.java:32)
at org.deeplearning4j.rl4j.learning.async.AsyncThreadDiscrete.trainSubEpoch(AsyncThreadDiscrete.java:130)
at org.deeplearning4j.rl4j.learning.async.AsyncThread.handleTraining(AsyncThread.java:192)
at org.deeplearning4j.rl4j.learning.async.AsyncThread.run(AsyncThread.java:168)
But the same code works fine when I use DQN.
I had the same issue. It seems that the default learning config would not work, because nStep value should not be 0. Simply call .nStep(5) when creating a learning config from the builder. You can find more info here: https://github.com/eclipse/deeplearning4j-examples/issues/991#issuecomment-823133909
Related
My road traffic model is throwing null pointers with a very cryptic stacktrace:
Exception during discrete event execution:
NullPointerException
java.lang.NullPointerException
at com.anylogic.libraries.road.Car_xjal.g(Unknown Source)
at com.anylogic.libraries.road.Car_xjal.al(Unknown Source)
at com.anylogic.libraries.road.Car_xjal.a(Unknown Source)
at com.anylogic.libraries.road.Car_xjal.on_SegmentEndEvent_xjal(Unknown Source)
at com.anylogic.libraries.road.Car_xjal$SegmentEndEvent.execute(Unknown Source)
at com.anylogic.engine.Engine.n(Unknown Source)
at com.anylogic.engine.Engine.cl(Unknown Source)
at com.anylogic.engine.Engine$n.run(Unknown Source)
The null pointer also doesn't happen immediately, I am able to see the model run for varying lengths of time(60-800 model seconds).
When a breakpoint is created, it says the following:
The JAR file C:\Program Files\AnyLogic 8.8 Professional\plugins\com.anylogic.road_traffic_library_8.8.1.202210270952\lib\RoadTrafficLibrary.jar
has no source attachment. You can attach a source by clicking Attach Source below
It also occasionally throws the same error, but citing a different path("C:\Program Files\AnyLogic 8.8 Professional\jre\lib\jrt-fs.jar") as having no source attachment instead.
Any help is appreciated.
I'm working on gridsim Min-Min project for workflow in Java Netbeans,i have 3 entities:user,broker and GridResources.
user send application with form of workfllow to broker
broker send gridlets to GridResource;
i implement the network topology for this entities with helping of example "auction" in example folder of Gridsim's pakage.
when run my programe,sometime its run without error and every thing is ok,
but after 3 run or some time after 8 run its failed with error and stop.
i checked network topology with another example but the logic of my programe is ok but im confiusing with this,i searched but not found anything.
anyone help me?
Exception in thread "router1" java.lang.NullPointerException
at gridsim.net.RIPRouter.dequeue(Unknown Source)
at gridsim.net.RIPRouter.processInternalEvent(Unknown `enter code here`Source)
at gridsim.net.RIPRouter.processEvent(Unknown Source)
at gridsim.net.Router.body(Unknown Source)
at eduni.simjava.Sim_entity.run(Sim_entity.java:605)
Exception in thread "router2" java.lang.NullPointerException
at gridsim.net.RIPRouter.dequeue(Unknown Source)
at gridsim.net.RIPRouter.processInternalEvent(Unknown Source)
at gridsim.net.RIPRouter.processEvent(Unknown Source)
at gridsim.net.Router.body(Unknown Source)
at eduni.simjava.Sim_entity.run(Sim_entity.java:605)
I am running openfire server as a basis for my chat server, but i am not happy with the robustness of the openfire, it seems to be having lot of java errors,
java expert people who i talked to says that its all coding errors, that java exceptions hasn't handle correctly. Just want to know from a java expert is following errors are really java programming problem or a my server or settings problem.
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.logicalcobwebs.proxool.util.FastArrayList.get(FastArrayList.java:475)
at org.logicalcobwebs.proxool.ConnectionPool.getConnection(ConnectionPool.java:184)
at org.logicalcobwebs.proxool.ProxoolDriver.connect(ProxoolDriver.java:89)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.jivesoftware.database.DefaultConnectionProvider.getConnection(DefaultConnectionProvider.java:86)
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager.java:124)
at org.jivesoftware.openfire.spi.PresenceManagerImpl.userUnavailable(PresenceManagerImpl.java:280)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateHandler.java:168)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateHandler.java:135)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateHandler.java:199)
at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:149)
at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:85)
at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:84)
at org.jivesoftware.openfire.SessionManager$ClientSessionListener.onConnectionClose(SessionManager.java:1164)
at org.jivesoftware.openfire.net.VirtualConnection.notifyCloseListeners(VirtualConnection.java:214)
at org.jivesoftware.openfire.net.VirtualConnection.close(VirtualConnection.java:190)
at org.jivesoftware.openfire.http.HttpSession$HttpVirtualConnection.systemShutdown(HttpSession.java:1008)
at org.jivesoftware.openfire.spi.LocalRoutingTable.stop(LocalRoutingTable.java:146)
at org.jivesoftware.openfire.spi.RoutingTableImpl.stop(RoutingTableImpl.java:857)
at org.jivesoftware.openfire.XMPPServer.shutdownServer(XMPPServer.java:948)
at org.jivesoftware.openfire.XMPPServer.access$700(XMPPServer.java:146)
at org.jivesoftware.openfire.XMPPServer$ShutdownHookThread.run(XMPPServer.java:898)
2012.11.24 05:50:37 org.jivesoftware.util.log.util.CommonsLogFactory - Problem
java.sql.SQLException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at org.logicalcobwebs.proxool.ConnectionPool.getConnection(ConnectionPool.java:235)
at org.logicalcobwebs.proxool.ProxoolDriver.connect(ProxoolDriver.java:89)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.jivesoftware.database.DefaultConnectionProvider.getConnection(DefaultConnectionProvider.java:86)
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager.java:124)
at org.jivesoftware.openfire.spi.PresenceManagerImpl.userUnavailable(PresenceManagerImpl.java:280)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateHandler.java:168)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateHandler.java:135)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateHandler.java:199)
at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:149)
at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:85)
at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:84)
at org.jivesoftware.openfire.SessionManager$ClientSessionListener.onConnectionClose(SessionManager.java:1164)
at org.jivesoftware.openfire.net.VirtualConnection.notifyCloseListeners(VirtualConnection.java:214)
at org.jivesoftware.openfire.net.VirtualConnection.close(VirtualConnection.java:190)
at org.jivesoftware.openfire.http.HttpSession$HttpVirtualConnection.systemShutdown(HttpSession.java:1008)
at org.jivesoftware.openfire.spi.LocalRoutingTable.stop(LocalRoutingTable.java:146)
at org.jivesoftware.openfire.spi.RoutingTableImpl.stop(RoutingTableImpl.java:857)
at org.jivesoftware.openfire.XMPPServer.shutdownServer(XMPPServer.java:948)
at org.jivesoftware.openfire.XMPPServer.access$700(XMPPServer.java:146)
at org.jivesoftware.openfire.XMPPServer$ShutdownHookThread.run(XMPPServer.java:898)
This is either a problem with the parameters you are (or aren't) passing to your database driver - or possibly a bug in the database driver itself. My guess is that you aren't passing in required properties in your DB connection string.
It is certainly not a problem with openfire itself - we have used openfire for many years now, and it is an exceptional piece of software.
Bit of a specific one this..
I'm having trouble using the Openblox diameter stack when using Spring MVC, specifically the init method call on the transport stack:
import com.traffix.openblox.core.transport.TransportStack;
Stack stack = new TransportStack();
stack.init(configureStack());
I'm getting a null pointer exception on the call to init - note that the Configuration returned from configureStack() is valid and works on non-Spring MVC projects. Heres the stack trace:
2776 [pool-2-thread-1] WARN com.traffix.openblox.core.fsm.StateMachine - Idle failed to process <Initiate Transport Stack( Idle)
java.lang.NullPointerException
at com.traffix.openblox.core.utils.logging.StackLogger.init(Unknown Source)
at com.traffix.openblox.core.transport.Stack.g(Unknown Source)
at com.traffix.openblox.core.transport.TransportStack.g(Unknown Source)
at com.traffix.openblox.core.transport.u.N(Unknown Source)
at com.traffix.openblox.core.transport.c$a.processEvent(Unknown Source)
at com.traffix.openblox.core.fsm.StateMachine.a(Unknown Source)
at com.traffix.openblox.core.fsm.StateMachine.a(Unknown Source)
at com.traffix.openblox.core.transport.u.a(Unknown Source)
at com.traffix.openblox.core.transport.Stack.init(Unknown Source)
at com.rory.services.pcrf.simulator.PcrfSimulator.initialize(PcrfSimulator.java:131)
at com.rory.services.pcrf.simulator.PcrfSimulator.<init>(PcrfSimulator.java:113)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
There is some sort of conflict between Openblox and Tomcat. Workaround for now is by removing conf/logging.properties from the Tomcat directory.
on Windows systems. I get the following NPE with the FileChooser. It is a known bug that is not fixed by sun yet. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6342301
Does somebody know a workaround to prevent this exception?
Thanks.
André
Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
at
javax.swing.plaf.metal.MetalFileChooserUI$IndentIcon.getIconWidth(Unknown
Source) at javax.swing.SwingUtilities.layoutCompoundLabelImpl(Unknown
Source) at javax.swing.SwingUtilities.layoutCompoundLabel(Unknown
Source) at javax.swing.plaf.basic.BasicLabelUI.layoutCL(Unknown
Source) at
javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source) at
javax.swing.plaf.basic.BasicListUI.updateLayoutState(Unknown Source)
at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(Unknown
Source) at
javax.swing.plaf.basic.BasicListUI$Handler.valueChanged(Unknown
Source) at
javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown
Source) at
javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown
Source) at
javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at javax.swing.DefaultListSelectionModel.setSelectionInterval(Unknown
Source) at javax.swing.JList.setSelectedIndex(Unknown Source) at
javax.swing.plaf.basic.BasicComboPopup.setListSelection(Unknown
Source) at javax.swing.plaf.basic.BasicComboPopup.access$300(Unknown
Source) at
javax.swing.plaf.basic.BasicComboPopup$Handler.itemStateChanged(Unknown
Source) at javax.swing.JComboBox.fireItemStateChanged(Unknown Source)
at javax.swing.JComboBox.selectedItemChanged(Unknown Source) at
javax.swing.JComboBox.contentsChanged(Unknown Source)
In the bug report that you linked to, they also mention a workaround.
It seems to come down to calling the methods in a specific order.
Have you tried that?
A DESCRIPTION OF THE PROBLEM :
There appears to be an undocumented bad intereaction between
explicitely setting the UI and removing all file filters, even temporarily.
If the latter is done before setting the ui, trying to display a file dialog
will throw an exception but not if the ui was set prior to messing with
the filters. Maybe it is possible to make the code more robust against
this or to include a warning in the docs?
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached program: it will not bomb. Then move the setUI
line to the bottom of the constructor and try again: it will.
So, now with registered account :)
The problem with these steps in the mentioned link is, that the look and feel and therefor the UI is set globaly in our software. So the UI is set before I'm able to manipulate the file filters.
Edit: Missunderstood the code for reproduction. The exampled works as mentioned. Thanks.
It looks like the workaround description says you should try to set the UI before manipulating the filters. Does this not work?
If that doesn't work, is it possible to create an instance of your manipulated FileFilters at the same point that you are setting your UI?