0

When trying to query FileNet with below query

SELECT d.To,d.Cc,d.[From],d.Subject,d.[ReceivedOn],d.[SentOn],d.DocumentTitle,d.MimeType,d.StorageLocation,d.ContentSize,d.DateContentLastAccessed,d.Creator,d.LastModifier,d.DateLastModified,d.Name,d.Id,d.DateCreated FROM Document d WHERE [ICCFrom] LIKE '%[email protected]%' AND [ICCMailDate] > 20210101T235959Z

String query ="Above query statement";
SearchSQL sql = new SearchSQL(query);
SearchScope scope = new SearchScope(objectStore);
IndependentObjectSet s = scope.fetchObjects(sql, pageSize, null, true); > // Get the page iterator PageIterator iterator = s.pageIterator();

I am getting the below error log.

[INFO ] 2021-05-06 10.04.19.856 [Thread-158] [1571783] filenet_error.api.com.filenet.apiimpl.util.SessionHandle 177- An exception has occurred while processing an executeSearch request. The search request is being retried(1) of (1) times. javax.net.ssl.SSLException: Connection reset at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_272] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_272]

Caused by: javax.net.ssl.SSLException: Connection reset at sun.security.ssl.Alert.createSSLException(Alert.java:127) ~[?:1.8.0_272]

Suppressed: java.net.SocketException: Broken pipe (Write failed) at java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:1.8.0_272]

[DEBUG] 2021-05-06 10.04.19.858 [Thread-158] [1571783] filenet_tracing.api.detail.com.filenet.apiimpl.util.SessionHandle 180- com.filenet.api.exception.EngineRuntimeException: FNRCT0042E: TRANSPORT_WSI_NETWORK_ERROR: A network error occurred when processing a Web service request or response. See the nested exception for specific details. See full stack trace for details. Message: Connection reset Duration 300,265 milliseconds.

Below is the java code I used to get instances of Objectstore.

// Get the connection
Connection conn = Factory.Connection.getConnection(uri);
// Get the user context
UserContext uc = UserContext.get();
uc.pushSubject(UserContext.createSubject(conn, username, password, getJAASStanzaName(configuration)));
// Get the default domain
Domain domain = Factory.Domain.getInstance(conn, null);
// Get an object store
objectStore = Factory.ObjectStore.fetchInstance(domain, configuration.getConfiguration(Configuration.OBJECT_STORE_NAME), null);`

can anyone help me solve the issue.?

5
  • Could you please share how get you instance of objectStore and session? Connection URL?
    – swepss
    Commented May 12, 2021 at 12:52
  • Hi swepss , I have updated the main question of how I am getting object-store instance. Commented May 14, 2021 at 13:31
  • show me your uri (change hostname to @hostname@), FN installed to WebSphere? Are you using WSI or CORBA ? Is it on 9443 port or on 9080... your error looks like connection timeout cause of port unrecheable or may be you are trying to get SSL connection to non-SSL port. Gimme your URL ˆ)
    – swepss
    Commented May 17, 2021 at 11:30
  • Are you connecting from standalone JVM or under deployed WebSphere application?
    – swepss
    Commented May 17, 2021 at 11:32
  • I am using a WSI connection (hostname/wsi/FNCEWS40SOAP) and standalone JVM to Websphere through jace.jar. Commented May 17, 2021 at 11:50

2 Answers 2

1

After some hassle, I found the link about session cache

https://www.ibm.com/support/pages/how-long-ce-java-api-session-object-valid-once-its-instantiated-jav

I have cached the CE Java API session object in the map using objects hashcode. And used it to retrieve resultset of files from object store without validating session object is valid or not.

So now instead of caching in the map. I am getting then and there when the object is needed. It is working fine.

0
  1. By default, WebSphere bind SSL port on 9443 please check the port.
  2. Check protocol, I mean connection URL should be like https://host:9443/wsi/FNCEWS40SOAP, try to connect using browser
  3. Check JAAS stanza name, it placed in jaas.conf.WSI
  4. Check VM params, it should contain link to jaas.conf.WSI

-Djava.security.auth.login.config="c:\Program Files\IBM\FileNet\CEClient\config\samples\jaas.conf.WSI"

non-Windows

-Djava.security.auth.login.config="/opt/IBM/FileNet/CEClient/config/samples/jaas.conf.WSI"

link to doc Creating a Runtime Configuration

1
  • Thanks for the suggestion @swepss. I have checked all the above. The problem was in the session object which has to be maintained programmatically. I have answered in solution how i solved it. Commented Sep 9, 2021 at 14:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.