Quantcast
Channel: SCN : Unanswered Discussions - BI Platform
Viewing all articles
Browse latest Browse all 5661

Error while running JAVA code based on Web service

$
0
0

Hi experts,

 

I am trying to create a session inorder to schedule a report through in business objects 4.0 SP2 Patch 10 environmnet using Web Service.

 

I end up getting the below error message: [Attached the Log for full error message]

DEBUG [main] - Trying to find [org/apache/axis2/deployment/axis2_default.xml] using sun.misc.Launcher$AppClassLoader@11cfb549 class loader.

DEBUG [main] - XMLStreamReader is com.ctc.wstx.sr.ValidatingStreamReader

DEBUG [main] - getBundle(org.apache.axis2,org.apache.axis2.i18n,resource,null,...)

DEBUG [main] - loadBundle: Ignoring MissingResourceException: Can't find bundle for base name org.apache.axis2.resource, locale en_US

DEBUG [main] - Created org.apache.axis2.i18n.resource, linked to parent null

DEBUG [main] - getBundle(org.apache.axis2,org.apache.axis2.i18n,resource,null,...)

DEBUG [main] - org.apache.axis2.i18n.resource::handleGetObject(errorinloadingts)

DEBUG [main] - A org.apache.axis2.transport.http.CommonsHTTPTransportSender error occurred in loading the transport sender {1}

  1. java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpException

                at java.lang.Class.getDeclaredConstructors0(Native Method)

                at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)

                at java.lang.Class.getConstructor0(Class.java:2699)

                at java.lang.Class.newInstance0(Class.java:326)

                at java.lang.Class.newInstance(Class.java:308)

                at org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:537)

                at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:112)

                at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:615)

                at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:115)

                at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)

                at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:180)

                at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:146)

                at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:139)

                at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:228)

                at com.businessobjects.dsws.session.SessionLocator.<init>(SessionLocator.java:18)

                at com.businessobjects.dsws.session.Session.createStub(Session.java:200)

                at com.businessobjects.dsws.Consumer.<init>(Consumer.java:112)

                at com.businessobjects.dsws.session.Session.<init>(Session.java:142)

                at admintool.ReportBurstJava.programLogic(ReportBurstJava.java:50)

                at admintool.ReportBurstJava.run(ReportBurstJava.java:109)

                at com.crystaldecisions.sdk.plugin.desktop.program.internal.ProgramWrapper.main(ProgramWrapper.java:174)

Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.HttpException

                at java.net.URLClassLoader$1.run(URLClassLoader.java:261)

                at java.security.AccessController.doPrivileged(Native Method)

                at java.net.URLClassLoader.findClass(URLClassLoader.java:249)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:354)

                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:344)

                at java.lang.ClassLoader.loadClass(ClassLoader.java:299)

                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:367)

                ... 21 more

 

Below is the code: The code gets the credentials and throws the above error when it is creating a new Session.

 

URL boConURL = new URL("http://parapldevvm54.spddom.sankyopharma.com/dswsbobje/services/Session");
connection = new com.businessobjects.dsws.Connection(boConURL);
EnterpriseCredential credential = EnterpriseCredential.Factory.newInstance();
credential.setLogin("administrator");
credential.setPassword("xxxxx");
credential.setDomain("xxxx");
credential.setAuthType("secEnterprise");

Session boSession = new Session(connection);
SessionInfo boSI = boSession.login(credential);
URL bipConURL = new URL("http://parapldevvm54.spddom.sankyopharma.com/dswsbobje/services/BIPlatform");

 

However the same program runs fine if i run it through Eclipse installed on the server.

 

I tried the following:

  1. Compiled the code and created a JAR file on the server. and deployed it on business Objects as program objects. Provided the BO libraries in the class path under default settings. Below are the libraries that are included
    • ..\java\lib\dsws-session.jar;
    • ..\java\lib\external\apache_poi-3.5\xmlbeans-2.3.0.jar;
    •   ..\java\lib\dsws-common.jar;
    •   ..\java\lib\external\commons-httpclient-3.0.1

 

  2.  Tried packing the libraries while creating a Runnable Jar.

 

Botht eh above steps didn't help. Please suggest as how to progress on this situation.


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>