Jim,
I created an app based off the example on the nms page just to make sure things are working. Things compiled fine, but when I ran I get the following error...

Macintosh:myDotNetApp nmittler$ mono hello.exe

** (hello.exe:174): WARNING **: Missing method Set in assembly /Users/ nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/build/mono-2.0/ debug/Apache.NMS.ActiveMQ.dll, type System.Threading.EventWaitHandle

Unhandled Exception: System.MissingMethodException: Method not found: 'System.Threading.EventWaitHandle.Set'. at Apache.NMS.ActiveMQ.Transport.WireFormatNegotiator.Start () [0x00000]
  at Apache.NMS.ActiveMQ.Transport.TransportFilter.Start () [0x00000]
  at Apache.NMS.ActiveMQ.Transport.TransportFilter.Start () [0x00000]
at Apache.NMS.ActiveMQ.Connection..ctor (ITransport transport, Apache.NMS.ActiveMQ.Commands.ConnectionInfo info) [0x00000] at Apache.NMS.ActiveMQ.ConnectionFactory.CreateConnection (System.String userName, System.String password) [0x00000] at Apache.NMS.ActiveMQ.ConnectionFactory.CreateConnection () [0x00000]
  at Hello.Main (System.String[] args) [0x00000]

Looking at the online docs for this method, it sounds like it's only supported since .NET v2.0. Given that mono does not fully support 2.0, might this be another compatibility issue with mono?

Thanks,
Nate

On Dec 19, 2007, at 8:02 AM, Jim Gomes wrote:

Nathan,

Part of the patch I am readying already includes a fix for these errors. Let me add in a patch for the GetHostEntry() problem you found, and I will send the patch file to you directly so you can apply it. I'd like to see if my recent changes will fix any of the problems you have been reporting.

Thanks,
Jim

On Dec 19, 2007 6:11 AM, Nathan Mittler <[EMAIL PROTECTED]> wrote:

Jim,
That seemed to do the trick ... almost there, I think.

The build of the tests fails now ... is there a way I can just skip
the tests, perhaps?

compile-main:

    [echo] Building the Apache.NMS.ActiveMQ library
     [csc] Compiling 229 files to '/Users/nmittler/activemq-dotnet/
Apache.NMS.ActiveMQ/trunk/build/mono-1.0/debug/ Apache.NMS.ActiveMQ.dll'.
     [csc] /Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/
src/main/csharp/OpenWire/V1/DataStructureSupportMarshaller.cs(19,1):
warning CS1587: XML comment is not placed on a valid language element
     [csc] /Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/
src/main/csharp/OpenWire/V1/ConnectionControlMarshaller.cs(89,27):
warning CS0219: The variable `info' is assigned but its value is never
used
     [csc] /Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/
src/main/csharp/OpenWire/V2/ConnectionControlMarshaller.cs(89,27):
warning CS0219: The variable `info' is assigned but its value is never
used
     [csc] /Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/
src/main/csharp/Transport/Stomp/StompWireFormat.cs(241,53): warning
CS0219: The variable `textMessage' is assigned but its value is never
used
     [csc] Compilation succeeded - 4 warning(s)

compile-test:

    [echo] Building the Apache.NMS.ActiveMQ.Test library
 [asminfo] Generated file '/Users/nmittler/activemq-dotnet/
Apache.NMS.ActiveMQ/trunk/src/test/csharp/CommonAssemblyInfo.cs'.
     [csc] Compiling 27 files to '/Users/nmittler/activemq-dotnet/
Apache.NMS.ActiveMQ/trunk/build/mono-1.0/debug/
Apache.NMS.ActiveMQ.Test.dll'.
     [csc] /Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/
src/test/csharp/NMSConnectionFactoryTest.cs(31,13): error CS0246: The
type or namespace name `NMSConnectionFactory' could not be found. Are
you missing a using directive or an assembly reference?
     [csc] /Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/
src/test/csharp/NMSConnectionFactoryTest.cs(39,13): error CS0246: The
type or namespace name `NMSConnectionFactory' could not be found. Are
you missing a using directive or an assembly reference?
     [csc] /Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/
src/test/csharp/NMSConnectionFactoryTest.cs(48,13): error CS0246: The
type or namespace name `NMSConnectionFactory' could not be found. Are
you missing a using directive or an assembly reference?
     [csc] Compilation failed: 3 error(s), 0 warnings

BUILD FAILED - 0 non-fatal error(s), 7 warning(s)

/Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-
common.xml(417,6):
External Program Failed: /Library/Frameworks/Mono.framework/Versions/
1.2.6/lib/mono/1.0/mcs.exe (return code was 1)

Total time: 9.9 seconds.

Thanks again,
Nate

On Dec 18, 2007, at 9:19 PM, Jim Gomes wrote:

OK, so now we are getting further.  I develop on Windows with .NET
2.0, and
it looks like the System.Net.Dns.GetHostEntry() is a newer 2.0 API.
For the
time being, you can probably downgrade that bit of code to the older
equivalent using GetHostByName() or GetHostByAddress(), or some other
variant.  I am not at my regular machine right now, so I can't try
it out
directly.  I just did a quick look-up on the Mono Project home page
and saw
that their class library is not in parity with the 2.0 API.  If you
can try
changing that bit of code and get a solution to work, send it to me
and I
can include it in my patch stuff.

On Dec 18, 2007 9:08 PM, Nathan Mittler <[EMAIL PROTECTED]>
wrote:

Thanks Jim,
That definitely helps :).  FYI, it looks like I had to add this to
my .bash_profile on OS X to get nant to work (this should probably
end
up in the instructions for OS X):

export PKG_CONFIG_PATH="/Library/Frameworks/Mono.framework/ Versions/
Current/lib/pkgconfig/:${PKG_CONFIG_PATH}"

The build got much further, but ends with the following:

compile-main:

   [echo] Building the Apache.NMS.ActiveMQ library
[asminfo] Generated file '/Users/nmittler/activemq-dotnet/
Apache.NMS.ActiveMQ/trunk/src/main/csharp/CommonAssemblyInfo.cs'.
    [csc] Compiling 229 files to '/Users/nmittler/activemq-dotnet/
Apache.NMS.ActiveMQ/trunk/build/mono-1.0/debug/
Apache.NMS.ActiveMQ.dll'.
[csc] /Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/ trunk/ src/main/csharp/OpenWire/V1/ DataStructureSupportMarshaller.cs(19,1): warning CS1587: XML comment is not placed on a valid language element [csc] /Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/ trunk/
src/main/csharp/OpenWire/V1/ConnectionControlMarshaller.cs(89,27):
warning CS0219: The variable `info' is assigned but its value is
never
used
[csc] /Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/ trunk/
src/main/csharp/OpenWire/V2/ConnectionControlMarshaller.cs(89,27):
warning CS0219: The variable `info' is assigned but its value is
never
used
[csc] /Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/ trunk/
src/main/csharp/Transport/Stomp/StompWireFormat.cs(241,53): warning
CS0219: The variable `textMessage' is assigned but its value is never
used
[csc] /Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/ trunk/
src/main/csharp/Transport/Tcp/TcpTransportFactory.cs(82,49): error
CS0117: `System.Net.Dns' does not contain a definition for
`GetHostEntry'
    [csc] /Library/Frameworks/Mono.framework/Versions/1.2.6/lib/
mono/gac/System/1.0.5000.0__b77a5c561934e089/System.dll (Location of
the symbol related to previous error)
    [csc] Compilation failed: 1 error(s), 4 warnings

BUILD FAILED - 0 non-fatal error(s), 6 warning(s)

/Users/nmittler/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-
common.xml(357,6):
External Program Failed: /Library/Frameworks/Mono.framework/ Versions/
1.2.6/lib/mono/1.0/mcs.exe (return code was 1)

Total time: 7.1 seconds.

I just installed the latest mono build for OS X ... could there be
something wrong with my installation?

Thanks,
Nate





Reply via email to