Java View Methods getAllUnreadEntries and getAllReadEntries

Hi,

I’m trying to use the Java View methods getAllUnreadEntries and getAllReadEntries, but cannot get any useful results. They both return the error java.lang.reflect.InvocationTargetException.

The methods are used in a Web Service on a Domino 8.0.2 server, made with a 8.5 Developer Client. (Well, actually I’m using Ecplise 3.3.2 while programming, and pasting the code to the Web Service when finished).

The resulting error message is seen in the SOAP Response Envelope while using the Web Service Explorer in Eclipse.

Here is an extract of the failing Web Service method, that has viewname, unreadOnly and readOnly as parameters:

view = bm_database.getView(viewName);

view.refresh();

if(unreadOnly) {

vec = view.getAllUnreadEntries(bm_session.getEffectiveUserName());

} else if (readOnly) {

vec = view.getAllReadEntries(bm_session.getEffectiveUserName());

} else vec = view.getAllEntries();

System.out.print(“Found " + vec.getCount() + " entries”); //Only for debugging

getAllEntries works fine, not the two other methods.

Any suggestions or workarounds are welcome

Subject: java.lang.reflect.InvocationTargetException

Normally “java.lang.reflect.InvocationTargetException” occurs when java compiler finds 2 different classes with same name in 2 different packages. when u r importing both classes at a time and when you r trying to create object of that class it throws “java.lang.reflect.InvocationTargetException” exception .

The solution is that when you are creating the object of the class use package name also along with class name so that compiler knows what class it has to use.

Please check out and update the forum.

Thank you.