The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

rv2014 (3) [Avatar] Offline
#1
Dear Mondrian Team

Can you please help me with necessary import statements and packages to be used for compiling the DynamicSchemaProcessor code shown in "Listing 8.4. Dynamic schema processor". I am using Pentaho 5 CE with Saiku plugin. Have tried compiling the code with following imports and I was able to overcome certain compilation errors.

import mondrian.i18n.*;
import mondrian.olap.*;
import mondrian.util.*;


However ended up with errors as below

DynamicSchemaProcessor.java:9: cannot find symbol
symbol : class InputStream
location: class DynamicSchemaProcessor
public String filter(String SchemaUrl, Util.PropertyList connectInfo, InputStream stream) throws Exception
^
DynamicSchemaProcessor.java:14: cannot find symbol
symbol : class IPentahoSession
location: class DynamicSchemaProcessor
IPentahoSession session = PentahoSessionHolder.getSession();
^
DynamicSchemaProcessor.java:14: cannot find symbol
symbol : variable PentahoSessionHolder
location: class DynamicSchemaProcessor
IPentahoSession session = PentahoSessionHolder.getSession();
^
DynamicSchemaProcessor.java:21: cannot find symbol
symbol : class PatternSyntaxException
location: class DynamicSchemaProcessor
catch (PatternSyntaxException pse)
^
4 errors


Thanks and Regards
william.back (28) [Avatar] Offline
#2
Re: Listing 8.4. Dynamic schema processor : Compiling DynamicSchemaProcessor
To figure out classes with Pentaho names, you should search the .jar files in tomcat/pentaho/WEB-INF/lib. Or whatever tool you are using. For example, in the pentaho-platform-api-5.0.0.1.jar you will find org/pentaho/platform/api/engine/IPentahoSession.class, so you need to include that class and the .jar in your class path.

Similarly the org/pentaho/platform/engine/core/system/PentahoSessionHolder.class.

Classes that aren't in our .jar files are usually the standard libraries, such as java.io.InputStream.
rv2014 (3) [Avatar] Offline
#3
Re: Listing 8.4. Dynamic schema processor : Compiling DynamicSchemaProcessor
Thanks William for your time. It worked now.

Hope this amendment would be made in future document release so that it can save time for Mondrian users.

Best Regards