Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

New Developer
Posts: 5
Registered: ‎01-13-2009
My Device: 8700;8100;8120;8800;8310;9000

Configuration does not match (IllegalArgumentException)

Hello Everybody,


I'm new to this forum and new to blackberry programming as well. I have this problem and its driving me crazy, so I hope that somebody here could help me.


I'm developing a midlet that makes http connection. When I reinstall midlet and want to open connection I get this error:


IllegalArgumentException with message "Configuration does not match"


This happens also if I close my midlet, open browser and visit a random URL, then close the browser open my midlet and I get the same error.


After this error my midlet is not able to open connection and I have to pull out the battery restart the phone to get midlet working again. I'm using BB8120 and BB8800 (this happens on both devices).


So my questions are:


- What's happening with blackberry after reinstall or update?

- Is there anything I can reset programatically when this exception occurs to get midlet working

- Can I prevent this exception?


Here is code, where exception is caught:

try { HttpConnection hc = (HttpConnection)Connector.open(url, Connector.READ_WRITE, true); // <-- Here } catch (IOException iox) { ... } catch (SecurityException sx) { ... } catch (IllegalArgumentException iax) { // this exception is raised with message: // "Configuration does not match" } catch (RuntimeException rtx) { ... }




New Developer
Posts: 5
Registered: ‎01-13-2009
My Device: 8700;8100;8120;8800;8310;9000

Re: Configuration does not match (IllegalArgumentException)

Any help or suggestions are appreciated.
BlackBerry Development Advisor
Posts: 15,407
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Configuration does not match (IllegalArgumentException)

What version of BlackBerry handheld software are you testing on?  You can find this under Options, About.  What route is your connection being made over (see link below).  Are you able to reproduce this with a very basic MIDlet and just the code in  your post?  Or is your MIDlet doing something else that is affecting this?


What Is - Different ways to make an HTTP or socket connection
Article Number: DB-00396


Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker