You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Maxim Smityukhov (JIRA)" <ji...@apache.org> on 2012/10/16 15:41:05 UTC

[jira] [Commented] (QPID-3491) windows c++ build with MSSQL storage cannot start with persisted messages in the store

    [ https://issues.apache.org/jira/browse/QPID-3491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476996#comment-13476996 ] 

Maxim Smityukhov commented on QPID-3491:
----------------------------------------

¡Hola, Amigos! :)

Recently I got the same troubles.
The problem was with the zero-length messages.

look at \qpid\store\ms-sql\MessageRecordset.cpp, method
...
void
MessageRecordset::recover(qpid::broker::RecoveryManager& recoverer,
                          std::map<uint64_t, broker::RecoverableMessage::shared_ptr>& messageMap)
{
.......................
................


        long contentLength = blobSize - headerFieldLength - headerSize;
        if (msg->loadContent(contentLength)) {
            BlobAdapter content(contentLength);
             content =
                rs->Fields->Item["fieldTableBlob"]->GetChunk(contentLength);
            msg->decodeContent(content);
        }
..............
}

If contentLength is zero, then 

"
inline _variant_t Field20::GetChunk ( long Length ) {
    VARIANT _result;
    VariantInit(&_result);
    HRESULT _hr = raw_GetChunk(Length, &_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _variant_t(_result, false);
}
"
raises an error "Unknown error 0x800A0BB9: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."

because HRESULT _hr = raw_GetChunk(Length, &_result); sets _result to VT_NULL and returns 0x800A0BB9

I don't know is it wrapper (qpid\store\mssql_store.dir\debug\msado15.tli) correct
"
// Wrapper implementations for type library C:\Program Files\Common Files\System\ado\msado15.dll
// compiler-generated file created 09/26/12 at 12:18:42 - DO NOT EDIT!
"
or not... but my decision was to change "if (msg->loadContent(contentLength))" with the "if (contentLength > 0 && msg->loadContent(contentLength))"

The result is broker started and drain received all restored messages from the queue.

                
> windows c++ build with MSSQL storage cannot start with persisted messages in the store
> --------------------------------------------------------------------------------------
>
>                 Key: QPID-3491
>                 URL: https://issues.apache.org/jira/browse/QPID-3491
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: 0.12
>         Environment: Windows 7 x64
> Built with Visual Studio 2008 (tested both 32-bit and 64-bit build)
> cmake 2.8.4
>            Reporter: Brandon Pedersen
>
> Problem:
> Using ONLY the C++ Windows broker with the MSSQL storage provider I cannot start the broker if I have messages persisted in the store. I have tested the Java broker on Windows with the BDB store, and the C++ broker on Linux with the BDB store (I think it's BDB...) and neither of them have this problem, so I am assuming it is just a problem with the MSSQL storage provider.
> Steps to reproduce:
> - get the C++ broker up and running on Windows with the MSSQL storage provider
> - run qpid-config add exchange news-service topic --durable
> - run qpid-config add queue mytopicq --durable
> - run qpid-config bind news-service mytopicq *.news
> - Modify the spout script and set durable to True on the Message
> - Run spout news-service/usa.news
> - Shut down the broker
> - Try to start the broker
> Results:
> It fails to start with the following output:
> 2011-09-15 01:10:42 notice MSSQL: Database located: QpidStore
> 2011-09-15 01:10:42 critical Unexpected error: Error recovering
> messages: Unknown error 0x800A0BB9: Arguments are of the wrong type,
> are out of acceptable range, or are in conflict with one another.
> Comments:
> This should probably be a blocker, but since I have gotten the Java broker up and running with the BDB store I am not terribly concerned about this now...though it is still a big issue

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org