Home Forums Development Failure in running unit tests Jenkins job

Viewing 1 reply thread
  • Author
    Posts
    • #18107
      Daniel DonciuDaniel Donciu
      Participant

      We encountered this error during our unit tests Jenkins job execution. It happens sporadically, at least once a week, but sometimes we get 3 or 4 good runs in a row and then several failures like this. When this happens the job dies after a random number of unit tests – sometimes it can execute as few as 5 unit tests, or it can go run half of the unit tests, but then the rest of unit tests are not executed as the job stops with error. The datasource quoted in the error is random, it can quote any of the datasources. Please advise.

       

      nexj.core.runtime.LifecycleException: Unable to resume the application. (err.runtime.resume)
      at nexj.core.runtime.LifecycleManager.resume(LifecycleManager.java:475)
      at nexj.core.container.platform.teee.GenericContainerContainer.resume(GenericContainerContainer.java:437)
      at nexj.core.tools.GenericMetadataObjectTool$DelayedStartWrapper.resume(GenericMetadataObjectTool.java:259)
      at nexj.core.testing.unit.GenericTestPlayer.resume(GenericTestPlayer.java:516)
      at nexj.core.testing.unit.UnitTestPlayer.run(UnitTestPlayer.java:582)
      at nexj.core.testing.unit.UnitTestPlayer.run(UnitTestPlayer.java:465)
      at nexj.core.testing.unit.UnitTestPlayer.run(UnitTestPlayer.java:331)
      at nexj.core.tools.UnitTestTool.runTests(UnitTestTool.java:507)
      at nexj.core.tools.UnitTestTool.end(UnitTestTool.java:569)
      at nexj.core.tools.GenericTool.run(GenericTool.java:131)
      at nexj.core.tools.UnitTestTool.main(UnitTestTool.java:826)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at nexj.core.container.platform.teee.BootstrapLoader.invoke(BootstrapLoader.java:374)
      at nexj.core.container.platform.teee.BootstrapLoader$1.run(BootstrapLoader.java:313)
      Caused by: nexj.core.persistence.AvailabilityException: Data source “Conversation” is temporarily unavailable. (err.persistence.unavailable)
      at nexj.core.persistence.sql.SQLAdapter.getConnection(SQLAdapter.java:913)
      at nexj.core.persistence.sql.SQLAdapter.getConnection(SQLAdapter.java:880)
      at nexj.core.persistence.sql.SQLAdapter.getVersion(SQLAdapter.java:2591)
      at nexj.core.runtime.Upgrade.upgrade(Upgrade.java:156)
      at nexj.core.runtime.Upgrade.startup(Upgrade.java:107)
      at nexj.core.runtime.Upgrade.resume(Upgrade.java:307)
      at nexj.core.runtime.LifecycleManager.resume(LifecycleManager.java:454)
      … 16 more
      Caused by: nexj.core.util.pool.resource.ResourceFactoryException: Unable to create a new resource. (err.pool.resource.create)
      at nexj.core.util.pool.resource.GenericResourcePool.get(GenericResourcePool.java:308)
      at nexj.core.rpc.sql.RelationalDatabaseConnectionPool.getConnection(RelationalDatabaseConnectionPool.java:161)
      at nexj.core.persistence.sql.SQLAdapter.open(SQLAdapter.java:970)
      at nexj.core.persistence.sql.SQLAdapter.getConnection(SQLAdapter.java:909)
      … 22 more
      Caused by: java.sql.SQLException: Network error IOException: Connection refused (Connection refused)
      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:423)
      at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
      at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:183)
      at net.sourceforge.jtds.jdbcx.JtdsDataSource.getConnection(JtdsDataSource.java:187)
      at net.sourceforge.jtds.jdbcx.JtdsDataSource.getXAConnection(JtdsDataSource.java:126)
      at nexj.core.rpc.sql.SQLConnectionFactory.create(SQLConnectionFactory.java:144)
      at nexj.core.rpc.sql.RelationalDatabaseConnectionPool.create(RelationalDatabaseConnectionPool.java:133)
      at nexj.core.util.pool.resource.GenericResourcePool.get(GenericResourcePool.java:304)
      … 25 more
      Caused by: java.net.ConnectException: Connection refused (Connection refused)
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
      at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
      at java.net.Socket.connect(Socket.java:589)
      at sun.reflect.GeneratedMethodAccessor118.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:309)
      at net.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:259)
      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:348)
      … 32 more

      0
    • #18217
      Shahzad Qureshishahzad.qureshi
      Keymaster

      Hi Daniel,

      Apologies for the late response. I have talked to our framework specialists and they have mentioned that the stacktrace above simply tells us that NexJ server isn’t able to connect to the database and doesn’t provide any other detail. A suggestion at this point is to look at the server logs and see if any other details show up above or after this stack trace.

      Perhaps database resources are running out when this unit test job fails and they are freed up and available for NexJ server when this job runs successfully.

      0
Viewing 1 reply thread
  • You must be logged in to reply to this topic.