• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Mapping an InetAddress to a Postgresql inet value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:

PNG image



  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

  • Follow-Ups:
    • Re: Mapping an InetAddress to a Postgresql inet value
      • From: Francis Labrie <email@hidden>
  • Prev by Date: Re: Making example WO apps
  • Next by Date: Re: valid global ID could not be obtained for entity
  • Previous by thread: Making example WO apps
  • Next by thread: Re: Mapping an InetAddress to a Postgresql inet value
  • Index(es):
    • Date
    • Thread