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] Report Caster API

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Report Caster API
 Login/Join
 
Gold member
posted
Hi Guys,

I am using Report Caster API to develop JAVA application to customize scheduling window.


I went though Report Caster documents,but could not solve my issues.

I am using Eclipse IDE to develop Java Application.

Can any one guide me how to run sample programs from Eclipse IDE,what are the environmental variables i should change?

Trying to achieve this from past one week.Help me to figure out this.

Thanks in advance.
Rakesh

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


WebFOCUS 8.0.03
Windows, All Outputs
 
Posts: 59 | Registered: February 13, 2014Report This Post
Gold member
posted Hide Post
Hi Rakesh,

I am not 100% sure if I understood you problem correctly. Do you need help running example Java Apps from Eclipse? Or do you need help accessing the RCaster API from Java.
For using Eclipse I would suggest looking into a different forum.
For accessing the Report Caster API using Java (independent of which IDE or none at all you use) - maybe the following first example helps to create at least a connection to your ReportCaster service:

import ibi.broker.api.CasterManagedConnectionFactory;
import ibi.broker.api.cci.CasterConnection;
import ibi.broker.api.cci.CasterConnectionFactory;
import ibi.broker.api.cci.PasswordCredential;
import ibi.broker.api.cci.SecurityTokenCredential;

import java.util.ResourceBundle;

import javax.resource.cci.ConnectionSpec;

public class PseudoConnectToRCaster {
	
	public static CasterConnection createCasterConnection() throws Exception {
		String host = "localhost";
		String port = "8200";
		String user = "admin";
		String password = "";
		String token = "";

		CasterManagedConnectionFactory managedConnectionFactory = new CasterManagedConnectionFactory();

		managedConnectionFactory.setServerName(host);
		managedConnectionFactory.setPortNumber(port);

		CasterConnectionFactory connectionFactory = (CasterConnectionFactory) managedConnectionFactory
				.createConnectionFactory();
		ConnectionSpec credential;
		if (token == "" || token == null) {
			credential = new PasswordCredential(user, password.toCharArray());
		} else {
			// System.out.println("Token: " + token);
			credential = new SecurityTokenCredential(token);
		}

		CasterConnection cc = ((CasterConnection) connectionFactory.getConnection(credential));
 		// System.out.println("User: " + cc.getUser().getName());
		return cc;
	}
}


(In Eclipse: make sure you have added your reportcaster.jar etc. to your Build-Path, in java itself it must be added to the classpath env var)

You need to fill in host, port etc. yourself of course or change the function to provide them as parameters. If the RCaster runs on a different server it must also be accessible (Firewall, Port etc.).

Using the CasterConnection object returned by my ex. function you can than retrieve further objects from the API or perform methods (e.g. getLibraryContentManager() for access on all already existing reports in the library).

Hope this points in the right direction and helps

Cheers Linne


WebFOCUS 7.7.03
 
Posts: 67 | Registered: January 05, 2011Report This Post
Gold member
posted Hide Post
Hi Linne,

First of all thanks for your very quick response.

I tried your above code,but having same error which i am facing earlier.

ERROR! License has not been loaded. Exception has been thrown while trying to read the file:null/wflicense.key


import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.NamedQuery; 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


I included all the API jars in BUILD PATH of my eclipse.


I am missing something,can you help me figure out.

Atleast want to create connection to my Report Caster Service.

Thanks,
Rakesh


WebFOCUS 8.0.03
Windows, All Outputs
 
Posts: 59 | Registered: February 13, 2014Report This Post
Gold member
posted Hide Post
Hi Rakesh,

sorry, but I will be guessing here now because I have not experienced this exception yet. It could also be that this is related to WebFOCUS 8.0.x you are using while I am still on WF 7.7.x

One Thing you could try (as it it also mentioned at the end of the exception error msg): add the right jdbc driver jar to your CLASSPATH.
If your WF runs on an Oracle DB this should be ojdbc6.jar or similar, for MS SQL: sqljdbc4.jar. You might Need to download them from the resp. DB vendor but they are generally free.

Hope this helps

Cheers Linne


WebFOCUS 7.7.03
 
Posts: 67 | Registered: January 05, 2011Report This Post
Gold member
posted Hide Post
Thanks Linne.

I included ojdbc6.jar file also in my Java Build Path of ECLIPSE environment.

But facing still error.

Thanks,
rakesh


WebFOCUS 8.0.03
Windows, All Outputs
 
Posts: 59 | Registered: February 13, 2014Report This Post
Gold member
posted Hide Post
Hi Rakesh,

I am out of ideas unfortunately.
I can only suggest opening a case with IBI.
They helps us getting the "first contact" with our WebFOCUS RCaster via the API. I believe they will also be able to help you out here.

Cheers
Linne


WebFOCUS 7.7.03
 
Posts: 67 | Registered: January 05, 2011Report 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] Report Caster API

Copyright © 1996-2020 Information Builders