Quantcast

can't get mondrian connection

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

can't get mondrian connection

leks
Hi All

I can't get mondrian connection with the following error:

Exception in thread "main" java.lang.VerifyError: (class: mondrian/olap/Util, method: matches signature: (Lorg/olap4j/mdx/IdentifierSegment;Ljava/lang/String;)Z) Incompatible argument to function
        at mondrian.olap.DriverManager.getConnection(DriverManager.java:52)

Please note:
1. I try running simple Java console application, no any web servers.
2. it doesn't depend on content of xml file, which defines cube. I tried differnet xml files which work fine with other OLAP Mondrian based tools.
3. simple JDBC connection to LucidDb works fine and sql queries work fine as well.

Source code which causes error:


Class.forName("org.luciddb.jdbc.LucidDbClientDriver");
mondrian.olap.Connection conn = mondrian.olap.DriverManager.getConnection(""
                    + "Provider=Mondrian;"
                    + "Jdbc=jdbc:luciddb:http://localhost;"
                    + "JdbcDrivers=org.luciddb.jdbc.LucidDbClientDriver;"
                    + "JdbcUser=sa;"
                    + "Catalog=file:/home/leks/projects/project.mondrian.xml",
                    null);


I also used another approach like this:
Class.forName("org.luciddb.jdbc.LucidDbClientDriver");
Class.forName("mondrian.olap4j.MondrianOlap4jDriver");
java.sql.Connection conn = java.sql.DriverManager.getConnection(""
                    + "jdbc:mondrian:Jdbc=jdbc:luciddb:http://localhost;"
                    + "JdbcDrivers=org.luciddb.jdbc.LucidDbClientDriver;"
                    + "Catalog=file:/home/leks/projects/project.mondrian.xml");

and got the same error:

Exception in thread "main" java.lang.VerifyError: (class: mondrian/olap/Util, method: matches signature: (Lorg/olap4j/mdx/IdentifierSegment;Ljava/lang/String;)Z) Incompatible argument to function
        at mondrian.olap4j.MondrianOlap4jConnection.<init>(MondrianOlap4jConnection.java:129)
        at mondrian.olap4j.FactoryJdbc4Impl$MondrianOlap4jConnectionJdbc4.<init>(FactoryJdbc4Impl.java:369)
        at mondrian.olap4j.FactoryJdbc4Impl.newConnection(FactoryJdbc4Impl.java:34)
        at mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:119)


Thank you for response
Leks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't get mondrian connection

Julian Hyde-9
Looks like a mismatched version of mondrian and/or olap4j.

What version of mondrian are you running? Where did you download it from? Any other copies of mondrian.jar on your classpath?

What JDK?

Julian

On Dec 8, 2011, at 7:35 AM, leks wrote:

> Hi All
>
> I can't get mondrian connection with the following error:
>
> Exception in thread "main" java.lang.VerifyError: (class:
> mondrian/olap/Util, method: matches signature:
> (Lorg/olap4j/mdx/IdentifierSegment;Ljava/lang/String;)Z) Incompatible
> argument to function
>     at mondrian.olap.DriverManager.getConnection(DriverManager.java:52)
>
> Please note:
> 1. I try running simple Java console application, no any web servers.
> 2. it doesn't depend on content of xml file, which defines cube. I tried
> differnet xml files which work fine with other OLAP Mondrian based tools.
> 3. simple JDBC connection to LucidDb works fine and sql queries work fine as
> well.
>
> Source code which causes error:
>
>
> Class.forName("org.luciddb.jdbc.LucidDbClientDriver");
> mondrian.olap.Connection conn = mondrian.olap.DriverManager.getConnection(""
>                 + "Provider=Mondrian;"
>                 + "Jdbc=jdbc:luciddb:http://localhost;"
>                 + "JdbcDrivers=org.luciddb.jdbc.LucidDbClientDriver;"
>                 + "JdbcUser=sa;"
>                 +
> "Catalog=file:/home/leks/projects/project.mondrian.xml",
>                 null);
>
>
> I also used another approach like this:
> Class.forName("org.luciddb.jdbc.LucidDbClientDriver");
> Class.forName("mondrian.olap4j.MondrianOlap4jDriver");
> java.sql.Connection conn = java.sql.DriverManager.getConnection(""
>                 + "jdbc:mondrian:Jdbc=jdbc:luciddb:http://localhost;"
>                 + "JdbcDrivers=org.luciddb.jdbc.LucidDbClientDriver;"
>                 +
> "Catalog=file:/home/leks/projects/project.mondrian.xml");
>
> and got the same error:
>
> Exception in thread "main" java.lang.VerifyError: (class:
> mondrian/olap/Util, method: matches signature:
> (Lorg/olap4j/mdx/IdentifierSegment;Ljava/lang/String;)Z) Incompatible
> argument to function
>     at
> mondrian.olap4j.MondrianOlap4jConnection.<init>(MondrianOlap4jConnection.java:129)
>     at
> mondrian.olap4j.FactoryJdbc4Impl$MondrianOlap4jConnectionJdbc4.<init>(FactoryJdbc4Impl.java:369)
>     at
> mondrian.olap4j.FactoryJdbc4Impl.newConnection(FactoryJdbc4Impl.java:34)
>     at
> mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:119)
>
>
> Thank you for response
> Leks
>
> --
> View this message in context: http://luciddb-users.1374590.n2.nabble.com/can-t-get-mondrian-connection-tp7074685p7074685.html
> Sent from the luciddb-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Cloud Services Checklist: Pricing and Packaging Optimization
> This white paper is intended to serve as a reference, checklist and point of
> discussion for anyone considering optimizing the pricing and packaging model
> of a cloud services business. Read Now!
> http://www.accelacomm.com/jaw/sfnl/114/51491232/
> _______________________________________________
> luciddb-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/luciddb-users


------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't get mondrian connection

leks
thank you for quick response
i thought about the same thing and and replaced jars

initially i used jars from mondrian-3.3.0.14703.zip
there are
mondiran.jar  3.3.0.14703
olap4j.jar  1.0.0.445

then i could get connection with jars from saiku-server software lib directory
there are
mondiran.jar 3.3-SNAPSHOT
olap4j.jar 1.0.0-SNAPSHOT

i've just not investigated what difference is.
do you know what are correct jar versions?

thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't get mondrian connection

Julian Hyde-9


On Dec 9, 2011, at 3:00 AM, leks wrote:

> thank you for quick response
> i thought about the same thing and and replaced jars
>
> initially i used jars from mondrian-3.3.0.14703.zip
> there are
> mondiran.jar  3.3.0.14703
> olap4j.jar  1.0.0.445
>
> then i could get connection with jars from saiku-server software lib
> directory
> there are
> mondiran.jar 3.3-SNAPSHOT
> olap4j.jar 1.0.0-SNAPSHOT
>
> i've just not investigated what difference is.
> do you know what are correct jar versions?

I don't know what are the "correct" versions. It depends on the problem that you were having connecting. It's also not helpful that Saiku is distributed with "SNAPSHOT" versions -- we don't know exactly what versions went into these. However, your ClassVerifyError is caused by having different versions of the jar files on your class path. Clean out your classpath and hopefully you can find something that works.

Julian

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users
Loading...