Mapping an InetAddress to a Postgresql inet value
Mapping an InetAddress to a Postgresql inet value
- Subject: Mapping an InetAddress to a Postgresql inet value
- From: Miguel Arroz <email@hidden>
- Date: Sun, 23 Dec 2007 00:20:58 +0000
Hi!
I'm trying to define a Prototype to store an IP on a Postgres
database using the native inet type.
I tried first with toString and getByName, but I got an exception
that lead me to think that it's a binary format.
So, I did this:
And I got this:
INFO 00:07:21 (er.transaction.adaptor.Exceptions:106) -Database
Exception occured: java.lang.IllegalArgumentException: Unable to
convert value of class [B for attribute 'ip' in entity 'Respondent'
to adaptor type EOAttribute.AdaptorBytesType. Check the signature of
the conversion method java.net.InetAddress.getAddress().
WARN 00:07:21 (NSLog :41) -
<com.webobjects.appserver._private.WOComponentRequestHandler>:
Exception occurred while handling request:
com.webobjects.eoaccess.EOGeneralAdaptorException: Unable to convert
value of class [B for attribute 'ip' in entity 'Respondent' to
adaptor type EOAttribute.AdaptorBytesType. Check the signature of
the conversion method java.net.InetAddress.getAddress().
[2007-12-23 00:07:21 WET] <WorkerThread9>
com.webobjects.eoaccess.EOGeneralAdaptorException: Unable to convert
value of class [B for attribute 'ip' in entity 'Respondent' to
adaptor type EOAttribute.AdaptorBytesType. Check the signature of
the conversion method java.net.InetAddress.getAddress().
Any ideias? Of course I could dump this to a varchar, but this way
it would be much cooler.
Yours
Miguel Arroz
Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden