App crash caused by data binding related to java.lang.Runnable android.databinding.ViewDataBinding.mRebindRunnable - android-databinding

The exception is the following:
java.lang.NullPointerException: Attempt to read from field 'java.lang.Runnable android.databinding.ViewDataBinding.mRebindRunnable' on a null object reference
at android.databinding.ViewDataBinding.access$100(ViewDataBinding.java:51)
at android.databinding.ViewDataBinding$5.onViewAttachedToWindow(ViewDataBinding.java:142)
at android.view.View.dispatchAttachedToWindow(View.java:14525)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2836)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2843)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1364)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
at android.view.Choreographer.doFrame(Choreographer.java:606)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Let me try my best to make the description brief and clear.
First, this is related to a layout added dynamically. The activity's data binding works perfectly without any problem.
Here is the layout foo_view:
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="foo"
type="net.mydomain.myapp.MyActivity.Foo" />
<import type="android.view.View" />
</data>
<!--For the sake of debugging, no data binding is actually used-->
...
</layout>
In MyActivity.java:
public class MyActivity extends AppCompatActivity {
public class Foo{
...
}
...
addFoo(){
FooViewBinding binding = DataBindingUtil.inflate(LayoutInflater.from(this), R.layout.foo_view, myGridLayout, true);
Foo foo = new Foo();
binding.setFoo(foo);
}
}
The app cashes immediately upon the start of MyActivity. The crash is not caused by a specific line of code.
Could anyone shed some light on this?
[Edit] 2016-06-30
The crash happens on a Lollipop, but same code works fine on a Jelly Bean

Just in case someone has the same problem, this errors occurs when you change the tag (i.e. view.setTag(object)) of a data-binding enabled view, as the data binding library uses the tag for itself.

in my case,
If I use <androidx.constraintlayout.widget.Group/> in 'merge'it gives an error on some screens.
<merge tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<androidx.constraintlayout.widget.Group
android:id="#+id/constraint_group_active"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="#{data != null}"
app:constraint_referenced_ids="txt_offering_slogan,view_extra_gift,iv_offering,txt_offering_title,txt_offering_subtitle,txt_buy_extra_gift"
tools:visibility="visible" />
</merge>

Related

Use generics in databinding's xml

<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.ihu.intelligentmedicinechest.activity.MainActivity">
<data>
<variable
name="items"
type="java.util.Collection<? extends com.ihu.intelligentmedicinechest.adapter.binder.ItemBinder>"/>
</data>
</layout>
Use generics in data binding XML is wrong. Follow is the exception:
android.databinding.tool.util.LoggedErrorException: Found data binding errors.
****/ data binding error ****msg:cannot find type argument for ?extendscom.tvvbbb.adapter.binder.ItemBinder in java.util.Collection
loc:56:30 - 56:34
****\ data binding error ****
How can I process it?

Attempt to invoke virtual method crash in AndroidPdfViewer

Using the AndroidPdfViewer package.
My build.gradle code:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation("com.github.bumptech.glide:glide:4.5.0") {
exclude group: "com.android.support"
}
implementation "com.android.support:support-fragment:26.1.0"
compile 'com.github.barteksc:android-pdf-viewer:2.8.2'
}
Activity XML file:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.github.barteksc.pdfviewer.PDFView
android:id="#+id/pdfView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
Activity code:
package eu.myapp.myapp;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.github.barteksc.pdfviewer.PDFView;
public class activity_fact_sheet extends AppCompatActivity {
PDFView pdfView;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PDFView pdfView = (PDFView) findViewById(R.id.pdfView);
pdfView.fromAsset("file2.pdf").load();
}
}
file2.pdf located in app > src > main > assets
Error on run:
01-18 11:59:25.475 29674-29674/eu.myapp.myapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: eu.myapp.myapp, PID: 29674
java.lang.RuntimeException: Unable to start activity ComponentInfo{eu.myapp.myapp/eu.myapp.myapp.activity_fact_sheet}: java.lang.NullPointerException: Attempt to invoke virtual method 'com.github.barteksc.pdfviewer.PDFView$Configurator com.github.barteksc.pdfviewer.PDFView.fromAsset(java.lang.String)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2924)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2985)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1635)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6692)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.github.barteksc.pdfviewer.PDFView$Configurator com.github.barteksc.pdfviewer.PDFView.fromAsset(java.lang.String)' on a null object reference
at eu.myapp.myapp.activity_fact_sheet.onCreate(activity_fact_sheet.java:17)
at android.app.Activity.performCreate(Activity.java:6912)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2877)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2985) 
at android.app.ActivityThread.-wrap14(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1635) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.app.ActivityThread.main(ActivityThread.java:6692) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358) 
Steps taken to resolve it:
added PDFView pdfView; to activity code above #Override and under public class activity_fact_sheet extends AppCompatActivity {
Also checked to see if it was an issue with my activity opening method (it wasn't).
It seems the error is thrown on pdfView.fromAsset("file2.pdf").load(); in the activity code. That makes it seem to me that it cannot find file2.pdf in the assets, but I'm probably wrong.
The app crashes when you try to open the activity.
Tried to implement it using this video.
OK, I found another topic on stackexchange (besides the countless ones on nullpointer exceptions - which didn't help me). This has the code that works. Just import
compile 'com.github.barteksc:android-pdf-viewer:2.8.2'
compile 'org.apache.commons:commons-collections4:4.1'
in your gradle build file.
Then make sure you have the <uses-permission android:name="android.permission.WRITE_SETTINGS"/> permission in AndroidManifest.xml. (You should already have had this anyway.)
Then make sure to copy his code in your activity where you want to show the PDF. Change public static final string SAMPLE_FILE to the actual pdf you want to show (in your assets folder).
If you get an error on the TAG in Log.e(TAG, String.format("%s %s, p %d", sep, b.getTitle(), b.getPageIdx())); you must add private static final String TAG = "youractivitynamehere"; just under the public static final String SAMPLE_FILE = "yourfilehere.pdf";
That's all! Hope anyone else searching for this issue will find this.
Add this code in your XML file
<com.github.barteksc.pdfviewer.PDFView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="#+id/pdfView"
></com.github.barteksc.pdfviewer.PDFView>

Read properties from database and use it instead of mule-app.properties

I have been able to read the properties from a table in the database as it was described here Reading mule config from database
Now, I am not able to apply these properties to the flow configs and also access them as out bound properties in the Java Processor classes through the MuleEventContext's message.
Update: below is my flow XML code
<flow name="push-data">
<poll doc:name="Push Poll">
<fixed-frequency-scheduler frequency="${push.data.poll.frequency}" timeUnit="MINUTES" />
<set-property propertyName="tempFilePath" value="${temp.csv.file.path}" doc:name="Property"/>
<component class="com.reports.processors.PushDataProcessor" doc:name="PushDataProcessor"/>
<logger message="worked!!!" level="INFO" doc:name="Logger"/>
<exception-strategy ref="push-report-data_Catch_Exception_Strategy" doc:name="Reference Exception Strategy"/>
</flow>
I am trying to set the properties "push.data.poll.frequency" and "temp.csv.file.path". Earlier, these properties existed in the "mule-app.properties" file.
So, My question is, How do I set the properties loaded from the database to the flow. Please keep in mind that I have already loaded the properties from the database as described in the link above. I just want to be able to set these properties to the flow rather than taking them from the mule-app.properties.
EDIT: To add some more information,
I am using a class with #Configuration annotation. The class as described in the link above, loads the properties from the database. Below is the source code.
#Configuration(name="databasePropertiesProvider")
#Component
public class DatabasePropertiesProvider {
#Autowired(required=true)
private MyService myService;
#Bean
public Properties getProperties() throws Exception {
Properties properties = new Properties();
// get properties from the database
Map<String,String> propertiesMap = myService.getMuleAppPropertiesFromDB();
if(null != propertiesMap && !CollectionUtils.isEmpty(propertiesMap))
properties.putAll(propertiesMap);
return properties;
}
#Bean
public static PropertySourcesPlaceholderConfigurer placeHolderConfigurer() {
return new PropertySourcesPlaceholderConfigurer();
}}
But this class runs after the app is initialized. Previously, I had configured the PropertySourcesPlaceholderConfigurer in the xml config with the factory-bean as the DatabasePropertiesProvider class. But since DatabasePropertiesProvider has a dependency on MyService class, and the dependency was not getting resolved due to MyService bean not initializing in the container before the property config, I had to make some changes to DatabasePropertiesProvider(the version above) so that this runs after the app initialization.
But now, the problem is that I am unable to access those properties that are loaded from the database.
UPDATE 2: I found a solution. Apparently I was trying to autowire the #Service MyService in the databasePropertiesProvider class. The autowiring was failing with null due to which I made some more modifications to the databasePropertiesProvider class so that It runs after the app is initialized.
Now when I look at it, I realized that I dont need to connect to the database through all the service and repository layers. I moved the query execution code from the repository class to the databasePropertiesProvider class and now the properties are loaded during initialization time and the flows can get the properties without making any changes.
Thanks for all your help guys. Made me do a lot of thinking.
Regards,
Zulfiqar
I found a solution. Apparently I was trying to autowire the #Service MyService in the databasePropertiesProvider class. The autowiring was failing with null due to which I made some more modifications to the databasePropertiesProvider class so that It runs after the app is initialized.
Now when I look at it, I realized that I dont need to connect to the database through all the service and repository layers. I moved the query execution code from the repository class to the databasePropertiesProvider class and now the properties are loaded during initialization time and the flows can get the properties without making any changes.
The whole code looks like this
XML Config:-
<bean class="net.intigral.reports.provider.properties.DatabasePropertiesProvider" id="databasePropertiesProvider">
<property name="entityManager" ref="entityManager" />
</bean>
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
<property name="properties">
<bean factory-bean="databasePropertiesProvider" factory-method="getProperties" />
</property>
</bean>
Java Code:-
public class DatabasePropertiesProvider {
EntityManager entityManager;
public Properties getProperties() throws Exception {
Properties properties = new Properties();
// get properties from the database
Map<String,String> propertiesMap = getMuleAppPropertiesFromDB();
if(null != propertiesMap && !CollectionUtilsIntg.isEmpty(propertiesMap))
properties.putAll(propertiesMap);
return properties;
}
public EntityManager getEntityManager() {
return entityManager;
}
public void setEntityManager(EntityManager entityManager) {
this.entityManager = entityManager;
}
#SuppressWarnings("unchecked")
private Map<String,String> getMuleAppPropertiesFromDB() {
Map<String,String> collect = null;
String query = "select key, value from MuleAppProps muleAppProps";
List<Object[]> results = entityManager.createQuery(query).getResultList();
if (CollectionUtilsIntg.isNotEmpty(results)) {
collect = results.stream().collect(Collectors.toMap(o -> (String)o[0], o -> (String)o[1]));
}
return collect;
}}
Now, I am able to load the properties the same way I used to load from mule-app.properties in the FLOWs.
Let your db contains following properties values with key/value pair as below :-
A simple example like below you can refer to read values from Database:-
<spring:beans>
<spring:bean id="dataSource" name="myCon" class="org.enhydra.jdbc.standard.StandardDataSource">
<spring:property name="url" value="jdbc:sqlserver://YourIpAddress\\SQLEXPRESS:1433;databaseName=YourDB;user=sa;password=yourDBPassword" />
<spring:property name="driverName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
</spring:bean>
<!-- Required to connect to datasource -->
<spring:bean name="PropertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<spring:property name="properties" ref="CommonsConfigurationFactoryBean" />
</spring:bean>
<spring:bean name="CommonsConfigurationFactoryBean"
class="org.springmodules.commons.configuration.CommonsConfigurationFactoryBean">
<spring:constructor-arg ref="DatabaseConfiguration" />
</spring:bean>
<spring:bean name="DatabaseConfiguration" class="org.apache.commons.configuration.DatabaseConfiguration">
<spring:constructor-arg type="javax.sql.DataSource" ref="dataSource" />
<spring:constructor-arg index="1" value="YourTableName" />
<spring:constructor-arg index="2" value="Key" />
<spring:constructor-arg index="3" value="Value" />
</spring:bean>
</spring:beans>
<db:generic-config name="Database_Configuration" dataSource-ref="dataSource" doc:name="Generic Database Configuration" />
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration" />
<flow name="firstflow" processingStrategy="synchronous">
<http:listener config-ref="HTTP_Listener_Configuration" path="/test" doc:name="HTTP" />
<set-payload value="File name ${file.name} File path ${file.path}" doc:name="Set Payload" />
</flow>
You need to add commons-configuration.jar, spring.jar and spring-modules-jakarta-commons.jar in your classpath
If you want to access properties values in Java class you can inject it using Spring property in init-method of Spring bean.
refer:- http://www.codeproject.com/Articles/28893/Loading-Application-Properties-from-a-Database

Why is my WCF Data Services method not appearing in the OData collections list?

When I view the root of my WCF Data Services service (http://localhost/MyService.svc/) in a browser I see this:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<service xml:base="http://localhost/MyService.svc/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app">
<workspace>
<atom:title>Default</atom:title>
</workspace>
</service>
I would expect to see a list of collections.
When I go to the $metadata URL I see this:
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
<edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="1.0">
<Schema Namespace="MyApp" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2007/05/edm">
<ComplexType Name="Package">
<Property Name="Id" Type="Edm.String" Nullable="true" />
</ComplexType>
</Schema>
<Schema Namespace="MyApp" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2007/05/edm">
<EntityContainer Name="PackageService" m:IsDefaultEntityContainer="true">
<FunctionImport Name="GetQueryablePackages" ReturnType="Collection(MyApp.Package)" m:HttpMethod="GET" />
</EntityContainer>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
Why might my GetQueryablePackages collection not be appearing?
I'm using these access settings:
config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
Service operations (the function import in the EDM) is not exposed in the service document. Only entity sets are exposed there.
If you want your data to be exposed in the service document make an entity set out of it. Depending on the provider model this differs. Typically it means exposing a property of type IQueryable on your context class. Note that T has to be an entity type (must have a key).
Can you share the context definition where you have defined the IQueryable <> properties. There are 2 things that come to my mind: First the properties must be of type IQueryable<> or some type that derives from it. Second, the element type refered by the IQueryable<> must be an entity type i.e. they must have key properties declared in them.
Hope this helps.
Thanks
Pratik
Or you can create an extension method like this:
public static class TestEntitiesExtensions
{
public static IEnumerable<Package> GetQueryablePackages(this TestEntities context)
{
var uri = new Uri(context.BaseUri, "GetQueryablePackages");
return context.Execute<Package>(uri);
}
}

Struts Action Invocation Framework for Struts 1.3

I'm trying to integration SAIF plugin to intercept my struts action. I learn from
http://struts.sourceforge.net/saif/index.html
I've write configuration like this:
struts-config.xml
<plug-in className="net.sf.struts.saif.SAIFPlugin">
<set-property property="interceptor-config" value="/WEB-INF/interceptor-config.xml" />
</plug-in>
interceptor-config.xml
<interceptor-config>
<interceptor name="componentInterceptor" type="net.sf.struts.saif.ComponentInterceptor"/>
<interceptor name="testInterceptor" type="net.sf.struts.saif.TestInterceptor"/>
<default-interceptors>
<interceptor name="componentInterceptor"/>
</default-interceptors>
<action type="org.apache.struts.webapp.example.EditRegistrationAction">
<interceptor name="testInterceptor"/>
</action>
</interceptor-config>
I got error like this:
javax.servlet.UnavailableException: Specified RequestProcessor not compatible with saif.
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:402)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
can you help me to solve this problem ?
Quoting this message from the struts users mailing list:
It's unlikely that SAIF would work
with the default S1.3 config since the
request processor is different--you
could try using the old request
processor if your application doesn't
rely on it.
AFAICT SAIF wouldn't work with
anything other than the standard (old)
request processor, but it might be
possible to hack it up so it would.
I haven't worked with the Struts Action Invocation Framework before but the exception message is familiar to me from Tiles. Tiles throws a message like this: Specified RequestProcessor not compatible with TilesRequestProcessor so I think that besides the familiarity of the message (in your case Specified RequestProcessor not compatible with saif) there is also a chance that the cause be the same.
Here is an article that fixes this on the Tiles plugin. Might help you.
When the Struts Servlet is initialized it does an init of all the plugins. The message should come from the init method of your plugin and if it is the same as Tiles then a test with Class.isAssignableFrom should be the cause.
EDIT: Looked up the source code for the SAIF plugin and found this in it:
protected void initRequestProcessorClass(ActionServlet servlet, ModuleConfig config) throws ServletException {
.........
.........
ControllerConfig ctrlConfig = config.getControllerConfig();
String configProcessorClassname = ctrlConfig.getProcessorClass();
.........
.........
// Check if specified request processor is compatible with saif.
try {
Class saifProcessorClass = SAIFRequestProcessor.class;
Class saifTilesProcessorClass = SAIFTilesRequestProcessor.class;
Class configProcessorClass = Class.forName(configProcessorClassname);
if (!saifProcessorClass.isAssignableFrom(configProcessorClass)
&& !saifTilesProcessorClass.isAssignableFrom(configProcessorClass)) {
String msg = "Specified RequestProcessor not compatible with saif.";
throw new ServletException(msg);
}
} catch (Exception ex) {
throw new ServletException(ex);
}
.........
.........
}
It seems to be the same as with Tiles plugin so the article that I indicated contains the answer.