BusinessObjects Board

SDK problem

Hi everyone, I’m new here and in Sdk’s.

I have a big problem.

On my actual job, I have a portal where the users create pdf instances of several reports on BO and send to a specific location on the company network.

But the company only had a BO Production system, now, it has Dev, QAS and PRD.

We did upgrade the DEV and QAS systems to BO 4.2 SP6 from SAP BO4.0;

All the .jsp files were copied and updated with the data of the respective server.

But I’m getting an error now, my code is:

<%@ page contentType=“text/html; charset=utf-8” language=“java” %>

<%@ page import=“com.crystaldecisions.sdk.framework." %>
<%@ page import=“com.crystaldecisions.sdk.exception.SDKException” %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.
” %>
<%@ page import=“com.crystaldecisions.sdk.plugin.CeKind” %>
<%@ page import=“com.businessobjects.sdk.plugin.desktop.webi." %>
<%@ page import="com.crystaldecisions.sdk.properties.
,com.crystaldecisions.sdk.plugin.destination.smtp." %>
<%@ page import="java.util.
,java.lang.Integer,java.io., java.lang.Object., java.net." %>
<%@ page import ="com.crystaldecisions.sdk.properties.
, com.businessobjects.sdk.plugin.desktop.profile., com.crystaldecisions.sdk.plugin.desktop.usergroup., com.crystaldecisions.sdk.plugin.desktop.user." %>
<%@ page import ="com.businessobjects.rebean.wi.
” %>
<%@ page import =“com.crystaldecisions.sdk.plugin.desktop.report." %>
<%@ page import ="com.crystaldecisions.sdk.plugin.destination.diskunmanaged.
” %>

<%@ page import=“java.io.FileInputStream” %>
<%@ page import=“java.io.File” %>
<%@ page import=“java.io.InputStreamReader” %>
<%@ page import=“java.net.URL” %>
<%@ page import=“java.io.FileReader” %>
<%@ page import=“java.io.BufferedReader” %>

<%!JspWriter out;%>

<%
this.out = out;

final String BO_USERNAME=(String)request.getParameter(“user”);
final String BO_PASSWORD=(String)request.getParameter(“pass”);

boolean loginSuccessful = false;
IEnterpriseSession boEnterpriseSession = null;

final String REPORT_NAME1 = “XPTO1”;
final String REPORT_NAME2 = “XPTO2”;
final String REPORT_NAME3 = “XPTO3”;
final String REPORT_NAME4 = “XPTO4”;
final String REPORT_NAME5 = “XPTO5”;

// actualizar esta informacao quando o servidor for configurado
final String BO_CMS_NAME = “xxx-xx-xx:6400”;
final String BO_AUTH_TYPE = “secSAPR3”;

// Read file
String jspPath = "D:\\SAPBO\\Tomcat6\\webapps\\mig\\";
String fileName = "defaults.txt";
String txtFilePath = jspPath + fileName;

BufferedReader reader = new BufferedReader(new FileReader(txtFilePath));
StringBuilder sb = new StringBuilder();
	
request.setAttribute("periodDefault", reader.readLine());		
request.setAttribute("exercDefault", reader.readLine());	
request.setAttribute("versaoDefault", reader.readLine());	
request.setAttribute("anoDefault", reader.readLine());

try{
boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon(BO_USERNAME, BO_PASSWORD, BO_CMS_NAME, BO_AUTH_TYPE);

On this point the boEnterpriseSession are “Null” and the following error appears:

java.lang.NullPointerException: while trying to invoke the method com.crystaldecisions.sdk.framework.IEnterpriseSession.logoff() of a null object loaded from local variable ‘boEnterpriseSession’
org.apache.jsp.porOrcam_jsp._jspService(porOrcam_jsp.java:730)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Anyone can help me please?

Thank you!

Regards.


Shaktar (BOB member since 2018-01-24)

The Java security and encryption libraries were updated with 4.2 SP4 (and you can’t be on 4.2 SP6 because it hasn’t been released yet - you may be on SP5). This means you can’t log in to the BI Platform if the SDK you’re using is from a pre-4.2 SP4 version of the software.

You need to change the versions of the libraries that are referenced in your application to match the version of the BI Platform that you’re using. You should do this any time that you upgrade the platform.

-Dell


hilfy :us: (BOB member since 2007-04-16)

Hi, thank you for your answer!

You’re absolutely right, my Basis said that we were on SP6, but we actually are in SP4 (I checked this time).

But we did what you said, we copied all the files from BOE 4.2 lib into our aplication, but we still have the same error.

We did anything wrong? have another idea?

Thank you,

Regards.

Eduardo Gonçalves


Shaktar (BOB member since 2018-01-24)

When you copied over the files from the lib folder, did you include the subfolders? Did you copy over the top of what was there already?

I would try deleting all of the libraries that are set up for your application and then copying over everything, including the subfolders, from the \java\lib folder where BOBJ is installed. This way you won’t have any relics of old libraries causing any issues.

-Dell


hilfy :us: (BOB member since 2007-04-16)