IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Java Service Problems

    Posted 07/16/02 12:13 AM

    Hi,

    I have a problem when i try to create an instance for a class.
    In the “Shared” tab i have:

    public class ClassName
    {
    private …
    public …
    }

    In the “Source” tab i have:
    ClassName var ;
    var = new ClassName() ;

    When i compile the service, a message error appear
    "C:\sapbc46\Server\packages\Eficentrum_PCP\code\source\Des\JService.java:85: non-static variable this cannot be referenced from a static context
    a = new Encripta() ; "

    Why this doesn’t work ???
    As always, any information is good.
    Omar


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Java Service Problems

    Posted 07/16/02 06:22 PM

    Hi,

    I found the problem.
    The class need to be STATIC.

    “Shared” tag
    public static class ClassName
    {

    }

    Omar


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services