Topic
No replies
SystemAdmin
SystemAdmin
693 Posts
ACCEPTED ANSWER

Pinned topic Unable to make a simple connection with CE

‏2011-08-28T10:10:37Z |
Hi i am getting an error when i try to make a connection to CE 4.0. Im getting very confused as to what im missing here.

package p8.sample.websphere;
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 {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("hello world");

String uri="http://myceserver:9080/wsi/FNCEWS40MTOM/"; //CEWS TRANSPORT CONFIGURATOPM JASS.CONF.WSI
Connection conn = Factory.Connection.getConnection(uri);

// Get the default domain
Domain domain = Factory.Domain.getInstance(conn, null);
// Get an object store
System.out.println("Object store name:" + domain.toString());

ObjectStore os = Factory.ObjectStore.fetchInstance(domain, "ObjectStoreName", null);

System.out.println("Object store name: " + os.get_Name());

}

}
==================
error
==================
hello world
log4j:WARN The log4j system is not properly configured!
log4j:WARN All ERROR messages will be sent to the system console until proper configuration has been detected.
Object store name: Class=com.filenet.apiimpl.core.DomainImpl AccessAllowed=null RecursionLevel=0 UpdateSequenceNumber=null ObjectAddress=(classId=Domain&objectId=null) Connection=( Class=com.filenet.apiimpl.core.ConnectionImpl URI=http://myceserver:9080/wsi/FNCEWS40MTOM/ Parameters={}) SuperClasses=null PendingActions=null
Exception in thread "main" com.filenet.api.exception.EngineRuntimeException: API_SESSION_NOT_IMPL_CORRECTLY: Session class com.filenet.apiimpl.wsi.SoapSession is not implemented correctly.
at com.filenet.apiimpl.util.SessionLocator.createNewSoapSession(SessionLocator.java:650)
at com.filenet.apiimpl.util.SessionLocator.createNewSession(SessionLocator.java:482)
at com.filenet.apiimpl.util.SessionLocator.getSession(SessionLocator.java:132)
at com.filenet.apiimpl.core.DispatchEntries.fetchObject(DispatchEntries.java:827)
at com.filenet.apiimpl.core.DomainImpl.fetchObject(DomainImpl.java:396)
at com.filenet.api.core.Factory$ObjectStore.fetchInstance(Factory.java:997)
at p8.sample.websphere.P8Connector.main(P8Connector.java:30)
Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:80)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:44)
at java.lang.reflect.Constructor.newInstance(Constructor.java:315)
at com.filenet.apiimpl.util.SessionLocator.createNewSoapSession(SessionLocator.java:622)
... 6 more
Caused by: java.lang.NullPointerException
at org.systinet.wasp.Wasp$DefaultSettings.init(Wasp.java:419)
at org.systinet.wasp.Wasp.init(Wasp.java:125)
at com.filenet.apiimpl.wsi.SoapSessionBase.<clinit>(SoapSessionBase.java:151)
... 11 more
============VM argumebnts============
-Dwasp.location="C:\Program Files\FileNet\ContentEngine\wsi"
-Djava.security.auth.login.config="C:\Program Files\FileNet\ContentEngine\config\samples\jaas.conf.WSI"
====================================

============included in class path of eclipse============
C:\Program Files\FileNet\ContentEngine\wsi\lib
====================================

===================================
More information:
===================================
eclipse version is 3.2.1
Compiler compliance level is 1.4 (i even tried 5.0 and 6.0, but same result)
My C.E version is 4.0
I have also attached my jaas.conf.wsi file