Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Client Development Environment for FileNet P8(How to setup using JBoss 5.x and Eclipse?)
Client Development Environment for FileNet P8 [message #531267] Tue, 04 May 2010 11:40 Go to next message
shiva  is currently offline shiva Friend
Messages: 2
Registered: May 2010
Junior Member
We are trying to set up a client environment for FileNet P8 Server. The client configuration set up is
1. JBoss 5.x as application Server and
2.Using Eclipse 3.3.2 as IDE.

We have copied the required the list jar files from FileNet server and copied to our client system
1. Jace.jar
2. Log4j.jar
3. Stax-api.jar
4. xlxpScanner.jar
5. xlxpScannerUtils.jar and
6. jass.conf.WSI
also configured as external jar in eclipse IDE. As FileNet help suggested, we have created a
project/package and a connector class. The source code is,
package p8.sample.cews;
//Import.
import java.util.Iterator;
import javax.security.auth.Subject;
import com.filenet.api.collection.ObjectStoreSet;
import com.filenet.api.core.Connection;
import com.filenet.api.core.Domain;
import com.filenet.api.core.Factory;
import com.filenet.api.core.ObjectStore;
import com.filenet.api.util.UserContext;

public class P8Connector {
public static void main(String[] args)
{
// Set connection parameters; substitute for the place holders.
String uri = "http://<server>:<port>/wsi/FNCEWS40MTOM/";
String username = "user";
String password = "password";

// Make connection.
Connection conn = Factory.Connection.getConnection(uri);
Subject subject = UserContext.createSubject(conn, username, password, null);
UserContext.get().pushSubject(subject);

try
{
// Get default domain.
Domain domain = Factory.Domain.fetchInstance(conn, null, null);
System.out.println("Domain: " + domain.get_Name());

// Get object stores for domain.
ObjectStoreSet osSet = domain.get_ObjectStores();
ObjectStore store;
Iterator osIter = osSet.iterator();

while (osIter.hasNext())
{
store = (ObjectStore) osIter.next();
System.out.println("Object store: " + store.get_Name());
}
System.out.println("Connection to Content Engine successful");
}
finally
{
UserContext.get().popSubject();
}
}
}

The error message is
Exception in thread "main" com.filenet.api.exception.EngineRuntimeException: API_INVALID_URI: An invalid URI
was found for connection http://<server>:<port>/wsi/FNCEWS40MTOM/

Anyway, help us how to configure client environment and what are all the prerequisites to create a
client environment with the said softwares (JBoss and Eclipse as client)
Thank you,
Kind Regards,
Shiva.
Re: Client Development Environment for FileNet P8 [message #760736 is a reply to message #531267] Sun, 04 December 2011 22:44 Go to previous message
OSCXPDEV  is currently offline OSCXPDEV Friend
Messages: 1
Registered: December 2011
Junior Member
Hey Gang!

This is my very first post I think in this forum. Wanted to report the current code sample the poster added helped me a great deal, and there is nothing wrong in the code.

I know this is an old post, but folks may be having issues I've encountered. I did have to properly configure log4j:

//added logger configuration
//2011.12.02.9.11.AM
Logger myLogger = Logger.getLogger(YourClassName.class.get-
Name());
Appender myAppender = null;
myLogger.setLevel(Level.ALL);


the following were great resources, I used the last one:

(1)Go to stackoverflow dot com then find this doc :how-toinitialize-
log4j-properly

(2) Go to coderanch, find this doc: log-WARN-Pleaseinitialize-
log

(3) Go to wiki base22 then find this doc: How+to+setup+Log4j+in+a+web+app+-+fast

Happy Coding!

Köll
Previous Topic:How to integrate two types of Eclipse projects into one
Next Topic:How do I install Eclipse 3.7 C++ in ubuntu 11.10?
Goto Forum:
  


Current Time: Fri Jun 25 14:29:46 GMT 2021

Powered by FUDForum. Page generated in 0.02578 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top