Re: Custom XML Resultmaps

2005-05-13 Thread Abdullah Kauchali
U,  I suppose we can, but that's another server-side processing we 
have to do then. 
What I'm looking for is the possibility of producing XML directly from 
the JDBC
Resultset?  Does the framework allow for extending them?

Kind regards
Abdullah
Larry Meadors wrote:
Could you transform it with XSLT?
Larry
On 5/12/05, *Abdullah Kauchali* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:

Is it possible to extend the current XML Resultmap format to a new
custom one?  Don't ask!, but were are investigating the possibility of
returning XML in Microsoft's ADO format.
Any general advice on this would be greatly appreciated,
Kind regards
Abdullah



Re: Custom XML Resultmaps

2005-05-13 Thread Abdullah Kauchali
Hi Ron,
That would have been ideal, but we are catering for a Win32 Application 
that deals with ADO 2.8 not
ADO.NET.  So we have to produce the ADO-XML Reduced schema.

What we need specifically is the Resultset meta-data - column types, 
sizes etc.

Kind regards,
Abdullah
Ron Grabowski wrote:
Do you want to have IBatis generate an xml file that can be loaded by a
DataSet's ReadXml method? Here's an example for the non-.Net people of
one way of saving a DataSet to XML:
DataSet ds = new DataSet(People);
DataTable dt = new DataTable(Person);
dt.Columns.Add(Name, typeof(string));
dt.Columns.Add(Age, typeof(int));

DataRow dr = dt.NewRow();
dr[Name] = Ron;
dr[Age] = 99;
dt.Rows.Add(dr);

ds.Tables.Add(dt);
ds.WriteXml(output.xml);
People
  Person
NameRon/Name
Age99/Age
  /Person
/People
Except for the outer People node, I believe IBatis can generate that
already.
--- Abdullah Kauchali [EMAIL PROTECTED] wrote:
 

Is it possible to extend the current XML Resultmap format to a new 
custom one?  Don't ask!, but were are investigating the possibility
of 
returning XML in Microsoft's ADO format.

Any general advice on this would be greatly appreciated,
Kind regards
Abdullah
   

 



Re: Custom Tag

2005-05-13 Thread Abdullah Kauchali

Brandon Goodin wrote:
I see. The question here is whether this is a common database issue
and if it should be supported. However, it does not seem to be a
common issue and there are ways to work around this. My other thought
is why do you have over 250+ IN parameters? 

My guess:  they have a large table with a foreign key.  When they do a 
select for this large
table, they also want to obtain the parent table values specific only to 
*that* resultset.

So we have:
ChildTable
ID COL1COL2FK_ID
--     
001 ABCASD1
002 EDFASE 1
003 EDW746 2
(SELECT * FROM ChildTable)
Now they want to do this:
SELECT * FROM ParentTable where
FK_ID IN ('1', '2')
In two round-trips, you have Master-detail.


Re: [OT] JPetStore - BaseBean / BeanAction

2005-05-13 Thread Lieven De Keyzer
Yes, I realize this, but a form can only have one action specified I 
believe?
So this method would need to have a case where other methods can be called?

From: Clinton Begin [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: ibatis-user-java@incubator.apache.org
Subject: Re: [OT] JPetStore - BaseBean / BeanAction
Date: Thu, 12 May 2005 21:56:55 -0600
It should be noted that JPetStore also performs multiple actions per 
form.
The difference is that with BeanAction, you must call a different URL for
each action. (I quote action, as there is obviously only one actual 
Action
class...).

Clinton
On 5/12/05, Lieven De Keyzer [EMAIL PROTECTED] wrote:



 From: Brandon Goodin [EMAIL PROTECTED]
 Reply-To: Brandon Goodin [EMAIL PROTECTED]
 To: ibatis-user-java@incubator.apache.org
 Subject: Re: [OT] JPetStore - BaseBean / BeanAction
 Date: Thu, 12 May 2005 19:01:02 -0600
 
 i'm not sure about your formAction semantic. You should name it
 something meaningful like removeFoo. The method names should be
 named after the actions that are taking place.

 Yes, I should have given my real problem instead of this one. But that
 would
 mean my action would be called: folderActions. And the methods foo and 
bar
 would be: remove and edit.

 But, yes you would follow the same semantic. You need to realize that
 JPetstore is NOT
 standard struts practice. It is a way to use struts in a more modern
 manner (i.e. Action has properties on it rather than sepearate in an
 ActionForm.).

 And I like this modern way better than the old one. :)

 Otherwise, it sounds like you have the idea down fairly well.
 
 Brandon
 
 On 5/12/05, Lieven De Keyzer [EMAIL PROTECTED] wrote:
   I took the lastest JPetStore as a starting point for my application.
  
   The problem I have now: I want to have multiple actions in one form. 
I
 have
   a set of objects belonging to a user and this are displayed together
 with a
   checkbox for each object. I want the users to be able to check a few
 boxes
   and let them choose to delete those, or edit them all at once, 
etc...
  
   Normall I think one should implement a class that inherits from the
   DispatchAction Class.
  
   I guess using the BaseBean and BeanAction class, this should even be
   simpler. Should I use the same tactic as the DispatchAction class 
uses
 ?
   Something like:
  
   public Class TreeLevel extends BaseBean {
  
   private String method;
  
   public String formAction {
   if (method == foo) {
   return foo(); }
   else { return bar(); }
   }
  
   private String foo() {
   //
   }
  
   private String bar() {
   }
   }
  
   And then in my jsp page:
  
   html:form action=/formAction
   html:submit property=method value=foo /
   html:submit property=method value=bar /
   /html:form
  
  





RE: Oracle OC4J and signon

2005-05-13 Thread Daniel H. F. e Silva
Hi David,

 After looking at the screen attached, i'm sure your problem is NOT the 
application.
It seems to be a realm problem or, if OC4J has integrated authentication with 
Windows, an OC4J
config issue.
 Let us know when/how you fixed this issue.

Cheers,
 Daniel Silva.

  
--- Trussell David N [EMAIL PROTECTED] wrote:

 My apologies for attaching a screenshot. I understand that's frowned upon in
 a discussion list, but I don't know a better way of answer your question.
 It's the same window in Firefox and MS IE6. I assume it's an MS Windows
 window. Maybe I'll look at it as a Windows configuration problem instead of
 an OC4J trick. I'll check into the realm thing, too. Thank you very much for
 your reply.
 
  -Original Message-
  From: Daniel H. F. e Silva [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, May 12, 2005 6:01 AM
  To: ibatis-user-java@incubator.apache.org
  Subject: RE: Oracle OC4J and signon
  
  
  Hi David,
  
   What is this window? A MS Windows window? A basic realm 
  window?  Have you checked if your webserver has any kind of 
  realm configured?  Hope that helps.
  
  Cheers,
   Daniel Silva.
  
  
  
  --- Trussell David N [EMAIL PROTECTED] wrote:
   It's the same database.properties file that's under Tomcat and that 
   works just fine.
   
   I thought maybe the JDBC driver had to be in /WEB-INF/lib under 
   jpetstore so I tried both classes12.jar and ojdbc14.jar. 
  Nope. I also 
   put something totally bogus for the driver name in 
  database.properties 
   and it didn't even complain (at least, anywhere I can see). 
  It's just 
   pops up that window.
   
   Ya know, this is really maddening. I've spent two days 
  trying to get 
   Appfuse running on OC4J with no success. Even Matt Raible 
  and company 
   couldn't help me. Now it's the same thing with iBATIS. 
  Heavy sigh. I 
   really wish I could just use Tomcat.
   
-Original Message-
From: Brice Ruth [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 11, 2005 2:38 PM
To: ibatis-user-java@incubator.apache.org
Subject: Re: Oracle OC4J and signon


Is your DB connection authenticating properly to Oracle? I
get this with DB2 if my password has expired or the account 
has been locked out.

Brice

On 5/11/05, Trussell David N [EMAIL PROTECTED] wrote:
  
 
 I've just deployed JPetStore to Oracle OC4J 10.1.2 (I've also 
 tried
 9.0.4) on Win XP and when I click Sign-in or Enter the 
  Store an 
 authentication window pops-up asking for my userid and 
  password. I 
 can't get past it.
 
 Where can I disable this?
 
 Thank you.


--
Brice Ruth
Software Engineer, Madison WI

   
  
  
  
  __ 
  Yahoo! Mail Mobile 
  Take Yahoo! Mail with you! Check email on your mobile phone. 
  http://mobile.yahoo.com/learn/mail 
  
 
 




Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html



Re: Availability of 2.1.0

2005-05-13 Thread Brandon Goodin
- The removeFirstPrepend attribute was added to all tags (except
dynamic because it already does this automagically)
- open and close attributes were added to all dynamic tags to better
handle complex queries that require bracketing.
- A bug was fixed that prevented dynamic tags from being nested inside
an iterate tag.
- A bug was also fixed that wil now allow for th $[]$ notation to be used.

Those are the major things i fixed and added.

Brandon



On 5/12/05, Nathan Maves [EMAIL PROTECTED] wrote:
 Now that we are on the topic.
 
 Is this a bug fix release or a feature release?
 
 In the case that it is a feature release what can we expect?
 
 Nathan
 
 On May 12, 2005, at 9:53 PM, Clinton Begin wrote:
 
  Karen,
 
   A release could be as early as this weekend, but is not guaranteed.
 
   I'm sure if it's not, that we can at least commit to giving you (and
  everyone else) a date.
 
   Sorry for the lack of clarity here.
 
   Cheers,
   Clinton
 
  On 5/12/05, Karen Koch [EMAIL PROTECTED] wrote:
  can't give you any real answer, that would be helpful.
 
  Also, just to verify, do I understand correctly that the fix for
  IBATIS-79 in
  Jira will not be available until version 2.1.0 (presumably not
  released yet) is
  released?
 
  Thanks in advance, sorry to be a pest.
 
  Karen
  --- Karen Koch [EMAIL PROTECTED]  wrote:
   Date: Fri, 6 May 2005 09:46:59 -0700 (PDT)
   From: Karen Koch [EMAIL PROTECTED]
   Subject: Availability of 2.1.0
   To: ibatis-user-java@incubator.apache.org
  
   Hello --
  
   I know one person already asked this in mid-April and didn't
  receive an
   answer,
   so perhaps you just don't know yet... but I'm going to ask anyway.
  
   I have an iBATIS app that uses nested resultMaps being introduced
  at a
   customer
   site in the next month or so.I just spent 7 hours chasing down
  Jira bug #79
   in my web app ( http://issues.apache.org/jira/browse/IBATIS-79),
  because I had
   primary keys on two tables related in a nested resultMap that just
  happened
   to
   be in sync.Such fun.:-)
  
   Anyway, I see that this problem has been fixed in 2.1.0.I'd
  really like to
   have this fix, as the situation that causes the bug is perfectly
  valid and
   might occur easily in the future, but I don't see us upgrading to a
  nightly
   build for something we're going to install at a customer
  site.Help?
  
   Thank you so much for any info you can give regarding the 2.1.0
  release /
   release date.iBATIS has been wonderful for this project.Keep up
  the great
   work.
  
   Karen Koch
Programmer/Analyst
   iDC Chicago, IL
  
  
  
 



Re: java.sql.PreparedStatement or java.sql.Statement used?

2005-05-13 Thread Daniel H. F. e Silva
Hi Martin,

  iBATIS has a feature for allowing this kind of situation.
  It's syntax is like this:
  
  select * from ACCOUNT_$category$

  You'll find all necessary details in the iBATIS Developer Guide.

Cheers,
 Daniel Silva.


--- Zeltner Martin [EMAIL PROTECTED] wrote:
 Hello,
 
 I've tried to find out in which combination a java.sql.PreparedStatement
 and in which a java.sql.Statement is used. Is there a possability to
 config each statement? I'd like to realize that I can access a table
 dependent of a given parameter. The sql could looks like the following:
 
 select * from ACCOUNT_#category#
 
 Of course, in this case a PreparedStatement will not work.
 
 Does anyone can tell me how I can switch between prepared and not prepared
 statements? Is this issue somewhere documented?
 
 Thanks,
 Martin
 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


PreparedStatementLogProxy log4j output with bind variables

2005-05-13 Thread Frank Thompson
Hello All,

I was wondering if there was a way to either request a change or if there
was a way to override the current logging output sent to log4j as shown
below:

From PreparedStatementLogProxy.java

public Object invoke(Object proxy, Method method, Object[] params) throws
Throwable {
try {
  if (EXECUTE_METHODS.contains(method.getName())) {
if (log.isDebugEnabled()) {
  log.debug({pstm- + id + } PreparedStatement:  +
removeBreakingWhitespace(sql));
  log.debug({pstm- + id + } Parameters:  + getValueString());
  log.debug({pstm- + id + } Types:  + getTypeString());
}

  .
  .
  .


The invoke() method simply prints the prepared statement with no bind
variable substitution so the statement is printed with the embedded '?'
placeholders.  Is there a way to also include the statement as it would be
sent to the database backend as the actual string with bind variables
replaced.  If not is there a way that this Proxy could implement a SPI
interface and adapter that could be configured as a runtime class that
could have a custom Proxy implementation.

Otherwise as it stands I would have to modify the class and rebundle a
custom jar to change the log4j output ...

thanks
frank


Referencing a select statement or resultmap in another config file

2005-05-13 Thread Eric T. Blue
Hi,
I have a number of objects/tables that require mapping, and in many 
instances there are 1-many relationships.  In order to minimize 
duplication in the config files, I would like to be able to reference a 
select statement in another namespace/config file.  For example:

// File 1
sqlMap namespace=Object1
   resultMap id=object1Result class=com.ericblue.domain.Object1
   result property=id column=id/
   result property=name column=name/ 
   result property=someList column=id 
select=Object2.getSomeListByObject1/ 
   /resultMap

/sqlMap
// File 2
sqlMap namespace=Object2
   resultMap id=object2Result class=com.ericblue.domain.Object2
   result property=id column=id/
   result property=name column=name/ 
   /resultMap

   select id=getSomeListByObject1 resultMap=object2Result
  select * from some_table where id = #id#
/select
/sqlMap
Any help is appreciated!



Oracle 9.2 connection reset problem

2005-05-13 Thread erlend.bjorge
Title: Melding



Hi 
there!

We get a 
SQLException saying 'connection reset', it seems that the "connection" 

is suddenly dead for 
us, and when we try again running the method ('click' on the
link that access the 
database again) again it's work just fine. It's happend in a 
webapplication 
in 
production.There are about 10 people 
using the web application, that query 

and update the database 
all the time of the 
day.

We haven't experience that we have run out of 
connections, just that this connection reset 
problem now and 
then. Same behaviour working with a Toad tool like called DbVisualizer 
using
JDBC as the 
connection, if I don't use the tool for over 15-30 min I guess, same 
message
from Oracle as we 
get using SQLMap.

In test environment, 
we haven't experienced this problem, but that don't mean it's 
not
a problem there, 
maybe we just haven't been seen it, since we haven't done full 
scale
testing there. So 
it's only in production we have this problem it seems, where our Resin server 

with the web 
application andOracle db server are two different DMZ, could that have 

something to do with 
it ?


Anyway we have this 
kind of setup of the datasource. After we introduced the
Pool.Ping 
configuration, it didn't helped that either.. 

 
settings 
cacheModelsEnabled="true" 
enhancementEnabled="true" 
lazyLoadingEnabled="true" 
maxRequests="256" 
maxSessions="128" 
maxTransactions="32" 
useStatementNamespaces="false"/

 
transactionManager 
type="JDBC" dataSource 
type="SIMPLE" 
property name="JDBC.Driver" 
value="${driver}"/ 
property name="JDBC.ConnectionURL" 
value="${url}"/ 
property name="JDBC.Username" 
value="${username}"/ 
property name="JDBC.Password" 
value="${password}"/ 
property name="Pool.MaximumActiveConnections" 
value="30"/ 
property name="Pool.MaximumIdleConnections" 
value="1"/ 
Should weexpand that one 
??? 
property name="Pool.MaximumWait" 
value="1000"/ 
property name="Pool.PingQuery" value="select * from 
dual"/ 
property name="Pool.PingEnabled" 
value="true"/ 
property name="Pool.PingConnectionsOlderThan" 
value="1"/ 
property name="Pool.PingConnectionsNotUsedFor" 
value="1"/ 
property name="Pool.ValidationQuery" value="select 1 from 
dual"/ 
property name="Pool.LogAbandoned" 
value="true"/ 
property name="Pool.RemoveAbandoned" 
value="true"/ 
property name="Pool.RemoveAbandonedTimeout" 
value="5"/ 
/dataSource 
/transactionManager
Shouldn't this Pool 
configuration work ?? = keeping the connections up to date 
??
We have tried to tune different 
values forth and back without any 100% result.

--

When I run some test 
methods from my IDE, haven't experienced this problem,
and in debug mode I 
get these kind of feedback that's the Pool stuff seems to 
work.

DEBUG 13:39:36,186 
[main] com.ibatis.common.jdbc.SimpleDataSource - Checked out connection 32550604 
from pool.DEBUG 13:39:36,186 [main] com.ibatis.common.jdbc.SimpleDataSource 
- Testing connection 32550604...DEBUG 13:39:36,196 [main] 
com.ibatis.common.jdbc.SimpleDataSource - Connection 32550604 is 
GOOD!.
DEBUG 13:39:36,266 
[main] com.ibatis.common.jdbc.SimpleDataSource - Testing connection 
32550604...DEBUG 13:39:36,266 [main] com.ibatis.common.jdbc.SimpleDataSource 
- Connection 32550604 is GOOD!DEBUG 13:39:36,266 [main] 
com.ibatis.common.jdbc.SimpleDataSource - Returned connection 32550604 to 
pool.

Any clues anyone ? 
what we can do about this ?


Thanks for any 
help!


Best 
regards,
Erlend 
Bjørge


Re: PreparedStatementLogProxy log4j output with bind variables

2005-05-13 Thread Brice Ruth
You can use p6spy ... this will do what you want w/o needing to modify
this behaviour.

Just google for it.

Brice

On 5/11/05, Frank Thompson [EMAIL PROTECTED] wrote:
 Hello All,
 
 I was wondering if there was a way to either request a change or if there
 was a way to override the current logging output sent to log4j as shown
 below:
 
 From PreparedStatementLogProxy.java
 
 public Object invoke(Object proxy, Method method, Object[] params) throws
 Throwable {
 try {
   if (EXECUTE_METHODS.contains(method.getName())) {
 if (log.isDebugEnabled()) {
   log.debug({pstm- + id + } PreparedStatement:  +
 removeBreakingWhitespace(sql));
   log.debug({pstm- + id + } Parameters:  + getValueString());
   log.debug({pstm- + id + } Types:  + getTypeString());
 }
 
   .
   .
   .
 
 The invoke() method simply prints the prepared statement with no bind
 variable substitution so the statement is printed with the embedded '?'
 placeholders.  Is there a way to also include the statement as it would be
 sent to the database backend as the actual string with bind variables
 replaced.  If not is there a way that this Proxy could implement a SPI
 interface and adapter that could be configured as a runtime class that
 could have a custom Proxy implementation.
 
 Otherwise as it stands I would have to modify the class and rebundle a
 custom jar to change the log4j output ...
 
 thanks
 frank
 


-- 
Brice Ruth
Software Engineer, Madison WI


Re: Oracle 9.2 connection reset problem

2005-05-13 Thread Brice Ruth
One thing that may help ... when I set up a connection pool in Tomcat,
I noticed I could set up time-based connection validation, but I could
also set it up such that whenever a connection was requested by the
application, it would validate the connection BEFORE handing it over.
Regardless of the timing. This quickly took care of similar problems I
was having.

Does the data pool you're using have such an option?

Brice

On 5/12/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  
 Hi there! 
   
 We get a SQLException saying 'connection reset', it seems that the
 connection 
 is suddenly dead for us, and when we try again running the method ('click'
 on the 
 link that access the database again) again it's work just fine. It's happend
 in a web application 
 in production. There are about 10 people using the web application, that
 query 
 and update the database all the time of the day. 
   
 We haven't experience that we have run out of connections, just that this
 connection reset 
 problem now and then. Same behaviour working with a Toad tool like called
 DbVisualizer using 
 JDBC as the connection, if I don't use the tool for over 15-30 min I guess,
 same message 
 from Oracle as we get using SQLMap. 
   
 In test environment, we haven't experienced this problem, but that don't
 mean it's not 
 a problem there, maybe we just haven't been seen it, since we haven't done
 full scale 
 testing there. So it's only in production we have this problem it seems,
 where our Resin server 
 with the web application and Oracle db server are two different DMZ,  could
 that have 
 something to do with it ? 
  
   
 Anyway we have this kind of setup of the datasource. After we introduced the
 Pool.Ping configuration, it didn't helped that either.. 
   
 settings
 cacheModelsEnabled=true
 enhancementEnabled=true
 lazyLoadingEnabled=true
 maxRequests=256
 maxSessions=128
 maxTransactions=32
 useStatementNamespaces=false/ 
   
 transactionManager type=JDBC
 dataSource type=SIMPLE
 property name=JDBC.Driver value=${driver}/
 property name=JDBC.ConnectionURL value=${url}/
 property name=JDBC.Username value=${username}/
 property name=JDBC.Password value=${password}/
 property name=Pool.MaximumActiveConnections value=30/
 property name=Pool.MaximumIdleConnections value=1/
   Should we expand that one ???
 property name=Pool.MaximumWait value=1000/
 property name=Pool.PingQuery value=select * from dual/
 property name=Pool.PingEnabled value=true/
 property name=Pool.PingConnectionsOlderThan value=1/
 property name=Pool.PingConnectionsNotUsedFor value=1/
 property name=Pool.ValidationQuery value=select 1 from
 dual/
 property name=Pool.LogAbandoned value=true/
 property name=Pool.RemoveAbandoned value=true/
 property name=Pool.RemoveAbandonedTimeout value=5/
 /dataSource
 /transactionManager
  
 Shouldn't this Pool configuration work ?? = keeping the connections up to
 date ?? 
 We have tried to tune different values forth and back without any 100%
 result. 
   
 -- 
   
 When I run some test methods from my IDE, haven't experienced this problem, 
 and in debug mode I get these kind of feedback that's the Pool stuff seems
 to work. 
   
 DEBUG 13:39:36,186 [main]
 com.ibatis.common.jdbc.SimpleDataSource - Checked out
 connection 32550604 from pool.
 DEBUG 13:39:36,186 [main]
 com.ibatis.common.jdbc.SimpleDataSource - Testing
 connection 32550604...
 DEBUG 13:39:36,196 [main]
 com.ibatis.common.jdbc.SimpleDataSource - Connection
 32550604 is GOOD!
 . 
 DEBUG 13:39:36,266 [main]
 com.ibatis.common.jdbc.SimpleDataSource - Testing
 connection 32550604...
 DEBUG 13:39:36,266 [main]
 com.ibatis.common.jdbc.SimpleDataSource - Connection
 32550604 is GOOD!
 DEBUG 13:39:36,266 [main]
 com.ibatis.common.jdbc.SimpleDataSource - Returned
 connection 32550604 to pool.
  
   
 Any clues anyone ? what we can do about this ? 
   
   
 Thanks for any help! 
   
   
 Best regards, 
 Erlend Bjrge 


-- 
Brice Ruth
Software Engineer, Madison WI


Re: issues upgrading from 1.31 to 2.09B

2005-05-13 Thread Clinton Begin

You can ditch the xmlns:fo=http://www.w3.org/1999/XSL/Formatthat's just a leftover. 


Other than that, I'm not sure what's wrong. Your DTD looks correct. 

Have you tried validating it with a 3rd party XML editor like the free BEA XML editor?

Clinton
On 5/12/05, Andy Thompson [EMAIL PROTECTED] wrote:
I'm working on refactoring an existing application.The environmentbeing deployed on is weblogic 8.1 and I'd like to use weblogic tocontrol datasources.I managed to get the jars updated (still usingthe compat jar).I also got the script to upgrade the 
sql-map.xml andsql-map-config.xml files working (documentation that ant 1.54 isneeded would be nice)..That said, I can't get the generated 2.0 SqlMapConfig.xml script to work.And unfortunatly the error logs are a little meaningless to me (pasted
below).Are there mandatory settings in 2.0 that aren't mandatory in1.3?Anyway, help would be appreciated.Thanks for your time,-Andy_com.ibatis.db.sqlmap.SqlMapException
: Error while building SqlMap.Error:java.io.IOException: The root tag of the SqlMap XML document must be 'sql-mapr 'sql-map-config'.Caused by: java.io.IOException: The root tag of the SqlMap XML document must
'sql-map' or 'sql-map-config'. at com.ibatis.db.sqlmap.XmlSqlMapBuilder.buildSqlMap(Unknown Source) at com.ibatis.db.sqlmap.XmlSqlMapBuilder.buildSqlMap(Unknown Source)_
New script:?xml version=1.0 encoding=UTF-8 standalone=no? !--Converted by iBATIS SQL Map Converter 'A' (1.x to 2.x)-- !DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config
2.0//EN http://www.ibatis.com/dtd/sql-map-config-2.dtdsqlMapConfig xmlns:fo=
http://www.w3.org/1999/XSL/Format settings cacheModelsEnabled=true maxRequests=0/ sqlMap resource=resource/ObjectMap.xml//sqlMapConfig
__Old script:?xml version=1.0 encoding=UTF-8?!DOCTYPE sql-map-config PUBLIC -//iBATIS.com//DTD SQL Map Config 1.0
//EN http://www.ibatis.com/dtd/sql-map-config.dtdsql-map-config settings cacheModelsEnabled=true

statementCacheSize=1
maxExecute=0
maxExecutePerConnection=0
driverHintsEnabled=true / sql-map resource=resource/ObjectMap.xml //sql-map-config

Re: runing dao, with strange errors...

2005-05-13 Thread Brandon Goodin
I'm honestly not sure what you are asking. If you would post your
error and the code that is causing it we might be able to help you.

Brandon

On 5/12/05, Scott Li [EMAIL PROTECTED] wrote:
  
 Hey, Dear there, 
   
 I am using ibatis dao for persistence. While runing my test, I got below for
 the DTO class I am trying to grab from DaoManager: 
   
 -- DTO Call on: $Proxy2
  
   
 DaoManager m =
 (DaoManager)getDaoManager(prjCtx,dbCtx,sqlKey);
 LOG.debug(-- DTO Call on:  +
 m.getDao(daoInterface).getClass().getName());
 return m.getDao(daoInterface); 
   
 I don't know why and how? How to debugy DaoManager, do I have to use the
 Resources class to load the dao.xml? 
   
 Scott 
   
 -- 
 Scott Li M.D. M.S. 
 Bioinformatics Software Engineer 
 Kemmel Cancer Center Rm 806 
 Thomas Jeffersion University 
 Philadelphia, PA 19107 
 (Office) 215-503-9815 
 (Mobile) 609-220-9133 
 
 
   



Re: PreparedStatementLogProxy log4j output with bind variables

2005-05-13 Thread Brandon Goodin
you won't get the parameters inline with the prepared statement. But,
you do get the parameter output when you configure log4j correctly.

log4j.logger.com.ibatis=DEBUG
log4j.logger.java.sql.Connection=DEBUG
log4j.logger.java.sql.Statement=DEBUG
log4j.logger.java.sql.PreparedStatement=DEBUG
log4j.logger.java.sql.ResultSet=DEBUG

Brandon

On 5/13/05, Brice Ruth [EMAIL PROTECTED] wrote:
 You can use p6spy ... this will do what you want w/o needing to modify
 this behaviour.
 
 Just google for it.
 
 Brice
 
 On 5/11/05, Frank Thompson [EMAIL PROTECTED] wrote:
  Hello All,
 
  I was wondering if there was a way to either request a change or if there
  was a way to override the current logging output sent to log4j as shown
  below:
 
  From PreparedStatementLogProxy.java
 
  public Object invoke(Object proxy, Method method, Object[] params) throws
  Throwable {
  try {
if (EXECUTE_METHODS.contains(method.getName())) {
  if (log.isDebugEnabled()) {
log.debug({pstm- + id + } PreparedStatement:  +
  removeBreakingWhitespace(sql));
log.debug({pstm- + id + } Parameters:  + getValueString());
log.debug({pstm- + id + } Types:  + getTypeString());
  }
 
.
.
.
 
  The invoke() method simply prints the prepared statement with no bind
  variable substitution so the statement is printed with the embedded '?'
  placeholders.  Is there a way to also include the statement as it would be
  sent to the database backend as the actual string with bind variables
  replaced.  If not is there a way that this Proxy could implement a SPI
  interface and adapter that could be configured as a runtime class that
  could have a custom Proxy implementation.
 
  Otherwise as it stands I would have to modify the class and rebundle a
  custom jar to change the log4j output ...
 
  thanks
  frank
 
 
 --
 Brice Ruth
 Software Engineer, Madison WI



Re: Availability of 2.1.0

2005-05-13 Thread Clinton Begin
Hi all,

We have a file to track this. Developers should keep it up to
date, and users are welcome to read it. Perhaps I'll add a link
from the website directly to this file. 

http://svn.apache.org/repos/asf/incubator/ibatis/trunk/java/mapper/mapper2/doc/release.txt

This release.txt gets deployed with every iBATIS build, but should be updated as we fix stuff.

You can also look in JIRA, which is up-to-date with all but two feature requests that I have yet to add.

Cheers,
ClintonOn 5/13/05, Brandon Goodin [EMAIL PROTECTED] wrote:
- The removeFirstPrepend attribute was added to all tags (exceptdynamic because it already does this automagically)- open and close attributes were added to all dynamic tags to betterhandle complex queries that require bracketing.
- A bug was fixed that prevented dynamic tags from being nested insidean iterate tag.- A bug was also fixed that wil now allow for th $[]$ notation to be used.Those are the major things i fixed and added.
BrandonOn 5/12/05, Nathan Maves [EMAIL PROTECTED] wrote: Now that we are on the topic. Is this a bug fix release or a feature release?
 In the case that it is a feature release what can we expect? Nathan On May 12, 2005, at 9:53 PM, Clinton Begin wrote:  Karen,  A release could be as early as this weekend, but is not guaranteed.
  I'm sure if it's not, that we can at least commit to giving you (and  everyone else) a date.  Sorry for the lack of clarity here.  Cheers,
 Clinton   On 5/12/05, Karen Koch [EMAIL PROTECTED] wrote:  can't give you any real answer, that would be helpful.
   Also, just to verify, do I understand correctly that the fix for  IBATIS-79 in  Jira will not be available until version 2.1.0 (presumably not  released yet) is
  released?   Thanks in advance, sorry to be a pest.   Karen  --- Karen Koch [EMAIL PROTECTED]
  wrote:   Date: Fri, 6 May 2005 09:46:59 -0700 (PDT)   From: Karen Koch [EMAIL PROTECTED]   Subject: Availability of 
2.1.0   To: ibatis-user-java@incubator.apache.org Hello -- I know one person already asked this in mid-April and didn't
  receive an   answer,   so perhaps you just don't know yet... but I'm going to ask anyway. I have an iBATIS app that uses nested resultMaps being introduced
  at a   customer   site in the next month or so.I just spent 7 hours chasing down  Jira bug #79   in my web app ( 
http://issues.apache.org/jira/browse/IBATIS-79),  because I had   primary keys on two tables related in a nested resultMap that just  happened   to
   be in sync.Such fun.:-) Anyway, I see that this problem has been fixed in 2.1.0.I'd  really like to   have this fix, as the situation that causes the bug is perfectly
  valid and   might occur easily in the future, but I don't see us upgrading to a  nightly   build for something we're going to install at a customer
  site.Help? Thank you so much for any info you can give regarding the 2.1.0  release /   release date.iBATIS has been wonderful for this 
project.Keep up  the great   work. Karen Koch  Programmer/Analyst   iDC Chicago, IL