PDA

View Full Version : web app fails



mcilfone
10-22-2002, 05:33 AM
Hello everybody,
I'm trying to start the web application, I'm running the mondrian 0.3.0-157 version with an access database and, when I start tomcat, I've got the following error:
Buildfile: build.xml
start.tomcat:
[echo] classpath is C:\jakarta-tomcat-4_1_12\localhost\work\classes;C:\jakarta-tomcat-4_1_12\bin\bootstrap.jar;C:\oracle\ora81\jdbc\lib\classes12.zip;C:\mysql-connector-java-2.0.14-bin.jar
[java] [INFO] Registry - -Loading registry information
[java] [INFO] Registry - -Creating new Registry instance
[java] [INFO] Registry - -Creating MBeanServer
[java] [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
[java] Starting service Tomcat-Standalone
[java] Apache Tomcat/4.1.12
[java] sun.jdbc.odbc.JdbcOdbcDriver
[java] java.lang.ClassNotFoundException: @jdbcDrivers@
[java] at java.lang.Class.forName0(Native Method)
[java] at java.lang.Class.forName(Class.java:120)
[java] at mondrian.web.taglib.ApplResources.init(ApplResources.java:88)
[java] at mondrian.web.taglib.Listener.contextInitialized(Listener.java:53)
[java] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3250)
[java] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3524)
[java] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
[java] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
[java] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
[java] at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
[java] at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
[java] at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569)
[java] at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411)
[java] at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
[java] at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
[java] at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
[java] at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
[java] at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
[java] at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
[java] at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
[java] at org.apache.catalina.core.StandardService.start(StandardService.java:497)
[java] at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
[java] at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
[java] at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
[java] at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
[java] at java.lang.reflect.Method.invoke(Native Method)
[java] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
[java] [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080
[java] [INFO] ChannelSocket - -JK2: ajp13 listening on tcp port 8009
[java] [INFO] JkMain - -Jk running ID=0 time=0/47 config=C:\jakarta-tomcat-4_1_12\bin\..\conf\jk2.properties
it seems like as it couldn't find the sun.jdbc package.
The strange thing is that the test application (ran with build test-access) works well and can find the sun.jdbc package (is it real? or do I have to find the sun package?)
Can anybody help me?
thanks in advance
Michele Cilfone

jhyde
10-22-2002, 05:51 AM
I presume you created mondrian.jar by running 'build deploy-webapp' or 'build webapp'. This process requires that you have a file called mondrian.properties in the root directory of your source tree, containing lines like
mondrian.jdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver,oracle.jdbc.OracleDriver,com.mysql.jdbc.Driver
mondrian.test.connectString=Provider=mondrian;Jdbc=jdbc:odbc:MondrianFoodMart;Catalog=file:///c:/mondrian/demo/FoodMart.xml
If you don't, the lines
<context-param>
<param-name>jdbcDrivers</param-name>
<param-value>@mondrian.jdbcDrivers@</param-value>
</context-param>
<context-param>
<param-name>connectString</param-name>
<param-value>@mondrian.test.connectString@</param-value>
</context-param>
in web.xml are not substituted correctly. Fix those lines manually, and restart tomcat. If that fails, create mondrian.properties as above, and re-run 'build deploy-webapp'.
Please let me know whether this works for you.

mcilfone
10-22-2002, 06:14 AM
Thanks, I've fixed the previous error and now Tomcat starts but, when I hit the index.jsp page with a browser, I had the following error?
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Compiling 1 source file
[javac] Modern compiler not found - looking for classic compiler
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:120)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:313)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:324)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:484)
Apache Tomcat/4.1.12
What could it be?
Thanks
Michele Cilfone

jhyde
10-22-2002, 06:17 AM
This is looks like a generic JSP problem, not specific to mondrian. Make sure your JAVA_HOME is set correctly. It must be a JDK (containing a javac command) not merely a JRE. Check the Tomcat install FAQ for more information.

mcilfone
10-22-2002, 09:47 PM
Thank you, now it's working.
It was a path problem in the build.xml file.
As you wrote, putting the drive letter (C:/) only the first element into the pathelement will be taken.
<!-- I had to take the 'C:' off these paths, otherwise the path got truncated
to just the first element. Any ideas, anyone? -->
<path id="tomcat.classpath">
<!-- <pathelement path="/jdk1.3.1_02/lib/tools.jar"/>
<pathelement path="/jakarta-tomcat-4.0.3/localhost/work/classes"/>
<pathelement path="/jakarta-tomcat-4.0.3/bin/bootstrap.jar"/>
<pathelement path="/oracle/ora81/jdbc/lib/classes12.zip"/>-->

<pathelement path="C:/jdk1.3.0_01/lib/tools.jar"/>
<pathelement path="C:/jdk1.3.0_01/jre/lib"/>
<pathelement path="C:/jakarta-tomcat-4_1_12/localhost/work/classes"/>
<pathelement path="C:/jakarta-tomcat-4_1_12/bin/bootstrap.jar"/>
<pathelement path="C:/oracle/ora81/jdbc/lib/classes12.zip"/>
<pathelement path="C:/mysql-connector-java-2.0.14/mysql-connector-java-2.0.14-bin.jar"/>
</path>
Did you solve this problem?
Michele Cilfone

mcilfone
10-23-2002, 02:53 AM
The previous post is quite important for me, 'cause I want to use a MySQL database and I have to add the jar file in the classpath.
Another question: do you have more detailed documentation about how to build the foodmart.xml file to describe a schema, what is the meaning of the xml tags and so on.... Where can I find something about it?
And, what about the pivot table? Do you have any documentation about that?
Thanks in advance and excuse me for the number of questions. The issue is that I'm trying to understand if will be possible to use mondrian in my applications, and I need tons of documentation. So, if you can help me....
Michele Cilfone

jhyde
10-28-2002, 05:19 AM
Silly me, I should have used <pathelement location=../.> instead of <pathelement path=.../>.

jhyde
10-28-2002, 05:30 AM
I just posted a solution to the 'pathelement' problem. But note that you can also start/stop tomcat using the regular 'startup.sh', 'shutdown.bat' commands.
I am working on a doc on how to create a schema. Mondrian.xml describes the XML model (also see the javadoc of the classes generated from it: mondrian.olap.MondrianDef,
http://mondrian.sourceforge.net/api/mondrian/olap/MondrianDef.html).
If you're referring to pivot.jsp, work on that has pretty much stopped, in favor of JPivot (http://jpivot.sourceforge.net). Check them out.

jhyde
10-28-2002, 05:36 AM
PS The URL of the schema definition (featuring nice XSL formattings) is
http://apoptosis.dyndns.org:8080/open/mondrian/src/main/mondrian/olap/Mondrian.xml.

noah_liu
11-19-2002, 08:45 PM
Julian,
When i click ad hoc query, adhoc.jsp appear. but
i click button process MDX qury, browser appear error as follow:
Results: Error: Internal error: while creating RolapSchema (Provider=mondrian; Jdbc=jdbc:odbc:MondrianFoodMart; Catalog=file:///c:/mondrian/demo/FoodMart.xml)
why? pls help me.
rgds
noah liu

jhyde
11-20-2002, 04:44 AM
Is MondrianFoodMart a valid ODBC data source?
Is c:/mondrian/demo/FoodMart.xml the correct path to your catalog file?