[Resolved] Bonita 6 on Oracle

Andrius's picture
Post submitted by Andrius Tue, 06/11/2013 - 07:44

Hi,



tried to install a new Bonita 6 on a test machine. Everything went well with default H2 preconfigured database. But when I tried to switch to Oracle 11g exceptions flooded my log files :)



[...]

INFO: reading resources configuration from C:\tomcats\bonita6-tomcat/conf/bitronix-resources.properties

Jun 11, 2013 8:14:27 AM bitronix.tm.recovery.Recoverer recoverAllResources

WARNING: error running recovery on resource 'jdbc/bonitaDSXA', resource marked as failed (background recoverer will retry recovery) (error=XAER_RMERR)

javax.transaction.xa.XAException

at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:709)

[...]

INFO: Loading properties file from file [C:\tomcats\bonita6-tomcat\bonita\server\platform\conf\jdbc-oracle.xml]

[...]

Jun 11, 2013 8:14:35 AM org.hibernate.cfg.SettingsFactory buildSettings

WARNING: Could not obtain connection to query metadata

java.sql.SQLException: unable to get a connection from pool of a PoolingDataSource containing an XAPool of resource jdbc/bonitaDSXA with 1 connection(s) (1 still available) -failed-

at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:262)

at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92)

at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:113)

[...]



I definitely specified correct username/password and URL (tried to connect with the same credentials from the same machine using SQL Developer - everything was ok). JDBC driver is present in /lib/ojdbc6.jar



May You point where I've missed something?

Comments

Submitted by ttoine Tue, 06/11/2013 - 15:28
Submitted by Andrius Tue, 06/11/2013 - 16:13

[quote=ttoine]Did you follow this documentation?



http://documentation.bonitasoft.com/tomcat-bundle[/quote]



It seems I've missed a DB grants parts. Exception stacktrace in the log is really confusing. So now I'm not getting exceptions mentioned above. But... I still cannot access /bonita URL.



Tomcat 6.0.37 startup log:

  1. <br>
  2. Jun 11, 2013 5:02:32 PM net.sf.ehcache.hibernate.AbstractEhcacheRegionFactory getCache<br>
  3. WARNING: Couldn't find a specific ehcache configuration for cache named [org.hibernate.cache.StandardQueryCache]; using defaults.<br>
  4. Jun 11, 2013 5:02:36 PM org.hibernate.type.TypeFactory$TypeScopeImpl injectSessionFactory<br>
  5. WARNING: Scoping types to session factory org.hibernate.impl.SessionFactoryImpl@1c86638 after already scoped org.hibernate.impl.SessionFactoryImpl@1af159b<br>
  6. Jun 11, 2013 5:02:36 PM net.sf.ehcache.CacheManager detectAndFixDiskStorePathConflict<br>
  7. WARNING: Creating a new instance of CacheManager using the diskStorePath "C:\tomcats\bonita6-tomcat\temp/parent-child.cache" which is already used by an existing CacheManager.<br>
  8. The source of the configuration was net.sf.ehcache.config.generator.ConfigurationSource$URLConfigurationSource@133a915.<br>
  9. The diskStore path for this CacheManager will be set to C:\tomcats\bonita6-tomcat\temp/parent-child.cache\ehcache_auto_created_1370959356321.<br>
  10. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.<br>
  11. Jun 11, 2013 5:02:36 PM net.sf.ehcache.hibernate.AbstractEhcacheRegionFactory getCache<br>
  12. WARNING: Couldn't find a specific ehcache configuration for cache named [org.hibernate.cache.StandardQueryCache]; using defaults.<br>
  13. Jun 11, 2013 5:02:40 PM net.sf.ehcache.CacheManager detectAndFixDiskStorePathConflict<br>
  14. WARNING: Creating a new instance of CacheManager using the diskStorePath "C:\tomcats\bonita6-tomcat\temp/parent-child.cache" which is already used by an existing CacheManager.<br>
  15. The source of the configuration was net.sf.ehcache.config.generator.ConfigurationSource$DefaultConfigurationSource@13240d4.<br>
  16. The diskStore path for this CacheManager will be set to C:\tomcats\bonita6-tomcat\temp/parent-child.cache\ehcache_auto_created_1370959360096.<br>
  17. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.<br>
  18. Jun 11, 2013 5:02:40 PM org.apache.catalina.core.StandardContext start<br>
  19. SEVERE: Error listenerStart<br>
  20. Jun 11, 2013 5:02:40 PM org.apache.catalina.core.StandardContext start<br>
  21. SEVERE: Context [/bonita] startup failed due to previous errors<br>
  22. Jun 11, 2013 5:02:40 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads<br>
  23. SEVERE: The web application [/bonita] appears to have started a thread named [net.sf.ehcache.CacheManager@11b98ca] but has failed to stop it. This is very likely to create a memory leak.<br>
  24. Jun 11, 2013 5:02:40 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads<br>
  25. SEVERE: The web application [/bonita] appears to have started a thread named [org.hibernate.cache.UpdateTimestampsCache.data] but has failed to stop it. This is very likely to create a memory leak.<br>
  26. Jun 11, 2013 5:02:40 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads<br>
  27. SEVERE: The web application [/bonita] appears to have started a thread named [net.sf.ehcache.CacheManager@a1bf09] but has failed to stop it. This is very likely to create a memory leak.<br>
  28. Jun 11, 2013 5:02:40 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads<br>
  29. SEVERE: The web application [/bonita] appears to have started a thread named [org.hibernate.cache.UpdateTimestampsCache.data] but has failed to stop it. This is very likely to create a memory leak.<br>
  30. Jun 11, 2013 5:02:40 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads<br>
  31. SEVERE: The web application [/bonita] appears to have started a thread named [net.sf.ehcache.CacheManager@3e1fef] but has failed to stop it. This is very likely to create a memory leak.<br>
  32. Jun 11, 2013 5:02:40 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads<br>
  33. SEVERE: The web application [/bonita] appears to have started a thread named [org.hibernate.cache.UpdateTimestampsCache.data] but has failed to stop it. This is very likely to create a memory leak.<br>
  34. [...]<br>
  35. INFO: Illegal access: this web application instance has been stopped already. Could not load ehcache-version.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.<br>
  36. <br>









P.S.: btw, You've made a mistake in http://documentation.bonitasoft.com/tomcat-bundle in Oracle section where content of bonita.xml is described:

driverClassName="org.hibernate.dialect.Oracle10gDialect"

should be replaced with oracle.jdbc.OracleDriver



P.P.S.: no tables were created in my oracle db. Should I manually create all structure or I've missed something (again)?

Submitted by Andrius Wed, 06/12/2013 - 14:07

As I haven't received any solution to my last question about empty database, so I decided to run everything step-by-step and make some investigation.



May be someone will face same problem, so I'll share how to solve this issue.



In /server/platform/conf/bonita-platform.properties DO NOT EDIT properties "platformAdminUsername" and "platformAdminPassword". If you change their values your database will not be initialized and no tables will be created.





It would be nice if Bonita could place some notes in documentation or in-place comments in configuration files (xml and properties) about parameters/properties which may be changed and which may not.

Submitted by antoine.mottier Wed, 06/12/2013 - 16:34

Hi,



Thanks a lot for sharing the knowledge!



Would you mind opening a new ticket in our tracking tool on the subject? For me it's either an issue in the way we initialize database or at least something to highlight in the documentation.



Thanks,

--

Antoine Mottier

Bonitasoft consultant

Submitted by ttoine Wed, 06/12/2013 - 17:05

I contacted the doc team, they will fix it. By the way, I will do my best, I am already doing my best so we can open comments on the documentation. Stay tuned, about that point.

Submitted by duy.tranquang Wed, 07/10/2013 - 10:42

hi, documentation has been updated since the report date. feel free to open the topic if you face any issues.

Submitted by ttoine Wed, 07/10/2013 - 11:55

And it is possible to comment the documentation.