You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Marco Rossi <mr...@gmail.com> on 2006/06/09 12:37:47 UTC

Problem SQL Maps with Oracle DbLink

Hi,

I have a problem to map a select with a Oracle  dblink. When a try to
execute my code I catch an unpredictable exception (ORA-01821), but if I
create a materialized view all works fine.
What's wrong?

Thanks in advance,

Marco

Re: Problem SQL Maps with Oracle DbLink

Posted by Marco Rossi <mr...@gmail.com>.
Diran,
thanks for your replay.
I tried with another Oracle Db version, and the code works. Probably it's an
Oracle problem.

Marco

On 6/9/06, Diran Ayandele <Ad...@sun.com> wrote:
>
> Marco, this isn't really an iBatis question.  You'd be better off
> posting it in an oracle forum.  Anyway, we select over dblinks using
> iBatis without problems.
> 1. Make a synonym in the schema you're using, just for clarity.
> 2. The actual error you're getting is for an unrecognized date format
> which tells me you need to specify date formats when passing dates to
> your query.  The default format is probably different in the remote
> database which might be why it works with the local view and not when
> you go to the tables themselves.  That is assuming your view is a local
> composite of local and remote tables.
>
> Diran
>
> Marco Rossi wrote:
>
> > Hi,
> >
> > I have a problem to map a select with a Oracle  dblink. When a try to
> > execute my code I catch an unpredictable exception (ORA-01821), but if
> > I create a materialized view all works fine.
> > What's wrong?
> >
> > Thanks in advance,
> >
> > Marco
> >
>

Re: Problem SQL Maps with Oracle DbLink

Posted by Diran Ayandele <Ad...@Sun.COM>.
Marco, this isn't really an iBatis question.  You'd be better off 
posting it in an oracle forum.  Anyway, we select over dblinks using 
iBatis without problems.
1. Make a synonym in the schema you're using, just for clarity.
2. The actual error you're getting is for an unrecognized date format 
which tells me you need to specify date formats when passing dates to 
your query.  The default format is probably different in the remote 
database which might be why it works with the local view and not when 
you go to the tables themselves.  That is assuming your view is a local 
composite of local and remote tables.

Diran

Marco Rossi wrote:

> Hi,
>
> I have a problem to map a select with a Oracle  dblink. When a try to 
> execute my code I catch an unpredictable exception (ORA-01821), but if 
> I create a materialized view all works fine.
> What's wrong?
>
> Thanks in advance,
>
> Marco
>