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 IndexWebSphere Message Broker SupportIIB v10 - Shared Library with Java function

Post new topicReply to topic
IIB v10 - Shared Library with Java function View previous topic :: View next topic
Author Message
gabrielj
PostPosted: Thu Oct 11, 2018 3:04 am Post subject: IIB v10 - Shared Library with Java function Reply with quote

Novice

Joined: 16 Nov 2014
Posts: 22
Location: Muscut,Perth,Sydney,Bangalore,Hydrabad,Coimbatore

Hi All,

I am just trying to implement the shared library concept in our IIB v10.0.0.7. I am getting error while deploying the application into integration server. Following things I did so far, implementing the Shared Library Concept.

1. Created a simple Java Project with one static function.
Code:

package com.test;
public class Test {
   public static String greeting(){
      return "Hello";
   }
}


2. Create a shared Library name: ShaLIB and provided the project reference of Java Project.

3. Deployed the shared Library into integration server and it was deployed successfully.

4. Created a Application named "ShaAPP" with one simple flow.

HTTPInput--->Compute--->HTTPReply

5. In Compute Node, I am trying to Access the greeting() function using ESQL code.
Code:



CREATE FUNCTION greeting()
RETURNS CHARACTER
LANGUAGE JAVA
EXTERNAL NAME "com.test.Test.greeting"
CLASSLOADER "{ShaLIB}";




6. Now I am trying to deploying the application into integration server, I am getting following error. Tried with reference of Shared Library and without shared library.

Quote:
Review related error messages to determine why the administration request failed.

BIP3202E: (.greeting, 1.1) : An error occurred when trying to resolve the Java class or method 'com.test.Test.greeting' which is referred to by the routine 'greeting'.

Further messages are generated that explain the error in more detail.

Correct the syntax of your Java expression in node '.greeting', around line and column '1.1', then redeploy the message flow.

BIP1328E: The Java method 'com.test.Test.greeting' cannot be loaded because the ESQL definition specifies that the Java method must be loaded from the classloader for shared library 'ShaLIB'. The shared library 'ShaLIB' is not available.

The ESQL definition for the specified Java method specifies that the Java method must be loaded from a classloader for a shared library that is not available.

Check that the specified shared library exists and is deployed to the integration server. Also check that the application or shared library that contains the specified message flow references that shared library explicitly.




So please give me a hint where I am missing any thing?

Thanks in advance.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Oct 11, 2018 7:42 pm Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19758
Location: LI,NY

Check back with your interfaces. I believe to be callable from ESQL your method needs to return String[] and not String.... Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gabrielj
PostPosted: Sat Oct 13, 2018 8:31 pm Post subject: Reply with quote

Novice

Joined: 16 Nov 2014
Posts: 22
Location: Muscut,Perth,Sydney,Bangalore,Hydrabad,Coimbatore

fjb_saper wrote:
Check back with your interfaces. I believe to be callable from ESQL your method needs to return String[] and not String.... Have fun


Hi Fjb_saper,

Thanks for your response. Same code was working as "static Library". So there is no issue in function definition.

The error says

Quote:
BIP1328E: The Java method 'com.test.Test.greeting' cannot be loaded because the ESQL definition specifies that the Java method must be loaded from the classloader for shared library 'ShaLIB'. The shared library 'ShaLIB' is not available.

The ESQL definition for the specified Java method specifies that the Java method must be loaded from a classloader for a shared library that is not available.


Java must be loaded from class loader. I am searching in the information center about, how to load java using class loader.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportIIB v10 - Shared Library with Java function
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.