• 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
Re: illegal argument error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: illegal argument error


  • Subject: Re: illegal argument error
  • From: "Jonathan Fleming" <email@hidden>
  • Date: Wed, 15 Jan 2003 17:13:19 +0000

For Chuck and anyone else interested in knowing the resolve of this problem:

I found that the binding on the WOForm for enctype was not set to "multipart/form-data" which cause the ClassCastException in this case

Regards
Jonathan






From: Chuck Hill <email@hidden>
To: Jonathan Fleming <email@hidden>
Subject: Re: illegal argument error
Date: Tue, 14 Jan 2003 13:47:33 -0800

Nothing obbvious jumped out. The file upload stuff seems fine. I guess the next step is to start removing pieces from the page until it starts to work. The error is during takeValues so it will be on a data input component.


Chuck




Jonathan Fleming wrote:

Hi Radwar,

You were right about the binding in the component, picThumbnail was bound to a WOTextField, but now I have a class cast exception given below:

Application:  JandMGeneralMaintenance
Error:  java.lang.ClassCastException
Reason:  java.lang.String
Stack trace:  File Line# Method Package

--------------------------------------------------------------------------------



WOFileUpload.java 56 takeValuesFromRequest com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest com.webobjects.appserver._private
WOForm.java 70 takeValuesFromRequest com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest com.webobjects.appserver._private
WOConditional.java 41 takeValuesFromRequest com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest com.webobjects.appserver._private
WOComponentContent.java 20 takeValuesFromRequest com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest com.webobjects.appserver._private
WOComponent.java 847 takeValuesFromRequest com.webobjects.appserver
WOComponentReference.java 106 takeValuesFromRequest com.webobjects.appserver._private
WODynamicGroup.java 81 takeChildrenValuesFromRequest com.webobjects.appserver._private
WODynamicGroup.java 89 takeValuesFromRequest com.webobjects.appserver._private
WOComponent.java 847 takeValuesFromRequest com.webobjects.appserver
WOSession.java 990 takeValuesFromRequest com.webobjects.appserver
WOApplication.java 1173 takeValuesFromRequest com.webobjects.appserver
WOComponentRequestHandler.java 191 _dispatchWithPreparedPage com.webobjects.appserver._private
WOComponentRequestHandler.java 279 _dispatchWithPreparedSession com.webobjects.appserver._private
WOComponentRequestHandler.java 314 _dispatchWithPreparedApplication com.webobjects.appserver._private
WOComponentRequestHandler.java 346 _handleRequest com.webobjects.appserver._private
WOComponentRequestHandler.java 414 handleRequest com.webobjects.appserver._private
WOApplication.java 1133 dispatchRequest com.webobjects.appserver
WOWorkerThread.java 158 runOnce com.webobjects.appserver._private
WOWorkerThread.java 231 run com.webobjects.appserver._private
Thread.java NA run java.lang


Any ideas?

Jonathan






From: Radwar <email@hidden>
To: "Jonathan Fleming" <email@hidden>
Subject: Re: illegal argument error
Date: Tue, 14 Jan 2003 08:08:05 -0500

What have you bound the picThumbnail in the component to? It looks like you have bound to a text field and when the values are tried to set it gets an error as it needs to be of
NSData. If you are getting in a file name there then you will have to convert that to NSData and then set it to the TbJobPicture as the picThumbnail.



On Monday, January 13, 2003, at 06:10 PM, Jonathan Fleming wrote:

Can anybody tell me what would most likey be causing this? I've looked and torn my classes apart and can not find the problem

Error: java.lang.IllegalArgumentException
Reason: While trying to invoke the set method "public void TbJobPicture.setPicThumbnail(com.webobjects.foundation.NSData)" on an object of type TbJobPicture we received an argument of type java.lang.String. This often happens if you forget to use a formatter.


Regards
Jonathan

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.





_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.



--

Chuck Hill  -  Village Idiot               email@hidden
Global Village Consulting Inc.             http://www.global-village.net



_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail




--

Chuck Hill  -  Village Idiot               email@hidden
Global Village Consulting Inc.             http://www.global-village.net


_________________________________________________________________
Help STOP SPAM: Try the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: ClassCastException...
  • Next by Date: Breakpoint don't work with WebObjects 5.2 and Project Builder 2.1
  • Previous by thread: Re: illegal argument error
  • Next by thread: xactisolevel not recognized
  • Index(es):
    • Date
    • Thread