Skip to Content
author's profile photo
Former Member

"JCO.Server cound not find sever function 'Z_sampleBean'"

On the Web As side, I have created an RFC-enabled function named "Z_sampleBean" which I am attempting to call. This a stateless session bean which has been successfully deployed, and the RFC destination has been set up correctly and tests ok.

The JNDI directory contains an entry at the root level for the bean name. (Visual Administrator display shows a little red box icon and under that entries for [class name] and [object value] - not sure what the icons or the specific entries mean...)

When I make the ABAP call to the JCO Provider Service, I get a dump as shown in the subject line.

Is JCO.server saying he can't find it in the JNDI directory, or that he can't find it in the Web AS repository?

I feeel like I must be missing something pretty obvious, but I don't know what.

I note that case is apparently preserved across the RFC call - are there any case considerations?

Any ideas?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

8 Answers

  • author's profile photo
    Former Member
    Jul 23, 2004 at 08:35 PM

    Hi David,

    I could be way off the mark, but from an SAP R/3 point of view, RFC names are case sensitive, and are allways in Upper Case, so I would have thought that you had to have a JNDI entry for Z_SAMPLEBEAN.

    Regards,

    Piers Harding.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 23, 2004 at 08:57 PM

    Thanks, Piers - I'll change some stuff to se if it makes any difference. However, I not the the JCO.Server reported his problem in mixed case, so he apparently saw upper and lower?

    I'll change everything in sight to upper and we'll see what happens.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 23, 2004 at 10:10 PM

    I changed everything in sight to upper case (but I still don't think that's necessary - I'm just too lazy to find the correct combination of JNDI names, functions names in ABAP, bean names, etc.) and he now appears to find the bean in the JNDI.

    However, it now complains that the bean is of the wrong type, because it doesn't have a 'processFunction' method. However, I'm sitting here looking right at it - it's a method on the bean class. Am I missing something simple?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi David,

      I push my luck, and maybe give another suggestion.

      What is the signature of the processFunction() method you have defined?

      the test one that I last used looked like:

      in Ejb1Bean.java ->

      public void processFunction(JCO.Function function) {

      System.err.println("inside processFunction() " + function.getName());

      }

      and it had the corresponding definitions in:

      Ejb1.java

      Ejb1Local.java

      I'm sure that there are more qualified people than me to help you with this one though.

      Regards,

      Piers Harding.

  • author's profile photo
    Former Member
    Jul 24, 2004 at 01:05 AM

    Well, I've regressed, so I can't test your latest suggestion.

    It's my fault, of course, because I've been changing stuff around, but he seems to ignore my specification of a JNDI name in the session been specification.

    It's in the ejb-j2ee-engine.xml file:

    <jndi-name>Z_SAMPLE_RFC</jndi-name>

    but it doesn't seem to get into the JNDI directory - either at the root or anywhere else. It's really making me mad, because I had that working ok an hour ago! Someplace, I found a secret for getting stuff into the JNDI directory, and now I can't find it!

    Got any idea how to do that? Do you have to enable JNDI naming or soemthing, to get a name other than the bean name put into the directory?

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 24, 2004 at 03:09 AM

    Well, I got it so that I have an entry in JNDI in the root, and it's all in caps, so apparetnly the TFC engine can find it when I call the RFM. (At least it doesn't ay it can't find it!)

    Now it complains about not my not having a processFunction() method in my bean. This is patetnly untrue - it's there and I'm looking at it.

    So I still think my problem is tied up the JNDI somehow. I'm going to start a new thread on this to see what I can find out.

    Thanks for your help!

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 24, 2004 at 03:58 AM

    Piers: I forgot to answer your question: the signature of the method I'm using is a little different than yours - it returns a JCO.Function object. However, these methods were all generated by the EJB wizard in NetWeaver Dev. Studio - I'm just tkaing them the way they were generated...

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      ...then i suggest to learn it. It will become more and more important in the future and the best fact is, it doesn't bite 😉

      Cheers

      Stefan

      PS: I would definitely enjoy to see one of your next blogs describing some hack in the J2EE world 😉

  • author's profile photo
    Former Member
    Jul 24, 2004 at 03:54 PM

    Well, I've got to tell you - this is agonizing!

    I've modified my bean and projects, etc. to parallel those that Piers listed. It deploys OK, but after the deployment there's NOTHING in the JNDI directory that refers to either the bean name or the JNDI name associated with the bean.

    Now what?

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 26, 2004 at 01:20 AM

    Well, with the help of all the good forum folks, I see what was happening: even though I had deployed the bean, I had to ue Visual Administrator to Start the Application. Once I did that, the appropriate entries showed up in the JNDI directory, and I was off and running.

    Yee-hah!

    Add comment
    10|10000 characters needed characters exceeded