Hi Enric

  I was chatting with Amita about this problem, and she found that
this might be a problem on our code, I  have applied a fix for the
issue to trunk under revision #554549. Please let us know if that
helps.

On 7/6/07, Enric Staromiejski Torregrosa <[EMAIL PROTECTED]> wrote:
BTW, did you solve this problem with Oracle? We optionally are allowed to
use Oracle instead of PostgreSQL...

Regards


2007/7/5, Luciano Resende <[EMAIL PROTECTED]>:
>
> This might be the same issue we have with the Oracle JDBC drive, could
> you try specifying the resultset shape definition in the das config as
> described in this user's guide link [1] and see if this make you go
> further ?
>
> [1]
> 
http://cwiki.apache.org/confluence/display/TUSCANY/Explicit+ResultSet+shape+definition
>
> On 7/5/07, Enric Staromiejski Torregrosa <[EMAIL PROTECTED]>
> wrote:
> > Luciano,
> >
> > when configuring the Customer sample against mysql everything goes fine.
> The
> > PostgreSQL connection and table creation also works fine, but the SELECT
> > sentence reports back the following exception:
> >
> > Exception in thread "main" *java.lang.RuntimeException*: *
> > org.postgresql.util.PSQLException*: Returning autogenerated keys is not
> > supported.
> >
> > at org.apache.tuscany.das.rdb.impl.ReadCommandImpl.executeQuery(*
> > ReadCommandImpl.java:65*)
> >
> > at org.apache.tuscany.samples.das.customer.CustomerClient.getCustomers(*
> > CustomerClient.java:168*)
> >
> > at org.apache.tuscany.samples.das.customer.CustomerClient.main(*
> > CustomerClient.java:131*)
> >
> > Caused by: *org.postgresql.util.PSQLException*: Returning autogenerated
> keys
> > is not supported.
> >
> > at org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement(*
> > AbstractJdbc3Connection.java:352*)
> >
> > at org.apache.tuscany.das.rdb.impl.ConnectionImpl.prepareStatement(*
> > ConnectionImpl.java:97*)
> >
> > at org.apache.tuscany.das.rdb.impl.Statement.getPreparedStatement(*
> > Statement.java:198*)
> >
> > at org.apache.tuscany.das.rdb.impl.Statement.executeQuery(*
> Statement.java:52
> > *)
> >
> > at org.apache.tuscany.das.rdb.impl.ReadCommandImpl.executeQuery(*
> > ReadCommandImpl.java:61*)
> >
> > Regards,
> > Enric
> >
> > 2007/7/5, Luciano Resende <[EMAIL PROTECTED]>:
> > >
> > > Yes, the typical one should work. I particularly haven't tried with
> > > PostgreSQL, but I don't anticipate any issues, you might have to
> > > manually create the databases, or maybe tweak the database generation
> > > classes under o.a.t.samples.das.databaseSetup.
> > >
> > > Once you make it working, and if you want, you could share your
> > > updates so we can make it easier for others that want to use the
> > > sample with PostgreSQL. I'll be more then happy to review and submit
> > > it to trunk.
> > >
> > > On 7/5/07, Enric Staromiejski Torregrosa <[EMAIL PROTECTED]>
> > > wrote:
> > > > by the way, the database engine i'll have to use is PostgreSQL 8.1,
> but
> > > the
> > > > configuration has to be a typicall one, isn't it, something like:
> > > >
> > > >  <ConnectionInfo>
> > > >                <ConnectionProperties
> > > >                        driverClass="org.postgresql.Driver"
> > > >                        databaseURL="jdbc:postgresql:databasename"
> > > >                        user="enric"
> > > >                        password="mypassword"
> > > >                        loginTimeout="600000">
> > > >                </ConnectionProperties>
> > > >        </ConnectionInfo>
> > > >
> > > >
> > > > 2007/7/5, Enric Staromiejski Torregrosa <[EMAIL PROTECTED]
> >:
> > > > >
> > > > > i imagined...but even if i get driverClass accepted, "Feature
> user" is
> > > > > not....
> > > > >
> > > > > i'm really impressed and happy with your presence and
> > > collaboration...it's
> > > > > greatly encouraging to a newby ;)
> > > > >
> > > > >
> > > > > Enric
> > > > >
> > > > >  2007/7/5, Luciano Resende <[EMAIL PROTECTED]>:
> > > > > >
> > > > > > The XSD is available here [1]. I would need to give it a try
> using
> > > > > > MySQL, but giving it a quick look on the DAS config files, looks
> > > like
> > > > > > connection info other then the derby one hasn't been updated
> > > recently,
> > > > > > and you would need to make some small modifications to it.
> > > > > >
> > > > > >        <ConnectionInfo>
> > > > > >                <ConnectionProperties
> > > > > >                        driverClass="
> > > > > > com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
> > > > > >                        databaseURL="java:comp/env/jdbc/dastest"
> > > > > >                        user="root"
> > > > > >                        password="yourpassword"
> > > > > >                        loginTimeout="600000">
> > > > > >                </ConnectionProperties>
> > > > > >        </ConnectionInfo>
> > > > > >
> > > > > >
> > > > > >
> > > > > > [1]
> > > > > >
> > >
> 
https://svn.apache.org/repos/asf/incubator/tuscany/java/das/rdb/src/main/resources/config.xsd
> > > > > >
> > > > > > On 7/5/07, Enric Staromiejski Torregrosa <
> > > [EMAIL PROTECTED] >
> > > > > > wrote:
> > > > > > > Yeah, but the path seems hard, hard.
> > > > > > >
> > > > > > > I just discovered the problem is not related with the code,
> but
> > > with
> > > > > > the
> > > > > > > fact that i was trying to use another connection distinct to
> the
> > > derby
> > > > > > one.
> > > > > > > I'm working with the default Customer sample code Tuscany is
> > > > > > distributing.
> > > > > > > When using the derby connection configuration everything goes
> > > well,
> > > > > > but when
> > > > > > > uncommenting the Mysql ConnectionInfo configuration and
> commenting
> > > the
> > > > > > derby
> > > > > > > one i'm still getting errors like the one i paste below. I
> imagine
> > > > > > people
> > > > > > > are using other databases apart from derby, aren't they? and
> if
> > > so,
> > > > > > where's
> > > > > > > the problem? btw, where can i get the xsd for this xml? (the
> url
> > > in
> > > > > > the
> > > > > > > namespace returns a 'not found page').
> > > > > > >
> > > > > > > Caused by: *
> > > > > > org.eclipse.emf.ecore.resource.Resource$IOWrappedException*:
> > > > > > > Feature 'contextAvailable' not found. ( http:///temp.xml, 46,
> 30)
> > > > > > >
> > > > > > > at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(*
> > > > > > XMLLoadImpl.java
> > > > > > > :80*)
> > > > > > >
> > > > > > > at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(*
> > > XMLLoadImpl.java:275*)
> > > > > > >
> > > > > > > at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(*
> > > > > > > XMLResourceImpl.java:666*)
> > > > > > >
> > > > > > > at
> org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad
> > > (*
> > > > > > > SDOXMLResourceImpl.java :465*)
> > > > > > >
> > > > > > > at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(*
> > > > > > XMLResourceImpl.java
> > > > > > > :634*)
> > > > > > >
> > > > > > > at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(*
> > > > > > XMLDocumentImpl.java
> > > > > > > :239*)
> > > > > > >
> > > > > > > at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(*
> > > > > > XMLDocumentImpl.java
> > > > > > > :217*)
> > > > > > >
> > > > > > > at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(*
> > > > > > XMLHelperImpl.java:78*)
> > > > > > >
> > > > > > > at org.apache.tuscany.sdo.helper.XMLHelperImpl.load (*
> > > > > > XMLHelperImpl.java:72*)
> > > > > > >
> > > > > > > at org.apache.tuscany.das.rdb.util.ConfigUtil.loadConfig(*
> > > > > > ConfigUtil.java:52
> > > > > > > *)
> > > > > > >
> > > > > > >
> > > > > > > 2007/7/5, Luciano Resende < [EMAIL PROTECTED]>:
> > > > > > > >
> > > > > > > > Great news Enric
> > > > > > > >
> > > > > > > > Just FYI, I think this was fixed by TUSCANY-1401 [1]
> > > > > > > >
> > > > > > > > [1] https://issues.apache.org/jira/browse/TUSCANY-1401
> > > > > > > >
> > > > > > > > On 7/5/07, Enric Staromiejski Torregrosa <
> > > > > > [EMAIL PROTECTED]>
> > > > > > > > wrote:
> > > > > > > > > The problem i reported in the mail below does not occur
> any
> > > more
> > > > > > with
> > > > > > > > the
> > > > > > > > > new "tuscany-das-1.0-incubating-beta1" binary version.
> > > > > > > > >
> > > > > > > > > Thks to all.
> > > > > > > > > Enric
> > > > > > > > >
> > > > > > > > > ---------- Forwarded message ----------
> > > > > > > > > From: Enric Staromiejski Torregrosa <
> > > [EMAIL PROTECTED] >
> > > > > > > > > Date: 02-jul-2007 20:06
> > > > > > > > > Subject: Trying to get started
> > > > > > > > > To: tuscany-user@ws.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > i'm trying to load a sample configuration file (from the
> > > samples
> > > > > > > > distributed
> > > > > > > > > by tuscany) like this:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Config config =
> > > > > > > > > ConfigUtil.*loadConfig*(t.getClass
> > > > > > > > ().getClassLoader().getResourceAsStream(configFile));
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > where t is an instance of the current class, but I'm get
> the
> > > > > > following
> > > > > > > > > error:
> > > > > > > > >
> > > > > > > > > Exception in thread "main"
> > > > > > > > > *java.lang.RuntimeException*: *
> > > > > > > > > org.eclipse.emf.ecore.resource.Resource$IOWrappedException*:
> > > > > > Feature
> > > > > > > > > 'ConnectionInfo' not found. (http:///temp.xml, 22, 20)
> > > > > > > > >
> > > > > > > > > at org.apache.tuscany.das.rdb.util.ConfigUtil.loadConfig(
> > > > > > > > > *ConfigUtil.java:54*)
> > > > > > > > >
> > > > > > > > > at _test.CATest.main(
> > > > > > > > > *CATest.java:48*)
> > > > > > > > >
> > > > > > > > > Caused by:
> > > > > > > > > *
> > > org.eclipse.emf.ecore.resource.Resource$IOWrappedException*:Feature
> > > > > > > > > 'ConnectionInfo' not found. ( http:///temp.xml, 22, 20)
> > > > > > > > >
> > > > > > > > > at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors
> (
> > > > > > > > > *XMLLoadImpl.java:80*)
> > > > > > > > >
> > > > > > > > > at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(
> > > > > > > > > *XMLLoadImpl.java:274*)
> > > > > > > > >
> > > > > > > > > at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad (
> > > > > > > > > *XMLResourceImpl.java:666*)
> > > > > > > > >
> > > > > > > > > at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(
> > > > > > > > > *XMLResourceImpl.java:634*)
> > > > > > > > >
> > > > > > > > > at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(
> > > > > > > > > *XMLDocumentImpl.java:238*)
> > > > > > > > >
> > > > > > > > > at org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(
> > > > > > > > > *XMLDocumentImpl.java :216*)
> > > > > > > > >
> > > > > > > > > at org.apache.tuscany.sdo.helper.XMLHelperImpl.load(
> > > > > > > > > *XMLHelperImpl.java:75*)
> > > > > > > > >
> > > > > > > > > at org.apache.tuscany.sdo.helper.XMLHelperImpl.load (
> > > > > > > > > *XMLHelperImpl.java:69*)
> > > > > > > > >
> > > > > > > > > at org.apache.tuscany.das.rdb.util.ConfigUtil.loadConfig(
> > > > > > > > > *ConfigUtil.java:52*)
> > > > > > > > >
> > > > > > > > > ... 1 more
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > 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]
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > 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]
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> > >
> > > --
> > > 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]
> > >
> > >
> >
>
>
> --
> 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]
>
>



--
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]

Reply via email to