Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Error when running Report Caster API Samples

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Error when running Report Caster API Samples
 Login/Join
 
Silver Member
posted
Hi All,

We are trying to build a stand alone Java Application which will serve as Front End for Scheduling/Report Caster. We tried creating a sample application and when we try to execute it we are getting the following error:

" Exception [EclipseLink-4021] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Unable to acquire a connection from driver [null], user [null] and URL [null]. Verify that you have set the expected driver class and URL. Check your login, persistence.xml or sessions.xml resource. The jdbc.driver property should be set to a class that is compatible with your database platform "

We have made the necessary settings in Persistence.xml file too. What would be the problem. Could anyone please help us on this.

Thanks,
Santhosh

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.0.03
Unix
HTML, Excel and PDF
 
Posts: 35 | Location: Los Angeles | Registered: April 25, 2014Report This Post
Silver Member
posted Hide Post
Hi All,

To simplify our problem, we are trying to run the following Java program and still we are getting the same error!!!

import ibi.broker.*;
import ibi.broker.api.data.schedule.*;
import ibi.broker.api.cci.*;
//import java.util;
import ibi.broker.api.CasterManagedConnectionFactory;
import java.util.ResourceBundle;
import ibi.broker.api.*;
import javax.resource.*;
import javax.resource.cci.ConnectionSpec;
import javax.resource.ResourceException;
import java.util.ResourceBundle;
import java.io.*;

//import ibi.org.xml.sax.helpers.*;
public class CasterServlet {

public static void main(String[] args)
{
String scheduleDescription = "testst";//args[0];
String fexFileName = "sample";//args[1];
String execId = "admin_username";//args[2];
String execPassword = "admin_Password";//args[3];
String server = "Webfocus_server";
String port_num = "8200";
CasterManagedConnectionFactory managedConnectionFactory = new CasterManagedConnectionFactory();
managedConnectionFactory.setServerName(server);//the name of the server running the distribution server
managedConnectionFactory.setPortNumber(port_num);//the port the distribution server is listening

try
{
CasterConnectionFactory connectionFactory = (CasterConnectionFactory)managedConnectionFactory.createConnectionFactory();

ConnectionSpec credential = new PasswordCredential(execId,execPassword.toCharArray());

CasterConnection aa = (CasterConnection)connectionFactory.getConnection(credential);
System.out.println("Hello");

}
catch (ResourceException ex)
{
System.out.println("Here");
System.out.println(ex);
}

//This portion of the code accepts four arguments

}
}

This is the exception we are getting

ERROR! License has not been loaded. Exception in thread "main" javax.persistence.PersistenceException: Exception [EclipseLink-4021] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Unable to acquire a connection from driver [null], user [null] and URL [null]. Verify that you have set the expected driver class and URL. Check your login, persistence.xml or sessions.xml resource. The jdbc.driver property should be set to a class that is compatible with your database platform at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:602) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:186) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:278) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:304) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:282) at com.ibi.ibss.dbdriver.IBSSEntityManager.getEM(IBSSEntityManager.java:87) at com.ibi.ibss.dbdriver.IBSSEntityManager.createNamedQuery(IBSSEntityManager.java:96) at com.ibi.ibss.dbdriver.IBSSEntityManager.createNamedQuery(IBSSEntityManager.java:115) at com.ibi.ibss.dbdriver.IBSSEntityManager.getNamedResultList(IBSSEntityManager.java:392) at com.ibi.ibss.dbdriver.IBSSGroupsImplDB.getGroupMap(IBSSGroupsImplDB.java:140) at com.ibi.ibss.dbdriver.IBSSGroupsImplDB.getGroupById(IBSSGroupsImplDB.java:339) at com.ibi.ibss.IBSSSecuritySystem.getEveryoneGroup(IBSSSecuritySystem.java:2905) at com.ibi.ibss.IBSSSecuritySystem.modifyNeededSystemRules(IBSSSecuritySystem.java:1665) at com.ibi.ibfs.IBFSService.(IBFSService.java:2472) at com.ibi.ibfs.IBFSService.getIBFSService(IBFSService.java:2877) at com.ibi.ibfs.IBFSService.getIBFSService(IBFSService.java:2841) at com.ibi.ibfs.IBFSService.getIBFSService(IBFSService.java:2894) at ibi.broker.api.CasterManagedConnectionFactory.(CasterManagedConnectionFactory.java:182) at CasterServlet.main(CasterServlet.java:26) Caused by: Exception [EclipseLink-4021] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Unable to acquire a connection from driver [null], user [null] and URL [null]. Verify that you have set the expected driver class and URL. Check your login, persistence.xml or sessions.xml resource. The jdbc.driver property should be set to a class that is compatible with your database platform at org.eclipse.persistence.exceptions.DatabaseException.unableToAcquireConnectionFromDriverException(DatabaseException.java:376) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:91) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:685) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:215) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:542)

Kindly help us to get this resolved.

Thanks,
Santhosh


WebFOCUS 8.0.03
Unix
HTML, Excel and PDF
 
Posts: 35 | Location: Los Angeles | Registered: April 25, 2014Report This Post
Platinum Member
posted Hide Post
I am also not able to configure Report Caster API.
If someone knows that how to implement the Report Caster API, Please help me.
My error Link is - Link


Thanks!
@vi

WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs
 
Posts: 103 | Registered: July 08, 2013Report This Post
Silver Member
posted Hide Post
In WebFOCUS 8, the ReportCaster legacy Java API calls the IBFS security system to authenticate and authorize users and to secure resources accessed during schedule creation and execution. Therefore any files needed by the IBFS security system must be available to an application calling the ReportCaster legacy Java API. The sample scripts provided in the ibi\WebFOCUS80\ReportCaster\samples\tools directory are set up so that the sample API programs can be compiled from this directory by modifying the SamplesComp script and run from this directory by modifying the setenv script. To run the API from another location you must copy all of the necessary files to that location and change any scripts to find these files. A simple way to do this with a Windows installation is the following:

1. Create an ibi\WebFOCUS80 folder in the new location.
2. Copy the ibi\WebFOCUS80\client folder from the installation to the new location.
3. Copy the ibi\WebFOCUS80\config folder from the installation to the new location.
4. Copy the ibi\WebFOCUS80\utilities\bin folder from the installation to the new location.
5. Copy the ibi\WebFOCUS80\utilities\setenv folder from the installation to the new location.
6. Copy the ibi\WebFOCUS80\utilities\logger folder from the installation to the new location.
7. Copy the ibi\WebFOCUS80\ReportCaster folder from the installation to the new location.
8. Edit the ibi\WebFOCUS80\config\webconfig.xml in the new location and globally change the path to ibi\WebFOCUS80 to match the new location.
9. Edit the ibi\WebFOCUS80\utilities\setenv\utilprodvars.bat in the new location and
a. change WFROOT to the new location.
b. change WEBinf to %WFROOT%\ReportCaster
10. Edit the ibi\WebFOCUS80\utilities\setenv\utiluservars.bat in the new location and set the path to java and to the jdbc driver.
11. Compile and run the sample API programs as described in the legacy API manual.


WebFOCUS All Releases
 
Posts: 45 | Location: NYC | Registered: September 21, 2007Report This Post
Silver Member
posted Hide Post
Hi Gerry,

Thanks for the detailed reply.

I followed your steps to do it in another machine where WebFocus is not installed. Still I am getting the same error.

I tried to follow another route. I compiled the sample files and the class files got created into CompiledCode directory. But I am not sure how to proceed after this.

Sorry to ask you such basic questions but I am really struck.

What we are really trying to do is to Simplify the Report Caster window. We need to remove certain sections like Pre/Post-RPC, Properties, Log Reports etc.,

Since we could not customize the window, we thought of creating a Web Application which accepts basic parameters for scheduling and from there by calling the API's we thought of achieving the functionality. This is what we are trying to do.

Your guidance will be greatly helpful.

Thanks,
Santhosh


WebFOCUS 8.0.03
Unix
HTML, Excel and PDF
 
Posts: 35 | Location: Los Angeles | Registered: April 25, 2014Report This Post
Silver Member
posted Hide Post
Hi Gerry,

The problem got fixed and now I am able to execute the java file from my remote machine.

Now the problem is I dont know how I fixed it. I followed all your steps and didnt get succeeded. I tried few options in the server side settings too.

Why I am worrying about this is I am working in development environment and once everything gets completed I need to move it to PROD and again I might face similar problems.

Thanks a lot for your guidance.

Thanks,
Santhosh


WebFOCUS 8.0.03
Unix
HTML, Excel and PDF
 
Posts: 35 | Location: Los Angeles | Registered: April 25, 2014Report This Post
Silver Member
posted Hide Post
Hi Gerry,

I am able to execute the Sample Java codes individually. What I am trying to do now is we are building a Web Application using Java and modified these Java codes into a Servlet program.

From JSP when I call these Java programs it throws an Authentication error.

Below is the error which I get:

AUTH0001: Authentication Error: You are not authenticated by ReportCaster. Please contact your ReportCaster administrator., error code: AUTH0001

Could you please help me in this.

Thanks,
Santhosh


WebFOCUS 8.0.03
Unix
HTML, Excel and PDF
 
Posts: 35 | Location: Los Angeles | Registered: April 25, 2014Report This Post
Gold member
posted Hide Post
quote:
AUTH0001: Authentication Error: You are not authenticated by ReportCaster. Please contact your ReportCaster administrator., error code: AUTH0001

Santhosh,
I am seeing this same error on an app that previously worked; Did you ever find a solution?

Ken


8.2.03 AIX Client Windows Tomcat
DB2, Terradata, SQL, Oracle
 
Posts: 56 | Location: Fort Worth, Texas USA | Registered: January 27, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Error when running Report Caster API Samples

Copyright © 1996-2020 Information Builders