Relative path of file in jasperserver - jasper-reports

In jasperStudio we are passing the absolute path of the file in the following manner:
<parameter name="Parameter1" class="java.lang.String">
<defaultValueExpression><![CDATA["C:\\Users\\ABC\\Desktop\\dynamicSubreport\\ABC.xml"]]></defaultValueExpression>
</parameter>
Here in jasperstudio it’s working fine.
While in jasperserver we need to pass the relative path instead absolute. In jasperserver we have added these xml template under Resources and tried calling the same in following way
<parameter name="Parameter1" class="java.lang.String">
<defaultValueExpression><![CDATA["repo:ABC.xml"]]></defaultValueExpression>
</parameter>
We also uploaded these files under reports folder in jasperserver and tried calling in the following way:
<parameter name="Parameter1" class="java.lang.String">
<defaultValueExpression><![CDATA["repo:reports/ABC.xml"]]></defaultValueExpression>
</parameter>
None of the above ways worked out in jasperserver. So any suggestions or feedback on the above scenario would be very helpful.

Related

How to add test steps to test run in ALM TestLab using rest api?

I have a test set in ALM TestLab.
I am able to create a test run for each test instance from that test set.
BUT: that test runs don't contain test steps(they are empty)
I found some workaround but I don't like it:
if I change status of some test instance (manually or using rest-api) when it causes automate creation of Fast_Run for that test instance and it contains all the test steps.
How can I create my test runs with all the test steps?
PS: this is how I create test run
https://alm-server/qcbin/rest/domains/my_domain/projects/my_project/runs
454660 - test id
380824 - test set id
3323939 - test instance id
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Entity Type="run">
<Fields>
<Field Name="test-config-id"><Value>454660</Value></Field>
<Field Name="cycle-id"><Value>380824</Value></Field>
<Field Name="test-id"><Value>453660</Value></Field>
<Field Name="testcycl-id"><Value>3323939</Value></Field>
<Field Name="build-revision"><Value>1</Value></Field>
<Field Name="name"><Value>TestRun</Value></Field>
<Field Name="owner"><Value>super.tester</Value></Field>
<Field Name="status"><Value>Not Completed</Value></Field>
<Field Name="subtype-id"><Value>hp.qc.run.external-test</Value></Field>
<Field Name="duration"><Value>5</Value></Field>
<Field Name="execution-date"><Value>2020-10-09</Value></Field>
<Field Name="execution-time"><Value>08:01:07</Value></Field>
</Fields>
</Entity>

How to deserialize XML starting from child element by using XStream

I have an XML document that contains data like the following:
<Properties>
...
<util>
<parameters>
<parameter name="a">
<externalProvider code="02">
<attribute key="B" value="BB"/>
<attribute key="CC" value="AA"/>
</externalProvider>
</parameter>
<parameter name="B">
<externalProvider code="02">
<attribute key="paramName" value="AVV"/>
<attribute key="applicationName" value="DD"/>
</externalProvider>
</parameter>
</parameters>
</util>
<security>
<permissions>
<parameter name="c">
<externalProvider code="02">
<attribute key="zz" value="cc"/>
<attribute key="dd" value="ddw"/>
</externalProvider>
</parameter>
<parameter name="q">
<externalProvider code="02">
<attribute key="paramName" value="as"/>
<attribute key="saw" value="dd"/>
</externalProvider>
</parameter>
</permissions>
</security>
...
</Properties>
I need to deserialize the XML above in order to take the elements that are in the 'permission' tag.
My probem is that inside '...' there are 6 xml tags that i do not want to define as Java class and so i do not want to define all the hiearchy.
I need to use XStream to deserialize the object.
Can someone tell me how to do it?
Thanks

setting up client affinity for db2 purescale

I have a DB2 Purescale environment set up. I am trying to configure client affinity for it on my client machine. I have modified my db2dsdriver.cfg file as follows to include the client affinity parameters:-
<configuration>
<dsncollection>
<dsn alias="sample" name="sample" host="127.0.0.0" port="50000">
<parameter name="Authentication" value="Server"/>
</dsn>
</dsncollection>
<databases>
<database name="sample" host="127.0.0.0" port="50000">
<parameter name="keepAliveTimeout" value="20"/>
<acr>
<parameter name="enableAcr" value="true"/>
<parameter name="enableSeamlessACR" value="true"/>
<parameter name="maxAcrRetries" value="2"/>
<parameter name="acrRetryInterval" value="3"/>
<parameter name="affinityFailbackInterval" value="60"/>
<parameter name="enableAlternateServerListFirstConnect" value="false"/>
<alternateserverlist>
<server name="host-1" hostname="127.0.0.0" port="50000"/>
<server name="host-2" hostname="127.0.0.1" port="50000"/>
<server name="host-3" hostname="127.0.0.2" port="50000"/>
</alternateserverlist>
<affinitylist>
<list name="list1" serverorder="host-1,host-2,host-3">
</list>
</affinitylist>
<clientaffinitydefined>
<client name="ABC" hostname="127.0.0.3" listname="list1">
</client>
</clientaffinitydefined>
</acr>
</database>
</databases>
</configuration>
Please note that all the IPs and the machine names provided here are just made up.
But, when I try the db2clp to connect to my database, I get the following error:-
"SQL5163N A required configuration parameter "listname or serverorder under affinitylist group" is missing from the db2dsdriver.cfg configuration file."I have tried but cannot figure out what is missing as both the listname and the serverorder are present in the file.
Also, if I use the CLPPLUS to access the DB from client machine, I can access the DB on host-1, but if I stop the instance on host-1 to test client affinity, my client machine cannot connect to the DB on host-2. I get the following error:-
Error when instance stopped on host-1 and running on host-2
Can someone please help me understand what might be the problem?
Check the following address:
<client name="ABC" hostname="127.0.0.3" listname="list1">
</client>
This must be your client's address. If it's not correct, you get such an error you mentioned.
As for CLPPLUS. It's a jdbc application, and it doesn't use db2dsdriver.cfg.
You must set the corresponding properties.
Example of enabling client affinities in Java clients for Db2 on Linux, UNIX, and Windows systems connections.

Automatic Backup Not working -Orient Db

I Have enable automatic backup by xml file(orientdb-server-plugin.xml)
it as follows.
<handler class="com.orientechnologies.orient.server.handler.OAutomaticBackup"> <parameters>
<parameter value="true" name="enabled"/>
<parameter value="4h" name="delay"/>
<parameter value="23:00:00" name="firstTime"/>
<parameter value="backup" name="target.directory"/>
<parameter value="${DBNAME}-${DATE:yyyyMMddHHmmss}.zip" name="target.fileName"/>
<parameter value="9" name="compressionLevel"/>
<parameter value="1048576" name="bufferSize"/>
<parameter value="" name="db.include"/>
<parameter value="" name="db.exclude"/>
</parameters>
</handler>
But backup not working for me.
Please assist me to do this.
You should put the configuration into orientdb-server-config.xml file (Reference: Automatic Backup Server Plugin).
What OS are you using? You can also put absolute path of the backup folder in the target.directory parameter, just to be sure of location where backups will be stored. Check you logs, there should be a line saying:
Automatic backup plugin installed and active: ...
If not, please post your logs here for further investigation.
Thanks.
Hope it helps.

Test send email on WSO2 ESB

I want to send emails from esb to some email address.
In order to do so I uncommented this lines in the axis2.xml file:
<transportSender class="org.apache.axis2.transport.mail.MailTransportSender" name="mailto">
<parameter name="mail.smtp.host">smtp.gmail.com</parameter>
<parameter name="mail.smtp.port">587</parameter>
<parameter name="mail.smtp.starttls.enable">true</parameter>
<parameter name="mail.smtp.auth">true</parameter>
<parameter name="mail.smtp.user">synapse.demo.0</parameter>
<parameter name="mail.smtp.password">mymailpassword</parameter>
<parameter name="mail.smtp.from">mymail#gmail.com</parameter>
</transportSender>
and
<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.MailTransportListener">
</transportReceiver>
Then I added this proxy to the WSO2 ESB.
Now I want to send an email from ESB to anymail#gmail.com.
I was thinking on using SoapUI to do so, so I created a new SOAP project and used the link https://localhost:9443/services/MailProxy?wsdl as the Initial WSDL.
Now this appears, but now I don't know what code I should enter in order to send the email. Can anyone help me, please?
You can define the receiver's mail address like below, in the address endpoint of the proxy service configuration.
<send>
<endpoint>
<address uri="mailto:anymail#gmail.com"/>
</endpoint>
</send>