Feb 27, 2014 10:42:09 AM org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection is broken: "java.net.ConnectException: Connection refused: localhost:9091" [90067-170])
Further down in the log I find this;
aused by: org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused: localhost:9091" [90067-170]at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
at org.h2.message.DbException.get(DbException.java:158)
at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:399)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:287)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:109)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)
at org.h2.Driver.connect(Driver.java:72)
I have completely removed reference to the H2 listener from server.xml, following is the line I removed;
<Listener className="org.bonitasoft.tomcat.H2Listener" tcpPort="9091" baseDir="${catalina.home}/bonita/server/platform/work" start="true" />
I'm connecting to a mysql database on an external server, I have updated bitronix-resources.properties to point to my sql server as shown;
esource.ds1.className=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
resource.ds1.driverProperties.user=xxxx
resource.ds1.driverProperties.password=xxxx
resource.ds1.driverProperties.URL=jdbc:mysql://srvmysql:3306/bonita?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8
resource.ds1.driverProperties.testQuery=SELECT 1
And my bonita.xml been update;
<Resource name="bonitaSequenceManagerDS"
auth="Container"
type="javax.sql.DataSource"
maxActive="17"
minIdle="5"
maxWait="10000"
initialSize="3"
maxPoolSize="15"
minPoolSize="3"
maxConnectionAge="0"
maxIdleTime="1800"
maxIdleTimeExcessConnections="120"
idleConnectionTestPeriod="30"
acquireIncrement="3"
validationQuery="SELECT 1"
validationInterval="30000"
testConnectionOnCheckout="true"
removeAbandoned="true"
logAbandoned="true"
username="xxxxxx"
password="xxxxx"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://srvmysql:3306/bonita?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8"/>
Finally setup the xetevn.sh with the proper database type; B_OPTS="-Dsysprop.bonita.db.vendor=mysql". Added mysql-connector-java-5.1.29-bin.jar to the /lib directory. I have went into platform-tenant-config.porperties and added the line platform.create=true.
What else am I missing? Happy to supply my log but like to know what is the best way to share it?
Thanks for your help.