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 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 unexpectedError
SEVERE: Default value provider not found:

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 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?



3 answers

permanent link
Eric Jodet (6.3k5111120) | answered Apr 03 '13, 4:02 a.m.
 Hello Jamie,
verified - the 4.0.2 SDK contains
Ensure is on you Java app path.

Hope it helps.

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


  I added the 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( ....

Caused by : java.lang.NullPointerException
    at org.eclipse.core.internal.runtime.FindSupport.buildNLVariants(
    at org.eclipse.core.internal.runtime.FindSupport.<clinit>(
    ... 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?



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.
edited Sep 06 '13, 3:10 a.m.

I just tried this with 4.0.3. I set up my projects as described in . 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.

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.