Weak 9iR2, maybe i don't know? Anyone can help me?
I install a new Oracle 9i DB(R2) on my pc.
I want write a java programe to try the given OLAP Api.
Mostly confused me is that com.sun.java.util.collections.* must be import in my java programe. It's is used in OLAP API,very strange! Sun has charged the namespace to java.util.*,Why Oracle still use this package? And anyone can tell me this?
This is not bad, I just recompiled the src in jdk1.3.1,change the namespace from java.util.* to com.sun.java.util.collection.*.
But really bad thing the programe is not worked!!! I copied the code from the user guide, Change some code(not a lot). Then run it, Exception throwed out!! and Oracle DB Can't be reconnect!! I must restart my pc!!
Who Can tell me how to start a programe using the 9i OLAP? Thanks!
I post my code, BUT DO IT CAREFUL! IT MAY LET YOU CANNT RECONNECT ORACLE!
I used the user name sh, after install oracle has done it.
=============================================================================
import com.sun.java.util.collections.Iterator;
import oracle.express.mdm.*;
import oracle.olapi.metadata.MetadataObject;
import oracle.olapi.data.source.Source;
import oracle.express.olapi.data.full.ExpressDataProvider;
import oracle.express.olapi.transaction.ExpressTransactionProvider;
import java.sql.*;
public class TestOLAP {
static final int TERSE = 0;
static final int VERBOSE = 1;
public TestOLAP(){}
public static void main(String[] args) throws Exception {
// Connect through JDBC to a database on Lab1
// and get a DataProvider (see Chapter 3)
String url = "jdbc:oracle:thin:@localhost:1521:cmcc";
String user = "sh";
String password = "sh";
DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
oracle.jdbc.OracleConnection conn = (oracle.jdbc.OracleConnection)java.sql.DriverManager.getConnection(url, user, password);
ExpressTransactionProvider tp = new ExpressTransactionProvider();
ExpressDataProvider dp = new ExpressDataProvider(conn, tp);
dp.initialize();
//ExpressDataProvider dp = MyConnection.connectOnLab1();
//Sample Code for Discovering Metadata
//Discovering the Available Metadata 4-11
// Create an MdmMetadataProvider
MdmMetadataProvider mp = null;
mp = (MdmMetadataProvider) dp.getDefaultMetadataProvider();
// Get metadata info about the root MdmSchema and its subschemas
MdmSchema root = null;
try {
root = mp.getRootSchema();
System.out.println("***Root MdmSchema: " + root.getName());
MdmDimension measureDim = root.getMeasureDimension();
System.out.println("******Measure MdmDimension: " + measureDim.getName());
getSchemaInfo(root, TERSE);
} catch (Exception e) {
System.out.println("***Exception encountered : " + e.toString());
// Make a Source object out of the PRODUCTS_DIM MdmDimension
System.out.println("***Making a Source object for PRODUCTS_DIM");
MdmDimension mdmProductDim = null;
try {
List rootDims = root.getDimensions();
Iterator rootDimIter = rootDims.iterator();
while (mdmProductDim == null && rootDimIter.hasNext()) {
MdmDimension aDim = (MdmDimension) rootDimIter.next();
if (aDim.getName().equals("PRODUCTS_DIM"))
mdmProductDim = aDim;
Source product = mdmProductDim.getSource();
System.out.println("******Made the Source");
} catch (Exception e) {
System.out.println("******Exception encountered : " + e.toString());
// Close the connection
conn.close();
//Sample Code for Discovering Metadata
//4-12 Oracle9i OLAP Developers Guide to the OLAP API
// Method for getting info about an MdmSchema
public static void getSchemaInfo(MdmSchema schema, int outputStyle) {
System.out.println("***Schema: " + schema.getName());
// Get the MdmSchemas dimension info
MdmDimension oneDim = null;
try {
List dims = schema.getDimensions();
Iterator dimIter = dims.iterator();
System.out.println(" ");
System.out.println("********************************************");
System.out.println(" ");
while (dimIter.hasNext()) {
oneDim = (MdmDimension) dimIter.next();
getDimInfo(oneDim, outputStyle);
System.out.println(" ");
System.out.println("********************************************");
System.out.println(" ");
} catch (Exception e) {
System.out.println("******Exception encountered : " + e.toString());
// Get the MdmSchemas measure info
MdmMeasure oneMeasure = null;
try {
List measures = schema.getMeasures();
Iterator measIter = measures.iterator();
while (measIter.hasNext()) {
oneMeasure = (MdmMeasure) measIter.next();
getMeasureInfo(oneMeasure, outputStyle);
System.out.println(" ");
System.out.println(" ");
} catch (Exception e) {
System.out.println("******Exception encountered : " + e.toString());
// Get the MdmSchemas subschema info
MdmSchema oneSchema = null;
try {
List subSchemas = schema.getSubSchemas();
Iterator subSchemaIter = subSchemas.iterator();
Sample Code for Discovering Metadata
Discovering the Available Metadata 4-13
while (subSchemaIter.hasNext()) {
oneSchema = (MdmSchema) subSchemaIter.next();
getSchemaInfo(oneSchema, VERBOSE);
} catch (Exception e) {
System.out.println("***Exception encountered : " + e.toString());
// Method for getting info about an MdmDimension
public static void getDimInfo(MdmDimension dim, int outputStyle) {
System.out.println("******MdmDimension Name: " + dim.getName());
System.out.println("*********Description: " + dim.getDescription());
if (outputStyle == VERBOSE) {
// Get MdmDimensionMemberType for the MdmDimension
try {
MdmDimensionMemberType dimMemberType = dim.getMemberType();
if (dimMemberType instanceof MdmStandardMemberType)
System.out.println("*********Member Type: MdmStandardMemberType");
if (dimMemberType instanceof MdmTimeMemberType)
System.out.println("*********Member Type: MdmTimeMemberType");
if (dimMemberType instanceof MdmMeasureMemberType)
System.out.println("*********Member Type: MdmMeasureMemberType");
} catch (Exception e) {
System.out.println("***Exception encountered : " + e.toString());
// Get attributes of the MdmDimension
try {
List attributes = dim.getAttributes();
Iterator attrIter = attributes.iterator();
while (attrIter.hasNext())
System.out.println("*********Attribute: " +
((MdmAttribute) attrIter.next()).getName());
} catch (Exception e) {
System.out.println("***Exception encountered : " + e.toString());
Sample Code for Discovering Metadata
4-14 Oracle9i OLAP Developers Guide to the OLAP API
// Get concrete class and hierarchy type of the MdmDimension
String kindOfDim = null;
try {
if (dim instanceof MdmListDimension) {
kindOfDim = "ListDim";
System.out.println("*********" + dim.getName() +
" is an MdmListDimension");
else if (dim instanceof MdmHierarchy)
switch(((MdmHierarchy) dim).getHierarchyType()) {
case (MdmHierarchy.UNION_HIERARCHY):
kindOfDim = "UnionHier";
System.out.println("*********" + dim.getName() +
" is a union MdmHierarchy");
break;
case (MdmHierarchy.LEVEL_HIERARCHY):
kindOfDim = "LevelHier";
System.out.println("*********" + dim.getName() +
" is a level MdmHierarchy");
break;
case (MdmHierarchy.VALUE_HIERARCHY):
kindOfDim = "ValueHier";
System.out.println("*********" + dim.getName() +
" is a value MdmHierarchy");
break;
else {
kindOfDim = "Level";
System.out.println("*********" + dim.getName() + " is an MdmLevel");
} catch (Exception e) {
System.out.println("***Exception encountered : " + e.toString());
// For level MdmHierarchy, get parent, ancestors, and region attributes
if (kindOfDim.equals("LevelHier"))
System.out.println("*********Parent attribute: " +
((MdmHierarchicalDimension) dim).getParentRelation().getName());
System.out.println("*********Ancestors attribute: " +
((MdmHierarchicalDimension) dim).getAncestorsRelation().getName());
System.out.println("*********Region attribute: " +
((MdmUnionDimensionDefinition) dim.getDefinition())
.getRegionAttribute().getName());
Sample Code for Discovering Metadata
Discovering the Available Metadata 4-15
// Get the MdmDimensionDefinition for the MdmDimension
MdmDimensionDefinition dimDef = dim.getDefinition();
// For union or level MdmHierarchy, list the regions and default hierarchy
if ((kindOfDim.equals("UnionHier")) || (kindOfDim.equals("LevelHier")))
try {
System.out.println(" ");
System.out.println("*********The following are the regions of " +
dim.getName());
List regions = ((MdmUnionDimensionDefinition)dimDef).getRegions();
Iterator regIter = regions.iterator();
while (regIter.hasNext()) {
MdmDimension oneRegion = (MdmDimension) regIter.next();
System.out.println("************" + oneRegion.getName());
if (oneRegion.hasMdmTag(MdmMetadataProvider.DEFAULT_HIERARCHY_TAG))
System.out.println("***************(The " + oneRegion.getName() +
" region is the default MdmHierarchy)");
} catch (Exception e) {
System.out.println("***Exception encountered : " + e.toString());
// For union or level MdmHierarchy, get region info
if ((kindOfDim.equals("UnionHier")) || (kindOfDim.equals("LevelHier")))
try {
System.out.println(" ");
System.out.println("*********Information about the regions of " +
dim.getName() + ":");
List regions = ((MdmUnionDimensionDefinition)dimDef).getRegions();
Iterator regIter = regions.iterator();
while (regIter.hasNext()) {
MdmDimension oneRegion = (MdmDimension) regIter.next();
getDimInfo(oneRegion, VERBOSE);
} catch (Exception e) {
System.out.println("***Exception encountered : " + e.toString());
System.out.println(" ");
//Sample Code for Discovering Metadata
// Method for getting info about an MdmMeasure
public static void getMeasureInfo(MdmMeasure measure, int outputStyle) {
System.out.println("******Measure: " + measure.getName());
if (outputStyle == VERBOSE) {
// Get the dimensions of the MdmMeasure
try {
List mDims = measure.getDimensions();
Iterator mDimIter = mDims.iterator();
while (mDimIter.hasNext())
System.out.println("*********Dimension of the Measure: " +
((MdmDimension) mDimIter.next()).getName());
} catch (Exception e) {
System.out.println("******Exception encountered : " + e.toString());
The OLAP API is built using JDK 1.2.2. The OLAP API supports Java 1.1 (1.1.8) as well as Java 1.2 and higher. The collections package was new in Java 1.2, but Sun backported it to 1.1.8. However, the backport package is in the com.sun namespace rather than in java.util. As long as we support Java 1.1.8, we must continue to use the backported collections jar file and its namespace.
Most likely you have encountered the bug with the OLAP 9iR2 denormalized snowflake schema support which is found in SH. This bug has a verified fix already and will be released with our first cumulative OLAP patch called 9.2.0.1.0a beginning of September.
Similar Messages
-
I am not sure what is going on with my ipod but my ipod will not even let me open my wifi or apps. I don't know why can anyone help?
Try:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Reset all settings
Go to Settings > General > Reset and tap Reset All Settings.
All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
- Restore from backup. See:
iOS: How to back up
- Restore to factory settings/new iOS device.
If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
Apple Retail Store - Genius Bar -
I want to start a new iTunes U course for catolog and I don't know what can I do please give me description about this title.
If you haven't already done so then you can contact iTunes support via this page and ask them why the message is appearing (these are user-to-user forums, we won't know why) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page
-
I have rented some movies and have them in itunes. I want to move them to my iphone but don't know how can someone help?
http://support.apple.com/kb/HT1390
Regards. -
Hi i don't no if anyone can help me, i have a ipad 1 and have been trying to upgrade it to the latest version and cant find anywhere. on my phone it is in the settings to upgrade, iv been online and looked but cant find any link. can someone send me a link or direct me the right way many thanks.
Upgrading the iOS "over-the-air" was introduced with iOS 5. If you are currently running an iOS version < 5.0 you can only update through iTunes. Connect your iPad to your PC or Mac. Open iTunes and click on "Check for updates"
-
I want to make a purchase in apple store but they ask me to have 3letters in the name of my county (select province). All choices are only in 2 letters like KL,SL... I don't know how can I do. Please
What country did you specify?
-
would like to know if anyone can help me.I want to type something out on my mac book and then copy it on my printer.Thank you
You can use Text Edit.
Then from the Text Edit menu bar click File / Print. -
I don't know why can't i use manycam app in Skype?
i don't know why can't i use manycam app in Skype?
i need a help to use it!
Thank youHi,
Does the ManyCam option appear in other apps ?
Messages for instance or Photo Booth ?
In Messages you will have to go to the Preferences > Video section and the camera drop down (below the pic)
In Photo Booth there are no Preferences as such and you use the Camera Menu. (when you have two cameras)
One reason for not seeing the Many Cam is you have not restarted the computer since installing it.
9:49 pm Monday; September 8, 2014
iMac 2.5Ghz i5 2011 (Mavericks 10.9)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
Couple of iPhones and an iPad -
I would like to know of how to change the language in my Ipod touch ?? anyone can help me please
Did you try Settings/General/International and choose your settings?
copied from page 107 ipod touch user guide 5 -
ok, so if anyone can help me I would greatly appreciate it. I have a "notification" that goes off every 5 minutes...there is no notification sign to let me know what it is...I have shut off everything I can think of and it is driving me crazy! Any suggestions?
bailey02,
Hmm, that's odd! When did you notice this start? Is your phone and applications up to date?
KarenC_VZW
Follow us on Twitter @VZWSupport -
can i help u? i had bought camfrog pro app by itunes...i see that app is upgrade now. but i can not upgrade that app...i can see this message "can not open by This id" i don't know why can not upgrade camfrog pro by my korea id? plz answer me
To Update the App you have to Use the Same Apple ID it was Purchased with...
-
I accidentally turned the Bluetooth off from my Mac all in one and now I can't use the mouse anymore so I don't know I can reactivate the Bluetooth again!! Please help!
Aisha05Try resetting the SMC.
Barry -
I am in Korea rigth now but i don't speak korean, and i don't know how can I change the idiom at the iTunes.
the iTune is already in english, the problen is wen i tray to open anithin is in hangul(korean), and i don't understand anithing!This forum is for questions from those managing sites on iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. You'll be most likely to get help with this issue if you ask in the general iTunes forums.
Regards. -
I am a Academy of Art University student. I purchased my CC on 04/18/2014. Since I don't graduate yet, I really don't know why can't I keep using my CC, or redeem it again!!!! Please help!!!!
Contact Adobe Support directly... preferably before the 18th.
Phone support | Orders, returns exchanges
http://helpx.adobe.com/x-productkb/global/phone-support-orders.html
Chat support - For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
Creative Cloud support (all Creative Cloud customer service issues)
http://helpx.adobe.com/x-productkb/global/service-ccm.html ( http://adobe.ly/19llvMN ) -
i got an email that I confirmed is phishing that I want to report but don't know how! Help? They were posing as Amazon.
<E-mail Edited by Host>Amazon.com Help- Report a Phishing or Spoofed E-mail
Maybe you are looking for
-
Hi gurus, I want to upload a flat file in BW 7.0. I am creating the datasource, the problem I have is that the data separator and the thousands separator is the same (.) in the file. I cant upload the file correctly it keeps adding a new field think
-
Email closing unexpectedly and safari issue
Hi I have been using a macbook pro retina version for a year. Recently, my email has been closing unexpectedly. I can't even open it for a few second. It shows me this message when it close: Process: Mail [2503] Path: /Applications
-
MainStage 1.0.1 available
Here's to seeing Logic 8.0.1 shortly to solve the controller problems.
-
Elements window will not maximize, help please
For some reason my photoshop elements window will not maximize. The editor workspace will just fine, but not the organizer. I am using elements 6 and Vista. Anyone else seen this happen? I can see it on my task pane and it previews the screen for
-
Need to Create a Dynamic Calendar Based on School Year Sharepoint O365
I have a request from a school program department. They are in need of a calendar based on total number of days in a school year (180) excluding weekends/holidays. The calendar will need to provide the following information: 1. Upon a student enterin