Author |
Message
|
rock33 |
Posted: Sun Oct 06, 2013 4:39 am Post subject: Java call from XSLT v1.0 |
|
|
Novice
Joined: 22 Mar 2013 Posts: 12
|
Hi Iam getting the below exception while tryig to call user defined java funtion from xslt in Websphere message broker v8.0.0.1.
Exception:
(Location of error unknown)javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: com.test.Myclass
Stylesheet definition:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan"
xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java">
Java call from xsl:
<xsl:value-of select="java:com.test.Myclass.myDateConverter($dateStr)"/>
Additional details:-
Websphere message broker : 8.0.0.1
org/apache/xalan/ Implementation-Version: 2.7.14
I have generated .bar file from messagebroker toolkit and it contains MyjavaLibrary.jar file.
<<MYJavaLibray.jar>>com/test/Myclass.class - Method is public static
Any pointers will be appreciated. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Oct 06, 2013 5:01 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
The first thing I'd do would be to update to 8.0.0.2. There are a lot of issues with 8.0.0.1 that are fixed with 8.0.0.2
The next thing I'd do would be to test that you can call your java function from ESQL.
If that works then it might be time for a PMR. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
rock33 |
Posted: Sun Oct 06, 2013 9:02 am Post subject: |
|
|
Novice
Joined: 22 Mar 2013 Posts: 12
|
I did apply the latest fix pack (i.e,)v8.0.0.2 for both toolkit and WMB runtime but no use getting the same exception.
Have have one tryied user defined java call from xsl in WMB v8? |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Oct 06, 2013 9:28 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Did you update the effective runtime level of the broker after you had applied the 8.0.0.2 fixpack?
I have called Java classes from ESQL and 8.0.0.2, That was why I suggested that you try calling the class from ESQL first.
Then if the xsl call fails we know that is it a problem either with the classpath in the xslt or a problem with the xslt node itself. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Oct 06, 2013 9:38 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What is executing the XSLT? Is it your own code or is it the XSLT built-in node?
Why do you assume that whatever is running the XSLT will have access to classes loaded by the EGShared classloader?
Why are you bothering with XSLT, when you have much easier and better and more straightforward and just as performant options available in Broker? |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Oct 06, 2013 10:39 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
mqjeff wrote: |
Why are you bothering with XSLT, when you have much easier and better and more straightforward and just as performant options available in Broker? |
A very good point and one that I and a colleague have been banging our heads against a brick wall in recent weeks trying to persuade a PHB that using an XSLT for ALL message transformations in a system that has to handle 5000 very complex messages a minute on a dual core CPU is a bad idea. The PHB won't listen because he is an XSLT expert. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Oct 06, 2013 12:46 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
smdavies99 wrote: |
The PHB won't listen because he is an XSLT expert. |
Only an expert can deal with the problem. |
|
Back to top |
|
 |
|