• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Web Service with PostgreSQL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Web Service with PostgreSQL


  • Subject: Re: Web Service with PostgreSQL
  • From: "Daniele Corti" <email@hidden>
  • Date: Tue, 9 Oct 2007 11:26:13 +0200



2007/10/9, Luigi Giannini <email@hidden>:
Thanks Lachlan and Daniele!
Now I have learned the lesson about JDBC and plugIn ...
But I need again some help.
With the right JDBC+plugIn I have my sample web service running on
PostgreSQL: but still remain the strange search behavoir from the
strating point:
If I create an operation with a like or caseIsensitiveLike operator
the web service returns nothing (without error) while searching a part
of a string or returns the right record from DB while searching the
exact string (seem that work like a = operator) !!!
Moreover I have many data non traslated from java class that represent
the DB data:

({
  (this=EOKeyGlobalID[Patient (java.lang.Integer)2]),
  (patSex = < com.webobjects.foundation.NSKeyValueCoding$Null>),
  (patient = <com.webobjects.foundation.NSKeyValueCoding$Null>),
  (gpspss = {
)
  }),
  (updatedTime = 2007-03-22 08:34:16 Etc/GMT),
  (gpppss = {
)
  }),
  (patBirthdate = 1985-03-14 23:00:00 Etc/GMT),
  (mppss = {
)
  }),
  (patName = TOURNEVIX^^^^),
  (studys = {
)
  }),
  (patIName = <com.webobjects.foundation.NSKeyValueCoding$Null >),
  (patients = {
)
  }),
  (createdTime = 2007-03-22 08:33:37 Etc/GMT),
  (patIdIssuer = <com.webobjects.foundation.NSKeyValueCoding$Null>),
  (patPName = <com.webobjects.foundation.NSKeyValueCoding$Null >),
  (mwlItems = {
)
  }),
  (patId = fDCztT),
  (patAttrs = <com.webobjects.foundation.NSKeyValueCoding$Null>
  })

What I miss?
Where's the next lesson I must learn?
Can someone help me?

Luigi

P.S. I have installed and run mySQL, recreate the same DB from PG to
mySQL but after modeling the DB and create the web service I have the
same behaviour: this should mean that the problem is not PostgreSQL
but some my bad DB modelling ...!?!?

If it fails in two databases at the same point it must be a Modeling problem or a Code problem (an incorrect model or an incorrect generation of qualifiers). You should check you model first, then have a look to the SQL the app invoke, this could help you understand the problem

2007/10/3, Lachlan Deck <email@hidden >:
> On 02/10/2007, at 6:29 PM, Luigi Giannini wrote:
>
> > 2007/10/2, Lachlan Deck <email@hidden>:
> >> Are you using any of the WO PostgresqlPlugIn/s or however they're
> >> named?
>
> (Best to keep this on the mailing list...)
>
> > I read on Apple WO docs that any JDBC driver is a good PlugIn. Isn't?
> > I downloaded from PostgreSQL site
> > (http://jdbc.postgresql.org/download.html) the latest JDBC driver
> > (8.2-506 JDBC 3) for Java 1.5 platform and for PostgreSQL v. 8.2
>
> That's fine. You'll definitely need that. But what I was referring to
> was the plugin for WO.
>
> You'll need to take a look at one of the following:
> - http://wiki.objectstyle.org/confluence/display/WO/Project+WONDER-
> Frameworks-PostgresqlPlugin
>   Note: if you're using WOLips you'll not need the EOModelerBundle
>
> - http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-
> Database+Adaptors+and+Plugins
>   Note: this is older docs. I'd use the Wonder one.
>
> Any further questions about that can also be directed to the wonder
> mailing list. http://wonder.sourceforge.net/index.php
>
>
> >> On 02/10/2007, at 1:06 AM, Luigi Giannini wrote:
> >>
> >>> Hi to everyone!
> >>> I'm a newbie to webobjects. I'm starting modeling a DB on PostgreSQL
> >>> then try to create a web service (via Xcode preconfigured template).
> >>> If I create an operation with an = operator it runs. But if I create
> >>> an operation with a like or
> >>> caseIsensitiveLike operator it fails with this error:
> >>>
> >>> Exception:
> >>> com.webobjects.foundation.NSForwardException
> >>> [org.apache.axis.AxisFault] java.lang.IllegalArgumentException:
> >>> com.webobjects.jdbcadaptor.JDBCAdaptorException: EvaluateExpression
> >>> failed: <com.webobjects.jdbcadaptor.JDBCExpression : "SELECT
> >>> t0.pat_attrs, t0.pat_id, t0.pat_id_issuer, t0.pat_name, t0.pk,
> >>> t0.priv_type FROM public.priv_patient t0 WHERE UPPER(t0.pat_name)
> >>> LIKE
> >>> UPPER(?) ESCAPE '\'" withBindings: 1:"ANTONACCIO"(patName)>:
> >>>    Next exception:SQL State:42601 -- error code: 0 -- msg: ERROR:
> >>> unterminated quoted string at or near "'\'": Exception trying to
> >>> invoke operation: searchPrivPatient
> >>>
> >>> I read that the problem is the generated SQL and I think that a
> >>> suggestion made by Guido Neitzer on a similar topic on August
> >>> (turning
> >>> off the variable binding) can help solve this problem but I don't
> >>> know
> >>> where add this setting:
> >>>
> >>> Guido Neitzer < email@hidden>:
> >>>> ... , it seems you use the PostgreSQL plugin - so, if that is okay
> >>>> for you, you can try turning on off the variable binding with:
> >>>>
> >>>> com.webobjects.jdbcadaptor.PostgresqlExpression.disableBindVariable
> >>>> s
> >>>> = true
> >>>
> >>> Or there's others thing to monitor and fix?
> >>>
> >>> Can someone help me ?
> >>> A suggestion?
> >>> A tip?
> >>>
> >>> Thanks in advance !
>
>
> with regards,
> --
>
> Lachlan Deck
>
>
>
>


--
Luigi Giannini
_____________________
email@hidden
Tel. 328.1161861
Fax 0883.1950191
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (

This email sent to email@hidden



--
Daniele Corti
AIM: S0CR4TE5
Messenger: email@hidden

--
Computers are like air conditioners -- they stop working properly if you open
WINDOWS

--
What about the four lusers of the apocalypse? I nominate:
"advertising", "can't log in", "power switch" and "what backup?"
--Alistair Young
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Web Service with PostgreSQL (From: "Luigi Giannini" <email@hidden>)
 >Re: Web Service with PostgreSQL (From: Lachlan Deck <email@hidden>)
 >Re: Web Service with PostgreSQL (From: Lachlan Deck <email@hidden>)
 >Re: Web Service with PostgreSQL (From: "Luigi Giannini" <email@hidden>)

  • Prev by Date: Re: Web Service with PostgreSQL
  • Next by Date: Re: Web Services, Flex and RPC Fault from complex types
  • Previous by thread: Re: Web Service with PostgreSQL
  • Next by thread: Re: Improve Upload speed...
  • Index(es):
    • Date
    • Thread