Topic
  • 3 replies
  • Latest Post - ‏2015-05-28T20:02:40Z by BUW5_Scott_Jones
SystemAdmin
SystemAdmin
199 Posts

Pinned topic unable to expose the methods of java class in component queue at PCC level

‏2012-02-23T12:02:06Z |
Hi…
I have written java code (i.e jar file )for component queue. This java code contains 2 public methods and 1 private method.
Problem: I unable to expose these two public methods from component queue in PCC. Even I can’t see the public method names when I am configure the class in adaptor configuration of component queue properties at PCC level.
I don’t know why it is not showing, There is no error in java file, it was compiled successfully and even I run that java code as standalone ( i.e by using main method ), it's run successfully.

Structure of java file
class Sample{
// global declarations
private String s=””;
public void method1(String arg1)
{
}
public void method2(String arg2)
{
// some java code
method3(arg);
}
private void method3(String arg3)
{
}

}

Kindly give me the solution for not exposing methods at component queue And I want to know the problematic reasons for not exposing method in component queue at PCC level

Sathyanarayana j,FileNet Developer.
Updated on 2012-02-24T17:56:45Z at 2012-02-24T17:56:45Z by SystemAdmin
  • drdamour
    drdamour
    15 Posts

    Re: unable to expose the methods of java class in component queue at PCC level

    ‏2012-02-24T17:02:28Z  
    your sample code has nothing wrong with it and should work (but this is obviously not you real code). If you are referencing other libraries than jace & pe then you need to add them as references in the PCC. these references are needed for reflection on your types to enumerate the methods. This action is available via the references context menu on a node in the PCC (i don't recall which).

    Also, it' can be important to target the JRE version that you are running the PCC with to ensure the reflection will work.


    I am Just a new Boy,
    A Stranger in this Town,
    Where are All the Good Times,
    Who's Gonna Show this Stranger Around?
    Check out our Agile ACM Catalogue: Widgets, APIs, & Components for Building Solutions
  • SystemAdmin
    SystemAdmin
    199 Posts

    Re: unable to expose the methods of java class in component queue at PCC level

    ‏2012-02-24T17:56:45Z  
    Sathya,

    Please see my response to http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14674093

    Mattias
  • BUW5_Scott_Jones
    BUW5_Scott_Jones
    1 Post

    Re: unable to expose the methods of java class in component queue at PCC level

    ‏2015-05-28T20:02:40Z  
    Sathya,

    Please see my response to http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14674093

    Mattias

    I was having the same issue, the code was as simple as above, and there are 0 .jar dependencies.   PCC showed me the .jar file and the classes in the configuration settings, but was not showing me the functions.    The problem was the .jar file was invalid, and PCC was smart enough to find the classes in the archive, but did not indicate the .jar file was invalid.   If this happens make sure the jar file is valid.