By: Mental_Mayhem - mentalmayhem
Howto Add Classes for Non-MySQL Repository
2006-05-12 16:12
I am attempting to build for the DB2400Dialect and the build is dying on the tests where the DDL is apparently generated. I'm not familiar with either Maven or Hibernate, but is there a quick way to get my jt400.jar in and recognized as part of the build?
By: Mental_Mayhem - mentalmayhem
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-12 19:53
Well after I got home from work, I decided to just add the jt400.jar to my jdk and jre installations and building is proceeding now. At least I see DDL scrolling up my terminal window. I'll just have to wait and see how far it gets.
By: Mental_Mayhem - mentalmayhem
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-12 20:30
Hmmm, 6 failures and 9 errors. Looks like most of the messages are like the following:
20:03:56,401 WARN JDBCExceptionReporter:71 - SQL Error: -99999, SQLState: IM001
20:03:56,416 ERROR JDBCExceptionReporter:72 - The driver does not support this function.
Anyone have any thoughts, comments, experience?
By: Sherman Wood - sgwood
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-13 13:01
This is a Hibernate issue. Was this during the database creation? Did you configure the system as per http://jasperintel.sourceforge.net/index.php?p_module=page&pageid=42? Did you set the Hibernate dialect?
Also I just took a look at the Hibernate forums and saw that there is a problem with the DB2 AS400 driver. See http://forum.hibernate.org/viewtopic.php?t=950850&highlight=db2400 .
Fixes appear to be:
"So, for the time being, the only way not to break compatibility with Hibernate is to force getGeneratedKeys() disabled even if the driver reports it is supported and to specify "naming=sql" in the url for jdbc.
Besides allowing Hibernate to use its standard syntax for queries (with the '.'), it is just the Good Choice to use "naming=sql" when using JDBC on iSeries. If you want to call RPG or custom iSeries commands you can always use a separate connection from the Toolbox."
hibernate.jdbc.use_get_generated_keys=false in applicationContext.xml ie.
<prop key="hibernate.jdbc.use_get_generated_keys">false</prop>
Let us know how you get along.
Sherman
JasperSoft
By: Mental_Mayhem - mentalmayhem
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-14 23:16
I did set my hibernate.cfg.xml and jdbc.properties per the document. I added the property to the applicationContext.xml file as well. I wrote the build out to a file and the first failure point is in the Setup test where RepoFolder is attempting to insert a record into resource_folder. The insert fails and then the SQL error appear.
I can post anything you feel would be relevant to figuring this out.
By: Sherman Wood - sgwood
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-15 04:11
I also saw these posts on the Hibernate forums:
http://forum.hibernate.org/viewtopic.php?t=956565&highlight=jt400
http://forum.hibernate.org/viewtopic.php?t=958167&highlight=jt400
Can you set journalling on?
Sherman
JasperSoft
By: Mental_Mayhem - mentalmayhem
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-15 11:45
I've recreated the schema through SQL so that journalling is enabled as the tables are created. That doesn't seem to fix the problem. I[m posting my files for examination. You'll notice I've attempted to stop the use of generated keys in both files, as I'm not sure they are both being used. I also placed the property in the applicationContext.xml file, but I'm assuming it's not to the point of using that file and am leaving it out.
The following is the contents of my jdbc.properties file:
# Property that determines the Hibernate dialect
# (only applied with "applicationContext-hibernate.xml")
metadata.hibernate.dialect=org.hibernate.dialect.DB2400Dialect
metadata.jdbc.driverClassName=com.ibm.as400.access.AS400JDBCDriver
metadata.jdbc.url=jdbc:as400://as400.wibank.com/jaspersvr;naming=sql
metadata.jdbc.username=******
metadata.jdbc.password=******
metadata.jdbc.use_get_generated_keys=false
metadata.jndi=jdbc/jasperserver
Here is my hibernate.cfg.xml file:
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="metadata">
<!-- Database connection settings -->
<property name="connection.driver_class">com.ibm.as400.access.AS400JDBCDriver</property>
<property name="connection.url">jdbc:as400://as400.wibank.com/jaspersvr;naming=sql</property>
<property name="connection.username">******/property>
<property name="connection.password">******</property>
<property name="dialect">org.hibernate.dialect.DB2400Dialect</property>
<property name="show_sql">false</property>
<property name="format_sql">false</property>
<property name="jdbc.use_get_generated_keys">false</property>
</session-factory>
</hibernate-configuration>
By: Mental_Mayhem - mentalmayhem
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-15 14:39
Tried a little more mucking about with variously setting hibernate.jdbc.use_get_generated_keys or metadata.hibernate.jdbc.use_get_generated_keys, etc. and nothing seems to be working. I'm wondering if there is some way to see what the preparedstatement data looks like. Particularly the timestamp data.
I was able to get the hibernate Auction demo running quite easily by just adding hibernate.jdbc.use_generated_keys false to the hibernate.properties file. This makes me wonder if it's just not seeing that property before executing the tests.
By: Sherman Wood - sgwood
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-19 06:11
Looking at it again, you are right. The tests use a different Spring bean to set up the Hibernate connection. Look for hibernateConfig.xml and put the <prop key="hibernate.jdbc.use_generated_keys">false</prop> in there.
Sherman
JasperSoft
Howto Add Classes for Non-MySQL Repository
2006-05-12 16:12
I am attempting to build for the DB2400Dialect and the build is dying on the tests where the DDL is apparently generated. I'm not familiar with either Maven or Hibernate, but is there a quick way to get my jt400.jar in and recognized as part of the build?
By: Mental_Mayhem - mentalmayhem
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-12 19:53
Well after I got home from work, I decided to just add the jt400.jar to my jdk and jre installations and building is proceeding now. At least I see DDL scrolling up my terminal window. I'll just have to wait and see how far it gets.
By: Mental_Mayhem - mentalmayhem
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-12 20:30
Hmmm, 6 failures and 9 errors. Looks like most of the messages are like the following:
20:03:56,401 WARN JDBCExceptionReporter:71 - SQL Error: -99999, SQLState: IM001
20:03:56,416 ERROR JDBCExceptionReporter:72 - The driver does not support this function.
Anyone have any thoughts, comments, experience?
By: Sherman Wood - sgwood
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-13 13:01
This is a Hibernate issue. Was this during the database creation? Did you configure the system as per http://jasperintel.sourceforge.net/index.php?p_module=page&pageid=42? Did you set the Hibernate dialect?
Also I just took a look at the Hibernate forums and saw that there is a problem with the DB2 AS400 driver. See http://forum.hibernate.org/viewtopic.php?t=950850&highlight=db2400 .
Fixes appear to be:
"So, for the time being, the only way not to break compatibility with Hibernate is to force getGeneratedKeys() disabled even if the driver reports it is supported and to specify "naming=sql" in the url for jdbc.
Besides allowing Hibernate to use its standard syntax for queries (with the '.'), it is just the Good Choice to use "naming=sql" when using JDBC on iSeries. If you want to call RPG or custom iSeries commands you can always use a separate connection from the Toolbox."
hibernate.jdbc.use_get_generated_keys=false in applicationContext.xml ie.
<prop key="hibernate.jdbc.use_get_generated_keys">false</prop>
Let us know how you get along.
Sherman
JasperSoft
By: Mental_Mayhem - mentalmayhem
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-14 23:16
I did set my hibernate.cfg.xml and jdbc.properties per the document. I added the property to the applicationContext.xml file as well. I wrote the build out to a file and the first failure point is in the Setup test where RepoFolder is attempting to insert a record into resource_folder. The insert fails and then the SQL error appear.
I can post anything you feel would be relevant to figuring this out.
By: Sherman Wood - sgwood
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-15 04:11
I also saw these posts on the Hibernate forums:
http://forum.hibernate.org/viewtopic.php?t=956565&highlight=jt400
http://forum.hibernate.org/viewtopic.php?t=958167&highlight=jt400
Can you set journalling on?
Sherman
JasperSoft
By: Mental_Mayhem - mentalmayhem
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-15 11:45
I've recreated the schema through SQL so that journalling is enabled as the tables are created. That doesn't seem to fix the problem. I[m posting my files for examination. You'll notice I've attempted to stop the use of generated keys in both files, as I'm not sure they are both being used. I also placed the property in the applicationContext.xml file, but I'm assuming it's not to the point of using that file and am leaving it out.
The following is the contents of my jdbc.properties file:
# Property that determines the Hibernate dialect
# (only applied with "applicationContext-hibernate.xml")
metadata.hibernate.dialect=org.hibernate.dialect.DB2400Dialect
metadata.jdbc.driverClassName=com.ibm.as400.access.AS400JDBCDriver
metadata.jdbc.url=jdbc:as400://as400.wibank.com/jaspersvr;naming=sql
metadata.jdbc.username=******
metadata.jdbc.password=******
metadata.jdbc.use_get_generated_keys=false
metadata.jndi=jdbc/jasperserver
Here is my hibernate.cfg.xml file:
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="metadata">
<!-- Database connection settings -->
<property name="connection.driver_class">com.ibm.as400.access.AS400JDBCDriver</property>
<property name="connection.url">jdbc:as400://as400.wibank.com/jaspersvr;naming=sql</property>
<property name="connection.username">******/property>
<property name="connection.password">******</property>
<property name="dialect">org.hibernate.dialect.DB2400Dialect</property>
<property name="show_sql">false</property>
<property name="format_sql">false</property>
<property name="jdbc.use_get_generated_keys">false</property>
</session-factory>
</hibernate-configuration>
By: Mental_Mayhem - mentalmayhem
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-15 14:39
Tried a little more mucking about with variously setting hibernate.jdbc.use_get_generated_keys or metadata.hibernate.jdbc.use_get_generated_keys, etc. and nothing seems to be working. I'm wondering if there is some way to see what the preparedstatement data looks like. Particularly the timestamp data.
I was able to get the hibernate Auction demo running quite easily by just adding hibernate.jdbc.use_generated_keys false to the hibernate.properties file. This makes me wonder if it's just not seeing that property before executing the tests.
By: Sherman Wood - sgwood
RE: Howto Add Classes for Non-MySQL Repositor
2006-05-19 06:11
Looking at it again, you are right. The tests use a different Spring bean to set up the Hibernate connection. Look for hibernateConfig.xml and put the <prop key="hibernate.jdbc.use_generated_keys">false</prop> in there.
Sherman
JasperSoft
0 Answers:
No answers yet