ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Java call from XSLT v1.0

Post new topic  Reply to topic
 Java call from XSLT v1.0 « View previous topic :: View next topic » 
Author Message
rock33
PostPosted: Sun Oct 06, 2013 4:39 am    Post subject: Java call from XSLT v1.0 Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Sun Oct 06, 2013 5:01 am    Post subject: Reply with quote

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
View user's profile Send private message
rock33
PostPosted: Sun Oct 06, 2013 9:02 am    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Sun Oct 06, 2013 9:28 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Sun Oct 06, 2013 9:38 am    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Sun Oct 06, 2013 10:39 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Sun Oct 06, 2013 12:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Java call from XSLT v1.0
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.