Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Unable to Add Outputs to Responders

Suddenly I am unable to add outputs to my responders using the Parasoft client. In the past I would right-click on a responder and select Add Output and then a dialog would appear to let me choose the type of item to add. Now when I click Add Output nothing happens. I've restarted the client and even rebooted my laptop. Any ideas? Thanks JT

Answers

  • OmarR
    OmarR Posts: 233 admin

    Does it happen for a particular responder or all responders (new and existing)? Does it happen on all workspaces?

    You could try toggling the Virtualize license under Parasoft Preferences>License to see if that triggers a change. Also, is there a chance the dialog could be showing up in a different monitor?

  • benken_parasoft
    benken_parasoft Posts: 1,224 ✭✭✭
    edited August 2023

    Click "Window > Show View > Error Log". Click "Add Output" again then check if any error shows there.

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    Happens for all responders, new and existing. Toggled the license info (version credentials, etc). Still no dialog. I do have three displays but I have the desktop showing on all three and no dialog. Thanks JT

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    yeah unhandled event loop exception no class found webtool.xml.encryption.WSSecurityOpotions

  • benken_parasoft
    benken_parasoft Posts: 1,224 ✭✭✭
    edited August 2023

    no class found webtool.xml.encryption.WSSecurityOpotions

    It is probably "java.lang.NoClassDefFoundError: webtool.xml.encryption.WSSecurityOptions".

    This is likely a side effect of some other error that happened earlier, like if something went wrong earlier on application startup. I would start the tool from a Command Prompt (or Bash prompt) with "eclipsec.exe -consolelog" then check your command prompt window for any errors as the tool starts. You will want to look for the first error that is reported and not any secondary ones that happened later as a result of the first one.

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    that gives me an "Incompatible JVM" popup I have 1.8 but it is saying it requires version 11

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    unable to acquire the state change lock for the module osgi.identity

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    EclipsePreferennceStoreFactoryInitializer may not be fully initialized

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    org.eclipse.osgi.container.Module.lockStateChange(Module.java:350)

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    says thread timeout

  • benken_parasoft
    benken_parasoft Posts: 1,224 ✭✭✭
    edited August 2023

    that gives me an "Incompatible JVM" popup I have 1.8 but it is saying it requires version 11

    You also need to pass "-vm" argument in this case. The "soavirt.exe" takes care of it but it doesn't get added automatically if you were to use "eclipsec.exe" instead.

    unable to acquire the state change lock

    You also need to pass a -vmargs argument with "-Dosgi.module.lock.timeout=30" and should also add "-Dosgi.bundlefile.limit=300".

    Together, it would look something like this:
    eclipsec.exe -consolelog -vm plugins\com.parasoft.ptest.jdk.eclipse.core.web.win32.x86_64_11.0.19.202306042000\jdk -vmargs -Dosgi.module.lock.timeout=30 -Dosgi.bundlefile.limit=300

    In the above, please replace "win32.x86_64_11.0.19.202306042000" with the correct path. It will be different depending on tool version.

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    that starts it up (but I had to include \bin on the dir path

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    Ok I think I see the issue first exception is on missing log4j which makes sense as I was trying to get JSONPath / jayway working and there was a interdependency conflict with log4j and slf4j jars. Not sure which dir it was in but I know it was under plugins.

  • jefftuckerbofa
    jefftuckerbofa Posts: 227
    edited August 2023

    I will restore the log4j jar. can you look into getting JayWay's JsonPath working with your set of dependencies.

  • benken_parasoft
    benken_parasoft Posts: 1,224 ✭✭✭
    edited August 2023

    Modifying any files under "plugins" is generally unsupported and can very well break the installation.

    Concerning "com.jayway.jsonpath:json-path", what are you doing exactly? Are you trying to use it in an Extension Tool or scripted field in a responder or something else? Which version of json-path (latest is 2.8.0)? Can you provide an example of what doesn't work?

    I see that "json-path" depends on slf4j-api 1.7.36 which is already provided by Virtualize/SOAtest. In other words, it should just work without you also having to explicitly add any additional slf4j api/binding jars and definitely not any log4j jars. Depending what other jars you are adding you can break slf4j and/or json-path.

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    Yep. I agree breaking things is on me for this one. We are trying to create a .jar that includes JayWay's JsonPath. In order to instantiate something within JsonPath (I think it was the node component) you have to have some jars in the classpath that are not compatible with jars in the distribution. Here's the error message that might can shed more light:

    Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path, preempting StackOverflowError. See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.

    Thanks,

    JT

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    returning those jars resolved the issue thx

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    For JsonPath, I'm trying to use it in an extension tool. Looking to use a Groovy script to query JSON files and return matching nodes. Looks like I have 2.4 locally. Will check the release notes on the latest version to see if there's anything useful there. From what I have read, it seems the issue we're seeing is related to both log4j and slf4j being found in the classpath.

    Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path, preempting StackOverflowError. See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.

  • benken_parasoft
    benken_parasoft Posts: 1,224 ✭✭✭
    edited August 2023

    Do not add slf4j-log4j12.jar or log4j.jar. Even if you happen to see some instances somewhere under "plugins" they are actually not present on the classpath of any scripts and therefore must have been ones you added in the Parasoft preferences or in "system_jars". Adding them is not needed for json-path which only depends on slf4j-api. Adding slf4j-log4j12.jar and log4j.jar is unnecessary and will break things that use slf4j which is already configured to use log4j-over-slf4j.jar.

  • benken_parasoft
    benken_parasoft Posts: 1,224 ✭✭✭
    edited August 2023

    Concerning versions, you can review the Maven dependency detail from Maven Central:

    https://central.sonatype.com/artifact/com.jayway.jsonpath/json-path/2.8.0/dependencies
    - json-smart
    - slf4j-api

    https://central.sonatype.com/artifact/com.jayway.jsonpath/json-path/2.4.0/dependencies
    - jackson-databind
    - gson
    - json-smart
    - tapestry-json
    - jettison
    - org.json:json
    - slf4j-api

    I think the dependencies are actually the same except in 2.8.0 the various JSON parser libraries are now correctly specified as "optional" ("compileOnly" dependency configuration):
    https://github.com/json-path/JsonPath/commit/1e6647bbce6cd75fdcd4bbdde16cefa33e3d9774#diff-d3090879ee21c1fc6553a2af71dfc3e8958557e0cd72703913590ad6319a5f38

    json-path works with various JSON parsers and seems to require at least one of them, not all of them all at once. Virtualize/SOAtest already provides Jackson in case you prefer Jackson over something else like Gson or Jettison. In other words, you don't need to specifically add jackson-databind if you don't want to. You would only need the "json-smart.jar" with the "json-path.jar" and that's it.

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    I will check to make sure slf4j-log4j12.jar and log4j.jar are not in the system_jars folder or in the Parasoft Preferences. I'm fairly certain they are not. Thanks for the research. Getting JsonPath running for us would be a really good thing.

  • benken_parasoft
    benken_parasoft Posts: 1,224 ✭✭✭

    For JsonPath, I'm trying to use it in an extension tool. Looking to use a Groovy script to query JSON files and return matching nodes.

    Please consider using the JSON Data Bank instead. Otherwise, can you share an example script to demonstrate the issue?

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    Can a JSON DB return more than one element of a JSON array? We had tried using a datasource but found it only matches a single row. I did write some Groovy that took the CSV datasource file and converted it to JSON and queried to bring back multiple elements of the array. That's kind of where we got started with this scripting.

  • benken_parasoft
    benken_parasoft Posts: 1,224 ✭✭✭
    edited August 2023

    We had tried using a datasource but found it only matches a single row.

    XPaths used in Data Banks can match multiple nodes from the document. By default, the textual representation of the nodes are concatenated but you can configure a delimiter if you use the "Allow alteration" operation where you can configure a value to append or prepend to each extracted value, like a comma.

    I did write some Groovy that took the CSV datasource file and converted it to JSON and queried to bring back multiple elements of the array

    Why would you need to convert a CSV file to JSON in the first place? Virtualize/SOAtest can parse CSV files directly. In particular, you can convert CSV files to XML using XML Converter tool and using XML Data Bank to extract values. XPath is much more capable and feature rich than JSON Path.

  • jefftuckerbofa
    jefftuckerbofa Posts: 227

    I'll check into using the data banks with some enhanced xpath. Totally agree that xpath is a much more robust method of querying. We have all sorts of use cases here at the bank and the CSV/JSON experiment was done when one group was trying to use a file that was provided to them without wanting to manipulate it. The correlation we were using wasn't cutting it so we just changed the format and did the processing in Groovy. We do all of our Virtualize work 100% through the API so we're always looking for novel approaches to solving issues. Some turn out great, others not so much.