Andreas,

Can you please post your question to the Java driver ml
https://groups.google.com/a/lists.datastax.com/forum/#!forum/java-driver-user
as you'll have better chances to get an answer there.

thanks

On Thu, Feb 5, 2015 at 9:10 AM, Andreas Finke <andreas.fi...@solvians.com>
wrote:

>  Hi,
>
>
>
> I encountered the problem that in Java the Session does not create a valid
> UserType for my corresponding CQL user defined type.
>
>
>
> CQL_SCHEMA:
>
>
>
> create keyspace if not exists quotes
>
> WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1
> };
>
>
>
> CREATE TYPE IF NOT EXISTS quotes.price (
>
>                 value double,
>
>                 size bigint,
>
>                 timestamp bigint,
>
>                 delay int
>
> );
>
>
>
> JAVA
>
>
>
> UserType priceType =
> session.getCluster().getMetadata().getKeyspace("quotes").getUserType("price");
>
> Assert.assertNotNull(priceType); // true
>
> Assert.assertEquals("price", priceType.getTypeName()); // true
>
> Assert.assertEquals(4, priceType.getFieldNames().size()); //
> AssertionFailedError: expected:<4> but was:<0>
>
>
>
> I am testing with Cassandra v.2.1.2 on Windows using Datastax Java Driver
> 2.1.2.
>
>
>
> I am thankful for any suggestions.
>
>
>
> Regards
>
> Andi
>



-- 

[:>-a)

Alex Popescu
Sen. Product Manager @ DataStax
@al3xandru

Reply via email to