[Mondrian] Re: Mondrian in my Java Program

Laurent Valdes valderama at gmail.com
Sat Mar 3 20:01:09 EST 2007


Hi,

yes I have had a look at this code already.
It is not running in tomcat nor jboss; since it is a CLI program (I'm doing
live tests before loading the whole in glassfish containers)
My classpath is the default one from the netbeans project I have created (I
need to gather it, since it is generated by NB)
My JVM is 1.6.0-b105, and I'm using the default class loader.

Have a good day, I'm going to sleep (very late here)

The log is the following:

init:
deps-jar:
compile-single:
run-main:
DEBUG - Mondrian: loading file=C:\Documents and
Settings\VALDES.SUPRATEC_NT\ProspectWS\mondrian.properties (exists=true)
INFO - Mondrian: properties loaded from 'file=C:\Documents and
Settings\VALDES.SUPRATEC_NT\ProspectWS\mondrian.properties (exists=true)'
INFO - Mondrian: properties loaded from 'file:/C:/Documents and
Settings/VALDES.SUPRATEC_NT/ProspectWS/mondrian.properties'
INFO - Mondrian: loaded 0 system properties
DEBUG - Mondrian: loading file=C:\Documents and
Settings\VALDES.SUPRATEC_NT\ProspectWS\mondrian.properties (exists=true)
INFO - Mondrian: properties loaded from 'file=C:\Documents and
Settings\VALDES.SUPRATEC_NT\ProspectWS\mondrian.properties (exists=true)'
INFO - Mondrian: properties loaded from 'file:/C:/Documents and
Settings/VALDES.SUPRATEC_NT/ProspectWS/mondrian.properties'
INFO - Mondrian: loaded 0 system properties
INFO - Mondrian: JDBC driver sun.jdbc.odbc.JdbcOdbcDriver loaded
successfully
INFO - Mondrian: JDBC driver org.hsqldb.jdbcDriver loaded successfully
WARN - Mondrian: Warning: JDBC driver oracle.jdbc.OracleDriver not found
WARN - Mondrian: Warning: JDBC driver com.mysql.jdbc.Driver not found
Exception in thread "main" org.eigenbase.xom.AssertFailure: Enclosure class
mondrian.olap.MondrianDef not found.
        at org.eigenbase.xom.DOMElementParser.getEnclosureClass(Unknown
Source)
        at org.eigenbase.xom.DOMElementParser.classArray(Unknown Source)
        at org.eigenbase.xom.DOMElementParser.getArray(Unknown Source)
        at mondrian.olap.MondrianDef$Schema.<init>(MondrianDef.java:104)
        at mondrian.rolap.RolapSchema.load(RolapSchema.java:261)
        at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:212)
        at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:89)
        at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:828)
        at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:653)
        at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:141)
        at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:76)
        at mondrian.olap.DriverManager.getConnection(DriverManager.java:120)
        at mondrian.olap.DriverManager.getConnection(DriverManager.java:87)
        at mondrian.olap.DriverManager.getConnection(DriverManager.java:55)
        at fr.supratec.crm.OLAPTest.main(OLAPTest.java:99)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

Regards,

Laurent.

2007/3/4, Julian Hyde <julianhyde at speakeasy.net>:
>
>  Here's the code it is executing:
>
>     /**
>      * Returns the enclosure class associated with clazz, or falls back on
>      * the fixed enclosure if none can be found.
>      */
>     private Class getEnclosureClass(Class clazz)
>     {
>         // Instead of using a fixed enclosure, derive it from the given
> Class.
>         // If we can't figure it out, just use the given enclosure
> instead.
>         Class thisEnclosure = enclosure;
>         String className = clazz.getName();
>         int dollarPos = className.indexOf('$');
>         if (dollarPos >= 0) {
>             String encName = className.substring(0, dollarPos);
>             try {
>                 thisEnclosure = Class.forName(encName);
>             } catch (ClassNotFoundException ex) {
>                 throw new AssertFailure("Enclosure class " + encName
>                                  + " not found.");
>             }
>         }
>         return thisEnclosure;
>     }
> Apparently the class loader can't do Class.forName("
> mondrian.olap.MondrianDef"). This is strange considering
> mondrian.olap.MondrianDef is on the call stack!
>
> Seems that something is up with the class loader. What java version and
> jvm are you using? What is your classpath? Are you using the default class
> loader? Are you running in a container such as jboss or tomcat?
>
> Julian
>
>
>  ------------------------------
> *From:* mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org]
> *On Behalf Of *Laurent Valdes
> *Sent:* Saturday, March 03, 2007 4:16 PM
> *To:* Mondrian developer mailing list
> *Subject:* Re: [Mondrian] Re: Mondrian in my Java Program
>
> In any cases I think it is a bug that should be corrected.
> I will have a look a this.
>
> Laurent
>
> 2007/3/3, Julian Hyde <julianhyde at speakeasy.net >:
>
> >  The 'Enclosure class mondrian.olap. MondrianDef not found' error is not
> > one I've seen before. I don't think it means that
> > mondrian.olap.MondrianDef.class is not on the classpath -- I think that
> > there is an error in the format of your <catalog>.xml file. For instance, if
> > you try running with foodmart.xml, I think you'll find that error goes
> > away.
> >
> > Julian
> >
> >  ------------------------------
> > *From:* mondrian-bounces at pentaho.org [mailto:
> > mondrian-bounces at pentaho.org] *On Behalf Of *Laurent Valdes
> > *Sent:* Saturday, March 03, 2007 8:44 AM
> > *To:* mondrian at pentaho.org
> > *Subject:* [Mondrian] Re: Mondrian in my Java Program
> >
> >  Sorry, I tested my JDBC string several times.
> > Enclosure class mondrian.olap.MondrianDef not found.
> > and the class does exist since I have done Class.forClass to check for
> > its existence.
> >
> > Have a good day !
> >
> >
> > 2007/3/2, Laurent Valdes < valderama at gmail.com>:
> >
> > > Currently I have the following:
> > >
> > > OLAPTest ot=new OLAPTest();
> > >     try{
> > >         ot.initialize();
> > >     }
> > >     catch(Exception e)
> > >     {
> > >         System.out.println("Erreur initialisation: ");
> > >         e.printStackTrace();
> > >     }
> > >
> > >     Connection connection = DriverManager.getConnection(
> > >         "Provider=mondrian;" +
> > >         "Jdbc=" + ot.jdbcUri + ";" +
> > >         "Catalog="+ "" + ot.catalogUrl.toString(),
> > >         null,
> > >         false);
> > >
> > > But I get the following:
> > >
> > >
> > > Exception in thread "main" org.eigenbase.xom.AssertFailure: Enclosure
> > > class mondrian.olap.MondrianDef not found.
> > >         at org.eigenbase.xom.DOMElementParser.getEnclosureClass(Unknown
> > > Source)
> > >         at org.eigenbase.xom.DOMElementParser.classArray(Unknown
> > > Source)
> > >         at org.eigenbase.xom.DOMElementParser.getArray(Unknown Source)
> > >
> > >         at mondrian.olap.MondrianDef$Schema.<init>( MondrianDef
> > > .java:104)
> > >
> > >
> > >
> > > 2007/3/2, Laurent Valdes <valderama at gmail.com >:
> > >
> > > > Hi everybody,
> > > >
> > > > How are you ?
> > > > I'm absolutely new in this mailing-list.
> > > >
> > > > I'm writing some java programs to automate decisions in my company,
> > > > and  was trying to use Mondrian as it is possible to use JDBC: from a Java
> > > > program.
> > > >
> > > > My first question is: How do I execute MDX queries from Java code ?
> > > > My second question is: Does the client need to keep separated from
> > > > the ROLAP server ?
> > > > If no, how can I do queries ?
> > > > If yes, how can I start the server ? and then how do I make OLAP
> > > > queries ?
> > > >
> > > > Many thanks for your help !
> > > >
> > > > Best regards,
> > > >
> > > > Laurent.
> > > >
> > > >
> > > > --
> > > > �� attendre que l'herbe pousse, le boeuf meurt de faim�
> > > > �Le boeuf� @< http://www.le-valdo.com >
> > >
> > >
> > >
> > >
> > > --
> > > �� attendre que l'herbe pousse, le boeuf meurt de faim�
> > > �Le boeuf� @< http://www.le-valdo.com>
> > >
> >
> >
> >
> > --
> > �� attendre que l'herbe pousse, le boeuf meurt de faim�
> > �Le boeuf� @<http://www.le-valdo.com>
> >
> >
> > _______________________________________________
> > Mondrian mailing list
> > Mondrian at pentaho.org
> > http://lists.pentaho.org/mailman/listinfo/mondrian
> >
> >
>
>
> --
> �� attendre que l'herbe pousse, le boeuf meurt de faim�
> �Le boeuf� @< http://www.le-valdo.com>
>
>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>


-- 
«À attendre que l'herbe pousse, le boeuf meurt de faim»
«Le boeuf» @<http://www.le-valdo.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20070304/478c8a14/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OLAPTest.java
Type: application/octet-stream
Size: 2696 bytes
Desc: not available
Url : http://lists.pentaho.org/pipermail/mondrian/attachments/20070304/478c8a14/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Celsius.xml
Type: text/xml
Size: 1387 bytes
Desc: not available
Url : http://lists.pentaho.org/pipermail/mondrian/attachments/20070304/478c8a14/attachment.xml 


More information about the Mondrian mailing list