I am working on an SUP MBO project. I am trying to use a Result Set Filter to customize my MBO. In that class, I need http get something and customize the MBO rows based on the feedback. I use MobileSDK of SUP2.1.2 and try preview the resultset. I enabled the debugging and can see the output from the console.
The changed result set filter code piece looks like:
@Override
public ResultSet filter(ResultSet in, Map arg1)
throws Exception {
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet("www.google.com");
HttpResponse response1 = httpclient.execute(httpGet);
httpGet.releaseConnection();
return in;
}
Each time when httpclient.execute(httpGet) gets called, an exception is thrown out as below:
00:06:42 [ERROR] [ExecuteSection]: Execution error
java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
at com.sybase.uep.tooling.ui.dialogs.preview.ExecuteSection.execute(ExecuteSection.java:227)
...
Caused by: java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
...
at com.sybase.uep.tooling.ui.dialogs.preview.ExecuteSection$4.run(ExecuteSection.java:207)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
I tried different httpclient jar versions (including 3.0.1, 4.2) but always got the same failure.
Does anyone have any hint? Thanks.