Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: WEIRD java/stored procedure behavior

Re: WEIRD java/stored procedure behavior

From: C. Ferguson <c_ferguson_at_rationalconcepts.com>
Date: 2000/03/29
Message-ID: <38E174BC.CF0FA2EF@rationalconcepts.com>#1/1

Sorry for jumping into this so late, but 1) is the java program connecting as the same user that you enter sqlplus? 2) do you have only one stored procedure by that name in that schema and either one or the other is not accessing a procedure by that name via a synonym?

Yes, these may seem like very silly questions but you are having anomalistic behavior out of one stored procedure...

and lastly, could you publish the code to your stored procedure?

regards,
cindy

Joseph Weinstein wrote:

> kal121_at_my-deja.com wrote:
>
> > Thanks - unfortunately id didn't have any effect setting autocommit to
> > false. Any other ideas???
>
> Not from me, I'm all out. You might try posting to comp.lang.java.databases
> as the group that will have the most concentration of JDBC/Oracle users.
> Good luck,
> Joe
>
> >
> >
> > In article <38E11E59.91F7BFB4_at_weblogic.com>,
> > Joseph Weinstein <joe_at_weblogic.com> wrote:
> > > Hi. It may have to do with the fact that JDBC connecitons run, by
 default,
> > > in autoCommit(true) mode. If you haven't, try setting your connection
 to
> > > autoCommit(false), then executing, then normally your JDBC code should
> > > also call commit(), but if you have the procedure doing it, then it
 may not
> > > be needed. Putting the commit in the procedure will be at odds with
> > > generic JDBC, but if you set autoCommit(false), then do what you
 normally
> > > do in SQL-PLUS, it should act the same. (SQL-PLUS runs in the
 equivalent
> > > of autoCommit(false)).
> > >
> > > Joe Weinstein at BEA, the home of WebLogic
> > >
> > > kal121_at_my-deja.com wrote:
> > >
> > > > Hello,
> > > >
> > > > I have an Oracle stored procedure that selects some fields into some
> > > > OUT variables. Then, after it selects into the OUT variables, I
 perform
> > > > an UPDATE on a certain field, then COMMIT, and that's it.
> > > >
> > > > When I run the procedure from within SQLPlus, the stored procedure
> > > > works fine - that is, it selects the OUT parameters, performs the
> > > > update, then commits. However, when I call the EXACT SAME stored
> > > > procedure from a java program, it does ONLY the select, but it never
> > > > performs the update or commit.
> > > >
> > > > Does anybody know why this is?
> > > >
> > > > Thanks
> > > >
> > > > Sent via Deja.com http://www.deja.com/
> > > > Before you buy.
> > >
> > > --
> > >
> > > PS: Folks: BEA WebLogic is in S.F., and now has some entry-level
 positions for
> > > people who want to work with Java and E-Commerce infrastructure
 products. Send
> > > resumes to joe_at_beasys.com
> > > ----------------------------------------------------------------------



> > > The Weblogic Application Server from BEA
> > > JavaWorld Editor's Choice Award: Best Web Application Server
> > > Java Developer's Journal Editor's Choice Award: Best Web Application
 Server
> > > Crossroads A-List Award: Rapid Application Development Tools for Java
> > > Intelligent Enterprise RealWare: Best Application Using a Component
 Architecture
> > > http://weblogic.beasys.com/press/awards/index.htm
> > >
> > >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> --
>
> PS: Folks: BEA WebLogic is in S.F., and now has some entry-level positions for
> people who want to work with Java and E-Commerce infrastructure products. Send
> resumes to joe_at_beasys.com
> --------------------------------------------------------------------------------
> The Weblogic Application Server from BEA
> JavaWorld Editor's Choice Award: Best Web Application Server
> Java Developer's Journal Editor's Choice Award: Best Web Application Server
> Crossroads A-List Award: Rapid Application Development Tools for Java
> Intelligent Enterprise RealWare: Best Application Using a Component Architecture
> http://weblogic.beasys.com/press/awards/index.htm
Received on Wed Mar 29 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US