I have an extension that doesn’t really do anything yet. But it does manage to stop Rhythmyx from starting up successfully. The log shows this error:
13:10:35,004 INFO [ActionSets] An action set could not be loaded because of an
error and will be skipped. com.percussion.extension.PSExtensionException: The Ex
tensionHandler handler could not initialize the Java extension: java.lang.ArrayI
ndexOutOfBoundsException: 2.
There’s no stack trace from this exception that I can find in the logs.
Attached is my extensions file. I copied the xml for this extension from the xml for the PSORequiredFieldsItemValidation extension. In my class, you can see that I wrapped the init in a try statement, because I thought maybe the error was happening there, and that I could output a stack trace. But that didn’t make any difference.
/**
*
*/
package com.percussion.tutorial.jexl;
import org.apache.log4j.Logger;
import java.io.File;
import org.w3c.dom.Document;
import com.percussion.extension.IPSExtensionDef;
import com.percussion.extension.IPSItemValidator;
import com.percussion.extension.PSExtensionException;
import com.percussion.extension.PSExtensionProcessingException;
import com.percussion.extension.PSParameterMismatchException;
import com.percussion.pso.validation.PSORequiredFieldsItemValidation;
import com.percussion.server.IPSRequestContext;
/**
* @author apapajoh
*
*/
public class MWValidateOnTransition extends PSORequiredFieldsItemValidation implements IPSItemValidator {
/* (non-Javadoc)
* @see com.percussion.extension.IPSResultDocumentProcessor#canModifyStyleSheet()
*/
public boolean canModifyStyleSheet() {
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see com.percussion.extension.IPSResultDocumentProcessor#processResultDocument(java.lang.Object[], com.percussion.server.IPSRequestContext, org.w3c.dom.Document)
*/
public Document processResultDocument(Object[] arg0,
IPSRequestContext arg1, Document arg2)
throws PSParameterMismatchException, PSExtensionProcessingException {
Document doc = super.processResultDocument(arg0, arg1, arg2);
return doc;
}
public void init(IPSExtensionDef def,
File codeRoot)
throws PSExtensionException {
try {
super.init(def,codeRoot);
} catch (Exception e){
ms_log.debug(e.getStackTrace());
}
}
public MWValidateOnTransition (){
}
private static Logger ms_log = Logger.getLogger(MWValidateOnTransition.class);
}
To get rid of the offending extension, I restored my Rhythmyx root (not sure how else to get rid of an extension), and I got Rhythmyx to start up successfully. then I tried adding another extension, identical to the tutorial extension, just to see what would happen. I got the same ArrayIndexOutOfBounds error.
Here’s what my extensions.xml file looks like this time:
<?xml version="1.0" encoding="utf-8"?>
<PSXExtensionHandlerConfiguration handlerName="Java">
<!-- Add your extensions here -->
<Extension categorystring="jexl" context="global/percussion/user/" deprecated="no" handler="Java" name="tutorialSlotContents" restoreRequestParamsOnError="no">
<initParam name="com.percussion.user.description">Slot Utility Functions</initParam>
<initParam name="com.percussion.extension.version">1</initParam>
<initParam name="com.percussion.extension.reentrant">yes</initParam>
<initParam name="className">com.percussion.tutorial.jexl.SlotContents</initParam>
<interface name="com.percussion.extension.IPSJexlExpression"/>
<suppliedResources/>
</Extension>
<Extension categorystring="jexl" context="global/percussion/user/" deprecated="no" handler="Java" name="tutorialSlotContentsCopy" restoreRequestParamsOnError="no">
<initParam name="com.percussion.user.description">Slot Utility Functions</initParam>
<initParam name="com.percussion.extension.version">1</initParam>
<initParam name="com.percussion.extension.reentrant">yes</initParam>
<initParam name="className">com.percussion.tutorial.jexl.CopyOfSlotContents</initParam>
<interface name="com.percussion.extension.IPSJexlExpression"/>
<suppliedResources/>
</Extension>