On Mon, Aug 08, 2005 at 07:46:51PM +0200, Niels Beekman wrote:
> Read carefully, my second sample uses the list directly:
>
> > When passing the list directly as argument use:
> >
> >
> > #[]#
> >
what's wrong here:
SELECT rule_id,
name, description FROM rule
#some
Hi,
I use the oscache with my data queries and am wondering if there is anyway I
can force flush the cache before the timeout period.?
I notice some undocumented code:
.flushDataCache() for cache model
But not sure how I can use this?
Anyone have any pointers??
thx.
Steve.
Hi all
I have a question about the connection pool.
Out Setup looks like this:
What does the Pool.MaximumActiveConnections property mean?
Are there 15 active Connections in the Pool an every query performed
uses one of these conne
Hi,
I have a question regarding the use of stored procedures (in particular
Sybase) with SQLMaps.
Having looked at the documentation I am still unsure as the documentation,
unless I have missed it, doesnt deal with getting results back from
the proc.
I wish to call a Sybase stored procedure, pass
Use a resultMap or resultClass as you would do for a normal query.
They have missed mention of procedures returning values in their documentation.
Your mapping would look like:
{call language_lookup @from_text = ?, @language = ?}
The call remains the same. i.e., {c
It's true: Without a resultMap or resultClass, your results will be
silently discarded.
Larry
On 8/9/05, Priyesh Mashelkar <[EMAIL PROTECTED]> wrote:
> Use a resultMap or resultClass as you would do for a normal query.
> They have missed mention of procedures returning values in their
> documen
Is there any way to get the some key value (for example, current sequence ID
in postgres gf get_last_insert_id() in MySQL) after the record was inserted in
the database?
--
Eugene N Dzhurinsky
The cause of the "Content is not allowed in prolog" error we had on AIX
turned out to be a bad application properties file on that box. The
property specifying the location of the sql mapping config file got run
together with a comment line above it. My theory is that when the
property value was
You defined a parameter-class list, this is java.util.List, then you
iterate over 'something' which does not exist. If you pass a single
parameter (like you do now) do not use the attribute 'property' of the
iterate-tag:
SELECT rule_id,
name, description FROM rule
#[]#
On Tue, Aug 09, 2005 at 02:27:38PM +0200, Niels Beekman wrote:
> You defined a parameter-class list, this is java.util.List, then you
> iterate over 'something' which does not exist. If you pass a single
> parameter (like you do now) do not use the attribute 'property' of the
> iterate-tag:
>
>
We cheat. In our insert method we manually get the next id from the
sequence, assign that value to a property of the object being inserted,
and then do the insert.
-Original Message-
From: Eugeny N Dzhurinsky [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 09, 2005 7:20 AM
To: user-java@
#[]# is not valid ibatis token, there can't be property of empty name and
when you address bean in a global manner (whole bean) you write "value"
Michal Malecki
> On Tue, Aug 09, 2005 at 02:27:38PM +0200, Niels Beekman wrote:
> > You defined a parameter-class list, this is java.util.List, then yo
On Tue, Aug 09, 2005 at 07:37:56AM -0500, Mitchell, Steven C wrote:
> We cheat. In our insert method we manually get the next id from the
> sequence, assign that value to a property of the object being inserted,
> and then do the insert.
Seems i will be forced to use last_insert_id...
Ok.
--
Eu
That's weird, the iBATIS JUnit-tests use this construction numerous
times and yet do not fail. That's why I assumed it should work, I do not
use it myself...
Niels
-Original Message-
From: Michal Malecki [mailto:[EMAIL PROTECTED]
Sent: dinsdag 9 augustus 2005 14:42
To: user-java@ibatis.a
On Tue, Aug 09, 2005 at 02:47:04PM +0200, Niels Beekman wrote:
> That's weird, the iBATIS JUnit-tests use this construction numerous
> times and yet do not fail. That's why I assumed it should work, I do not
> use it myself...
Very nice =)))
Unit tests are testing something which is not legal, an
Thanks for the info guys, but it doesnt seem to have solved the problem.
I updated my procedure to :
{call language_lookup @from_text = ?, @language = ?}
Now I get the following stack trace:
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred
Hi Andrew,
Have you tried using JDBC syntax?
Look at this:
http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+call+a+stored+procedure%3F
Cheers,
Daniel Silva.
On 8/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Thanks for the info guys, but it doesnt seem to have solv
Sorry, I gave you wrong info.
Use {call language_lookup (?, ?)} .
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 09, 2005 6:25 PM
To: user-java@ibatis.apache.org
Subject: Re: SQLMaps - Sybase and stored procedures
Thanks for the i
I'm afraid that neither
{call language_lookup (?, ?)}
nor
{call language_lookup @from_text, @language}
seems to make any difference.
As long as I add the 'resultClass' or 'resultMap' attribute to the
tag I get a Null Pointer Exception.
If I miss out these attributes from the tag, t
Thanks.
I have tried both regular jdbc and sybase jdbc calls i.e.
sybase --> {call client_reporting..CLT_language_lookup_q1 @from_text=?,
@language=? }
jdbc --> {call client_reporting..CLT_language_lookup_q1 (?,?) }
Both attempts failed with the same sql exception (see previous thread
entry).
Have you tried using a plain JDBC connection and running the procedure using it.
Use execute and get resultset from the callablestatement used for executing the
procedure.
If the resultset returned is null, I am afraid we are sailing in the same
boat. Only difference is i am selecting data from
I hope the '..' in client_reporting..CLT_language_lookup_q1 is not the problem
here!!!
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 09, 2005 7:08 PM
To: user-java@ibatis.apache.org
Subject: Re: SQLMaps - Sybase and stored procedures
Thanks.
If you mean just use regular jdbc and callable statements, I have tried
that and it runs fine:
(from original post)
CallableStatement cstmt = conn.prepareCall("{call language_lookup
@from_text = 'Computers', @language = 'FRE'}");
ResultSet rs = cstmt.executeQuery();
rs.next();
String output = (S
Ah, this may a red herring.
I was trying a similar stored proc on a seperate database.
I will take the '..' out and try again though.
andy
Here is my solution fo MS SQL Server. I think Sybase is a copy of MS SQL
Server:
in the ibatis map file:
{call $m_name$(?) }
in the dao class:
Map map_param = new HashMap(2);
map_param.put("m_name", sequence_name);
getSqlMapClientTemplate().insert(
"my_seq_nex
Perhaps you can try getting rid of this or increasing the value because I
think this means that a connection should be re-created if it hasn't been
requested for more than a second.
I could be wrong but try giving it a shot.
- Original Message -
From: "Ron Kirchheimer" <[EMAIL
Hi Andrew,
I am wrong or is everybody nothing looking at the definition of the procedure.
You have not defined the OUT Parameter for this procedure. How are you going
to get the result
from the procedure.
Thanks
Prashanth.
--- [EMAIL PROTECTED] wrote:
> Thanks.
>
> I have tried both regula
Have a look at in
http://prdownloads.sourceforge.net/ibatisnet/DevGuide.pdf?download
Koka
Hi,
Sorry for that horrible english. I did not read before i pressed the send
button.
I meant nobody is looking at the definition of the prodecure in the sqlmaps.
Rgds
Prashanth.
--- Prashanth Sukumaran <[EMAIL PROTECTED]> wrote:
> Hi Andrew,
>
> I am wrong or is everybody nothing looking
On Tue, Aug 09, 2005 at 04:57:01PM +0300, Koka wrote:
> Have a look at in
> http://prdownloads.sourceforge.net/ibatisnet/DevGuide.pdf?download
Cool!
thanks!
--
Eugene N Dzhurinsky
Voila, You are doing a executeQuery(), while iBATIS uses execute() and
getResultSet().
Try with the later combination.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 09, 2005 7:20 PM
To: user-java@ibatis.apache.org
Subject: RE: SQLMaps - Sybase
Title: Stored procedures returning resultset
I am using ibatis with oracle and executing a within sqlmap to retrieve a REF CURSOR. Since ibatis does not handle REF CURSOR directly, I have to use a custom handler and custom java code to map each column name to a java attribute. In other word
This may be an issue.
How would I define this.
Would it be in one of the maps (parameterMap or resultMap), or would it be
added to the procedure tag?
thanks,
andy
Can not you modify procedure yo use OUT parameters? Kind of
{call language_lookup @from_text = ?, @language = ?, @to_text = ?}
Koka
On 8/9/05, Priyesh Mashelkar <[EMAIL PROTECTED]> wrote:
> Voila, You are doing a executeQuery(), while iBATIS uses execute() and
> get
Hi there.
I can only see queryForList() and queryForObject() in the API docs.
How do you force an executeQuery() instead of the execute()/getResultset()
option?
andy
You got me wrong.
I did not mean using iBATIS but rather plain JDBC.
By the way, try Koka's solution. It will work.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 09, 2005 7:37 PM
To: user-java@ibatis.apache.org
Subject: RE: SQLMaps - Sybase and
Well, it may be reasonable to avoid ref_cursors at all as it is oracle
specific. So in your procedure you can just insert data you want to
return to some temp table and then just run select. I have been using
that appoach in the old days when I had to use ADO (thank God that
days have gone :) ) an
make the modifications and still getting:
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in sqlmap/TestSqlMap.xml.
--- The error occurred while applying a parameter map.
--- Check the TestNameSpace.languageLookupMap.
--- Check the results (failed to retrieve results).
So in that case if I want to return a list of employees based on some
search criteria, will the setting below work?
{call PROCEDURE_NAME(?,?)}
In the stored procedure what will be the return type, since there is no
OUT parameter?
D
Did you also put "to_text" into your Map? Say
HashMap map = new HashMap();
map.put("from_text", "Computers");
map.put("language", "FRE");
map.put("to_text", "FRE");
Actual value for to_text is irrelevant as it will be overwritten by
the return value after running proc.
Koka
Hi Andrew,
The reason may be you have defined to_text as INOUT.
In the parameterMAP define to_text as OUT only. Then you don't have to set any
value for to_text.
Rgds
Prashanth.
--- Koka <[EMAIL PROTECTED]> wrote:
> Did you also put "to_text" into your Map? Say
>
> HashMap map = new Has
Yes, my code is currently:
HashMap map = new HashMap();
map.put("from_text", "Computers");
map.put("language", "FRE");
map.put("to_text", "");
results = (ArrayList) sqlMap.queryForList("testLanguageLookup", map);
iter = results.iterator();
System.out.println("results = " + results.toString());
a
We use something like this where we return a value:
<... rest of parameters...>
{? = call myProc(?, ?); }
HTH,
-ed
On 8/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi there.
> I can only see queryForList() and queryForObject() in the API docs.
> How do you force an executeQuer
No. You'll need to run extra select statement after executing the
procedure to retrieve data from temporary table:
Say your proc creates
CREATE GLOBAL TEMPORARY TABLE temp_emp_table (
EMP_ID NUMBER,
FNAME VARCHAR2(30),
LNAME VARCHAR2(30),
) ON COMMIT DELETE ROWS;
Then you need
sel
Actually I do not like temporary tables (bad taste :) there were not
there in Oraccle 7 days ). I used regular ones and in procedure I
usually Deleted rows, inserted rows, retrieved and rollbacked - same
effect as that of temp tables
The issue is, we have to use calls as a company policy and
not make calls and hence I wanted to create the resultMap from
the procedure call.
-Original Message-
From: Koka [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 09, 2005 10:55 AM
To: user-java@ibatis.apache.org
Subject: Re: Stor
Yes, I have tried that one too :)
Do you think this may be down to the jdbc driver I am using, as I assume
that you all are getting this working without
the same issues that I have.
Is anyone else using Sybase ASE?
thanks,
andy
I'm lost. :( I haven't used sybase...
I've only used iBatis on Oracle, sorry.
On 8/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Yes, I have tried that one too :)
>
> Do you think this may be down to the jdbc driver I am using, as I assume
> that you all are getting this working without
> the same issues that I have.
> Is anyo
For the moment there's no direct way to create a ResultMap from a
procedure call (the closest you get is returning a ref cursor and
using custom type handlers).
There is already a request in JIRA to support this:
http://issues.apache.org/jira/browse/IBATIS-154
Maybe you can vote for it there or a
Can we have a stored function call that returns a ref cursor and have
that map to a resultMap?
If yes, what is the syntax to call a stored function from sqlmap?
-Original Message-
From: Sven Boden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 09, 2005 11:51 AM
To: user-java@ibatis.apa
For the moment the mapping from ref cursor directly to ResultMap is
not in iBATIS yet, that's what the JIRA 154 is about.
Sven
On Tue, 9 Aug 2005 12:34:08 -0400, you wrote:
>Can we have a stored function call that returns a ref cursor and have
>that map to a resultMap?
>
>If yes, what is the sy
> The issue is, we have to use calls as a company policy
I believe that kind of policy is enforced for extra security reasons
(what else can it be?). But it's a bit too much (absurd!?) to enforce
same with temporary tables... But, alas, we all have to obey some
rules... :)
Good luck
Koka
I make that mistake every few months. It should throw exception and fail
at dtd.
;-)
.V
Larry Meadors wrote:
It's true: Without a resultMap or resultClass, your results will be
silently discarded.
Larry
Hi List,
I have a group of objects that I'm using in my project, and part of them I'm
populating via lazy-load, because they are ralelly used (there are some
object's that are used only to show information in the screen or in reports). I
have some process, in my back-end, that uses and create a
Hi,
I apoligize in advance if this problem has been addressed previously on
this list. But, I've come across a (more than likely) common
situation where I have 2 Objects:
Object 1 has a m:n relationship to Object2
AND
Object 2 has a 1:1 relationship to Object1
In other words, Object1.getObject2
Hm, I am assuming this is something like an Order to OrderItem relationship.
I'll try not to preach too much about this, but I generally shy away
from these kinds of relationships, because they are rarely all that
valuable.
You could do this with a RowHandler by joining Order+OrderItem into a
com
Hi Larry,
You're right, this is a Order to OrderItem relationship (I should have
used a more practical example). To be honest, for our initial
release we could do away with resolving the 1:1 relationship, so this
is just a nice-to-have right now.
Currently, our object model/business objects ar
58 matches
Mail list logo