Upgrade from ICN 2.0.3 to 2.0.3 FP3

Note: This post is superseded by its new version.

Here is a way to silently upgrade from IBM Content Navigator 2.0.3 to 2.0.3 FP3. You can use this right after using the CPIT installer to be up-to-date with your ICN version.

In the same folder you copied 2.0.3-ICN-FP003-LINUX.tar, execute these commands:

# The profile used when installing ICN 2.0.3, if you use the CPIT installer it should already be correct
export profilePath=/opt/IBM/cpit/install-scripts/profiles/NexusConfig
# The path of the IBM Content Navigator Configuration and Deployment Tool, if you used the default location to install ICN, that should be correct
export configmgr_cl=/opt/IBM/ECMClient/configure/configmgr_cl

mkdir icnfp
tar -xvf 2.0.3-ICN-FP003-LINUX.tar --directory=icnfp
cd icnfp
sed -i "s/LICENSE_ACCEPTED=false/LICENSE_ACCEPTED=true/g" ecmclient_silent_install.txt
./IBM_CONTENT_NAVIGATOR-2.0.3.3-FP003-LINUX.bin -f ecmclient_silent_install.txt

$configmgr_cl execute -task configureicntask -profile $profilePath
$configmgr_cl execute -task rebuildear -profile $profilePath
$configmgr_cl execute -task deployapplication -profile $profilePath

Customize the progress message of your service

By default, in IBM Content Navigator, the progress message when you are invoking a plug-in’s service is always Working… However, you may want something more meaningful. Give a progressMessage attribute to the plugin parameters doesn’t work because the Request class overwrite it anyway. You have to define one of the following attribute in the messages list.

  • progress_message_repositoryType_serviceName
  • progress_message_serviceName

Here is an example:

var serviceParams = {};
serviceParams[Constants.PARAM_REPOSITORY] = repository.id;
serviceParams[Constants.PARAM_SERVER_TYPE] = repository.type;
serviceParams[Constants.PARAM_FOLDER_ID] = items[0].id;
ecm.messages.progress_message_PrimeReleaseService = "Priming " + items[0].name + "...";

Request.invokePluginService("GenericActionsPlugin", "PrimeReleaseService", {
    requestCompleteCallback: lang.hitch(this, function (response) {
        this.displayResults(response);
    }),
    requestParams : serviceParams
});

Install FileNet P8 5.2.1 (with Composite Platform Installation Tools)

Here is the new and up-to-date version of the Install FileNet P8 series, replacing the old one (5.2). What is mainly new, compare to CPIT 5.2:

  • Tivoli Directory Server 6.3 FP24
  • GSKit 8.0.14.27
  • FileNet Content Platform Engine 5.2.1
  • WebSphere Application Server 8.5.5
  • IBM Content Navigator 2.0.3
  • Installation Manager 1.6.2
  • There are now two WAS nodes, one for FileNet and one for ICN
  • IBM DB2 9.7 Fix Pack 8/li>

Last version was Install FileNet P8. This post is intended to help you to use the CPIT installer to install a fully functional FileNet P8 on a single server. We will see what you need to run and how to proceed. As nice as it sounds, errors are frequent so we will try to isolate all errors and see how to fix them.

This is weird, but most of the errors from the CPIT 5.1 are still present in the version 5.2.1… The only one actually fixed is the creation of the setDB2port which is not needed anymore.

Continue reading

How works the FileTracker in ICN

Since I spent some time working with the File Tracker, I thought I would write how it really works. This is useful to know:

  • what can be manually done with the files without preventing the File Tracker to work
  • what can be done when downloading file via ICN, especially sub-folders speaking

Principle

The File Tracker applet will use the desktop’s configuration to know what is the File Tracker directory. That can be an environment variable, user home directory, user document directory, or a hard defined folder. Then it will download all documents in this folder, and will be able to find them back for the check in. That way, the user does not have to give the file himself when checking in.

How the FileTracker store and retrieve files

Continue reading

Callback not working in the FileTracker functions

Status: fixed in 2.0.3.3

You might have noticed that when using the ecm/model/FileTracker class in IBM Content Navigator, the callback is never called.

For instance if you are using the following code:

FileTracker.downloadAndTrackFiles(documentInfoObj, function (response) {
    console.log("Never invoked");
});

the callback is never called. This is because there is a defect in the FileTracker processMessage function, it does not look correctly for the callback because of a = missing in the condition:

var callbackResponse;
if (response.responses && response.responses.length > 0) {
	var callbackResponse;
	for ( var i = 0; i < response.responses.length; i++) {
		if (response.responses[i].errorCode = this.SERVER_RESPONSE_CALLBACK) {
			callbackResponse = response.responses[i];
			break;
		}
	}
} else if (response.errorCode == this.SERVER_RESPONSE_CALLBACK) {
	callbackResponse = response;
}

This is fixed in Fix Pack 3 though (2.0.3.3), so you can either upgrade or use a plugin to do an aspect around and replace the function by the correct one, which is:

processMessage: function(json, showSuccessMessage) {
	var methodName = "processMessage";
	this.logEntry(methodName);

	var response = dojojson.fromJson(json);
	if (response.hasError) {
		var errorPrefix = "", inserts = [];
		var showError = true;
		if (response.errorCode == 7) {//ERROR_OPEN_FAILED
			errorPrefix = "runtime_file_tracking_file_not_found_error";
		} else if (response.errorCode == 3) {
			errorPrefix = "runtime_file_tracking_ioexception_error";
		} else if (response.errorCode == this.ERROR_NOT_TRACKED) {
			showError = false;
		} else if (response.errorCode == this.ERROR_OPEN_FAILED) {
			showError = true;
			errorPrefix = "runtime_file_tracking_open_error";

		} else if (response.errorCode == this.ERROR_SAVE_FILE_FAILED) {
			showError = true;
			errorPrefix = "runtime_file_tracking_save_file_error";

		} else if (response.errorCode == this.ERROR_SAVE_FILE_FAILED_AND_OPEN_FIALED) {
			showError = true;
			errorPrefix = "runtime_file_tracking_save_file_after_checkout_error";

		} else if (response.errorCode == this.ERROR_ENVIRONMENT_VARIABLE_PATH_NOT_FOUND) {
			showError = true;
			errorPrefix = "runtime_file_tracking_ev_file_path_not_found_error";

		} else if (response.errorCode == this.ERROR_OPEN_CONNECTION) {
			showError = true;
			errorPrefix = "runtime_file_tracking_ioexception_error";

		} else if (response.errorCode == this.ERROR_FOLDER_NOT_FOUND) {
			showError = true;
			errorPrefix = "runtime_file_tracking_exact_file_path_not_found_error";

		} else if (response.errorCode == this.ERROR_EXACT_PATH_NOT_FOUND) {
			showError = true;
			errorPrefix = "runtime_file_tracking_exact_file_path_not_found_error";

		} else if (response.errorCode == this.ERROR_CANNOT_CREATE_TRACKING) {
			showError = false;
			errorPrefix = "runtime_file_tracking_exact_file_path_not_found_error";

		} else if (response.errorCode == this.ERROR_DELETE_FILE_FAILED) {
			showError = true;
			errorPrefix = "runtime_file_tracking_cannot_delete_file_error";

		} else {
			showError = true;
			errorPrefix = "runtime_file_tracking_generic_error";
		}

		if (showError) {
			if (response.responses && response.responses[0].value) {
				inserts.push(response.responses[0].value);
			} else if (response.value) {
				inserts.push(response.value);
			}
			Desktop.addMessage(Message.createErrorMessage(errorPrefix, inserts, false));
		}

	} else {
		var successMessage = "";
		if (response.responses) {

			if (response.responses.length == 1 && ((response.responses[0].errorCode == this.ERROR_DELETE_FILE_FAILED || response.responses[0].errorCode == this.FOUND_TRACKED_RECORD_BY_FILE_PATH) || (response.responses[0].errorCode == this.FOUND_TRACKED_RECORD_BY_SCANNING) || (response.responses[0].errorCode == this.SUCCESSFULLY_TRACKED_FILE_USING_ADS))) {

				successMessage = string.substitute(ecm.messages.file_tracking_successfully_downloaded_document, [
					response.responses[0].originalDocumentName,
					response.responses[0].value
				]);
			} else if (response.responses.length > 1 && ((response.responses[0].errorCode == this.FOUND_TRACKED_RECORD_BY_FILE_PATH) || (response.responses[0].errorCode == this.FOUND_TRACKED_RECORD_BY_SCANNING) || (response.responses[0].errorCode == this.SUCCESSFULLY_TRACKED_FILE_USING_UD) || (response.responses[0].errorCode == this.SUCCESSFULLY_TRACKED_FILE_USING_ADS))) {

				var count = response.responses.length;
				var documentsDownloaded = [];
				for ( var i = 0; i < count; i++) {
					documentsDownloaded.push(response.responses[i].originalDocumentName);
				}
				successMessage = string.substitute(ecm.messages.file_tracking_successfully_downloaded_document, [
					documentsDownloaded.join(",")
				]);

			}
		}

		if (successMessage && successMessage.length > 0) {
			Desktop.addMessage(new Message({
				number: 0,
				level: 0,
				text: successMessage
			}));
		}

		var callbackResponse;
		if (response.responses && response.responses.length > 0) {
			var callbackResponse;
			for ( var i = 0; i < response.responses.length; i++) {
				if (response.responses[i].errorCode == this.SERVER_RESPONSE_CALLBACK) {
					callbackResponse = response.responses[i];
					break;
				}
			}
		} else if (response.errorCode == this.SERVER_RESPONSE_CALLBACK) {
			callbackResponse = response;
		}
		if (callbackResponse && callbackResponse.value) {
			var lookupId = callbackResponse.value.callbackId;
			if (lookupId && this.callbackMap[lookupId]) {
				var callbackFunc = this.callbackMap[lookupId];
				if (callbackFunc) {
					callbackFunc(callbackResponse.value.response);
				}
			}
		}

	}

	this.logExit(methodName);
	return response;
	//MessageFactory.createErrorMessage = function(messagePrefix, inserts, backgroundRequest);

},

Feature is not implemented: PreparedStatement.setBinaryStream

Today I faced this new issue I’ve never got before. It happened when I was trying to set Entry Template on a folder in ICN, which is weird because I did that plenty of times in the past.

Perhaps another app I installed changed a configuration in WebSphere.

Here is the symptoms when I was updating the entry templates on the folder:

ICN_JDBC4_error

Message as text:

Contact your system administrator with the following information: An unexpected exception occurred. The unexpected exception is chained to this exception. Message was: RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException: ; nested exception is: com.filenet.api.exception.EngineRuntimeException: FNRCC0036E: CONTENT_DCA_FAILED_INSERT: The content element could not be inserted.

And in the SystemOut.log from WebSphere:

000000e2 .ibm.ejs.container.LocalExceptionMappingStrategy 3    NON_APPLICATION_EXCEPTION_METHOD_ON_BEAN_CNTR0020E                   
                                 com.filenet.api.exception.EngineRuntimeException: FNRCC0036E: CONTENT_DCA_FAILED_INSERT: The content element could not be inserted.                                                              
        at com.filenet.engine.content.DatabaseContentArea.copyElementToInbound(DatabaseContentArea.java:2034)    
        at com.filenet.engine.content.ContentStreamUploader.doUpload(ContentStreamUploader.java:196)             
        at com.filenet.engine.content.PutContentHandler.putContent(PutContentHandler.java:203)                   
        at com.filenet.engine.jca.impl.RequestBrokerImpl.putContent(RequestBrokerImpl.java:448)                  
        at com.filenet.engine.jca.impl.RequestBrokerImpl.putContent(RequestBrokerImpl.java:356)                  
        at com.filenet.engine.ejb.EngineContentCoreBean._putContent(EngineContentCoreBean.java:82)               
        at com.filenet.engine.ejb.EngineContentCoreBean.putContent(EngineContentCoreBean.java:57)                
        at com.filenet.engine.ejb.EJSLocalStatelessEngineContentCore_dd5e7ec6.putContent(Unknown Source)         
        at com.filenet.engine.ejb.EngineContentBean.putContent(EngineContentBean.java:192)                       
        at com.filenet.apiimpl.transport.ejbstubs.EJSRemoteStatelessEngineContent_a66a23a6.putContent(Unknown Source)                                                                                                             
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                           
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)                         
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)                 
        at java.lang.reflect.Method.invoke(Method.java:613)                                                      
        at com.ibm.rmi.util.ProxyUtil$4.run(ProxyUtil.java:609)                                                  
        at java.security.AccessController.doPrivileged(AccessController.java:280)                                
        at com.ibm.rmi.util.ProxyUtil.invokeWithClassLoaders(ProxyUtil.java:606)                                 
        at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1177)                                    
        at $Proxy140.putContent(Unknown Source)                                                                  
        at com.filenet.apiimpl.transport.ejbstubs._EngineContent_Stub.putContent(Unknown Source)                 
        at com.filenet.apiimpl.transport.ejb.ContentEJB.putContent(ContentEJB.java:475)                          
        at com.filenet.apiimpl.transport.ejb.ContentPush$EJBImpl.putContent(ContentPush.java:892)                
        at com.filenet.apiimpl.transport.ejb.ContentPush$EJBImpl.run(ContentPush.java:749)                       
        at java.security.AccessController.doPrivileged(AccessController.java:314)                                
        at javax.security.auth.Subject.doAs(Subject.java:572)                                                    
        at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:195)                                    
        at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:152)                                    
        at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)                                          
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)                 
        at java.lang.reflect.Method.invoke(Method.java:613)                                                      
        at com.filenet.apiimpl.util.J2EEUtilWS.doAs(J2EEUtilWS.java:220)                                         
        at com.filenet.apiimpl.transport.ejb.ContentPush$EJBImpl.uploadContent(ContentPush.java:555)             
        at com.filenet.apiimpl.transport.ejb.ContentPush.uploadContent(ContentPush.java:312)                     
        at com.filenet.apiimpl.transport.ejb.ContentPush.singleThreadUpload(ContentPush.java:289)                
        at com.filenet.apiimpl.transport.ejb.ContentPush.uploadContent(ContentPush.java:152)                     
        at com.filenet.apiimpl.transport.ejb.EJBSession.executeChanges(EJBSession.java:371)                      
        at com.filenet.apiimpl.util.SessionHandle.executeChanges(SessionHandle.java:112)                         
        at com.filenet.apiimpl.core.Session.callExecuteChanges(Session.java:144)                                 
        at com.filenet.apiimpl.core.Session.executeChanges(Session.java:527)                                     
        at com.filenet.apiimpl.core.Session.executeChange(Session.java:830)                                      
        at com.filenet.apiimpl.core.IndependentlyPersistableObjectImpl.save(IndependentlyPersistableObjectImpl.java:85)                                                                                                           
        at com.filenet.apiimpl.core.IndependentlyPersistableObjectImpl.save(IndependentlyPersistableObjectImpl.java:76)                                                                                                           
        at com.ibm.ecm.util.p8.P8FolderTemplates.associateTemplatesWithFolder(P8FolderTemplates.java:120)        
        at com.ibm.ecm.struts.actions.p8.P8SaveEntryTemplateFolderAssociations.executeAction(P8SaveEntryTemplateFolderAssociations.java:33)                                                                                       
        at com.ibm.ecm.struts.actions.p8.P8BaseAction.executeBaseAction(P8BaseAction.java:183)                   
        at com.ibm.ecm.struts.actions.BaseAction.execute(BaseAction.java:211)                                    
        at com.ibm.ecm.jaxrs.Actions.loadAndExecuteAction(Actions.java:241)                                      
        at com.ibm.ecm.jaxrs.Actions.handleAction(Actions.java:83)                                               
        at com.ibm.ecm.jaxrs.Actions.handlePostRepositoryActions(Actions.java:183)                               
        at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)                                         
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)                 
        at java.lang.reflect.Method.invoke(Method.java:613)                                                      
        at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)                                                                                                                
        at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:33)                
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)             
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)             
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)          
        at org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest(CreateInvocationParametersHandler.java:54)                                                                                    
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)             
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)             
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)          
        at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:34)                
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)             
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)             
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)          
        at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleSubResourceMethod(FindResourceMethodHandler.java:183)                                                                                         
        at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:110)                                                                                                   
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)             
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)             
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)          
        at org.apache.wink.server.internal.handlers.FindRootResourceHandler.handleRequest(FindRootResourceHandler.java:95)                                                                                                        
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)             
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)             
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)          
        at org.apache.wink.server.internal.handlers.HeadMethodHandler.handleRequest(HeadMethodHandler.java:53)   
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)             
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)             
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)          
        at org.apache.wink.server.internal.handlers.OptionsMethodWADLHandler.handleRequest(OptionsMethodWADLHandler.java:51)                                                                                                      
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)             
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)             
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)          
        at org.apache.wink.server.internal.handlers.SearchResultHandler.handleRequest(SearchResultHandler.java:33)                                                                                                                
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)             
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)             
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)          
        at org.apache.wink.server.internal.log.ResourceInvocation.handleRequest(ResourceInvocation.java:92)      
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)             
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)             
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)          
        at org.apache.wink.server.internal.log.Requests.handleRequest(Requests.java:76)                          
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)             
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)             
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)          
        at org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:60)              
        at org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:207)                                                                                                           
        at org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154)             
        at org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:124)                     
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)                                          
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1214)                      
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)                 
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)                 
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)         
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:125)             
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:77)                  
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:926)             
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1023)       
        at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)        
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:895)                             
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)                        
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)                           
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)   
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:522)       
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:311)         
        at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:87)        
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)                                                                                                              
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)                     
        at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)                
        at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)                                          
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)                                       
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)                         
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)                                          
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1783)                                           
Caused by: com.filenet.api.exception.EngineRuntimeException: FNRCD0009E: DB_ERROR: The database access failed with the following error: ErrorCode 0, Message 'DSRA1300E: Feature is not implemented: PreparedStatement.setBinaryStream' ObjectStore: "TARGETOS"                                                                                    
        at com.filenet.engine.dbpersist.DBDB2Context.throwEngineException(DBDB2Context.java:730)                 
        at com.filenet.engine.dbpersist.DBContext.throwEngineException(DBContext.java:1277)                      
        at com.filenet.engine.dbpersist.DBStatementBase.setBinding(DBStatementBase.java:640)                     
        at com.filenet.engine.dbpersist.DBStatementBase.buildSingleExecution(DBStatementBase.java:526)           
        at com.filenet.engine.dbpersist.DBStatementBase.execute(DBStatementBase.java:271)                        
        at com.filenet.engine.content.DatabaseContentArea.copyElementToInbound(DatabaseContentArea.java:2027)    
        ... 122 more                                                                                             
Caused by: java.sql.SQLFeatureNotSupportedException: DSRA1300E: Feature is not implemented: PreparedStatement.setBinaryStream                                                                                                     
        at com.ibm.ws.rsadapter.AdapterUtil.notSupportedX(AdapterUtil.java:1460)                                 
        at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.setBinaryStream(WSJdbcPreparedStatement.java:1424)  
        at com.filenet.engine.dbpersist.DBStatementBase.setBinding(DBStatementBase.java:624)                     
        ... 125 more                                                                                             
Caused by: java.lang.AbstractMethodError: java/sql/PreparedStatement.setBinaryStream(ILjava/io/InputStream;)V    
        at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.setBinaryStream(WSJdbcPreparedStatement.java:1408)  
        ... 126 more   

It seems that my DataSources are not using JDBC 4 anymore but 3 instead (strange ???). To fix this, go to your JDBC DataProvider in WebSphere Resources > JDBC > JDBC Data Providers and edit the providers :

  • IBM Content Navigator JDBC provider for DB2
  • JDBC provider for DB2
  • JDBC provider for DB2 (XA)

to modify in the Class Path:

${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar

to

${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc4.jar

ICN_JDBC4_fix

 

And restart you WebSphere server. That should fix the issue.

Install Java 7 SDK for WebSphere 8.5

WebSphere Application Server 8.5 comes by default with an IBM Java SDK 6. But nowadays, it becomes harder and harder to find applications running under Java 6 and most of the time, Java 7 is required. I faced this problem with Jenkins. So here is how to install and activate the IBM Java SDK 7 for WebSphere 8.5.0.

Checking if the Java SDK 7 is already installed

First, check that you don’t have the SDK 7 already installed. Run the command:

cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin
./managesdk.sh -listAvailable

You should get a result like:

CWSDK1003I: Available SDKs :
CWSDK1005I: SDK name: 1.6_64
CWSDK1001I: Successfully performed the requested managesdk task.

or

CWSDK1003I: Available SDKs :
CWSDK1005I: SDK name: 1.7_64
CWSDK1005I: SDK name: 1.6_64
CWSDK1001I: Successfully performed the requested managesdk task.

If you already has the line listing the SDK 7, you can go to the last step right away (Enabling the SDK). If not, follow the next steps.

Installing the SDK

You need to download the SDK 7 for WebSphere, the parts number for WAS 8.5.0 are CI717ML, CI718ML, CI719ML.

Then deflate all three files in the same folder. Start the IBM Installation Manager tool and add a new repository:

  1. Go to File > Preferences
  2. Click add repository
  3. Select the repository,config file from the folder you deflated all files.

Then Click Install and install IBM WebSphere SDK Java Technology Edition, Version 7.0.1.0

Check if the SDK is now available:

./managesdk.sh -listAvailable

You should have the line:

CWSDK1005I: SDK name: 1.7_64

Enabling the SDK

Now stop your WebSphere server:

./stopServer.sh server1

Ebable the SDK 7 for your profile:

./managesdk.sh -enableProfile -profileName AppSrv01 -sdkname 1.7_64

And restart your server:

./startServer.sh server1

Your server server1 is now running a Java SDK 7.

Push updates from an ICN service to your client with CometD

One feature I really miss in ICN right now is a 2 ways communication channel between service and client. At this moment, you call your service and then it returns something when the execute method is done. That creates an issue, because users have no patience… More than one minute on the same loading spinner and you can be sure most of them will refresh the page thinking ICN crashed. That won’t stop your service, but if this one is not done by the time the user comes back, he will run the service again…

So here is a way to push information from the server to the client.

Principle

I used CometD to implement that because ICN is already shipped with some CometD client libraries (actually not all of them, discussed below)). The reason for that is ICN uses CometD for the Sync and Share feature. That way we don’t need to add any library to the client. About the server, the PluginService class is not a servlet or a web service, it is actually called by a Struts action so forget about asynchronous servlet, websocket and so on since we are not master of our servlet. On the other hand, we can’t change the navigator application either (well we could and redeploy but we want to be update proof), so we can’t add support for any “push” framework and ICN doesn’t have that natively. That’s why I’ve decided to use another light web application to achieve that. Here is the schema to help you understand how it works.

ICN_CometD_push
Continue reading

Understand messaging and logging in ICN

In this post, I’ll explain how messaging and logging work in ICN and how to use them to give meaningful information to users and developers.

First, what’s the difference between messaging and logging? Messaging means showing information to the user. These information are meaningful to them and have to be shown to all users.

Logging means persisting information to track the application execution. These information are not supposed to be shown to users. They help tracking defects more quickly.
Continue reading