You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "yanglimin@dssp.com.cn" <ya...@dssp.com.cn> on 2014/02/27 03:01:36 UTC
Openwire C library problem
I'm trying to get the hello world example to run using the C library for
Openwire.
So far, I've had no luck... I get an error message saying "Could not
connect: Cannot allocate memory (12).
Digging into the code, it looks like the problem happens in
ow_create_object() - the passed object is of type 99 which drops out of the
function's switch statement.
Anyone have any ideas on why this function is being sent a type 99?
Since I can't step through the code with my debugger without crashing
activemq, I went through the call stack manually and have written it below:
main
amqcs_connect
ow_read_command
ow_unmarshal_object
ow_unmarshal_WireFormatInfo
ow_unmarshal_nested_object
ow_create_object \\type 99 is not valid
ow_unmarshal_nested_object
ow_unmarshal_WireFormatInfo
ow_unmarshal_object
ow_read_command \\fail
Again, any help or advice would be greatly appreciated!
ylmylm224@126.com
Re: Openwire C library problem
Posted by Timothy Bish <ta...@gmail.com>.
On 02/26/2014 09:01 PM, yanglimin@dssp.com.cn wrote:
> I'm trying to get the hello world example to run using the C library for
> Openwire.
> So far, I've had no luck... I get an error message saying "Could not
> connect: Cannot allocate memory (12).
> Digging into the code, it looks like the problem happens in
> ow_create_object() - the passed object is of type 99 which drops out of the
> function's switch statement.
> Anyone have any ideas on why this function is being sent a type 99?
> Since I can't step through the code with my debugger without crashing
> activemq, I went through the call stack manually and have written it below:
> main
> amqcs_connect
> ow_read_command
> ow_unmarshal_object
> ow_unmarshal_WireFormatInfo
> ow_unmarshal_nested_object
> ow_create_object \\type 99 is not valid
> ow_unmarshal_nested_object
> ow_unmarshal_WireFormatInfo
> ow_unmarshal_object
> ow_read_command \\fail
> Again, any help or advice would be greatly appreciated!
>
>
>
>
> ylmylm224@126.com
The Openwire C client is not maintained so it's probably not worth
spending a lot of time on.
Are you confined to using C code or can you use C++, we have a very
mature C++ client ActiveMQ-CPP
http://activemq.apache.org/cms/
And there is a C wrapper lib
https://github.com/fusesource/fusemq-c
--
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/