SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-355
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Shay Banon
Reporter: Jeff Glatz
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Compass

Compass does not work with Oracle 10g using C3P0DataSourceProvider

Created: 10/Jan/07 05:16 PM   Updated: 12/Jan/07 04:19 AM
Component/s: None
Affects Version/s: 1.1 RC1
Fix Version/s: None

Environment:
Compass 1.1 RC1
Spring 2.0
Hibernate 3.2.1
Oracle 10g


 Description  « Hide
the c3p0 connection pooling library generates a dynamic proxy for the ResultSet interface, which does not expose the getBLOB() method present on the oracle result set. this causes a NoSuchMethodException to be raised. stack trace below:

org.compass.gps.device.hibernate.HibernateGpsDeviceException: {hibernate}: Failed while creating [Customer[customerId='4e8e5da0ff11dba6a50007e909bfe7', customerType='P', custPriName='null', custStatus='null', custSource='null', custSourceId='null', custTaxExemptFlag=null, custAddressPriSeqNo=null, custPhonePriSeqNo=null, custEmailPriSeqNo=null, custOptInFlag='true', custPriNamePrefix='null', custPriNameFirst='FTest.FirstName', custPriNameMiddle='null', custPriNameLast='FTest.LastName', custPriNameSuffix='null', custSetupDate=java.util.GregorianCalendar[time=1138659970000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/Chicago",offset=-21600000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=America/Chicago,offset=-21600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2006,MONTH=0,WEEK_OF_YEAR=5,WEEK_OF_MONTH=5,DAY_OF_MONTH=30,DAY_OF_YEAR=30,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=5,AM_PM=1,HOUR=4,HOUR_OF_DAY=16,MINUTE=26,SECOND=10,MILLISECOND=0,ZONE_OFFSET=-21600000,DST_OFFSET=0], custTrainingFlag=null, custTaxExemptId='null', customerEmails=[CustomerEmail[customerId='4e8e5da0ff11dba6a50007e909bfe7', customerType='P', custEmailSeqNo=1, custEmailAddress='foo@bar.com', custEmailBounce=null, custEmailValid=null, custOptInFlag='true'], CustomerEmail[customerId='4e8e5da0ff11dba6a50007e909bfe7', customerType='P', custEmailSeqNo=2, custEmailAddress='foo@baz.com', custEmailBounce=null, custEmailValid=null, custOptInFlag='true']], customerTenders=[CustomerTender[customerId='4e8e5da0ff11dba6a50007e909bfe7', customerType='P', tenderAcctNo='ACCT-888888888', tenderType='TenderType', tenderStatus='A'], CustomerTender[customerId='4e8e5da0ff11dba6a50007e909bfe7', customerType='P', tenderAcctNo='ACCT-111111111', tenderType='TenderType', tenderStatus='A']], customerAddresses=[CustomerAddress[customerId='4e8e5da0ff11dba6a50007e909bfe7', customerType='P', custAddressSeqNo=1, custAddressType='null', custAddressStatus='A', custName='null', custAddress1='100 Anywhere Street', custAddress2='null', custAddress3='null', custCity='null', custCounty='null', custState='null', custZip='null', setupDate=java.util.GregorianCalendar[time=1138659970000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/Chicago",offset=-21600000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=America/Chicago,offset=-21600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2006,MONTH=0,WEEK_OF_YEAR=5,WEEK_OF_MONTH=5,DAY_OF_MONTH=30,DAY_OF_YEAR=30,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=5,AM_PM=1,HOUR=4,HOUR_OF_DAY=16,MINUTE=26,SECOND=10,MILLISECOND=0,ZONE_OFFSET=-21600000,DST_OFFSET=0], custNamePrefix='null', custNameFirst='FTest.FirstName', custNameMiddle='null', custNameLast='FTest.LastName', custNameSuffix='null', custAddressNote='null'], CustomerAddress[customerId='4e8e5da0ff11dba6a50007e909bfe7', customerType='P', custAddressSeqNo=2, custAddressType='null', custAddressStatus='A', custName='null', custAddress1='123 Anywhere Street', custAddress2='null', custAddress3='null', custCity='null', custCounty='null', custState='null', custZip='null', setupDate=java.util.GregorianCalendar[time=1138659970000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/Chicago",offset=-21600000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=America/Chicago,offset=-21600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2006,MONTH=0,WEEK_OF_YEAR=5,WEEK_OF_MONTH=5,DAY_OF_MONTH=30,DAY_OF_YEAR=30,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=5,AM_PM=1,HOUR=4,HOUR_OF_DAY=16,MINUTE=26,SECOND=10,MILLISECOND=0,ZONE_OFFSET=-21600000,DST_OFFSET=0], custNamePrefix='null', custNameFirst='FTest.FirstName', custNameMiddle='null', custNameLast='FTest.LastName', custNameSuffix='null', custAddressNote='null']], customerPhones=[CustomerPhone[customerId='4e8e5da0ff11dba6a50007e909bfe7', customerType='P', custPhoneSeqNo=1, custPhoneNoType='null', custPhoneNoDigits='(012) 345-6789', custPhoneNoExtn='null', custPhoneNoNote='null', custPhoneStatus='A'], CustomerPhone[customerId='4e8e5da0ff11dba6a50007e909bfe7', customerType='P', custPhoneSeqNo=2, custPhoneNoType='null', custPhoneNoDigits='(123) 456-7890', custPhoneNoExtn='null', custPhoneNoNote='null', custPhoneStatus='A']], customerIdentifiers=[CustomerIdentifier[customerId='4e8e5da0ff11dba6a50007e909bfe7', customerType='P', customerIdentifierType='DEMO', customerIdentifierValue='abc123', customerIdentifierStatus='A'], CustomerIdentifier[customerId='4e8e5da0ff11dba6a50007e909bfe7', customerType='P', customerIdentifierType='DEMO', customerIdentifierValue='abc123-321cba', customerIdentifierStatus='A']]]]; nested exception is org.compass.core.engine.SearchEngineException: Failed in first phase commit from sub-index [customer]; nested exception is org.apache.lucene.store.jdbc.JdbcStoreException: Failed to execute sql [select INDEX_VALUE as x from index_customer where INDEX_NAME = ? for update]; nested exception is java.lang.RuntimeException: Failed to getBLOB on [com.mchange.v2.c3p0.impl.NewProxyResultSet@99d56b]
org.compass.core.engine.SearchEngineException: Failed in first phase commit from sub-index [customer]; nested exception is org.apache.lucene.store.jdbc.JdbcStoreException: Failed to execute sql [select INDEX_VALUE as x from index_customer where INDEX_NAME = ? for update]; nested exception is java.lang.RuntimeException: Failed to getBLOB on [com.mchange.v2.c3p0.impl.NewProxyResultSet@99d56b]
org.apache.lucene.store.jdbc.JdbcStoreException: Failed to execute sql [select INDEX_VALUE as x from index_customer where INDEX_NAME = ? for update]; nested exception is java.lang.RuntimeException: Failed to getBLOB on [com.mchange.v2.c3p0.impl.NewProxyResultSet@99d56b]
java.lang.RuntimeException: Failed to getBLOB on [com.mchange.v2.c3p0.impl.NewProxyResultSet@99d56b]
at org.apache.lucene.store.jdbc.index.oracle.OracleIndexOutputHelper.getBlobOutputStream(OracleIndexOutputHelper.java:57)
at org.apache.lucene.store.jdbc.index.oracle.OracleRAMJdbcIndexOutput$2.execute(OracleRAMJdbcIndexOutput.java:46)
at org.apache.lucene.store.jdbc.support.JdbcTemplate.executeSelect(JdbcTemplate.java:108)
at org.apache.lucene.store.jdbc.index.oracle.OracleRAMJdbcIndexOutput.close(OracleRAMJdbcIndexOutput.java:35)
at org.apache.lucene.index.FieldInfos.write(FieldInfos.java:259)
at org.apache.lucene.index.SegmentMerger.mergeFields(SegmentMerger.java:176)
at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:88)
at org.apache.lucene.index.TransIndex.firstPhase(TransIndex.java:317)
at org.compass.core.lucene.engine.transaction.ReadCommittedTransaction$TransIndexManager.firstPhase(ReadCommittedTransaction.java:156)
at org.compass.core.lucene.engine.transaction.ReadCommittedTransaction.doPrepare(ReadCommittedTransaction.java:261)
at org.compass.core.lucene.engine.transaction.ReadCommittedTransaction.doCommit(ReadCommittedTransaction.java:267)
at org.compass.core.lucene.engine.transaction.AbstractTransaction.commit(AbstractTransaction.java:85)
at org.compass.core.lucene.engine.LuceneSearchEngine.commit(LuceneSearchEngine.java:244)
at org.compass.core.transaction.LocalTransaction.doCommit(LocalTransaction.java:93)
at org.compass.core.transaction.AbstractTransaction.commit(AbstractTransaction.java:38)
at org.compass.core.CompassTemplate.execute(CompassTemplate.java:135)
at org.compass.core.CompassTemplate.execute(CompassTemplate.java:117)
at org.compass.gps.impl.SingleCompassGps.executeForMirror(SingleCompassGps.java:160)
at org.compass.gps.device.hibernate.Hibernate3GpsDevice$Hibernate3GpsDevicePostInsert.onPostInsert(Hibernate3GpsDevice.java:172)
at org.hibernate.action.EntityInsertAction.postInsert(EntityInsertAction.java:123)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:102)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:558)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:540)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:510)
at com.containerstore.testcase.FunctionalTestCase.commitTransaction(FunctionalTestCase.java:60)
at com.containerstore.pos.domain.FTestCustomerHomeImpl.testSearch(FTestCustomerHomeImpl.java:735)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.containerstore.testcase.BaseTestCase.runTest(BaseTestCase.java:233)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: java.lang.NoSuchMethodException: com.mchange.v2.c3p0.impl.NewProxyResultSet.getBLOB(java.lang.String)
at java.lang.Class.getMethod(Class.java:986)
at org.compass.core.util.MethodInvoker.prepare(MethodInvoker.java:173)
at org.apache.lucene.store.jdbc.index.oracle.OracleIndexOutputHelper.getBlobOutputStream(OracleIndexOutputHelper.java:55)
... 55 more



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 12/Jan/07 04:19 AM
Currently, there is no support to add native extractor ofr ResultSets that get wrapped by different data sources wrappers (like c3p0).

Just as a quick fix, I see that you use Oracle10g, and when using the OracleDialect (and not the Oracle9Dialect), there is no need for the native oracle result set.