salut a vous. depuis quelques jours, j'essaie de me connecter a SSAS sous sql server 2008 plus précisément a mon cube. mais a chaque fois , je me heurte au problème ci dessous:
voici la classe chargée de faire la connexion avec mon cube :
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
65
66
67
68
69
70 run: LOAD FILE LOAD FILE OK jdbc:jdbc4olap:http://10.0.1600.22/olap/msmdpump.dll org.jdbc4olap.jdbc.OlapDriver sa bezalel SUCCESS LOAD DRIVER nov. 26, 2014 10:27:01 AM org.jdbc4olap.xmla.XmlaConn <init> AVERTISSEMENT: WARNING: Login info missing? nov. 26, 2014 10:27:09 AM com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection post GRAVE: SAAJ0009 : échec de l'envoi du message nov. 26, 2014 10:27:09 AM org.jdbc4olap.xmla.XmlaConn discover INFOS: Error in soap call: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed nov. 26, 2014 10:27:09 AM org.jdbc4olap.jdbc.OlapNonRegisteringDriver connect INFOS: Connect error Exception in thread "main" com.sobi.Exception.SobiConfigurationException: CONNEXION IMPOSSIBLE . at com.sobi.test.Test.getInstance(Test.java:81) at com.sobi.test.Test.main(Test.java:37) Caused by: java.sql.SQLException: Connect error: Error in soap call: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed Caused by: null Cause Stack Trace: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:140) at org.jdbc4olap.xmla.XmlaConn.discover(XmlaConn.java:310) at org.jdbc4olap.xmla.XmlaConn.discoverDatasource(XmlaConn.java:371) at org.jdbc4olap.xmla.XmlaConn.<init>(XmlaConn.java:110) at org.jdbc4olap.jdbc.OlapConnection.<init>(OlapConnection.java:71) at org.jdbc4olap.jdbc.OlapNonRegisteringDriver.connect(OlapNonRegisteringDriver.java:79) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:270) at com.sobi.test.Test.getInstance(Test.java:76) at com.sobi.test.Test.main(Test.java:37) Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:344) at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:169) ... 11 more Caused by: java.net.UnknownHostException: 10.0.1600.22 at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) at sun.net.www.http.HttpClient.New(HttpClient.java:308) at sun.net.www.http.HttpClient.New(HttpClient.java:326) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1167) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1103) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:997) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:931) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1281) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1256) at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:301) ... 12 more Caused by: unknown at org.jdbc4olap.jdbc.OlapNonRegisteringDriver.connect(OlapNonRegisteringDriver.java:83) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:270) at com.sobi.test.Test.getInstance(Test.java:76) ... 1 more Java Result: 1 BUILD SUCCESSFUL (total time: 10 seconds)
voici le code du fichier properties
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90 /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.sobi.test; import com.sobi.Exception.SobiConfigurationException; import java.io.IOException; import java.io.InputStream; import java.net.InetAddress; import java.net.Socket; import java.sql.DriverManager; import java.sql.SQLException; import java.util.Properties; import java.util.logging.Level; import java.util.logging.Logger; import org.olap4j.OlapConnection; import org.olap4j.OlapWrapper; /** * * @author Bezalel */ public class Test { private static final String FICHIER_PROPERTIES = "com/sobi/dao/Sobi.properties"; private static final String PROPERTY_URL = "url"; private static final String PROPERTY_DRIVER = "driver"; private static final String PROPERTY_NOM_UTILISATEUR = "nomutilisateur"; private static final String PROPERTY_MOT_DE_PASSE = "motdepasse"; private String url; private String username; private String password; /** * @param args the command line arguments * @throws java.sql.SQLException */ public static void main(String[] args) throws SQLException { getInstance(); } public static void getInstance() throws SobiConfigurationException, SQLException { Properties properties = new Properties(); String url; String driver; String nomUtilisateur; String motDePasse; ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); InputStream fichierProperties = classLoader.getResourceAsStream(FICHIER_PROPERTIES); if (fichierProperties == null) { throw new SobiConfigurationException("Le fichier properties " + FICHIER_PROPERTIES + " est introuvable."); } try { System.out.println("LOAD FILE"); properties.load(fichierProperties); System.out.println("LOAD FILE OK"); url = properties.getProperty(PROPERTY_URL); driver = properties.getProperty(PROPERTY_DRIVER); nomUtilisateur = properties.getProperty(PROPERTY_NOM_UTILISATEUR); motDePasse = properties.getProperty(PROPERTY_MOT_DE_PASSE); System.out.println(url); System.out.println(driver); System.out.println(nomUtilisateur); System.out.println(motDePasse); } catch (IOException e) { throw new SobiConfigurationException("Impossible de charger le fichier properties " + FICHIER_PROPERTIES, e); } try { Class.forName(driver); System.out.println("SUCCESS LOAD DRIVER"); } catch (ClassNotFoundException e) { throw new SobiConfigurationException("Le driver est introuvable dans le classpath.", e); } try { OlapConnection con = (OlapConnection) DriverManager.getConnection(url, nomUtilisateur, motDePasse); OlapWrapper wrapper = (OlapWrapper) con; OlapConnection olapConnection = wrapper.unwrap(OlapConnection.class); System.out.println("SUCCESS CONNEXION"); } catch (SQLException et) { throw new SobiConfigurationException("CONNEXION IMPOSSIBLE .", et); } } }
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 # To change this license header, choose License Headers in Project Properties. # To change this template file, choose Tools | Templates # and open the template in the editor. url =jdbc:jdbc4olap:http://WINSERVER/olap/msmdpump.dll driver = org.jdbc4olap.jdbc.OlapDriver nomutilisateur = Bezalel motdepasse = bezalel
je vous en prie , aidez moi a trouver une solution
Partager