Hi All,
I'm running into Hibernate problems using the PXE BPEL engine thats deployed into Servicemix.
Hibernate version 3.1, I'm using MySQL version 5.0, JDBC driver is mysql-connector-java-3.1.12. Essentially the sequence of operations I'm trying is to
1. deploy the PXE engine into servicemix.
2. deploy a BPEL process into the engine.
3. send a soap message to the BPEL engine.
This isn't entirely important, I mention it because the first two steps work fine, and both of them involve some hefty Hibernate activity as the PXE engine creates the appropriate schema and then when the process is deployed, serializes all the process state to the database. So Hibernate is actually working fine up to this point.
Then I go to send the soap message. Theres a flurry of hibernate activity , then a hibernate exception :
Code:
Hibernate: select hsystem0_.UUID as UUID15_0_, hsystem0_.SAR_LDATA_ID as SAR2_15_0_, hsystem0_.DOMAIN_ID as DOMAIN3_15_0_, hsystem0_.NAME as NAME15_0_, hsystem0_.SDD_LDATA_ID as SDD5_15_0_, hsystem0_.DEPLOYED as DEPLOYED15_0_, hsystem0_.ACTIVE as ACTIVE15_0_ from PXE_SYSTEM hsystem0_ where hsystem0_.UUID=?
Hibernate: insert into PXE_MESSAGE_EXCHANGE (PORT_TYPE, SYSTEM_ID, CHANNEL_NAME, LDATA_ID, INPUT_MESSAGE_ID, OUTPUT_MESSAGE_ID, INSERT_DT, OP_NAME, STATE, PINNED, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into LARGE_DATA (BIN_DATA, INSERT_TIME) values (?, ?)
Hibernate: insert into PXE_MESSAGE (INSERT_TIME) values (?)
Hibernate: update PXE_MESSAGE_EXCHANGE set LDATA_ID=? where ID=?
Hibernate: select hmessagepa0_.ID as ID18_, hmessagepa0_.LDATA_ID as LDATA2_18_, hmessagepa0_.MESSAGE_ID as MESSAGE3_18_, hmessagepa0_.PARTNAME as PARTNAME18_, messagepa0_.INSERT_TIME as INSERT5_18_ from PXE_MESSAGE_PART hmessagepa0_ where hmessagepa0_.PARTNAME=? and hmessagepa0_.MESSAGE_ID=?
Hibernate: insert into LARGE_DATA (BIN_DATA, INSERT_TIME) values (?, ?)
Hibernate: insert into PXE_MESSAGE_PART (LDATA_ID, MESSAGE_ID, PARTNAME, INSERT_TIME) values (?, ?, ?, ?)
Hibernate: select hmessagepa0_.ID as ID18_, hmessagepa0_.LDATA_ID as LDATA2_18_, hmessagepa0_.MESSAGE_ID as MESSAGE3_18_, hmessagepa0_.PARTNAME as PARTNAME18_, messagepa0_.INSERT_TIME as INSERT5_18_ from PXE_MESSAGE_PART hmessagepa0_ where hmessagepa0_.PARTNAME=? and hmessagepa0_.MESSAGE_ID=?
Hibernate: insert into LARGE_DATA (BIN_DATA, INSERT_TIME) values (?, ?)
Hibernate: insert into PXE_TASK (LDATA_ID, DELIVERY_DT, DOMAIN_ID, id) values (?, ?, ?, ?)
Hibernate: update PXE_MESSAGE_EXCHANGE set INPUT_MESSAGE_ID=?, STATE=? where ID=?
Hibernate: select hsystem0_.UUID as UUID15_0_, hsystem0_.SAR_LDATA_ID as SAR2_15_0_, hsystem0_.DOMAIN_ID as DOMAIN3_15_0_, hsystem0_.NAME as NAME15_0_, hsystem0_.SDD_LDATA_ID as SDD5_15_0_, hsystem0_.DEPLOYED as DEPLOYED15_0_, hsystem0_.ACTIVE as ACTIVE15_0_ from PXE_SYSTEM hsystem0_ where hsystem0_.UUID=?
Hibernate: select hmessageex0_.ID as ID16_0_, hmessageex0_.PORT_TYPE as PORT2_16_0_, hmessageex0_.SYSTEM_ID as SYSTEM3_16_0_, hmessageex0_.CHANNEL_NAME as CHANNEL4_16_0_, hmessageex0_.LDATA_ID as LDATA5_16_0_, hmessageex0_.INPUT_MESSAGE_ID as INPUT6_16_0_, hmessageex0_.OUTPUT_MESSAGE_ID as OUTPUT7_16_0_, hmessageex0_.INSERT_DT as INSERT8_16_0_, hmessageex0_.OP_NAME as OP9_16_0_, hmessageex0_.STATE as STATE16_0_, hmessageex0_.PINNED as PINNED16_0_ from PXE_MESSAGE_EXCHANGE hmessageex0_ where hmessageex0_.ID=?
Hibernate: select this_.ID as ID0_0_, this_.PROCID as PROCID0_0_, this_.deployer as deployer0_0_, this_.namespace as namespace0_0_, this_.deploydate as deploydate0_0_, this_.name as name0_0_, this_.version as version0_0_, this_.INSERT_TIME as INSERT8_0_0_ from
BPEL_PROCESS this_ where this_.PROCID=?
Hibernate: select hcorrelato0_.ID as ID3_, hcorrelato0_.NAME as NAME3_, hcorrelato0_.PROCESS_ID as PROCESS3_3_, hcorrelato0_.INSERT_TIME as INSERT4_3_ from BPEL_CORRELATOR hcorrelato0_ where hcorrelato0_.PROCESS_ID = ? and hcorrelato0_.NAME=?
WARN - JDBCExceptionReporter.logExceptions(71) | SQL Error: 0, SQLState: S0022
ERROR - JDBCExceptionReporter.logExceptions(72) | Column 'col_0_0_' not found.
FATAL - ServiceBackend.onServiceEvent(150) | Unexpected Error
org.hibernate.exception.SQLGrammarException: could not execute query using iterate
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:410)
at org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.java:310)
at org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java:170)
at org.hibernate.impl.SessionImpl.iterateFilter(SessionImpl.java:1422)
at org.hibernate.impl.CollectionFilterImpl.iterate(CollectionFilterImpl.java:38)
at com.fs.pxe.daohib.bpel.ProcessDaoImpl.getCorrelator(ProcessDaoImpl.java:61)
at com.fs.pxe.bpel.runtime.BpelProcess$PartnerLinkMyRoleImpl.inputMsgRcvd(BpelProcess.java:256)
at com.fs.pxe.bpel.runtime.BpelProcess.inputMsgRcvd(BpelProcess.java:180)
at com.fs.pxe.bpel.provider.BpelWorker.handleServerRoleEvent(BpelWorker.java:216)
at com.fs.pxe.bpel.provider.BpelWorker.onMessageExchangeEvent(BpelWorker.java:101)
at com.fs.pxe.bpel.provider.BpelWorker.onServiceEvent(BpelWorker.java:66)
at com.fs.pxe.bpel.provider.BpelService.onServiceEvent(BpelService.java:130)
at com.fs.pxe.bpel.provider.BpelServiceProvider.onServiceEvent(BpelServiceProvider.java:168)
at com.fs.pxe.sfwk.impl.ServiceProviderBackend.onServiceEvent(ServiceProviderBackend.java:143)
at com.fs.pxe.sfwk.impl.ServiceBackend.onServiceEvent(ServiceBackend.java:136)
at com.fs.pxe.sfwk.impl.ChannelBackend.onMessageExchangeEvent(ChannelBackend.java:144)
at com.fs.pxe.sfwk.impl.SystemBackend.handleMsgExServiceEvent(SystemBackend.java:294)
at com.fs.pxe.sfwk.impl.SystemBackend.onTask(SystemBackend.java:137)
at com.fs.pxe.sfwk.impl.DomainNodeImpl.doTask(DomainNodeImpl.java:345)
at com.fs.pxe.sfwk.impl.TaskScheduler$TaskExecRunnable$1.run(TaskScheduler.java:254)
at com.fs.pxe.sfwk.impl.DomainNodeImpl.runTransaction(DomainNodeImpl.java:617)
at com.fs.pxe.sfwk.impl.TaskScheduler$TaskExecRunnable.run(TaskScheduler.java:251)
at com.fs.pxe.sfwk.impl.DomainNodeImpl$3.run(DomainNodeImpl.java:382)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: Column 'col_0_0_' not found.
at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:950)
at com.mysql.jdbc.ResultSet.getLong(ResultSet.java:2603)
at org.hibernate.type.LongType.get(LongType.java:28)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:102)
at org.hibernate.type.ManyToOneType.hydrate(ManyToOneType.java:95)
at org.hibernate.type.EntityType.nullSafeGet(EntityType.java:217)
at org.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:93)
at org.hibernate.impl.IteratorImpl.<init>(IteratorImpl.java:58)
at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:390)
... 28 more
Although the actual select statement that causes the exception appears to be the following:
Code:
select htask0_.id as col_0_0_ from PXE_TASK htask0_ where htask0_.id=?
I've checked the DB and run that statement from a DB client and it works fine (except that the table is empty). I've done up a short Java client which connects using the same JDBC driver to the DB and run that statement and it also works fine (just in case col_0_0_ was an invalid JDBC identifier or something), retrieving some dummy data I'd put into the table for the purposes of the test. So I'm at a loss now as to what this could be. Is this a known issue with MySQL or anything ?
hibernate.properties:
Code:
hibernate.hbm2ddl.auto=create
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost:3306/test
hibernate.connection.username=pxe
hibernate.connection.password=
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.query.substitutions=true 1, false 0
hibernate.show_sql=true
Any ideas ?
Daire Quinlan.