It does have a Primary Key. That was the first problem we had, so we updated the database. It works now, but only if we specify ResultDescriptors.
-Jason This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender immediately and delete this e-mail from you system. This message may contain company proprietary, sensitive information and is intended only for the individual named. Its contents may be covered under the Trade Secret Act of various jurisdictions. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. > -----Original Message----- > From: Amita Vadhavkar [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 30, 2007 7:47 PM > To: [email protected] > Subject: Re: DAS configuration must specify ResultDescriptors > > Also, please see if the table can have a logical Primary Key. DAS can > identify unique DB records and thus unique Data Objects > only based on Primary Key. One can be specified in the DAS Config <Table> > section. If it is not specified but the table has a column > id (ignore case), it is considered as PK by some basic convention that DAS > follows. Without a PK (either from table column name > as ID or from DAS config), DAS query will not be able to give correct > results and will throw exception about missing PK. > > Regards, > Amita > > On 10/31/07, Luciano Resende <[EMAIL PROTECTED]> wrote: > > > > There are some databases that does not return metadata information, > > and DAS need that to build the result SDO Graph.More info on > > ResultDescriptor here [1]. > > > > What database are you using ? > > > > [1] > > http://incubator.apache.org/tuscany/explicit-resultset-shape- > definition.html > > > > On 10/30/07, Jason Clark <[EMAIL PROTECTED]> wrote: > > > I'm getting the following exception when trying to implement simple > DAS > > CRUD > > > operations. > > > > > > Exception in thread "main" java.lang.RuntimeException: Unable to > obtain > > > table information from JDBC. DAS configuration must specify > > > ResultDescriptors > > > at > > > org.apache.tuscany.das.rdb.graphbuilder.impl.ResultMetadata > > .<init>(ResultMet > > > adata.java:81) > > > at > > > org.apache.tuscany.das.rdb.graphbuilder.impl.GraphBuilderMetadata > > .<init>(Gra > > > phBuilderMetadata.java:69) > > > at > > > org.apache.tuscany.das.rdb.impl.ReadCommandImpl.buildGraph( > > ReadCommandImpl.j > > > ava:295) > > > at > > > org.apache.tuscany.das.rdb.impl.ReadCommandImpl.executeQuery > > (ReadCommandImpl > > > .java:277) > > > at ContactDASTest.getContacts(ContactDASTest.java:22) > > > at ContactDASTest.printContacts(ContactDASTest.java:28) > > > at ContactDASTest.main(ContactDASTest.java:41) > > > > > > > > > > > > Given the following config. I tried following the Company example and > > their > > > config. > > > > > > I'm unsure what a ResultDescriptor is and why I would need one, but > the > > > Company example does not. > > > > > > As a side note, my table is all strings stored in nvarchar columns. Is > > that > > > part of the issue? > > > > > > It also does not have a primary key at the moment, but I'm not sure > why > > that > > > would be a problem. > > > > > > > > > <Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd"> > > > > > > <!--ConnectionInfo dataSource="java:comp/env/jdbc/dastest"/--> > > > > > > <ConnectionInfo> > > > <ConnectionProperties > > > > > > driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver" > > > > databaseURL="jdbc:sqlserver://*;databasename=*" > > > userName="*" > > > password="*" > > > loginTimeout="600"/> > > > </ConnectionInfo> > > > > > > <Command name="all contacts" SQL="select * from CONTACTS" > > > kind="Select"/> > > > > > > <Table tableName="CONTACTS"> > > > > > > </Table> > > > > > > </Config> > > > > > > > > > -Jason Clark > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > Luciano Resende > > Apache Tuscany Committer > > http://people.apache.org/~lresende > > http://lresende.blogspot.com/ > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
