Become familiar with sed and awk.
Chris Mathrusse
christopher.mathru...@sybase.com
Sybase, Inc
From:
kiran vuppla
To:
user-java@ibatis.apache.org
Date:
03/23/2010 11:16 AM
Subject:
Re: Ibatis sql-maps
I do have sql-maps written for Oracle Database. Is there any tool or
something that I ca
Its pretty much the same thing, just add your additional parameter
statements comma separated. You can even specify output parameters as
well, to return values from the proc other than a rowset. You can also, if
you would like, specify the parameter name. ASE has no issue with this and
sometime
I personally opt for the in-line parameters.
{call procName (
#searchUserId,jdbcType=VARCHAR,javaType=java.lang.String,mode=IN# ) }
I use this syntax extensively with ASE and don't have any issues.
Chris Mathrusse
christopher.mathru...@sybase.com
Sybase, Inc
From:
omnipresent
To:
Hi Clinton,
I was wondering if you could share with me the application you used to
create the video for the Schema Migration System. I know your running on a
Mac, so am I, but I would like to do something similar and was wondering
what the application is.
Thanks...
Chris Mathrusse
christopher
Hi Nathan,
I know this is not the proper list for this question but seeing as you are
stating " how cool are unit tests that use mockito and guice! ", I was
wondering if you could provide us with a simple example of how you are
using Mockito with iBatis. While the Mockito website has some simpl
If the datatype on your table is defined as a DATE or DATETIME or
TIMESTAMP, then you should not be trying to supply a String format to your
SQL. You should be using a java.util.Date or java.util.Calendar. You can
even provide a Custom Type Handler for this to ensure that the value that
you sup
Aside from the fact that you don't want to write any additional code, this
option is viable. It seems that you could easily create a Java class that
could generate all of you XStream converters for you using reflection to
discover the fields of "your" objects. This would only take a short time
Why not then create a custom converter for your class?
http://xstream.codehaus.org/converter-tutorial.html
You can create a custom converter for XStream that will convert your
object into XML using only the fields that you want marshalled,
effectively eliminating all fields that are generated
XStream already has the capability to exclude specific fields from the
serialization. It's rather easy:
com.thoughtworks.xstream.XStream xstream;
...
xstream.omitField(YouriBatisClass.class, "fieldName");
That's it! You can omit as many fields as you want.
You can even omit them with Annotations
We have an application that has a similar requirement; caching catalog
data to build a tree representation for the UI. This was an expensive hit
for the user to pay. Rather than asking iBatis to cache the entire table,
we let iBatis cache the results for each query. For the web UI, I simply
bui
Make the following change below and give it a try.
select region_id,region_name from Region
Abdel Olakara
05/14/2009 12:29 PM
Please respond to
user-java@ibatis.apache.org
To
user-java@ibatis.apache.org
cc
Subject
Trouble with SQL SERVER 2005
Not that I am throwing stones, but you really should raise an issue about
this schema design. I perviously worked in a company that took this
approach in designing their data model. As you have already seen, this is
not an easy data model to work with for obvious reasons, but the greatest
probl
I've been using iBatis with ASE for quite some time now and I have never
encountered this issue with delete. If it works via iSQL then it should
work via JDBC. You can always enable tracing in the JConnect driver to
ensure that the SQL being executed is what you expect. You can even
intercept t
This should be so simple but I must be overlooking something. I currently
have a TypeHandlerCallback defined that handles a TIMESTAMP to a
java.util.Calendar, and it works perfectly. But now I want to do something
really simple. I would like to execute the following to get the database
current
0
IF it doesn't impact the main code line and someone is willing to maintain
it, then why not? Seems more like a plugin at this rate.
Chris Mathrusse
christopher.mathru...@sybase.com
Sybase, Inc
One Sybase Drive
Dublin, CA 94568
(925) 236-5553
Clinton Begin
01/23/2009 11:05 AM
Please respon
Sorry, I overlooked the fact that I didn't provide it.
As far as I know, there are no plans to change the implementation in
JConnect. On occasion, I can sometimes get them to correct a bug when I
scout it out, but issues like this are up to the powers that be that
decide the priority of the is
This is a JConnect Driver issue. It doesn't like it when you attempt to
set a NULL for a TEXT field. This is something that I have run into many
times. One easy solution is rather than assigning NULL try assigning an
empty string. This gets around the issue in the driver.
As a side note, you ma
Give this entry a try.
"Petr V."
01/16/2009 12:03 PM
Please respond to
user-java@ibatis.apache.org
To
user-java@ibatis.apache.org
cc
Subject
Re: SQL Mapping is not working
Please bear with me, this is my first on hand on iBatis, I am coming from
hibernate world :-(
Yeah Chris,
Make certain you register your type handler in you SQL Map Config file,
similar to as follows:
Chris Mathrusse
christopher.mathru...@sybase.com
Sybase, Inc
One Sybase Drive
Dublin, CA 94568
(925) 236-5553
"Petr V."
01/16/2009 11:14 AM
Please respond to
user-java@ibatis.apache.org
To
us
Type Handler:
public Object getResult(ResultGetter getter) throws SQLException {
if (getter.wasNull())
return null;
java.util.Calendar cal = java.util.Calendar.getInstance();
java.sql.Timestamp ts = getter.getTimestamp
I'm not certain as to why it's not in the Maven repository. I can't really
comment as its outside of my realm. But I do know that the JConnect ships
with ASE. It also comes bundled with the Admin or Client set of tools. You
can find it usually located under
\\jConnect-xxx
Like I said, I used
Seeing as I work at Sybase I don't think it would go over very well if I
were to use the jTDS driver rather than our own JConnect. While I have
found a few issues with JConnect, they have been all relatively minor and
are usually addressed rather quickly when we identify them, which only
makes
Sounds more like an issue with the jTDS driver and not with ASE. I've been
using the JConnect driver with iBatis for several years now and never
encountered any issues with dates.
Chris Mathrusse
[EMAIL PROTECTED]
Sybase, Inc
One Sybase Drive
Dublin, CA 94568
(925) 236-5553
Rick <[EMAIL PROTE
As a suggestion Zsolt, iBatis does OR mapping extremely well. What you are
looking for is something that will map Objects into XML extremely well.
Why not take a look at XStream by thoughtworks. I'm using their library
for several projects pertaining to Object -> XML and it handles them
excepti
A simple solution to this problem is to always include the timestamp in
your where clause. This applies for all UPDATE and DELETE statements.
UPDATE
FOO
SET
BAR = #object.id#
, TIMESTAMP = #newTimeStamp#
WHERE
ID = #id#
AND
TIMESTAMP = #object.timestamp#
Here are the specifics. It's not very complex which is why it surprised me
so much.
{ call ${getCreditHoldFlag_sp} (
@CustomerNumber =
#customerNo,jdbcType=VARCHAR,javaType=java.lang.String,mode=IN#
)
}
The parameter class is a String and I'm even specifying it i
Thank you Clinton..
Chris
"Clinton Begin" <[EMAIL PROTECTED]>
07/15/2008 10:38 AM
Please respond to
user-java@ibatis.apache.org
To
user-java@ibatis.apache.org
cc
Subject
Re: NullPointerException after upgrade to 2.3.2
I'll add the patch now... and let you know when to grab from SVN.
Is the fix committed so I can get it and build from SVN?
Chris Mathrusse
[EMAIL PROTECTED]
Sybase, Inc
One Sybase Drive
Dublin, CA 94568
(925) 236-5553
"Clinton Begin" <[EMAIL PROTECTED]>
07/15/2008 10:27 AM
Please respond to
user-java@ibatis.apache.org
To
user-java@ibatis.apache.org
cc
Sub
I just upgraded to 2.3.2 due to the fact that Spring 2.5.5 seems to need
it. After I upgraded I am now getting a NullPointerException after
executing a procedure. This was working prior to the upgrade and seems to
be associated to the TypeHandlerFactory.setTypeHanlder method at line 143.
As I s
Could it be that your datasource in Tomcat is pointing to a different
database than your datasource in WebLogic? If you look at the exception
message it is coming from the database itself and not your stored proc.
(It doesn't contain your formatting)
Chris
prabho <[EMAIL PROTECTED]>
06/25
Hey Clinton,
I'm not using the logging as a benchmark but rather just trying to figure
out what is going wrong. I spent some more time with this issue and I'm
using a utility that captures the TDS communication between the
application and my ASE server. One thing that I've noticed is that while
I'm running iBatis 2.3.0.668 within Spring 2.5 inside of Glassfish.
(Actually, I was running inside of Tomcat without any issues) We are
migrating to Glassfish and the only change I've made is to utilize the
resources from Glassfish, via JNDI. This includes the TX Manager as well
as all DataSou
Hi Josh,
This looks surprisingly similar to Sybase ASE syntax. I can assure you
that iBatis works quite well with this syntax as I use it quite regularly
although I usually avoid the use of the parameterMap. I use the following:
{ call ${listShipDestination_sp} (
@CustomerNumber
Thanks Brandon. That worked like a charm. I knew it was something with the
syntax that I was just not understanding.
Chris...
"Brandon Goodin" <[EMAIL PROTECTED]>
04/23/2008 07:38 PM
Please respond to
user-java@ibatis.apache.org
To
user-java@ibatis.apache.org
cc
Subject
Re: removeFirstPre
I'm having some trouble with the syntax of removeFirstPrepend. I have a
procedure that I am attempting to invoke and all of the parameters are
optional. SO I've embedded the content within the dynamic tag as
documented and specified on each conditional element
removeFirstPrepend="true", but the
Caching regular results is all that I am interested in. So does this
currently work?
I have the following defined:
And here is where I use it:
So am I to understand that this is all I should need for it to work with a
procedure?
Thanks for the help Clinton...
"Cl
Is this true? Caching does not work with stored procedures? Is there a
work around or is a patch expected?
Thanks...
Chris
"Jason Bennett" <[EMAIL PROTECTED]>
04/17/2008 12:32 PM
Please respond to
user-java@ibatis.apache.org
To
cc
Subject
iBatis-362 - Caching broken for stored procs
Did you search the archives? I found the following threads pertaining to
your issue.
http://www.mail-archive.com/user-java@ibatis.apache.org/msg10469.html
http://mail-archives.apache.org/mod_mbox/ibatis-dev/200704.mbox/[EMAIL
PROTECTED]
http://www.nabble.com/Re:-Ibatis-throttle---possible-dead
I think your exception shows you clearly that this is not an iBatis issue
but rather an Apache Commons DBCP issue. Review your documentation and
configuration of the connection pool.
manypoints <[EMAIL PROTECTED]>
02/04/2008 03:21 PM
Please respond to
user-java@ibatis.apache.org
To
user-j
Agreed. You should transform the string
representation into a java.util.Date object before passing it off to the
database. (Regardless of the vendor) That way the JDBC driver will handle
the work for you.
(Separation of concerns)
"Larry Meadors"
<[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECT
I'm using iBatis 2.3.0,
and have been for some time. A new requirement has come along and I will
need to expose some of our applications services to external parties. Not
an issue using Spring. I have lot's of choices. (I think I'm going to tread
down the path of the simple HTTP exporter to begin
I can't remember. That was almost 3
years ago and I've fortunately forgotten most of it. :-)
Christopher Lamey <[EMAIL PROTECTED]>
11/21/2007 12:12 PM
Please respond to
user-java@ibatis.apache.org
To
cc
Subject
Re: "encoding not supported"-error
using iBATIS with db2 on z/os
In addition, I've worked with DB2 previously
on a z/OS system utilizing the type driver supplied by IBM. The database
was expecting EBCDIC and the data I was working with in the Java world
was ASCII coming in from an XML document encoded in UTF-8. The JDBC driver
did a marvelous job of converting
Just for future reference, to get this
to work the proper javaType definition is "[B".
This will allow the ClassLoader to instanciate a Class of type byte[].
Chris Mathrusse
[EMAIL PROTECTED]
Sybase, Inc
One Sybase Drive
Dublin, CA 94568
(925) 236-5553
[EMAIL PROTECTED]
09/14/2007 02:32 P
I'm writing a TypeHandlerCallback for
my application, which is running against Sybase ASE. I'm trying to convert
a Block (IMAGE or TEXT) field into a byte[]. If I allow iBatis to handle
this with the default TypeConverter the Sybase JDBC driver raises an exception
complaining that getBlob() cannot
Yes, I am aware of that little snafu.
I've been bitten by this one before. There is a WIKI on this one pertaining
to implementing a ResultObjectFactory that can potentially correct this
issue. I still need to look into it though.
http://opensource.atlassian.com/confluence/oss/display/IBATIS/Lazy+
That was it! I removed the variable
definition from all my domain objects, performed a clean and build and
the lazy loading is now working correctly. Thanks for the suggestion.
[EMAIL PROTECTED]
09/11/2007 12:30 PM
Please respond to
user-java@ibatis.apache.org
To
user-java@ibatis.a
This may actually answer my question.
I recently added to my domain objects the following:
private
static
final
long
serialVersionUID
= -1699855014908794446L;
I added this to eliminate the warning
that Eclipse was giving me. Any object that I needed to touch as of recently
I would add this to. T
I've been spending a fair amount of
time on this now but I can't seem to get any further. Objects that I am
attempting to load lazily are simply loading. The relationships that are
1-M seem to be fine, meaning that they are not pre-loading, but any relationship
that I have that is a 1-1 seems to b
I'm using iBatis 2.3.0 and I'm having
some issues with the Lazy Loading. It seems that several of my objects
which should be lazy loaded are actually getting loaded when nothing is
accessing the object. The SQL select statements are simply getting fired
when the parent object is loaded. I've looke
I'm using iBatis 2.3.0 build# 677 with
JDK 1.5.11
I have the following 3 tables.
create
table
op_rule_drl (
id
numeric(18)
identity,
name
varchar(32)
not
null,
content
text
nul
You can define a ResultObjectFactory in the
SqlMapClient.
ExtendedSqlMapClient client = (ExtendedSqlMapClient)
getObject();
client.getDelegate().setResultObjectFactory(resultObjectFactory);
This factory will then be used by iBatis to instantiate all of your ResultMap objects. Take a look at t
If your login has the proper roll you could execute
SET CHAINED OFF
just prior to executing your stored procedure. My guess is
that you don't. Altering the procedure can be a way around it but you've already
stated that you cannot change this in the production system.
You are left with o
Yes. Using a Map is very simple and very flexible.
There are downsides to it so you need to weigh your options closely. But in the
given scenario that you gave a Map would be the best fit. You can use a Map as
either a parameter class, a result class or both. The choice is yours. That's
the
Yes, you can do that or you can pass in a java.util.Map
that contains your values. This is probably the simpler.
java.util.Map map = new
java.util.Hashmap();
map.put("value1", date1);
map.put("value2", date2);
From: vinays84 <[EMAIL PROTECTED]>
[mailto:vinays84 <[EMAIL PROTECTED]>] Sent:
Take a look at the Quartz timer. If your are using Spring
it is easy to use and configure.
From: "Ashish Kulkarni"
<[EMAIL PROTECTED]> [mailto:"Ashish Kulkarni"
<[EMAIL PROTECTED]>] Sent: Friday, June 01, 2007
12:30 PMTo: user-java@ibatis.apache.orgSubject: checking
for Database changes
H
Title: Sybase stored proc
There are a few solutions to your problem. One it to ensure
that you have a transaction started before you invoke the sp. All sp's have a
default mode. The default is usually Unchained. If it is then it is required
that the sp be executed within a transaction. You ca
I think you need to specify the alias as
follows:
select @@IDENTITY AS tkreq
selectKey>
and it is always a good idea to specify the
type. (pre or post) I can't remember which is the default so I always specify
the val
I found the problem. I was trying to be clever and
support a bi-directional relationship.
Message -- 1*
--> MessageMetaData
MessageMetaData -- *1 -->
Message
I had my SQLMap defined as follows for the MetaData
column:
result column="Message_id" property="metaData" select="MessageMetaD
Yes I do. The interesting thing is that Lazy loading is
working on some of my other objects but not on this one.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of "Larry Meadors"
<[EMAIL PROTECTED]>Sent: Thursday, May 24, 2007 8:12
PMTo: user-java@ibatis.apache.orgSubject: Re:
I've got one SQLMap
for an object that has children. For some reason when I execute a select and
have properties of the result object perform selects to retrieve the adjacent
objects the lazy load does not seem to work, but rather the adjacent select
statements are being fired and the data i
First, your problem with JConnect. There is documented
in the JConnect reference guide one sentence that you should never
overlook.
Executing stored procedures
•If you execute a stored procedure in a CallableStatement object
that represents parameter values as question marks, you get bette
Are you setting the Sybase JConnect property
IGNORE_DONE_IN_PROC=true? If not then you probably won't see the exception
unless you process all of the returned resultSets. This is by design. If your
only interested in the last resultSet, the one that actually contains the error,
then you will
I'm attending
JavaOne this week in San Francisco and of course I had to stop by the book store
to see if they had a copy of "iBatis In Action". Sadly on Tuesday, Day one, of
the conference I found no copies on display. Surely this was an oversight on
someone's part because I saw many copies
IMAGE will work and maps easily to byte[]. TEXT should
map easily to String. I've used both and they both work very well. I do however
prefer to use IMAGE data type when it comes to persisting
XML.
From: "Steven G. Sajous"
<[EMAIL PROTECTED]> [mailto:"Steven G. Sajous"
<[EMAIL PROTECTED]
I'm using Sybase ASE and iBatis with an IMAGE field and I
have no problems. I'm assigning the data to a byte[] which is what I you
are attempting, I believe. Sybase does not have BLOB data type but does
have IMAGE and TEXT data types so you should be covered with what you are
attempting. Can
I'm using iBatis with Spring for XA and have no problems.
It is difficult getting all the technologies to play together but XA is
difficult and it requires a bit of patience. I'm currently using Spring 2.0.2
with iBatis 2.3.0. My transaction manager is Bitronix as I am not running within
JBo
You forgot to assign a resultMap to
your element. Try the following:
resultMap="fetch-ban-policies-map">
Chris Mathrusse
[EMAIL PROTECTED]
Sybase, Inc
One Sybase Drive
Dublin, CA 94568
(925) 236-5553
Paul Sanders <[EMAIL PROTECTED]>
04/11/2007 01:13 PM
Please respond to
user-java@ib
I'm running into a
rather odd and difficult issue to nail down and I believe it is associated to
the way connections are cached.
iBatis:
2.3.0.668
Spring:
2.0
Transaction Manager:
Bitronix
DB: Sybase ASE
12.0.0.8
JDBC Driver: Sybase
JConnect 6.0
I've got a running
transaction that I
You should use Spring to manage all of your objects, that
includes your Dao's. Next you will need to use an external Transaction Manager
that supports XA 2pc. There are several out there to choose from. I would
recommend Bitronix (http://bitronix.be/)
or Atomikos (http://www.atomikos.com/).
Download the Spring framework. There is a JPetstore sample
application that uses iBatis in the samples directory.
From: legolas <[EMAIL PROTECTED]>
[mailto:legolas <[EMAIL PROTECTED]>] Sent: Friday, February
23, 2007 1:25 AMTo: user-java@ibatis.apache.orgSubject: I
am looking to something
Yes, but usually I see that used with properties of the
Result class. How can I use that with the Result class
itself?
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of "Larry Meadors"
<[EMAIL PROTECTED]>Sent: Monday, February 19, 2007 5:10
AMTo: user-java@ibatis.apache.orgSu
Yes, but usually I see that used with properties of the
Result class. How can I use that with the Result class
itself?
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of "Larry Meadors"
<[EMAIL PROTECTED]>Sent: Monday, February 19, 2007 5:10
AMTo: user-java@ibatis.apache.orgSu
I have a class named
Message which has a type (REQUEST, CONFIRM) based upon an enum. I want to be
able to define the Message class as abstract and define RequestMessage
and ConfirmMessage classes. Based upon a select from the Message table and
the type value contained within the type column,
I have a class named
Message which has a type (REQUEST, CONFIRM) based upon an enum. I want to be
able to define the Message class as abstract and define RequestMessage
and ConfirmMessage classes. Based upon a select from the Message table and
the type value contained within the type column,
I'm currently using Bitronix Transaction Manager (http://www.bitronix.be/)
And there is also Atomikos (http://www.atomikos.com/home.html)
From: Mark Volkmann <[EMAIL PROTECTED]>
[mailto:Mark Volkmann <[EMAIL PROTECTED]>] Sent: Wednesday,
February 14, 2007 3:11 PMTo:
user-java@ibatis.apac
Yes, so long as you use an external transaction
manager.
From: Mark Volkmann <[EMAIL PROTECTED]>
[mailto:Mark Volkmann <[EMAIL PROTECTED]>] Sent: Wednesday,
February 14, 2007 2:46 PMTo:
user-java@ibatis.apache.orgSubject: XA
transactions
Can iBATIS work with XA transactions? I surfed the
I'm getting a very
odd error that states:
The error
occurred while applying a result map.
Check the
HomeCompany.HomeCompanyResult.
The error
happened while setting a property on the result object.
Cause:
org.omg.CORBA.MARSHAL: bad UTF-8 data vmcid: 0x0 minor code: 0 completed:
No
The w
This is the first
time I've ever come across this and it's causing me a bit of a headache. This is
not an iBatis issue but rather a Sybase JConnect issue. (As I see
it)
I have a stored proc
that I am attempting to execute to perform an insert. (32 parameters) All of
which allow null to be
Yes, you remember correctly. That value,
IGNORE_DONE_IN_PROC, will tell ASE to only return the finally ResultSet and not
all the others produced during the execution of the sp. (Refer to the JConnect
documentation)
Great memory Jeff!!
From: "Jeff Butler"
<[EMAIL PROTECTED]> [mailto:"Jeff
How about searching the archives?
http://www.mail-archive.com/user-java@ibatis.apache.org/
From: "Tamilselvan Radha Krishnan"
<[EMAIL PROTECTED]> [mailto:"Tamilselvan Radha Krishnan"
<[EMAIL PROTECTED]>] Sent: Tuesday, November
28, 2006 10:12 AMTo:
Subject: RE: Need help on nested N
+ 1 q
This worked like a charm. Thanks for the suggestion. I hadn't really
thought of doing this but it makes perfect sense and it's extremely
easy.
From: "Niels Beekman" <[EMAIL PROTECTED]>
[mailto:"Niels Beekman" <[EMAIL PROTECTED]>] Sent: Saturday,
November 04, 2006 3:35 AMTo:
Subject: RE: d
-1.
I actually found a use for this and I am using it currently. Please don't
ask me to go find it in my code as it's been months since I visited it, but I
did find a valid use case for it.
From: "Jeff Butler"
<[EMAIL PROTECTED]> [mailto:"Jeff Butler"
<[EMAIL PROTECTED]>] Sent: Sunday, Nov
Well I did something similar but I still need to
perform the 'else'.
My problem is that the above will apply the resultMap
if the field part_no is null, but how do I apply a different resultMap if
part_no is not null. I don't want to test for all possible values I only wan
Can I use the discriminator and
sub map to test for null values? Meaning if I define the discriminator for a
field and I want to apply one result map if the field is null and another if it
is not, how do I define this?
Thanks
Chris Mathrusse
[EMAIL PROTECTED]
(925) 236-5553
Just a follow up, I sync'ed with SVN and rebuilt iBatis. After updating
the jars in my application everything works perfectly. No more exceptions being
caused by statement.close() being called twice.
Thanks for the prompt resolution on this issue,
Clinton.
From: [EMAIL PROTECTED]
[mailto
Fabulous! Then I won't bother opening a JIRA. Thanks for the prompt
response to this one Clinton. It's greatly appreciated. I'll sync in the morning
and rebuild.
From: "Clinton Begin"
<[EMAIL PROTECTED]> [mailto:"Clinton Begin"
<[EMAIL PROTECTED]>] Sent: Saturday, October 28, 2006
9:53 PM
Yes, if I disable logging all together the error does not occur. I'm
guessing that this is something that you have seen
before.
From: "Jeff Butler"
<[EMAIL PROTECTED]> [mailto:"Jeff Butler"
<[EMAIL PROTECTED]>] Sent: Friday, October 27, 2006 12:40
PMTo: user-java@ibatis.apache.orgSubject:
Hi Clinton,
I've run into a bit of a snag
in the SqlExecutor class, closeStatement method. (Line 501) It seems that this
class caches statements within the session object. In the closeStatement method
there is an evaluation:
if
(!session.hasPreparedStatement(ps)) { if (ps
!= null
I'm using 2.2.0 that I built from source on 9/22/06. (I guess that's old
by now)
From: Tom Duffey <[EMAIL PROTECTED]>
[mailto:Tom Duffey <[EMAIL PROTECTED]>] Sent: Tuesday,
October 17, 2006 8:40 AMTo:
user-java@ibatis.apache.orgSubject: Re: Problem w/enum and
TypeHandlerCallback
On Oct
My enums are enclosed within another class, not external. As an
example:
public class DocumentStore extends DomainObject {
public static enum MsgType { REQUEST, CONFIRM }
The TypeHandler declaration looks like the
following:
RE: Problem w/enum and TypeHandlerCallback
I'm using Enums without difficulty. I've implemented a
TypeHandlerCallback to accommodate the set and get in the following
manner:
public Object getResult(ResultGetter getter) throws SQLException {
String value = getter.getString();
if (getter.wasNull())
return null;
return YourEnum.valueOf(
Sweet!!! That did the trick.
Thanks very much Larry!
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of "Larry Meadors"
<[EMAIL PROTECTED]>Sent: Tuesday, October 10, 2006 3:57
PMTo: user-java@ibatis.apache.orgSubject: Re: Enum
typeHandlerCallback
An inner enum class? Hmm, sho
I'm attempting to implement a
TypeHandlerCallback to handle an Enum. The Enum is declared within a class but I
can't seem to figure out how to do this correctly. I keep getting an exception
thrown at startup because iBatis cannot seem to load the enum. In the Resources
class, the method clas
This is an Oracle generated message and it's telling you rather clearly
that your procedure cannot be found.
--- Cause: java.sql.SQLException: ORA-06550:
line 1, column 7:PLS-00221: 'GET_KEY_2' is not a procedure or is
undefinedORA-06550: line 1,
column 7:
One
thing that I would suggest i
Again, look at the JavaDocs. You've got a byte[], so to write you could
use a ByteArrayOutputStream. To read you could use a ByteArrayInputStream. There
are many other classes in the java.io package that lend themselves to how and
where you write the data.
From: soussou97 <[EMAIL PROTECTED
Once you have a byte[] you can read it using a ByteArrayInputStream and you can write it using ByteArrayOutputStream.
You should look at the JavaDocs to learn more about these
classes.
For reading the byte[] you could, for example, do the
following:
java.sql.Connection connection = this.
When I was working with Oracle and needed to store XML
documents in the database I defined the column type as LONG RAW. Then I was able
to stream the data into the table by using the following:
PreparedStatement
statement = connection.prepareStatement("insert into DOCUMENTSTORE
value
Wouldn't this behavior effect the caching mechanism? If
the PreparedStatement is never found in the session then wouldn't a new
PreparedStatement be created each time?
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Sent: Wednesday, September
27, 2006 2:26 PMTo: user-java@ibatis.apache.o
I think I found it. The $Proxy97 class is a java.lang.reflect.Proxy
instance and the problem lies in the class com.ibatis.common.jdbc.logging.PreparedStatementLogProxy. When the equals
method is invoked control is being passed to this class. The
invoke method is being called and control falls
1 - 100 of 141 matches
Mail list logo