# WebSphere error: Wrong argument to Broker constructor

**URL:** <https://techcommunity.softwareag.com/t/websphere-error-wrong-argument-to-broker-constructor/59234>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [April 6, 2005, 10:35pm UTC](https://techcommunity.softwareag.com/t/websphere-error-wrong-argument-to-broker-constructor/59234 "2005-04-06T22:35:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David6](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@David6](https://techcommunity.softwareag.com/u/David6)\
**Post date:** [April 6, 2005, 10:35pm UTC](https://techcommunity.softwareag.com/t/websphere-error-wrong-argument-to-broker-constructor/59234/1 "2005-04-06T22:35:48Z")

</div>

I have built a Java component that uses Communicator through the entireX.jar to call the Natural RPC server on the mainframe. I’ve tested the code and run a sample application using this code with the Sun Java 1.4.2 VM.

However when my customer runs the same code under WebSphere with the IBM 1.4.1 VM they recieve the following exception.

java.lang.IllegalArgumentException: Wrong argument to Broker constructor.

The line that throws this excpetion is this where the two arguments are both Strings:  
broker = new Broker(brokerID, brokerUser);

I’m not sure what is causing this error but has the entireX.jar been tested with the IBM VM? Also I’ve tested this with an older version of WebSphere that has the IBM Java 1.3.1 VM and it works fine as well.

---

<div class="post-metadata">

**Author:** ![Rolf\_Bahlke](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rolf_bahlke/32/109_2.png) [@Rolf\_Bahlke](https://techcommunity.softwareag.com/u/Rolf_Bahlke)\
**Post date:** [April 7, 2005, 2:08pm UTC](https://techcommunity.softwareag.com/t/websphere-error-wrong-argument-to-broker-constructor/59234/2 "2005-04-07T14:08:33Z")

</div>

> [@](#):
>
> java.lang.IllegalArgumentException: Wrong argument to Broker constructor.

This exception is thrown when either the brokerid or the userid parameter is null or is an empty String. So this might be a user error.

BTW what version of the entirex.jar file are you using ?

---

<div class="post-metadata">

**Author:** ![David6](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@David6](https://techcommunity.softwareag.com/u/David6)\
**Post date:** [April 7, 2005, 5:32pm UTC](https://techcommunity.softwareag.com/t/websphere-error-wrong-argument-to-broker-constructor/59234/3 "2005-04-07T17:32:09Z")

</div>

Thanks for the response.

The class files in the entireX.jar are dated 1/23/2004, not sure what version.

---

<div class="post-metadata">

**Author:** ![David6](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@David6](https://techcommunity.softwareag.com/u/David6)\
**Post date:** [April 8, 2005, 6:53pm UTC](https://techcommunity.softwareag.com/t/websphere-error-wrong-argument-to-broker-constructor/59234/4 "2005-04-08T18:53:18Z")

</div>

FYI got it working now.

Seems the problem was not with the IBM VM or the entireX jar but developer error… they weren’t setting the IP and Port # for the broker.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:39pm UTC](https://techcommunity.softwareag.com/t/websphere-error-wrong-argument-to-broker-constructor/59234/5 "2021-04-02T14:39:43Z")

</div>


