PDA

View Full Version : Internal error: while creating RolapConnectio



kestlert
09-15-2002, 11:02 PM
Hello,
I get the following exception when starting up Mondrian webapp in Tomcat 4.0.3:
2002-09-16 11:28:43 StandardContext[/mondrian]: Exception sending context initialized event to listener instance of class mondrian.web.taglib.Listener
mondrian.resource.Error: Internal error: while creating RolapConnection (Provider=mondrian; Catalog=file:///f:/programme/mondrian/mondrian-0.3/demo/FoodMart.xml)
at mondrian.olap.MondrianResource.newInternal(MondrianResource.java:59)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:72)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:38)
at mondrian.web.taglib.ApplResources.init(ApplResources.java:106)
at mondrian.web.taglib.Listener.contextInitialized(Listener.java:53)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3175)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3378)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:714)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at org.apache.catalina.core.StandardService.start(StandardService.java:388)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
I have deployed mondrian.war (after modifying web.xml for ConnectString and resourceURL).
I've checked the JDBC URL and resource URL, both are fine. ORACLE JDBC driver is set in setclasspath.bat.
Thomas

jhyde
09-16-2002, 10:09 AM
Can you also add the name of your jdbc driver class to the 'jdbcDrivers' parameter in web.xml (it occurs twice). For example,
...
<context-param>
<param-name>jdbcDrivers</param-name>
<param-value>sun.jdbc.odbc.JdbcOdbcDriver,oracle.jdbc.OracleDriver</param-value>
</context-param>
...
<init-param>
<param-name>jdbcDrivers</param-name>
<param-value>sun.jdbc.odbc.JdbcOdbcDriver,oracle.jdbc.OracleDriver</param-value>
</init-param>
...

kestlert
09-18-2002, 07:08 AM
I have already included in web.xml:
<context-param>
<param-name>jdbcDrivers</param-name>
<param-value>oracle.jdbc.OracleDriver</param-value>
</context-param>
<init-param>
<param-name>jdbcDrivers</param-name>
<param-value>oracle.jdbc.OracleDriver</param-value>
</init-param>
Have I missed something? I think about including debug output in RolapConnection.java.

jhyde
09-18-2002, 12:53 PM
What's your JDBC connect string? Does it include a username/password?
I admit, the diagnostic output isn't too great right now. (a) a bug in release 0.3 means that every other property in a connect string is not printed to the screen; (b) the SQL exception which caused the error you are seeing somehow got lost. I'll work on improving this. Meantime, you may get more information if you attach to Tomcat in the debugger.

kestlert
09-19-2002, 02:27 AM
Hi,
I've added user/password to the connectString:
<param-value>Provider=mondrian;Jdbc=jdbc:oracle:oci8:foodmart/
foodmart@ORCL;Catalog=file:///f:/programme/mondrian/mondrian-0.3/demo/FoodMart.xml
</param-value>
</context-param>
But now an SQL error comes up.
2002-09-19 15:16:59 StandardContext[/mondrian]: Exception sending context initialized event to listener instance of class mondrian.web.taglib.Listener
mondrian.resource.Error: Internal error: while counting members of level '[Customers].[Country]'; sql=[select count(*) as "c0" from (select distinct "country" as "c0" from (SELECT *, "fname" + ' ' + "lname" as "name" FROM "customer") "Customers") "foo"]
at mondrian.olap.MondrianResource.newInternal(MondrianResource.java:59)
at mondrian.rolap.SqlMemberSource.getLevelMemberCount(SqlMemberSource.java:138)
at mondrian.rolap.SqlMemberSource.getMemberCount(SqlMemberSource.java:111)
Test in SQLPlus Worksheet:
select count(*) as "c0" from
(select distinct "country" as "c0" from
(SELECT *, "fname" + ' ' + "lname" as "name" FROM "customer") "Customers") "foo";
ORA-00923: Schl├╝sselwort FROM nicht an erwarteter Stelle gefunden (in English: Missing keyword FROM)
With a little modification this SQL runs fine:
select count(*) as "c0" from
(select distinct "country" as "c0" from
(SELECT "country", "fname" + ' ' + "lname" as "name" FROM "customer") "Customers") "foo";
c0
----------
3

jhyde
09-19-2002, 06:09 AM
This is good, we're getting further. The new problem is that you're running a SQL statement which doesn't work in the Oracle dialect. You need to edit demo/FoodMart.xml as described in doc/install.html.
Alternatively, download mondrian-0.3.111-src.zip; this automatically switches to the correct dialect, so you won't need to edit FoodMart.xml.

jhyde
09-19-2002, 02:36 PM
I just uploaded mondrian-0.3.157-src.zip, which has a number of improvements to diagnostics. Please check this out.

kestlert
09-22-2002, 09:56 PM
Hello,
I've edited Foodmart.xml and now Tomcat starts the Mondrian webapp. It works, I can issue some MDX queries, but some of them make troubles (I'll try to setup mondrian-0.3-157-src.zip before giving you a full summary which MDX queries run and which do not - but got some compile errors for which I#ll open a new thread).

mcilfone
10-21-2002, 04:24 AM
Hello,
I've found the same problem and now I've upgraded mondrian to 0.3-157 version, but the build command give me errors like as follows:
D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3>build
Buildfile: build.xml
sniff:
prepare:
parser:
[javacup] Files are up to date.
def:
compile.java:
[javac] Compiling 11 source files to D:\Progetto\Analisi OLAP\mondrian\mondr
ian-0.3\classes
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\rol
ap\RolapProperty.java:21: cannot resolve symbol
[javac] symbol : class Expression
[javac] location: class mondrian.olap.MondrianDef
[javac] RolapProperty(String name, int type, MondrianDef.Expression exp)
{
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\rol
ap\RolapProperty.java:26: cannot resolve symbol
[javac] symbol : class Expression
[javac] location: class mondrian.olap.MondrianDef
[javac] MondrianDef.Expression exp;
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableError.java:37: cannot resolve symbol
[javac] symbol : constructor Error (java.lang.String)
[javac] location: class mondrian.resource.Error
[javac] super(instance.toString());
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableError.java:52: initCause(java.lang.Throwable) in mondrian.resourc
e.ChainableError cannot override initCause(java.lang.Throwable) in java.lang.Thr
owable; attempting to use incompatible return type
[javac] found : void
[javac] required: java.lang.Throwable
[javac] public void initCause(Throwable cause)
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableError.java:65: cannot resolve symbol
[javac] symbol : class DummyPrintWriter
[javac] location: class mondrian.resource.Util
[javac] if (s instanceof Util.DummyPrintWriter) {
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableError.java:69: cannot resolve symbol
[javac] symbol : method printStackTrace (mondrian.resource.ChainableError,
java.io.PrintWriter)
[javac] location: class mondrian.resource.Util
[javac] Util.printStackTrace(this, s);
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableError.java:74: cannot resolve symbol
[javac] symbol : class DummyPrintStream
[javac] location: class mondrian.resource.Util
[javac] if (s instanceof Util.DummyPrintStream) {
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableError.java:78: cannot resolve symbol
[javac] symbol : method printStackTrace (mondrian.resource.ChainableError,
java.io.PrintStream)
[javac] location: class mondrian.resource.Util
[javac] Util.printStackTrace(this, s);
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableException.java:29: mondrian.resource.ChainableException should be
declared abstract; it does not define getNextThrowable() in mondrian.resource.C
hainableException
[javac] public class ChainableException
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableException.java:49: initCause(java.lang.Throwable) in mondrian.res
ource.ChainableException cannot override initCause(java.lang.Throwable) in java.
lang.Throwable; attempting to use incompatible return type
[javac] found : void
[javac] required: java.lang.Throwable
[javac] public void initCause(Throwable cause)
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableException.java:95: cannot resolve symbol
[javac] symbol : class DummyPrintWriter
[javac] location: class mondrian.resource.Util
[javac] if (s instanceof Util.DummyPrintWriter) {
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableException.java:99: cannot resolve symbol
[javac] symbol : method printStackTrace (mondrian.resource.ChainableExcept
ion,java.io.PrintWriter)
[javac] location: class mondrian.resource.Util
[javac] Util.printStackTrace(this, s);
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableException.java:104: cannot resolve symbol
[javac] symbol : class DummyPrintStream
[javac] location: class mondrian.resource.Util
[javac] if (s instanceof Util.DummyPrintStream) {
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableException.java:108: cannot resolve symbol
[javac] symbol : method printStackTrace (mondrian.resource.ChainableExcept
ion,java.io.PrintStream)
[javac] location: class mondrian.resource.Util
[javac] Util.printStackTrace(this, s);
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableRuntimeException.java:29: mondrian.resource.ChainableRuntimeExcep
tion should be declared abstract; it does not define getNextThrowable() in mondr
ian.resource.ChainableRuntimeException
[javac] public class ChainableRuntimeException
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableRuntimeException.java:56: initCause(java.lang.Throwable) in mondr
ian.resource.ChainableRuntimeException cannot override initCause(java.lang.Throw
able) in java.lang.Throwable; attempting to use incompatible return type
[javac] found : void
[javac] required: java.lang.Throwable
[javac] public void initCause(Throwable cause)
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableRuntimeException.java:102: cannot resolve symbol
[javac] symbol : class DummyPrintWriter
[javac] location: class mondrian.resource.Util
[javac] if (s instanceof Util.DummyPrintWriter) {
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableRuntimeException.java:106: cannot resolve symbol
[javac] symbol : method printStackTrace (mondrian.resource.ChainableRuntim
eException,java.io.PrintWriter)
[javac] location: class mondrian.resource.Util
[javac] Util.printStackTrace(this, s);
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableRuntimeException.java:111: cannot resolve symbol
[javac] symbol : class DummyPrintStream
[javac] location: class mondrian.resource.Util
[javac] if (s instanceof Util.DummyPrintStream) {
[javac] ^
[javac] D:\Progetto\Analisi OLAP\mondrian\mondrian-0.3\src\main\mondrian\res
ource\ChainableRuntimeException.java:115: cannot resolve symbol
[javac] symbol : method printStackTrace (mondrian.resource.ChainableRuntim
eException,java.io.PrintStream)
[javac] location: class mondrian.resource.Util
[javac] Util.printStackTrace(this, s);
[javac] ^
[javac] 20 errors
BUILD FAILED
file:D:/Progetto/Analisi OLAP/mondrian/mondrian-0.3/build.xml:157: Compile faile
d; see the compiler error output for details.
Total time: 3 seconds
Can anybody help me?
Alternatively, how should I edit the Foodmart.xml file to work with mysql?
thanks in advance
Michele Cilfone

jhyde
10-21-2002, 05:40 AM
Try 'build clean compile'.
Glad you upgraded to 157 -- should give you a more informative error message when you do get the code built.