Topic
  • No replies
avi_techy
avi_techy
1 Post

Pinned topic Error in connecting web-application to FileNet CE 4.5.1

‏2010-03-12T11:32:23Z |
Hi,
I am trying to connect my web-application deployed in JBoss 4.2.3 to the FileNet CE 4.5.1 deployed in Websphere 6.1.I am able to connect using "http" but I am not able to connect using "iiop".My "iiop" connection code is:-
public class HelloDocument implements PrivilegedAction
{
private static final class ConfigInfo
{
static boolean USE_EXPLICIT_JAAS_LOGIN = true;
static String USERID = "sino";
static String PASSWORD = "Password123";
static String JAAS_STANZA_NAME = "FileNetP8";
static String CE_URI = "iiop://ip-add:2814/FileNet/Engine";
static String FOLDER_NAME = "MyDocument";
static String LOCAL_FILE_NAME = "c:/temp/rupanjal6.txt";
static String DOCUMENT_TITLE = "My Document Title";
static String CONTAINMENT_NAME = "My Document";
static boolean USE_SKIP = true;
}

private Connection conn = com.filenet.api.core.Factory.Connection.getConnection(ConfigInfo.CE_URI);

public void AddDoc() throws LoginException
{

Properties env = System.getProperties();
System.setProperty("java.security.auth.login.config","G:\\Rupanjal\\JBOSS JVM ARG\\jaas.conf.WebSphere");
System.setProperty("com.ibm.CORBA.ConfigURL","G:\\Rupanjal\\JBOSS JVM ARG\\sas.client.props");

//System.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
//System.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
//System.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
//System.setProperty(Context.PROVIDER_URL, "iiop://ip-add:2814");
System.out.println("CE is at " + ConfigInfo.CE_URI);
System.out.println("ObjectStore is " + ConfigInfo.OBJECT_STORE_NAME);
System.out.println("Connection on " + env.getProperty(Context.PROVIDER_URL));
HelloDocument fd = new HelloDocument();
if (ConfigInfo.USE_EXPLICIT_JAAS_LOGIN)
{
loginAndRun(fd, ConfigInfo.USERID, ConfigInfo.PASSWORD);
}
else
{
Subject subject = UserContext.createSubject(fd.conn, ConfigInfo.USERID,
ConfigInfo.PASSWORD, ConfigInfo.JAAS_STANZA_NAME);
UserContext.get().pushSubject(subject);......

The error is:-
javax.security.auth.login.LoginException: unable to find LoginModule class: com.ibm.ws.security.common.auth.module.WSLoginModuleImpl
javax.security.auth.login.LoginContext.invoke(Unknown Source)
javax.security.auth.login.LoginContext.access$000(Unknown Source)
javax.security.auth.login.LoginContext$4.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.login.LoginContext.invokePriv(Unknown Source)
javax.security.auth.login.LoginContext.login(Unknown Source)

My modification login-config.xml is:-
</application-policy>
<application-policy name = "FileNetP8">
<authentication>
<login-module code = "com.ibm.ws.security.common.auth.module.WSLoginModuleImpl" flag = "required" />
</authentication>
</application-policy>

Can anybody please help me out?As I am new to FileNet.Do i need to any other configuration in some file?What jars i should add?