IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

SSAS Discussion :

Connexion Java - XMLA


Sujet :

SSAS

  1. #1
    Membre à l'essai
    Inscrit en
    Mai 2008
    Messages
    20
    Détails du profil
    Informations forums :
    Inscription : Mai 2008
    Messages : 20
    Points : 21
    Points
    21
    Par défaut Connexion Java - XMLA
    Bonjour,

    je cherche à faire une connexion entre java et SSAS en passant par XMLA

    voici mon code :




    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    import org.olap4j.*;
     
     
    import java.io.FileNotFoundException; 
     
    import java.sql.*;
    //import org.olap4j.mdx.*;
     
    public class ConnexionOlap {
     
     
    	public static void main(String []args)throws SQLException,FileNotFoundException
    	{ 
     
    		System.out.println("Test avant");
    		try
    		{
    			System.out.println("Test dedans");
     
    			Class.forName("org.olap4j.driver.xmla.XmlaOlap4jDriver");
     
    			OlapConnection con = (OlapConnection)DriverManager.getConnection("jdbc:xmla:Server=http://localhost/xmla/msxisapi.dll;Catalog=AnalysisWindows");
     
     
    			OlapWrapper wrapper = (OlapWrapper) con;
    			OlapConnection olapConnection = wrapper.unwrap(OlapConnection.class);
    			OlapStatement stmt = olapConnection.createStatement();
     
    			System.out.println("Test avant requete");
     
     
    			CellSet cellSet = stmt.executeOlapQuery("select {[Measures].[Etudiant Nombre]} on columns from [DatatestWindows]");
     
     
    			System.out.println("Test après requête");
    		}
    		catch(Exception ex){ 
    			//System.out.println("ERREUR"); 
    			System.err.println("Erreur pendant la connexion"); 
    			ex.printStackTrace();
     
     
    		}
    		System.out.println("Test Fin");
    	}
    }




    voici le resutat :


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
     
    Test avant
    Test dedans
    Test avant requete
    Erreur pendant la connexion
    java.lang.RuntimeException: org.olap4j.OlapException: This connection encountered an exception while executing a query.
    	at org.olap4j.driver.xmla.DeferredNamedListImpl.getList(DeferredNamedListImpl.java:76)
    	at org.olap4j.driver.xmla.DeferredNamedListImpl.get(DeferredNamedListImpl.java:94)
    	at org.olap4j.driver.xmla.DeferredNamedListImpl.get(DeferredNamedListImpl.java:43)
    	at org.olap4j.driver.xmla.XmlaOlap4jConnection.getCatalog(XmlaOlap4jConnection.java:377)
    	at org.olap4j.driver.xmla.XmlaOlap4jStatement.executeOlapQuery(XmlaOlap4jStatement.java:257)
    	at comAutres.ConnexionOlap.main(ConnexionOlap.java:35)
    Caused by: org.olap4j.OlapException: This connection encountered an exception while executing a query.
    	at org.olap4j.OlapExceptionHelper.createException(OlapExceptionHelper.java:29)
    	at org.olap4j.driver.xmla.XmlaOlap4jConnection.xxx(XmlaOlap4jConnection.java:610)
    	at org.olap4j.driver.xmla.XmlaOlap4jDatabaseMetaData.getMetadata(XmlaOlap4jDatabaseMetaData.java:127)
    	at org.olap4j.driver.xmla.XmlaOlap4jDatabaseMetaData.getDatasources(XmlaOlap4jDatabaseMetaData.java:932)
    	at org.olap4j.driver.xmla.XmlaOlap4jConnection.getDataSourceInfo(XmlaOlap4jConnection.java:252)
    	at org.olap4j.driver.xmla.XmlaOlap4jConnection.generateRequest(XmlaOlap4jConnection.java:749)
    	at org.olap4j.driver.xmla.XmlaOlap4jConnection.populateList(XmlaOlap4jConnection.java:585)
    	at org.olap4j.driver.xmla.DeferredNamedListImpl.populateList(DeferredNamedListImpl.java:102)
    	at org.olap4j.driver.xmla.DeferredNamedListImpl.getList(DeferredNamedListImpl.java:71)
    	... 5 more
    Caused by: org.olap4j.driver.xmla.proxy.XmlaOlap4jProxyException: This proxy encountered an exception while processing the query.
    	at org.olap4j.driver.xmla.proxy.XmlaOlap4jHttpProxy.getResponse(XmlaOlap4jHttpProxy.java:94)
    	at org.olap4j.driver.xmla.proxy.XmlaOlap4jAbstractHttpProxy.get(XmlaOlap4jAbstractHttpProxy.java:165)
    	at org.olap4j.driver.xmla.XmlaOlap4jConnection.xxx(XmlaOlap4jConnection.java:599)
    	... 12 more
    Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost/xmla/msxisapi.dll
    	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    	at org.olap4j.driver.xmla.proxy.XmlaOlap4jHttpProxy.getResponse(XmlaOlap4jHttpProxy.java:78)
    	... 14 more
    Test Fin



    Pouvez vous m'aider svp.

  2. #2
    Membre émérite Avatar de FrancoisJehl
    Homme Profil pro
    BI Engineer
    Inscrit en
    Juillet 2009
    Messages
    1 485
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : BI Engineer
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Juillet 2009
    Messages : 1 485
    Points : 2 883
    Points
    2 883
    Par défaut
    Tu es en 2000? Tu as testé la data pump en dehors d'Olap4j?

  3. #3
    Membre à l'essai
    Inscrit en
    Mai 2008
    Messages
    20
    Détails du profil
    Informations forums :
    Inscription : Mai 2008
    Messages : 20
    Points : 21
    Points
    21
    Par défaut
    Je suis en SSAS 2008, IIS6 avec JDK1.6 et Eclipse europa sous Win XP :

    voici mon code après modification :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
     
    package comAutres;
     
    import org.olap4j.*;
     
     
    import java.io.FileNotFoundException; 
     
    import java.sql.*;
    //import org.olap4j.mdx.*;
     
    public class ConnexionOlap {
     
     
    	public static void main(String []args)throws SQLException,FileNotFoundException
    	{ 
     
    		System.out.println("Test avant");
    		try
    		{
     
     
    			Class.forName("org.olap4j.driver.xmla.XmlaOlap4jDriver");
     
    			OlapConnection		
     
    			con = (OlapConnection)DriverManager.getConnection("jdbc:xmla:Server=http://localhost/olap/msmdpump.dll;Catalog=datatest;Provider=SQLNCLI10.1;");
     
    			OlapWrapper wrapper = (OlapWrapper) con;
     
    			OlapConnection olapConnection = wrapper.unwrap(OlapConnection.class);
     
    			OlapStatement stmt = olapConnection.createStatement();
     
     
     
    			/*System.out.println(con.getCatalogs() );*/
     
     
     
    			CellSet cellSet = stmt.executeOlapQuery("select {[Measures].[Etudiant Nombre]} on columns from [DatatestWindows]");
     
     
     
     
     
     
     
     
     
     
     
     
    		}
    		catch(Exception ex){ 
     
    			System.err.println("Erreur pendant la connexion"); 
    			ex.printStackTrace();
     
     
    		}
     
    	}
    }

    et voilà mon rapport d'erreur:


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
     
    Erreur pendant la connexion
    java.lang.RuntimeException: org.olap4j.OlapException: This connection encountered an exception while executing a query.
    	at org.olap4j.driver.xmla.DeferredNamedListImpl.getList(DeferredNamedListImpl.java:76)
    	at org.olap4j.driver.xmla.DeferredNamedListImpl.get(DeferredNamedListImpl.java:94)
    	at org.olap4j.driver.xmla.DeferredNamedListImpl.get(DeferredNamedListImpl.java:43)
    	at org.olap4j.driver.xmla.XmlaOlap4jConnection.getCatalog(XmlaOlap4jConnection.java:377)
    	at org.olap4j.driver.xmla.XmlaOlap4jStatement.executeOlapQuery(XmlaOlap4jStatement.java:257)
    	at comAutres.ConnexionOlap.main(ConnexionOlap.java:42)
    Caused by: org.olap4j.OlapException: This connection encountered an exception while executing a query.
    	at org.olap4j.OlapExceptionHelper.createException(OlapExceptionHelper.java:29)
    	at org.olap4j.driver.xmla.XmlaOlap4jConnection.xxx(XmlaOlap4jConnection.java:610)
    	at org.olap4j.driver.xmla.XmlaOlap4jDatabaseMetaData.getMetadata(XmlaOlap4jDatabaseMetaData.java:127)
    	at org.olap4j.driver.xmla.XmlaOlap4jDatabaseMetaData.getDatasources(XmlaOlap4jDatabaseMetaData.java:932)
    	at org.olap4j.driver.xmla.XmlaOlap4jConnection.getDataSourceInfo(XmlaOlap4jConnection.java:252)
    	at org.olap4j.driver.xmla.XmlaOlap4jConnection.generateRequest(XmlaOlap4jConnection.java:749)
    	at org.olap4j.driver.xmla.XmlaOlap4jConnection.populateList(XmlaOlap4jConnection.java:585)
    	at org.olap4j.driver.xmla.DeferredNamedListImpl.populateList(DeferredNamedListImpl.java:102)
    	at org.olap4j.driver.xmla.DeferredNamedListImpl.getList(DeferredNamedListImpl.java:71)
    	... 5 more
    Caused by: org.olap4j.driver.xmla.proxy.XmlaOlap4jProxyException: This proxy encountered an exception while processing the query.
    	at org.olap4j.driver.xmla.proxy.XmlaOlap4jHttpProxy.getResponse(XmlaOlap4jHttpProxy.java:94)
    	at org.olap4j.driver.xmla.proxy.XmlaOlap4jAbstractHttpProxy.get(XmlaOlap4jAbstractHttpProxy.java:165)
    	at org.olap4j.driver.xmla.XmlaOlap4jConnection.xxx(XmlaOlap4jConnection.java:599)
    	... 12 more
    Caused by: java.io.IOException: Server returned HTTP response code: 405 for URL: http://localhost/olap/msmdpump.dll
    	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    	at org.olap4j.driver.xmla.proxy.XmlaOlap4jHttpProxy.getResponse(XmlaOlap4jHttpProxy.java:78)
    	... 14 more

Discussions similaires

  1. Connexion Java / LDAP
    Par dedeloux dans le forum API standards et tierces
    Réponses: 8
    Dernier message: 03/06/2013, 19h15
  2. Pb de connexion Java - Filemaker
    Par Mikou27 dans le forum JDBC
    Réponses: 2
    Dernier message: 10/08/2006, 11h55
  3. Connexion java avec mysql
    Par hlimaiem dans le forum Installation
    Réponses: 2
    Dernier message: 15/06/2006, 17h37
  4. Erreur de connexion : java RMI & linux
    Par pedouille dans le forum API standards et tierces
    Réponses: 2
    Dernier message: 16/05/2006, 20h04
  5. Connexion Java
    Par Alain_B dans le forum Outils
    Réponses: 1
    Dernier message: 19/04/2006, 16h57

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo