[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] VB .NET InvalidCastException on Demo Client

Bradley Jonas wrote:
Thanks for the help - updating JDK/JRE allowed me to get past that
error. I am still running into some problems though - this time using

Every time I have some type of return object (i.e. a subscription or
connection), and the code tries to write a property of that return
object to the console, I get an Invalid Cast

I think you have a JDK/JRE or xmlBlaster version mismatch/inconistency.

Please do again (with JDK 1.5: check with 'java -version')

  build  -DJRE_HOME=C:\PROGRA~1\Java\j2re1.5.0  activex

start the server

  java org.xmlBlaster.Main

and try the example in


In Visual Studio you need to add a Reference to the


COM object and everything should run out of the box.

Exception:System.InvalidCastException: Cast from type '_ComObject' to type 'String' is not valid. at Microsoft.VisualBasic.CompilerServices.StringType.FromObject(Object Value) at Microsoft.VisualBasic.CompilerServices.ObjectType.StrCatObj(Object vLeft, Object vRight) at XMLBlasterClient.HelloWorld3.HelloWorld3() ln. 88

In this case - line 88 is:
         Console.WriteLine("Published message id=" & _
                       publishReturnQos.getRcvTimestamp().toXml("", True))
Another line where I got an error was:
        Console.WriteLine("Got subscribe response:" & _

It's these .getXXX calls that are causing the problem.

On the XMLBlaster server console, I see:

[Nov 2, 2004 1:48:10 PM WARN  XmlBlaster.SOCKET.tcpListener-brad SOCKET-HandleCl
ient-brad] Error parsing TCP data from '/', check if client a
nd server have identical compression or SSL settings: java.net.SocketException:
Connection reset

As you don't use SSL or compression on either side this is not the error. The connection reset is probably caused when you abrupt stop the client without a proper disconnect, so it is OK, just ignore it in this case.


Thanks in advance for any help!!

-- http://www.xmlBlaster.org