I try to run CRUDTemplate.
My env: winxp sp2, sun jdk6_29, hyfinity 3.2 ce.
During desing I cannot connect to DB2:
java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
db2jcc.jar (yours) and even db2jcc_license_cu.jar (mine) are in common/lib.
With H2 (1.3.161) no problem in design time, hovewer in runtime there is a problem with DBCP:
java.sql.SQLException: Configuration file not found
at org.apache.commons.dbcp.PoolingDriver.getConnectionPool(PoolingDriver.java:133)
at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:171)
Of course h2.jar is on classpath of runtime tomcat in common/lib and even WEB-INF/lib of webapp.
Can CE connect to any DB?
My env: winxp sp2, sun jdk6_29, hyfinity 3.2 ce.
During desing I cannot connect to DB2:
java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
db2jcc.jar (yours) and even db2jcc_license_cu.jar (mine) are in common/lib.
With H2 (1.3.161) no problem in design time, hovewer in runtime there is a problem with DBCP:
java.sql.SQLException: Configuration file not found
at org.apache.commons.dbcp.PoolingDriver.getConnectionPool(PoolingDriver.java:133)
at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:171)
Of course h2.jar is on classpath of runtime tomcat in common/lib and even WEB-INF/lib of webapp.
Can CE connect to any DB?
RE: jdbc: db2, h2
Technically you should be able to use any JDBC compliant database with WebMaker, however as noted on http://www.hyfinity.com/Downloads.html the Community Edition license only allows using open source databases.
For your DB2 issue, can you check the value of the JDBC Driver setting for your database connection. I have seen this have a trailing space before that can cause a ClassNotFoundException to be thrown even when everything looks ok. If you do have any spaces, can you try deleting them and trying again?
With regards to H2, I have just done a quick test with this database and didn't have any issues either during design or at runtime. I am not very familiar with this database to be honest, but I used the client/server approach with the following settings, and it seemed to work ok:
JDBC Driver: org.h2.Driver
JDBC Conenction URL: jdbc:h2:tcp://localhost/~/test
DB Username: sa
DB Password: <blank>
Can you provide some more details of the H2 setup you are trying to use? Hopefully we will be able to track down what is causing your issue.
Regards,
Gerard
RE: jdbc: db2, h2
DB2 issue was a traiiling space in driver class name ...
This bad JDBC Driver setting is default to wm studio, is it mistake or some kind of CE license lock?
H2 issue was (I suspect): During creating connection pools phase runtime server try to register bad DB2 driver and exception was thrown, so H2 driver was not even registered nor H2 pool was created, then I saw exception from DBCP.getConnection.
BTW, Who manage dbcp, server or apps? And why dbcp jars are in app/WEB-INF/lib too?
Is it possible to delete unused DB setup from wm studio, how?
Regards,
Pawel
RE: jdbc: db2, h2
I have just checked, and you are right that the default for DB2 contains a space at the end. This is a mistake, and will be corrected for the next release.
The connection pools are managed by the WebMaker runtime platform, and I think it is the case in 3.2 that one invalid setup can stop other databases being initialised correctly which would explain what you have seen.
Please see this thread for details on how to delete a database connection.
Regards,
Gerard