WSo2 XSLT Parser Issue - wso2

WSO2 XSLT mediator Parsing Issue in the below line
<xsl:template match="Id[some $sib in preceding-sibling::Id satisfies deep-equal(., $sib)]"/>
We have two servers in one server there is no issue and the transformation has happened successfully without node-set(). In the another WSO2 server there is an parser Issue. Unable to pase $ expected ] and it is asking for a node-set() in XSLT.
I have compared the conf files and repository files between the two servers and both are same. Even dropins and lib files are also same. We are just confused to sort out the issue since it is asking for node-set() in one server and in another server it is throwing exception because of node-set(). Kindly help on it.

Is it possible to copy the working instance from one server to another server and then try testing.
If that is not possible then can you confirm whether other XSLT's are working fine or not.

Hi the issue has been solved. Since we were using Linux environment it was taking the Saxon processor by default where as in Windows wso2 takes the xalon processor to process the xslt. So in linux we have pointed manually in the wso2server.sh file to manually point to xalon processor and it is working fine. Thanks..,

Related

WSO2 Tomcat deployment logs

I need your help.
How can I get logs in WSO2 EI while WAR is deploying?
I want to see the process and get the errors like in standalone Tomcat instance.
Is it possible?
I've tried to change log level at log4j.properties, catalina-server.xml and many others. But there is still no result.
Kind Regards,
Kirill
I found the next solution:
In file /opt/ame-a/repository/conf/log4j.properties
set
log4j.logger.org.apache.catalina=DEBUG
This way you will be able to implement logging realization inside your application and put application logs wherever you need, for example, I put it to
/opt/ame-a/lib/tomcat/logs/monitor.log
You need to setthe log level in the logging-bridge.properties file.
Open wso2as/repository/conf/etc/logging-bridge.properties file and put org.apache.catalina.level=FINEST

VFS lock files are not removed after processing

We are using WSO2 ESB 4.8.1. We have developed a proxy for reading a CSV file and inserting into a database table. File is configured to be MOVED to a history folder after processing. When the file is dropped in the FTP folder, a lock file would be created. It normally will be removed when the processing is over. But now it never gets deleted and the lock file stays as it is in the input folder. We couldn't find out the reason for the same. Please help to solve this issue.
You can also try to set transport.vfs.Locking parameter to disable creation of a .lock file when its processed.
Hope that helps
This is a known error in ESB 4.8.1. There is a patch available from WSO2 support, but that requires having a support contract. You can also use a newer version of the ESB since 4.8.1 is already quite dated, using 4.9 or 5.0 you should not run into these problems anymore.

JavaPackage org.wso2.carbon.apimgt.impl.APIManagerAnalyticsConfiguration]. It is not a function, it is "object".)

I encounter the following exception in the WSO API Manager
ERROR {JAGGERY.modules.analytics.add.jag}Error occurred while saving
Analytics configuration (Cause:Cannot call property getInstance in
object [JavaPackage
org.wso2.carbon.apimgt.impl.APIManagerAnalyticsConfiguration]. It is
not a function, it is "object".){JAGGERY.modules.analytics.add.jag}
We have no clue what leads to this problem, we are sure that we didn't change the jag files,but we did replace one class file(within the jar) with our own compiled class and replace it into the jar.
When we change back to the original jar and restart the server,the problem is still there,does anyone know what may lead to this problem and how to fix?
This can happen if APIManagerAnalyticsConfiguration class is not available in OSGi rumtime. Most possible reason is that corresponding jar is not ACTIVE. You can start the server with -DosgiConsole and see if that's the case. Here is a guide.
Did you replace a jar in plugins directory? That's actually not recommended. And that can cause OSGi activating issues too. If you really want to replace a jar, you should patch the jar by placing the jar inside <APIM_HOME>/repository/components/patches/patch0100/. Here 0100 is an arbitrary number.
We are deploying our own war app on the APIM Console. Looks the war contains a CXF jar, which conflicts with APIM's own CXF jar that leads to the problem.We are simply un-deploy the war,and the problem is gone

Solutions within WSo2 ESB for Processing Zip files

I have the following requirement :
“Copy a Zip file from a sftp server to a directory on a local server, then unzip the file and extract 2 Xml files from inside it to process in our message service we have setup within our ESB.”
I have done some several searches over the past week on the internet, as well as read several topics in the Wso2 documentation but I cannot find a clean way to implement this requirement. I found this question asked on stackoverflow already - https://stackoverflow.com/questions/27806557/wso2-esb-extracting-and-processing-zip-files
However, I did not see where there were any suggestions/solutions provided. My first thought is to build a sequence with a class mediator to handle the extraction of the 2 xml files I need from the zip file, but maybe there is a better approach?
Is there any recommendations, links, or other references that folks could provide or suggest that would help me move forward with implementing this requirement? Or is this something I will need to handle outside of ESB via script with cron control?
Please kindly note that I'm assuming that you are using ESB 4.8.1
Since this is a specific requirement we don't have an out of the box solution for your scenario. However, you can easily do this using WSO2's VFS transport and a custom class mediator. The procedure would be:
Read your zip file using VFS Transport and save it in your local server.
Next, create a class mediator which unzip your zip file and then read your XML files. For more details about how to write a class mediator please refer Class Mediator.
If you need more help regarding this issue please let me know.
Thanks,
Upul
In the newer version of the ESB, the File Connector supports zip/unzip operations: https://docs.wso2.com/display/ESBCONNECTORS/Working+with+the+File+Connector+Version+2

BizTalk deployment including a web reference

Trying out BizTalk with a web service call
The request/response is working fine on my own dev machine, but not on test ...
Exported the MSI over to my deployment test server (a seperate virtual), created the application with the Application/Import and then tested it to find it not working ...
checking the event log and it's shows an XLANG error with "Could not load file or assembly"
checked the GAC and the BizTalk assembly isn't there ...
so manually added it and that seemed to do the trick
Does the added web service reference mean the assembly has to be GAC'ed as part of a deployment?
And just to get me confused, tried deploying to the real test server, import the MSI, manual copy of the DLL to the GAC ... and it fails with the XLANG error in eventlog :-(
any idea what's going on here ?
What adapter are you using? I am assuming the SOAP adapter. If so you can look at your bindings. Look here near figure 6:
http://msdn.microsoft.com/en-us/magazine/cc163464.aspx
-Bryan
Just importing the MSI will by default not include the dll.You need to run it as well (like from windows explorer or the option given after install). This will physically move the file. This behavior is quite useful when scaling out. I don't think it have anything to do with the web reference specifically.