Openbravo Forum End of Life Notice

Dear Openbravo Forum User,

Because of continued very low usage we decided to stop the forums on 31st of August 2017

In case of questions: webmaster "at" openbravo.com

Database already exists, outofmemory error on install.source

<<

Varghese Renny

Posts: 25

Joined: Fri May 11, 2012 12:39 pm

Post Wed Jun 20, 2012 10:35 am

Database already exists, outofmemory error on install.source

Hi,
While i am doing install.source for continous integration, it 's showing database already exists error, and some sessions are accessing the database. I tried to stop tomcat and postgres and restart it. Still it is showing that error.

  Code:
[sql] Failed to execute:   DROP DATABASE eulencidump
      [sql] org.postgresql.util.PSQLException: ERROR: database "eulencidump" is being accessed by other users
      [sql]   Detail: There are 5 other session(s) using the database.



Even if it survives this error , it is showing java.lang.outofmemory and PermGenspace

/usr/share/tomcat6/.jenkins/workspace/EULEN PROJECT/EulenSVN/src/build.xml:126: java.lang.OutOfMemoryError: PermGen space
  Code:
at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
   at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
   at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
   at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
   at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
   at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at org.postgresql.jdbc2.AbstractJdbc2Connection.executeTransactionCommand(AbstractJdbc2Connection.java:685)
   at org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:709)
   at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:166)
   at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:142)
   at org.openbravo.base.model.ModelProvider.initialize(ModelProvider.java:291)
   at org.openbravo.base.model.ModelProvider.getModel(ModelProvider.java:137)
   at org.openbravo.base.model.ModelProvider.refresh(ModelProvider.java:122)
   at org.openbravo.dal.core.DalLayerInitializer.initialize(DalLayerInitializer.java:65)
   at org.openbravo.dal.core.DalInitializingTask.execute(DalInitializingTask.java:109)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   at org.apache.tools.ant.Task.perform(Task.java:348)
   at org.apache.tools.ant.Target.execute(Target.java:390)
   at org.apache.tools.ant.Target.performTasks(Target.java:411)
   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
   at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
   at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
   at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)


What to do for this error?..Is repeating install.source will create some problem?
i am using Ubuntu 12.04
Openbravo version is 3.0.16731
MY CATALINA_OPTS IS
  Code:
CATALINA_OPTS="-server -Xms512m -Xmx1024m -XX:MaxPermSize=1024m -XX:HeapDumpPath=/home/sigma/Desktop/memory -Djava.awt.headless=true -DJENKINS_HOME=/usr/share/tomcat6/.jenkins"


Please reply to sort out this problem..
<<

Stefan Huehner

Posts: 197

Joined: Wed Mar 18, 2009 7:26 pm

Post Thu Jun 21, 2012 3:56 pm

Re: Database already exists, outofmemory error on install.source

Hi,

for the first error you can check yourself what process is still having connections to your database.
One way to do this is to look at network connection: i.e. by running netstat -tanp | grep 5432
Assuming you have your postgres running on that part.
In the output check for 'ESTABLISHED' lines and in the last column you will see username + processid of the process still being connected to your db.

For the install.source error it seems you are missing configuration of the ANT_OPTS variable. For details on that please check the custom installation documentation: http://wiki.openbravo.com/wiki/Installation/Custom

Note: both questions are not really directly related to automation. But openbravo installation. You will probably get faster replies by asking those general questions in the normal Help or Developers forum instead of here.

Note2: you use permgen setting of 1gb for tomcat, if you just have one openbravo context there and nothing else deployed in that tomcat a setting of 256mb should be more then enough.

Regards,
Stefan
<<

Varghese Renny

Posts: 25

Joined: Fri May 11, 2012 12:39 pm

Post Mon Jun 25, 2012 2:14 pm

Re: Database already exists, outofmemory error on install.source

Thanks for the reply...

Anyway for the second question while doing install.source outofmemory:PerGenSpace Error, it is not getting from command prompt, it's only coming in continous integration.
Can i give -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled in JAVA_OPTS..?
gIVE me a suggestion.?

Return to Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Website Terms


Designed by ST Software for PTF.