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 » The Java method could not be found

Post new topic  Reply to topic
 The Java method could not be found « View previous topic :: View next topic » 
Author Message
gecs
PostPosted: Tue Dec 27, 2016 5:03 pm    Post subject: The Java method could not be found Reply with quote

Acolyte

Joined: 14 Nov 2007
Posts: 56

Hi everybody. Im'm trying to call a java function and I get this error:

Code:

Ex = [( ['MQROOT' : 0x1187bf050]
  (0x01000000:Name):RecoverableException = (
    (0x03000000:NameValue):File                 = '/build/slot1/S900_P/src/DataFlowEngine/SQLNodeLibrary/ImbComputeNode.cpp' (CHARACTER)
    (0x03000000:NameValue):Line                 = 520 (INTEGER)
    (0x03000000:NameValue):Function             = 'ImbComputeNode::evaluate' (CHARACTER)
    (0x03000000:NameValue):Type                 = 'ComIbmComputeNode' (CHARACTER)
    (0x03000000:NameValue):Name                 = 'MF_TestJava#FCMComposite_1_4' (CHARACTER)
    (0x03000000:NameValue):Label                = 'MF_TestJava.Compute' (CHARACTER)
    (0x03000000:NameValue):Catalog              = 'BIPmsgs' (CHARACTER)
    (0x03000000:NameValue):Severity             = 3 (INTEGER)
    (0x03000000:NameValue):Number               = 2230 (INTEGER)
    (0x03000000:NameValue):Text                 = 'Caught exception and rethrowing' (CHARACTER)
    (0x01000000:Name     ):Insert               = (
      (0x03000000:NameValue):Type = 14 (INTEGER)
      (0x03000000:NameValue):Text = 'MF_TestJava.Compute' (CHARACTER)
    )
    (0x01000000:Name     ):RecoverableException = (
      (0x03000000:NameValue):File                 = '/build/slot1/S900_P/src/DataFlowEngine/ImbRdl/ImbRdlRoutine.cpp' (CHARACTER)
      (0x03000000:NameValue):Line                 = 2272 (INTEGER)
      (0x03000000:NameValue):Function             = 'SqlRoutine::resolveExternalJavaParameters' (CHARACTER)
      (0x03000000:NameValue):Type                 = '' (CHARACTER)
      (0x03000000:NameValue):Name                 = '' (CHARACTER)
      (0x03000000:NameValue):Label                = '' (CHARACTER)
      (0x03000000:NameValue):Catalog              = 'BIPmsgs' (CHARACTER)
      (0x03000000:NameValue):Severity             = 3 (INTEGER)
      (0x03000000:NameValue):Number               = 3202 (INTEGER)
      (0x03000000:NameValue):Text                 = 'An error occured whilst trying to locate a Java Class / method' (CHARACTER)
      (0x01000000:Name     ):Insert               = (
        (0x03000000:NameValue):Type = 5 (INTEGER)
        (0x03000000:NameValue):Text = '.MF_TestJava_Compute.fnIsFileExists' (CHARACTER)
      )
      (0x01000000:Name     ):Insert               = (
        (0x03000000:NameValue):Type = 5 (INTEGER)
        (0x03000000:NameValue):Text = '1.2' (CHARACTER)
      )
      (0x01000000:Name     ):Insert               = (
        (0x03000000:NameValue):Type = 5 (INTEGER)
        (0x03000000:NameValue):Text = 'xyz.com.pe.Util.ExisteFile' (CHARACTER)
      )
      (0x01000000:Name     ):Insert               = (
        (0x03000000:NameValue):Type = 5 (INTEGER)
        (0x03000000:NameValue):Text = 'fnIsFileExists' (CHARACTER)
      )
      (0x01000000:Name     ):RecoverableException = (
        (0x03000000:NameValue):File     = 'MbMethodResolver.java' (CHARACTER)
        (0x03000000:NameValue):Line     = 250 (INTEGER)
        (0x03000000:NameValue):Function = 'resolveMethodMapping' (CHARACTER)
        (0x03000000:NameValue):Type     = '' (CHARACTER)
        (0x03000000:NameValue):Name     = '' (CHARACTER)
        (0x03000000:NameValue):Label    = '' (CHARACTER)
        (0x03000000:NameValue):Catalog  = 'BIPmsgs' (CHARACTER)
        (0x03000000:NameValue):Severity = 3 (INTEGER)
        (0x03000000:NameValue):Number   = 2946 (INTEGER)
        (0x03000000:NameValue):Text     = 'The Java method could not be found' (CHARACTER)
        (0x01000000:Name     ):Insert   = (
          (0x03000000:NameValue):Type = 5 (INTEGER)
          (0x03000000:NameValue):Text = 'xyz.com.pe.Util.ExisteFile' (CHARACTER)
        )
      )
    )
  )
)]



Java class:


Code:

package xyz.com.pe;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;

public class Util
{
   public static Boolean ExisteFile(String Ruta_File)
   {      
      boolean existe = false;
      
      try
      {
         File archivo = new File(Ruta_File);
         existe = archivo.exists();         
      }
      catch(Exception e)
      {
         existe = false;
      }
         
      return new Boolean(existe);
   }
   
}


ESQL function:

Code:

CREATE FUNCTION fnIsFileExists(IN fileName CHARACTER)
   RETURNS BOOLEAN
   LANGUAGE JAVA
   EXTERNAL NAME "xyz.com.pe.Util.ExisteFile";


ESQL call function:

Code:

   DECLARE val BOOLEAN FALSE;

   SET val = fnIsFileExists('/xcom_rep/GAHR/entrada/14/EMPTCC.TXT');
   SET Environment.DEBUG.val  = val;


If someone has had a similar error, please give me a hand (I've compared Java and ESQL data types using "ESQL-to-Java data-type mapping table" information).

(*) Additional Info:
IIB ver: IBM Integration Bus 9.0.0.1
MQ ver: MQ 7.0
SO: AIX 5.3
Java ver: 7.0
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 28, 2016 12:22 am    Post subject: Reply with quote

Grand High Poobah

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

Has the java project been deployed to the eg (integration server)?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gecs
PostPosted: Wed Dec 28, 2016 8:37 am    Post subject: Reply with quote

Acolyte

Joined: 14 Nov 2007
Posts: 56

fjb_saper wrote:
Has the java project been deployed to the eg (integration server)?


Hi fjb_saper, thanks for your reply.

Effectively, the application was deployed to the "EG" (this reference the java project) like this:

-EG_Test
-MAB_I00_TestV01 (application)
- MF_TestJava
- XYZ_Util (.bar)
- MF_TestJava_Compute (.esql)
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 » The Java method could not be found
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.