The column type is varchar and I believe it is set to MAX size at the moment. Could that be causing the problem? I honestly don't know that much about databases but my project doesn't have enough money to hire someone who does.
-Jason > -----Original Message----- > From: Amita Vadhavkar [mailto:[EMAIL PROTECTED] > Sent: Sunday, November 04, 2007 11:15 PM > To: [email protected] > Subject: Re: Different DB Drivers pulling information differently? > > What is the column type in database for LAST_NAME? If it is varchar, what > is > the length if any specified? > > Regards, > Amita > > On 11/3/07, Jason Clark <[EMAIL PROTECTED]> wrote: > > > > My Config. > > > > > > > > <ConnectionInfo> > > > > <ConnectionProperties > > > > driverClass="net.sourceforge.jtds.jdbc.Driver" > > > > databaseURL="jdbc:jtds:sqlserver://************/cr" > > > > userName="*****" > > > > password="*******" > > > > loginTimeout="600"/> > > > > </ConnectionInfo> > > > > > > > > <Command name="all contacts" SQL="select ID,LAST_NAME from CONTACTS" > > kind="Select"> > > > > <ResultDescriptor columnName="ID" tableName="CONTACTS" > > columnType="commonj.sdo.Int"/> > > > > <ResultDescriptor columnName="LAST_NAME" tableName="CONTACTS" > > columnType="commonj.sdo.String"/> > > > > </Command> > > > > > > > > <Table tableName="CONTACTS"> > > > > <Column columnName="ID" primaryKey="true" generated="true"/> > > > > </Table> > > > > > > > > > > > > With the JTDS driver, I get the following exception. > > > > > > > > Exception in thread "main" java.lang.ClassCastException: The value of > type > > 'class net.sourceforge.jtds.jdbc.ClobImpl' must be of type 'class > > java.lang.String' > > > > at > > > > > org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateS > in > > gleDataUnsettableStatic.validate(EStructuralFeatureImpl.java:2195) > > > > at > > > > > org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateS > in > > gleDataUnsettable.dynamicSet(EStructuralFeatureImpl.java:2116) > > > > at > > org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet( > > BasicEObjectImpl.jav > > a:709) > > > > at > > org.apache.tuscany.sdo.impl.DynamicDataObjectImpl.eDynamicSet > > (DynamicDataObj > > ectImpl.java:160) > > > > at org.apache.tuscany.sdo.impl.DataObjectImpl.eSet(DataObjectImpl.java > > :1459) > > > > at > > org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java > > :654) > > > > at > org.apache.tuscany.sdo.impl.DataObjectImpl.set(DataObjectImpl.java:142) > > > > at > > > > > org.apache.tuscany.das.rdb.graphbuilder.impl.DataObjectMaker.createAndAddD > at > > aObject(DataObjectMaker.java:90) > > > > at > > > > > org.apache.tuscany.das.rdb.graphbuilder.impl.ResultSetProcessor.addRowToGr > ap > > h(ResultSetProcessor.java:127) > > > > at > > > > > org.apache.tuscany.das.rdb.graphbuilder.impl.ResultSetProcessor.processRes > ul > > tSet(ResultSetProcessor.java:91) > > > > at > > > > > org.apache.tuscany.das.rdb.graphbuilder.impl.ResultSetProcessor.processRes > ul > > ts(ResultSetProcessor.java:77) > > > > at > > org.apache.tuscany.das.rdb.impl.ReadCommandImpl.buildGraph( > > ReadCommandImpl.j > > ava:309) > > > > at > > org.apache.tuscany.das.rdb.impl.ReadCommandImpl.executeQuery > > (ReadCommandImpl > > .java:277) > > > > at > > com.p21csi.cr.service.contact.ContactDASTest.getContacts( > > ContactDASTest.java > > :22) > > > > at > > com.p21csi.cr.service.contact.ContactDASTest.printContacts( > > ContactDASTest.ja > > va:28) > > > > at com.p21csi.cr.service.contact.ContactDASTest.main(ContactDASTest.java > > :41) > > > > > > > > But, with the MS Driver, I get no exception and it executes correctly? > > > > > > > > I'm not sure if this has anything to do with Tuscany and DAS directly, > but > > I > > was just wondering if anyone had any idea why this is happening? > > > > > > > > -Jason Clark > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
