On Thu, Sep 21, 2006 at 10:31:02AM -0600, [EMAIL PROTECTED] wrote:
> You're only going to want to create temporary tables when the connection is
> created, not at the beginning of every transaction.
>
> Depending on what kind of connection pool you're using, you may be able to
> use their connecti
On Wed, Sep 20, 2006 at 09:59:12AM -0600, [EMAIL PROTECTED] wrote:
> This sounds like it could be solved by a connection lifecycle event handler
> that Clinton mentioned on Sept. 16th:
>
> http://www.mail-archive.com/user-java@ibatis.apache.org/msg06174.html
>
> Strangely, I've actually needed t
On Tue, Sep 19, 2006 at 03:40:43PM +0300, Eugeny N Dzhurinsky wrote:
> Hello!
>
> I have a problem - my application creates temporary views for set of talbes
> and then I would like to execute some queries on this view using iBATIS. For
> postgresql the temporary view is a
On Tue, Sep 19, 2006 at 03:56:43PM +0200, Niels Beekman wrote:
> Try using $value[]$ or maybe $[]$.
> Using #'s is probably not going to work, since most databases do not
> support dynamic tablenames.
The $[]$ solved problem, but $value[]$ doesn't work for some reason.
--
Eugene N Dzhurinsky
On Tue, Sep 19, 2006 at 04:01:38PM +0300, Eugeny N Dzhurinsky wrote:
> I'm trying to do this:
>
>
> create temporary view task_url_view as
>
>
> select * from task_url_$values[]$
>
>
>
I'm trying to do this:
create temporary view task_url_view as
select * from task_url_$values[]$
but this seems not work -
weird exception is thrown: ERROR - relation task_url_$1 does not exists
I'm calling this statem
Hello!
I have a problem - my application creates temporary views for set of talbes
and then I would like to execute some queries on this view using iBATIS. For
postgresql the temporary view is alife unless the connection is closed, so my
workflow might looks like this:
1) get the connection from
On Wed, Aug 16, 2006 at 07:22:22AM -0600, Larry Meadors wrote:
>
>So does this make the error go away?
Yep.
>If the database allows null values, you really don't want to use an
>int - and you are discovering why.
>Even with JDK5 and auto-boxing, if you try to assign a null to an
On Mon, Aug 14, 2006 at 10:38:33AM -0600, Nathan Maves wrote:
>
>what version of the jdk are you using?
>can you post the sqlmap as well as the set/get method of the property
>that you are having issues with?
select
task_id,
customer_id,
On Mon, Aug 14, 2006 at 10:43:15AM -0600, Nathan Maves wrote:
>
>Eugeny that is why I asked what jdk you are using. If you can run
>java 1.5 you will not have these issues.
java -version
java version "1.5.0-p3"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0-p3-root_19_jul_
On Mon, Aug 14, 2006 at 09:38:02AM -0600, Larry Meadors wrote:
>
>The simplest solution is for you to make the setters for the
>properties on com.project.Entity.Task not throw NPEs. ;-)
The thing is I don't have methods whch are throwing MPEs. I found such thing
happens when setProperty(i
Would it be a better idea to explain exceptions like NullPointerException when
setting some property and inform which method on the business object was
executed?
Because I don't see any help of:
ERROR com.project.Builder.DBTaskBuilder -
com.ibatis.common.jdbc.exception.NestedSQLException:
-
On Tue, Aug 01, 2006 at 05:44:52PM +0530, Prasad Jayakumar wrote:
>I am researching on using iBatis 2.1.7 in our project. I am an Oracle
>DBA and a Java Developer. I am using
>iBatis DAO
> SQLMAP Transaction Manager
> SqlMapDaoTemplate.
>
>I tried some sample programs.
Hello, in my application there is only single instance of SqlMapClient
(singleton). Legacy code contains it's own connection manager and thus
connections for now are obtained from there. The thing is I'd prefer to use
these connections rather than allow iBATIS obtain them from datasource, but I
fou
On Mon, Jul 31, 2006 at 08:13:29AM -0600, Larry Meadors wrote:
> Hmm, that looks funky. Try this:
>
> insert into table (field) values (#value:VARCHAR#)
Umm, really, I missed this
Thanks, it works fine!
--
Eugene N Dzhurinsky
Hello!
When passing "null" as parameter value for postgresql, the exception is being
thrown: org.postgresql.util.PSQLException: Unknown Types value
I tried to alter my query for like this: insert into table (field)
(#value#::varchar) but that didn't solve issue. Could somebody please help?
--
E
Hello!
Is it possible somehow to use several databases for single SqlMapClient
instance?
For example, I would like to use queries in namespace "spider" to be executed
on MySQL, and queries in the reset namepaces to be executed on PostgreSQL, w/o
creating 2 instances of SQL map clients.
--
Eugene
Is it possible to pass some parameter and wrap it with %%?
Something like this:
select * from table where name=%#param%
to ensure parameters will be escaped as well?
--
Eugene N Dzhurinsky
When using gnujaxp.jar java.lang.StackOverflowError occurs when iBATIS tries
to parse XML file.
JDK 1.4.2-p8 on FreeBSD 5.5
--
Eugene N Dzhurinsky
Could somebody please tell me, is it possible to use nested loops or
conditions inside loops in current version of iBATIS?
--
Eugene N Dzhurinsky
On Wed, Feb 22, 2006 at 03:37:26PM +0100, Cimballi wrote:
> This a Tomcat specific prefix, not iBatis.
> Cimballi
Well, I'm not sure about that, because I'm using OSWorkflow and it uses
another JNDI resource, specified like this:
On Wed, Feb 22, 2006 at 08:26:22AM -0600, Jeff Butler wrote:
> Try this:
>
that seem to work... Strange, so I should add prefix /comp/env ? May be there
are some other common prefixes for iBATIS not described in documentation? =)
--
Eugene N Dzhurinsky
exception is
ERROR 22/07/06 02:07:51 [http-8280-Processor24] (DevCasePortlet:75) -
java.lang.RuntimeException: Error initializing class. Cause:
com.ibatis.common.exception.NestedRuntimeException: Error occurred. Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
com.iba
I seem to miss something - I configured JNDI resource in context like this
factory
org.apache.commons.dbcp.BasicDataSourceFactory
username
root
password
On Fri, Nov 04, 2005 at 08:22:29AM +0100, Zsolt wrote:
> The MySql driver loads everything into the memory (unless you use LIMIT),
> thus if paginated list just skips records it seems to be use less. Its
> functionality can be replaced with List.subList(int fromIndex, int toIndex).
>
> My log just
On Thu, Nov 03, 2005 at 04:07:11PM +0100, Niels Beekman wrote:
> It doesn't, it just skips results in the ResultSet I believe. If you
> want to get optimal performance, roll your own implementation of paging
> and use the LIMIT/OFFSET statements, however, it won't be
> database-independent.
Okay,
Can somebody please explain how this work? I need to show results from some
table, i'm using limit/offset statements in SQL query, but I saw iBATIS can
handle pages in result set somehow, so I might not be forced to add
limit/offset statements in the SQL clauses. But I'm wandering how does iBATIS
h
Hi all!
Is there some way to dynamically pass properties to iBatis for configuring
database access instead of providing
in mapping configuration file? We have encrypted passwords in db.properties
which should be decrypted on the fly.
--
Eugene N Dzhurinsky
On Tue, Oct 25, 2005 at 10:23:54AM -0500, Jeff Butler wrote:
> Hmmm...another undocumented feature :(
> From browsing through the source code, it looks like you can do this:
>
>
> value="urlToYourProvider"/>
>
> Any property with the prefix "context." will be passed to the constructor
> of
On Tue, Oct 25, 2005 at 10:00:31AM -0500, Jeff Butler wrote:
> I would say it's not *exactly* singleton, but close enough. And it certainly
> works. As to the question "why not this?", I have these thoughts:
> It's not cool as cool as the other ways, and we're all about
> cool
> On a more serious
Hello! Just a question - I have DataSource, registered in JNDI on some
another server. How should I specify the name and location of that DataSource
in db.properties/connection tag?
--
Eugene N Dzhurinsky
On Tue, Sep 13, 2005 at 11:47:14AM +0200, Joachim Hoffmann wrote:
> Are there any plans for the integration of iBatis into Ecplise 3.1?
>
> ... e.g in order to use an XML editor from within the IDE and be able to
> benefit from Refactoring, e.g class rename, and package rearrangement
> I'm a bit w
Is there simple way to load/store HashMap in the database using the BLOB column
and iBATIS? I can think about getting BLOB as byte array and then create
HashMap from this byte array.
--
Eugene N Dzhurinsky
On Tue, Sep 06, 2005 at 10:42:07AM +0200, Koranda Matthew James wrote:
> I bundle the files along side my class files and jar the whole thing
> together. Just add the full paths in you config:
>
> Is that what you mean?
Not really, I don't want to jar the config for now and put it in the
classpat
Is there any way to specify the path where to search for the mapping files?
I simply don't want to store the iBATIS files in the WEB-INF/classes for my
WEB application
--
Eugene N Dzhurinsky
I'm trying to execute
select * from table
test = #test#
The thing is if the test property in the object does have value set to -1,
the IsNotEqual is appended to the SQL query for some reason.
The test property is declared as "int".
Any ideas?
--
E
log4j.rootLogger=ERROR, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p %d{dd/mm/yy hh:mm:ss} [%t]
(%C{1}:%L) - %m%n
log4j.logger.com.ibatis=INFO
log4j.logger.com.greenvalle
Could somebody please explain, how this works?
Does it use the limit/offset or it simply extracts all the data and then
navigates on the big list to find a subset?
--
Eugene N Dzhurinsky
Hi
I'm trying to rollback the transaction with SqlMapClient.
the source looks like
client.startTransaction();
//some insert/select calls
client.endTransaction();
the inserted data remains in the table, but is shouldn't (it's unit-test)
there is MySQL at the backend.
Any ideas?
--
Eugene N Dzhur
On Wed, Aug 10, 2005 at 05:57:05PM +0200, [EMAIL PROTECTED] wrote:
> Hi,
> I had "commons-logging.jar" and "log4j-1.2.8.jar" in my project classPath
> and didn't see logs from iBatis.
> I tried to add even "commons-logging-api.jar" to the classPath but nothing
> changed...
> I'm starting thinking i
On Wed, Aug 10, 2005 at 07:36:19AM -0500, Mitchell, Steven C wrote:
> That is a question for IBM. If you have a JUnit test you can run from the
> command line logging works fine and you can see all the detail you need. It
> just doesn't work from inside of RAD. Let me know if you find the answer
On Wed, Aug 10, 2005 at 11:29:34AM +0200, Niels Beekman wrote:
> >From ibatis.apache.org, the very first page:
> iBATIS for Java 2.1.5 Released
> (July 17, 2005) We've released a maintenance release, with a few bonuses
> as well. The most notable changes are: *** 1) iBATIS no longer depends
> on co
On Wed, Aug 10, 2005 at 11:23:43AM +0200, Niels Beekman wrote:
> Almost, in 2.1.5 the dependency on commons-logging has been removed, so
> just addding the log4j-libraries should do the trick.
It is just a wish.
Right now it won't work w/o the commons-logging libraries.
--
Eugene N Dzhurinsky
On Wed, Aug 10, 2005 at 11:19:42AM +0200, [EMAIL PROTECTED] wrote:
> Hi, I think a very simple question: how to log in Log4J with iBatis 2.1.5?
>
> I'm using IBM Rational Software Development Platform Version: 6.0.0.1 and
> iBatis 2.1.5 and I've configured log4j.properties file this way:
you need
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
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
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
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:
>
>
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
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
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:
> >
> > #[]#
> >
> Niels
Ahh, i missed it
Thanks a lot =)
--
Eugene N Dzhurinsky
On Mon, Aug 08, 2005 at 04:29:42PM +0200, Niels Beekman wrote:
> Something like this:
>
> class MyBean {
> public List getList() {
> return mylinkedList;
> }
> }
>
>
> #[]#
>
>
> When passing the list directly as argument use:
>
>
> #[]#
>
> Hope this helps,
> Niels
Umm, so the
Is there any way to pass the LinkedList to the iterate tag and make something
like creating the (1,2,3,4,5) list in the SQL? The thing is I know how to
iterate on the bean property which contains the list, but have no idea how to
do that with the LinkedList passed to the iBATIS SQL mapper :(
P.S.
On Thu, Aug 04, 2005 at 04:32:02PM +0300, Eugeny N Dzhurinsky wrote:
> I still facing the problems with the SQL logging :(
> I'm using the Log4J and my simple configuration below:
>
> log4j.rootLogger=DEBUG, stdout
> log4j.appender.stdout=org.apache.l
On Thu, Aug 04, 2005 at 04:33:18PM +0200, Guido Garc??a Bernardo wrote:
> I'm not sure, but that is the problem I suffered running my application
> under Tomcat 4.1.x.
> Logs don't appear with Tomcat, but it works fine with any other server...
> I don't know what is the solution... :(
> iBatis 2.1.
> I'm running the application at Jakarta tomcat 5.0, may be that's the clue?
> An log statements from my application are logged w/o any problems.
and log4j-1.2.9.jar is located under WEB-INF/lib in my application, and
is working fine, just the iBATIS don't see it for some reason :(
--
Eugene N D
On Thu, Aug 04, 2005 at 03:57:34PM +0200, Guido Garc??a Bernardo wrote:
> Maybe you are facing with a commons-logging problem:
> http://mail-archives.apache.org/mod_mbox/incubator-ibatis-user-java/200504.mbox/[EMAIL
> PROTECTED]
>
> Try to make sure there's only one version of log4j in your envir
I still facing the problems with the SQL logging :(
I'm using the Log4J and my simple configuration below:
log4j.rootLogger=DEBUG, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPatter
On Wed, Aug 03, 2005 at 04:20:57PM -0600, Nathan Maves wrote:
> I think a union is only a good solution when the data from both
> queries can be combined into one column.
Not really, the columns should be ordered to have the same types
in the order, so there is an ability to query for several
On Wed, Aug 03, 2005 at 09:25:24PM -, sreenivas wrote:
> Hi,
>
> I would like to know whether or not below approach is possible with iBATIS.
>
> "com.abc.Output"> select emp_name as eName, emp_sal as eSal from emp where
> emp_id = #emp_id# and loc_code=#loc_code#
> select dept_no as eDeptNo
On Wed, Aug 03, 2005 at 02:41:39PM +0200, Niels Beekman wrote:
> I've also posted an JIRA-issue myself a while ago:
> http://issues.apache.org/jira/browse/IBATIS-131 I tried it with 2.1.5
> but it still does not seem to work, I'll try to look closer at it in a
> few days...
It would be great if so
On Wed, Aug 03, 2005 at 01:47:45PM +0100, James, Steven wrote:
> if this is just an issue with isnotnull could you not just add a geter
> int getFieldsize(){
> return fields.size();
> }
> then in the xml map
>
>
> or is this an issue with the iterate?
it is iterate-related issue. I need to
On Wed, Aug 03, 2005 at 02:23:34PM +0200, Niels Beekman wrote:
> Wat version are you using? Your error looks much like
> http://issues.apache.org/jira/browse/IBATIS-148 which was fixed in 2.1.5
I've found this:
if (name.indexOf("[") > -1) {
value = getIndexedProperty(object, name);
} else
at
On Wed, Aug 03, 2005 at 02:23:34PM +0200, Niels Beekman wrote:
> Wat version are you using? Your error looks much like
> http://issues.apache.org/jira/browse/IBATIS-148 which was fixed in 2.1.5
iBATIS_DBL-2.1.5.582.zip from sourceforge
--
Eugene N Dzhurinsky
On Wed, Aug 03, 2005 at 01:07:25PM +0100, James, Steven wrote:
> Can we see the parameter class?
the rule(parameter) class
import java.util.ArrayList;
import java.util.List;
public class Rule extends iBATISSearchable {
private static final String RULE_SEARCH_COUNT_SQL = "dynamicGetRuleCoun
On Wed, Aug 03, 2005 at 01:25:47PM +0300, Eugeny N Dzhurinsky wrote:
> On Wed, Aug 03, 2005 at 10:40:46AM +0100, James, Steven wrote:
> > did you try it and what were the errors..
> for now I'm trying to play with this query.
And finally that's it:
d="
Is there any way to view the queries the iBATIS generates? I tried to set up
the java.sql=DEBUG, in log4j, but no luck for now.
--
Eugene N Dzhurinsky
On Wed, Aug 03, 2005 at 10:40:46AM +0100, James, Steven wrote:
> did you try it and what were the errors..
for now I'm trying to play with this query.
select distinct r.rule_id,r.name,r.description from rule r left join
rule_field rf
on r.rule_id = rf.rule_id
r.name like
On Wed, Aug 03, 2005 at 10:40:46AM +0100, James, Steven wrote:
> did you try it and what were the errors..
I tried that query, but the iBATIS complains it can't find the property in the
bean 'fields,values'
--
Eugene N Dzhurinsky
Or may be it is possible to use the iterator on the complex types somehow?
--
Eugene N Dzhurinsky
I have a query like this:
select distinct r.rule_id,r.name,r.description from rule r left join
rule_field rf
on r.rule_id = rf.rule_id
r.name like #name#
r.description like
#description#
rf.name=#fields[]# and rf.value=values[]
Sorry to all, I've found it in the developers guide. Really nice, iBATIS rocks
=)
--
Eugene N Dzhurinsky
Hello!
Is there any way to pass dynamic where clause portion to the iBATIS mapper?
for example:
select name,description from sometable where $clause$
if the user provided the just name pattern, the clause will look like
name like '%#name#$'
if the user will provide the both name and descriptio
73 matches
Mail list logo