hi there,
the code below works fine for our older projects.
now i have an new standalone project with jdk 1.6 and hibernate 4.2.3.
have to remove the sapxmltoolkit.jar because the nothing works anymore and it is deprecated with the recommendation use JDK instead.
after removing i get an NoClassDefFoundError: com/sap/engine/lib/xml/util/NestedException(moore see below).
is there someone who has a clue what to do?
thanx in advance
ute
------------- code --------------------------------------------------------------------------------------------------------------------------
ManagedConnectionFactory mcf;
IConnectionFactory cf = null;
IConnectionSpec cs = null;
IBIConnection connection = null;
try {
mcf = (ManagedConnectionFactory) Class.forName("com.sap.ip.bi.sdk.dac.connector.xmla.XmlaManagedConnectionFactory").newInstance();
cf = (IConnectionFactory) mcf.createConnectionFactory();
cs = cf.getConnectionSpec();
} catch (Exception e) {
throw new BIResourceException(Locale.getDefault(),
Samples.SDK_SAMPLES_1210, e);
}
BIResourceProperties props =
new BIResourceProperties(Helpers.class, ".xmla");
// Collects information about the properties used to connect
// to the data source.
Enumeration propnames = props.propertyNames();
while (propnames.hasMoreElements()) {
String key = (String) propnames.nextElement();
//out.println("<p>key:" + key + " prop:" + props.getProperty(key) + "</p>");
cs.setPropertyValue(key, props.getProperty(key));
}
cs.setPropertyValue("UserName", Helpers.userName);
cs.setPropertyValue("Password", Helpers.password);
cs.setPropertyValue("URL", Helpers.url);
try {
// Establishes the connection.
connection = (IBIConnection) cf.getConnectionEx(cs);
} catch (Exception e) {
throw new BIResourceException(Locale.getDefault(),
Samples.SDK_SAMPLES_1100, e);
}
------------- code end --------------------------------------------------------------------------------------------------------------------------
------------- exception --------------------------------------------------------------------------------------------------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: com/sap/engine/lib/xml/util/NestedException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ServiceBase.getLPFactory(ServiceBase.java:71)
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ServiceBase.init(ServiceBase.java:98)
at com.sap.ip.bi.sdk.dac.connector.xmla.standalone.MsXmlAnalysisImpl.<init>(MsXmlAnalysisImpl.java:11)
at com.sap.ip.bi.sdk.dac.connector.xmla.impl.StandaloneProxy.<init>(StandaloneProxy.java:48)
at com.sap.ip.bi.sdk.dac.connector.xmla.impl.Connection$ProxyWrapper.<init>(Connection.java:1703)
at com.sap.ip.bi.sdk.dac.connector.xmla.impl.Connection.<init>(Connection.java:154)
at com.sap.ip.bi.sdk.dac.connector.xmla.impl.Connection.connect(Connection.java:184)
at com.sap.ip.bi.sdk.dac.connector.xmla.XmlaManagedConnection.<init>(XmlaManagedConnection.java:166)
at com.sap.ip.bi.sdk.dac.connector.xmla.XmlaManagedConnectionFactory.createManagedConnection(XmlaManagedConnectionFactory.java:70)
at com.sap.ip.bi.sdk.dac.connector.impl.BIConnectionManager.allocateConnection(BIConnectionManager.java:83)
at com.sap.ip.bi.sdk.dac.connector.xmla.XmlaConnectionFactory.getConnectionEx(XmlaConnectionFactory.java:145)
at bwDaten.Helpers.connectToXMLADatasource(Helpers.java:92)
at bwDaten.BwConnection.process(BwConnection.java:151)
at bwDaten.BwConnection.setzeBwDaten(BwConnection.java:33)
at bundesstatitik.EinnahmenBwGrusi.erstelleEinnahmenMapGrusi(EinnahmenBwGrusi.java:53)
at bundesstatitik.StatistikGrusi.erstelleGrusiStatistikGesamt(StatistikGrusi.java:90)
at bundesstatitik.StatistikGrusi.erstelleGrusiStatistik(StatistikGrusi.java:51)
at bundesstatitik.Bundesstatistik.starteStatistikGrusi(Bundesstatistik.java:79)
at bundesstatitik.Bundesstatistik.generateStatistik(Bundesstatistik.java:54)
at bundesstatitik.RunBundesstatistik.startBundesstatistik(RunBundesstatistik.java:139)
at bundesstatitik.RunBundesstatistik.main(RunBundesstatistik.java:113)
Caused by: java.lang.ClassNotFoundException: com.sap.engine.lib.xml.util.NestedException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 33 more