error on upgrade 7.7.2 to 7.8.0
Hello,
Currently i am using 7.7.2 version and i want to upgrade but i can't start bonita portal.I migrate my database with migration tool without any error, then i updated tomcat files and bundle, then i started bonita but portal not starting. And i am getting
java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid36340.hprof ...
error.
And these are detail error logs;
2018-12-11 14:41:28.704 +0300 SEVERE: org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bonita] Exception sending context initialized event to listener instance of class [org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener]
java.lang.RuntimeException: Error while initializing the Engine
at org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener.contextInitialized(EngineInitializerListener.java:35)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:629)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.bonitasoft.engine.platform.StartNodeException: Platform starting failed.
at org.bonitasoft.engine.api.impl.PlatformAPIImpl.startNode(PlatformAPIImpl.java:211)
at org.bonitasoft.engine.EngineInitializer.initializeEngine(EngineInitializer.java:75)
at org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener.contextInitialized(EngineInitializerListener.java:33)
... 13 more
Caused by: org.bonitasoft.engine.commons.exceptions.SBonitaRuntimeException: java.lang.OutOfMemoryError: Java heap space
at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:282)
at org.bonitasoft.engine.api.impl.PlatformAPIImpl.startServicesOfTenants(PlatformAPIImpl.java:397)
at org.bonitasoft.engine.api.impl.PlatformAPIImpl.startNode(PlatformAPIImpl.java:195)
... 15 more
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.lang.reflect.Array.newArray(Native Method)
at java.lang.reflect.Array.newInstance(Array.java:75)
at org.hibernate.type.descriptor.java.ArrayMutabilityPlan.deepCopyNotNull(ArrayMutabilityPlan.java:43)
at org.hibernate.type.descriptor.java.MutableMutabilityPlan.deepCopy(MutableMutabilityPlan.java:52)
at org.hibernate.type.AbstractStandardBasicType.deepCopy(AbstractStandardBasicType.java:321)
at org.hibernate.type.AbstractStandardBasicType.deepCopy(AbstractStandardBasicType.java:317)
at org.hibernate.type.TypeHelper.deepCopy(TypeHelper.java:67)
at org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:268)
at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:144)
at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.performTwoPhaseLoad(AbstractRowReader.java:244)
at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.finishUp(AbstractRowReader.java:215)
at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:140)
at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:138)
at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:102)
at org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.load(AbstractLoadPlanBasedEntityLoader.java:186)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:4126)
at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:503)
at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:468)
at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:213)
at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:275)
at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:151)
at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1106)
at org.hibernate.internal.SessionImpl.access$2000(SessionImpl.java:176)
at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2587)
at org.hibernate.internal.SessionImpl.get(SessionImpl.java:991)
at org.bonitasoft.engine.persistence.TenantHibernatePersistenceService.selectById(TenantHibernatePersistenceService.java:158)
at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectById(AbstractHibernatePersistenceService.java:352)
at org.bonitasoft.engine.dependency.impl.DependencyServiceImpl.getDependency(DependencyServiceImpl.java:237)
at org.bonitasoft.engine.dependency.impl.AbstractDependencyService.lambda$getDependenciesResources$0(AbstractDependencyService.java:93)
at org.bonitasoft.engine.dependency.impl.AbstractDependencyService$$Lambda$49/1662045670.apply(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
2018-12-11 14:41:29.249 +0300 SEVERE: org.bonitasoft.engine.api.impl.ServerAPIImpl THREAD_ID=18 | HOSTNAME=DenemeBPM | Node not started. Method 'org.bonitasoft.engine.api.PlatformAPI.getClientPlatformConfigurations' cannot be called until node has been started (PlatformAPI.startNode()). Exact class: org.bonitasoft.engine.api.impl.PlatformAPIImpl
2018-12-11 14:41:29.250 +0300 SEVERE: org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bonita] Exception sending context initialized event to listener instance of class [org.bonitasoft.console.common.server.servlet.PlatformTenantListener]
org.bonitasoft.engine.platform.NodeNotStartedException: USERNAME=local | The current node has not been started yet. Method PlatformAPI.startNode() must be called previously.
at org.bonitasoft.engine.api.impl.ServerAPIImpl.checkMethodAccessibility(ServerAPIImpl.java:287)
at org.bonitasoft.engine.api.impl.ServerAPIImpl$2.call(ServerAPIImpl.java:430)
at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:274)
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIInTransaction(ServerAPIImpl.java:438)
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:272)
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:124)
at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:86)
at com.sun.proxy.$Proxy43.getClientPlatformConfigurations(Unknown Source)
at org.bonitasoft.console.common.server.utils.PlatformManagementUtils.retrievePlatformConfiguration(PlatformManagementUtils.java:101)
at org.bonitasoft.console.common.server.utils.PlatformManagementUtils.initializePlatformConfiguration(PlatformManagementUtils.java:113)
at org.bonitasoft.console.common.server.servlet.PlatformTenantListener.contextInitialized(PlatformTenantListener.java:52)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:629)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Hello,
This is a Java heap space issue, could you try restarting with more memory in the JVM?
To add more memory in the JVM, you will need to use the Bonita Platform Setup tool to pull, edit and push the "CATALINA_OPTS" property (attributes "Xms" and "Xmx") in the file "tomcat-templates/setenv.sh" for example if you are running with a Tomcat on Linux.
If this does not help in any way then it might be related to a memory leak due to migration or the targetted version, keep us posted!
HIH,
Comments
Hello,
I did what you told me to but this time i get dependency missing error. But interesting thing is every time i run bonita it asks me diffirent dependency. I am not adding anything, just stopping bonita and starting again and diffirent dependency is missing. When i go to database and check them, they are not my dependencies. They are not related to any of my processes. They are came with bonita i guess.
the dependency with 1814 id is "castor-1.2.jar"
Here is error log;
It seems that Bitronix (the transaction manager used with Tomcat) takes too much time to load the dependencies and reach a transaction timeout. Because it is time related, it never fails loading the exact same dependency even though the issue is the same.
To fix that, the best is to increase the Bitronix transaction timeout (60 seconds by default as described here ). You will need to use the Bonita Platform Setup tool to pull, edit and push the "bitronix.tm.timer.defaultTransactionTimeout=120" property in the file "tomcat-templates/bitronix-config.properties".
This might be due to an unusual work to be done during the first run after the migration or DB connection latency. I suggest that you give another try rollbacking to the initial 60 seconds if you make it run smoothly with 120.
Let us know how it goes!
I tried to change Bitronix transaction timeout but i couldn't manage to that. I am not sure what i am doing wrong. The steps that i tried;
1- setup.sh pull
2- add line "bitronix.tm.timer.defaultTransactionTimeout=120" to "tomcat-templates/bitronix-resources.properties" file
3- setup.sh push
Didn't worked.
1-setup.sh pull
2- add line "bitronix.tm.timer.defaultTransactionTimeout=120" to "tomcat-templates/bitronix-resources.properties" file
3- setup.sh configure
4- setup.sh push
that didn't work either.