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.

 View Only
Expand all | Collapse all

Java service Error package name clashes

  • 1.  Java service Error package name clashes

    Posted Mon December 15, 2003 10:56 PM

    I have written four java services under one folder “ListOfFiles” and i have written the following code in “Shared” tab:

    static String[] aListOfFiles; 
    static int aCurrent = 0; 
    

    I want to user this variables in my all four services, is it mandatory to declase these variable as “static”. or i can do otherwise. I mean to say i can declare them as non static i.e.

    String[] aListOfFiles; 
    int aCurrent = 0; 
    

    then how can i use these java variables in my all four services.

    When I save my services, I get the following error:

    C:\wM6\IntegrationServer\packages\Default\code\source\EDI852\services\ListOfFiles.java:1:
    package EDI852.services clashes with class of same name
    package EDI852.services;
    ^

    Can someone help me ???

    Regards,
    Nilesh
    webMethods Consultant


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


  • 2.  RE: Java service Error package name clashes

    Posted Thu December 18, 2003 12:13 AM

    Hi Nilesh,

    I am using SAP BC 4.6 and came across this issue when I installed a Service Pack.

    I had the following Folder/java structure setup:

    FolderJava
    |-FolderJava2
    | |-JavaService2
    |-JavaService1

    This worked fine before the Service pack was applied.

    After the service Pack I got the same Error you describe, I had to change my Folder/JavaService structure to be:

    FolderJava
    |-FolderJava2
    __|-JavaService1
    __|-JavaService2

    OR

    FolderJava
    |-JavaService1
    |-JavaService2

    Hope this helps, it was a big pain to change all these services, I had to rea-slign the folders, then verify/modify all the flow Services that used these Java Services.

    Good Luck.
    Cheers.


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


  • 3.  RE: Java service Error package name clashes

    Posted Thu December 18, 2003 12:53 AM

    Thanks MJUG.
    I will try your trick and see whether it works fine.

    Regards,
    Nilesh


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