PDA

View Full Version : Internal Error while creating RolapSchema



vaninha
03-23-2003, 02:24 PM
Hi,
I'm trying the Mondrian Server, cause I'm wanting to use it in my M.Sc. thesis.
When I try a connection to a DriverManager I get an error that the org.hsqldb.jdbcDriver could not be found.
I'm using a JDBC ODBC connection to an Access foodmart database. The mondrian.properties is in the classpath and the jdbc values are correct in this file.
Does anyone know how can I solve the problem?
How can I try out the mondrian server writing my own app, instead of running the demo tables?
Below I put the source code and the error returned in runtime.
Best regards,
Vaninha Vieira.
-----------------
SOURCE:
...
Connection connection = DriverManager.getConnection(
"Provider=mondrian;" +
"Jdbc=jdbc:odbc:MondrianFoodMart;" +
"Catalog=/WEB-INF/FoodMart.xml;",
null,
false);
...
ERROR MESSAGE (in runtime)
C:\Vaninha\olapmondrian>java OLAPConnection
Could not find driver org.hsqldb.jdbcDriver
Exception in thread "main" mondrian.resource.ChainableRuntimeException: Internal
error: while creating RolapSchema (Provider=mondrian; Jdbc=jdbc:odbc:MondrianFo
odMart; catalog=file:/c:/olap/mondrian/demo/FoodMart.xml)
at mondrian.olap.MondrianResource.newInternal(MondrianResource.java:45)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:105)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:65)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:113)
at OLAPConnection.main(OLAPConnection.java:34)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:102)
... 3 more
caused by
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:102)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:65)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:113)
at OLAPConnection.main(OLAPConnection.java:34)

px7444
03-23-2003, 05:45 PM
when using your own db,for runing the samples in mondrian,i think maybe u need to change 4 db driver configuration
1.in web.xml,2 places need change
2.mondrian.jsp for run jPivot table
3.fourhier.jsp for ?
change them becase the sample using hsqldb

jhyde
03-24-2003, 06:04 AM
You don't need to worry about the 'Could not find driver org.hsqldb.jdbcDriver' error. It merely indicates that org.hsqldb.jdbcDriver is not on your classpath.
You need to ensure (1) your JDBC driver is on your classpath, (2) your JDBC drivers list (either the "mondrian.jdbcDrivers", or the "JdbcDrivers" keyword in your connect string) contains your JDBC driver.
To talk to ODBC, you probably need "sun.jdbc.odbc.JdbcOdbcDriver".

vaninha
03-24-2003, 08:39 AM
Hi Julian,
I think the JDBC driver is already in my classpath cause I'm able to run Mondrian using the demo tables in the Tomcat.
My problem happen when I try to connect to the Mondrian server in a Java app, using the getConnection method (as described above).
I checked the mondrian.properties and the mondrian.jdbcDrivers lists my JDBC driver (JDBC-ODBC)
Any other idea??
Thank you so much..
Vaninha.

totoelgalo
03-25-2003, 11:10 PM
hello !
the same thing in may case: first of all the hsqldb driver: I was working around that: to put it in your class path you need to find the right driver the Hypersonic driver not the Sun one.
if you are working on a windows OS i could not find a better way to access a Mysql database to make first an ODBC access to MySQl and use the JDBC mode of Mondrian, you don't need a specific driver because it is in your JDK.
My connecting line in web.xml is:
<param-value>Provider=mondrian;Jdbc=jdbc:odbc:ald_dev;Catalog=file:///d:/mondrian-0.4/demo/ALDCube_data.xml</param-value>
Then you need to construct your own XML cube schema
try the jsp page "adhoc query", modify the query and launch it it works!
AH, another thing i'm using 0.4 version of Mondrian!

jhyde
03-26-2003, 12:54 PM
Change 399 aims to make these problems a bit easier to debug. Mondrian loads ODBC, MySQL, HSQL, and Oracle drivers by default. If it can't find a particular driver, the message it issues is now clearly a warning.
It also prints out which properties files it is loading.