It's all about the answers!

Ask a question

Can anyone help resolve Default Value provider not found issue with Java API application?


Jamie Berry (14013593) | asked Apr 02 '13, 6:06 p.m.
I have a Java app that creates work items from a CSV file.  The application works fine for most of our projects (either 3.0.1.1 based or 4.0.2 based).  However, I tried running it today against a project that has a script based Default Value provider setup for the description field.  Whenever the application is executed, the following error is logged in the output:

Apr 2, 2013 2:43:32 PM com.ibm.team.foundation.common.util.FoundationLog unexpectedError
SEVERE: Default value provider not found: com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider


The work item is created successfully, although if no Description was provided in the CSV, then the default isn't used.

I have included the Plain Java API libraries in my Java project and in looking through the libraries available, it looks like the com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider isn't in any of the jar files.  It seems like I am missing some jar file to add the shared classes.

The Default Value works fine when the work item is created via the GUI (Eclipse or Web).

Does anyone know what I need to add to my Java project to make this error go away?

Thanks,

Jamie.

3 answers



permanent link
Eric Jodet (6.3k5111120) | answered Apr 03 '13, 4:02 a.m.
JAZZ DEVELOPER
 Hello Jamie,
verified - the 4.0.2 SDK contains com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider
class
Ensure com.ibm.team.workitem.shared.common_3.1.200.v20121022_1010.jar is on you Java app path.

Hope it helps.
Eric.

Comments
Jamie Berry commented Sep 04 '13, 6:08 p.m.

Eric,

  I added the com.ibm.team.workitem.shared.common_3.1.200.v20121022_1010.jar on the Java app path, and then proceeded to receive a series of additional class not found errors.  I kept adding .jar files from the plugins folder and then ran into :
Exception in thread "main" java.lang.ExceptionInInitializerError
    at org.eclipse.core.runtime.FileLocator.find(FileLocator.java:84) ....

Caused by : java.lang.NullPointerException
    at org.eclipse.core.internal.runtime.FindSupport.buildNLVariants(FindSupport.java:37)
    at org.eclipse.core.internal.runtime.FindSupport.<clinit>(FindSupport.java:31)
    ... 33 more

Any idea on what is going on here?  Do you know what I need to do in order to have the calculated value providers work within a Java application outside of Eclipse or the server?

Thanks,

Jamie.


permanent link
sam detweiler (12.5k6194201) | answered Sep 06 '13, 8:31 a.m.
I am guessing that this is a RTC design limitation.. I don't think the full execution environment for scripts is enabled for plain java clients. Similar for private plugins. you need the eclipse runtime and configuration.

I was never able to get scripts working reliably from commadline plainjava apps.. we were just starting to use them.

permanent link
Ralph Schoon (62.7k33643) | answered Sep 06 '13, 3:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Sep 06 '13, 3:10 a.m.
Jamie,

I just tried this with 4.0.3. I set up my projects as described in http://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ . I have set up the SDK as well.

My project references the whole Plain Java Client Libraries. I prepared a script based default and a script based calculated value for a string type attribute.

If I run out of Eclipse I get these errors



If I run out of a shell


Some more observations: At least the default value is not processed when I run the Plain Java Code. The Calculated value shows if I open the item, but I suspect this is calculated when opening the Item in the UI.

Summary, I get these errors too and I think something is broken. So I think you have a valid point and should file a PMR.

Comments
Lukas Steiger commented Dec 10 '13, 10:13 a.m.

Did anyone of you ever log a work item for this issue?

If yes could you provide the work item link so that I can subscribe on it?

Your answer


Register or to post your answer.