The importance of the JAAS Stanza name

One upon a time, I was wondering what the stanza name is for when connecting to P8,  using most of the time a null value. Today I remembered this lost time and I thought I would write about it.

Why does it work with null

It works with a null stanza name when you don’t have the thin client jar in your classpath. Indeed this jar contains some properties files which makes the connection impossible without stanza name. If you are using WSI connection (CEWS), you don’t need this jar. But if you are sometimes using the EJB connection and have this jar in your classpath, then the WSI connectionwon’t work with a null stanza name, and you will have to do things properly, i.e. use the appropriate stanza for the WSI: FileNetP8WSI.

What stanza name to use

Well to do things properly, always use FileNetP8WSI when connecting via WSI, and always use FileNetP8 when connecting via EJB, even if you don’t have the thin client jar in your classpath. At least if you add it later because you want to use an EJB connection, your code won’t break on every WSI connection.

The error you will get if you use the wrong stanza name when using the thin client jar is:

JSAS1480I: Security is not enabled because the ConfigURL property file is not set.
com.filenet.api.exception.EngineRuntimeException: FNRCS0005E: SECURITY_INVALID_CREDENTIALS: Access to the Content Engine was not allowed because the Content Engine API library or the Web Service Interface (WSI) Listener could not find the required security context information. Expected credentials were not found in the security context.
 at com.filenet.apiimpl.wsi.ClientOperation.getCredential(ClientOperation.java:347)
 at com.filenet.apiimpl.wsi.ClientOperation.getSoapEnvelopeSecurity(ClientOperation.java:280)
 at com.filenet.apiimpl.wsi.ServiceSessionNst.bStartXmlDocument(ServiceSessionNst.java:831)
 at com.filenet.apiimpl.wsi.ServiceSessionNst.cReqRespPath(ServiceSessionNst.java:155)
 at com.filenet.apiimpl.wsi.ServiceSessionNst.getObjects(ServiceSessionNst.java:104)
 at com.filenet.apiimpl.util.SessionHandle.getObjects(SessionHandle.java:346)
 at com.filenet.apiimpl.core.Session.callGetObjects(Session.java:92)
 at com.filenet.apiimpl.core.Session.executeGetObject(Session.java:297)
 at com.filenet.apiimpl.core.Session.getObject(Session.java:311)
 at com.filenet.apiimpl.core.DispatchEntries.fetchObject(DispatchEntries.java:833)
 at com.filenet.apiimpl.core.DomainImpl.fetchObject(DomainImpl.java:605)
 at com.filenet.api.core.Factory$ObjectStore.fetchInstance(Factory.java:8054)
 at org.gdelory.benchmarks.Connector.makeConnection(Connector.java:44)
 at org.gdelory.benchmarks.Connector.connect(Connector.java:62)
 at org.gdelory.benchmarks.Connector.getObjectStore(Connector.java:55)
 at org.gdelory.benchmarks.runner.CountQueryBenchmarks.main(CountQueryBenchmarks.java:35)
Exception in thread "P=625269:O=0:CT" com.filenet.api.exception.EngineRuntimeException: FNRCE0046E: E_NULL_OR_INVALID_PARAM_VALUE: Parameter objectStore is either null or has an invalid value.
 at com.filenet.apiimpl.query.RepositorySearch.fetchRows(RepositorySearch.java:90)
 at com.filenet.api.query.SearchScope.fetchRows(SearchScope.java:150)
 at org.gdelory.benchmarks.runner.CountQueryBenchmarks.countIteratorNonPaged(CountQueryBenchmarks.java:151)
 at org.gdelory.benchmarks.runner.CountQueryBenchmarks.testAllMethod(CountQueryBenchmarks.java:110)
 at org.gdelory.benchmarks.runner.CountQueryBenchmarks.main(CountQueryBenchmarks.java:43)

3 thoughts on “The importance of the JAAS Stanza name

  1. Kemal omar

    What a critical piece of information. Thanks !!!! I was trying for quite a few hours, to understand why my component suddenly stopped functioning.

    Reply
  2. Ramesh

    Hi, I am facing exactly same issue. After reading this article, I have changed the stanza to FileNetP8WSI in code and in adapter properties as well.But no luck. I checked the taskman.login.config , there is no stanza declaration available for FileNetP8WSI, however in WebSphere this stanza is defined. Do I need to add this stanza to config file?

    Reply

Leave a Reply