You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2011/03/27 07:29:05 UTC
[jira] [Resolved] (CASSANDRA-2390) MarshalException is thrown when
cassandra-cli creates the example Keyspace specified by
conf/schema-sample.txt
[ https://issues.apache.org/jira/browse/CASSANDRA-2390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis resolved CASSANDRA-2390.
---------------------------------------
Resolution: Fixed
fixed in r1085877 by adding comparator=UTF8Type to the CF definition. Thanks for catching that!
> MarshalException is thrown when cassandra-cli creates the example Keyspace specified by conf/schema-sample.txt
> --------------------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-2390
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2390
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.5
> Reporter: Jingguo Yao
> Assignee: Jonathan Ellis
> Priority: Minor
> Fix For: 0.7.5
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Use the following steps to recreate the bug:
> 1. Checkout the source code from trunk. For my case, revision is 1085753.
> 2. Run "ant" to build cassandra.
> 3. Run "bin/cassandra -f" to start cassandra.
> 4. Run "bin/cassandra-cli -host localhost --file conf/schema-sample.txt".
> Then there is the following message:
> {quote}
> ... schemas agree across the cluster
> Line 9 => org.apache.cassandra.db.marshal.MarshalException: cannot parse 'birthdate' as hex bytes
> {quote}
> The root cause is BytesType's fromString method. FBUtilities's hexToBytes method is invoked with "birthdate". NumberFormatException is thrown since "birthdate" is not a hex string.
> {code:title=BytesType.java|borderStyle=solid}
> public ByteBuffer fromString(String source)
> {
> try
> {
> return ByteBuffer.wrap(FBUtilities.hexToBytes(source));
> }
> catch (NumberFormatException e)
> {
> throw new MarshalException(String.format("cannot parse '%s' as hex bytes", source), e);
> }
> }
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira