webMethods

webMethods

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

Need to recompile Java Service after package reload or IS restarted

webMethods Community Member

webMethods Community MemberTue October 17, 2023 07:35 PM

webMethods Community Member

webMethods Community MemberThu October 19, 2023 12:13 PM

webMethods Community Member

webMethods Community MemberThu October 19, 2023 12:35 PM

  • 1.  Need to recompile Java Service after package reload or IS restarted

    Posted Tue October 17, 2023 06:37 PM

    Product/components used and version/fix level:

    10.15

    Detailed explanation of the problem:

    Hello,

    I have a small Java program in my package, but every time the package is reloaded or the IS is restarted, I encounter an error that requests recompiling the Java program.

    Any idea to get rid of this issue?

    Error messages / full error message screenshot / log file:

    com.wm.app.b2b.server.ServiceException: [ISS.0026.9102] Service ‘endsWith’ is not operational. To run this service, first recompile the Java source.

    Question related to a free trial, or to a production (customer) instance?


    #webMethods


  • 2.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Tue October 17, 2023 07:35 PM

    You may find info in this thread helpful.


    #webMethods


  • 3.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Wed October 18, 2023 02:39 AM

    The suggested URL for correction is not accessible in the ticket.


    #webMethods


  • 4.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Wed October 18, 2023 09:46 AM

    The suggested URL is another thread in this community forum. If you have access to this current thread, you have access to the thread in my post.

    Referring to the provided URL as a “correction” is not really accurate. It is an exchange which may have information that may apply to the issue you’re facing.

    Referring to this thread as a “ticket” implies this is a help desk system or official support. It is not. It is a community forum where mostly SAG customers exchange info and try to assist each other. SAG employees often participate as well but in an informal manner.

    I mention these terminology items only to guide expectations. If you want/need official support, you’ll want to create a ticket with SAG on Empower.


    #webMethods


  • 5.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Wed October 18, 2023 09:57 AM

    Hi Rob,

    the post you mentioned can be accessed, but it contains another link to the documentation section of the community, which is not working. It is leading to a 404 “not found” error.

    Regards,
    Holger


    #webMethods


  • 6.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Wed October 18, 2023 11:31 AM

    @Holger_von_Thomsen - Thanks for the info!


    #webMethods


  • 7.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Thu October 19, 2023 09:35 AM

    I’m having a hard time understanding how a package reload or server restart could make a Java service “not operational”. Is there a startup or shutdown service in that package (or dependent package) that is doing something unusual? Is this occurring in a local development environment or a regular environment? Is someone opening the service and editing it before the service is executed again?

    If the Integration Server itself is “breaking” the service upon restart, this would constitute a bug so you may need a support ticket. It would be a pretty significant and unlikely bug though. Feel free to share your package if you’d like us to try it out ourselves.

    Percio


    #webMethods


  • 8.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Thu October 19, 2023 09:38 AM

    It is because there is a class that is referenced by the java service that has compilation errors.


    #webMethods


  • 9.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Mon October 23, 2023 10:02 AM

    IME, this has been due to class conflicts and library load order.


    #webMethods


  • 10.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Thu October 19, 2023 09:56 AM

    The integration server doesn’t change anything in the standard java runtime except place the class files in he right place and set the classpath. So if just a simple restart is making the service go from available to unavailable, it’s either a bug or some code is removing a dependency somewhere. Can you please archive the package when it’s working and then reboot and archive it again when its not working ? A diff on those will confirm nothing is broken in the package. Another aspect to compare is the server classpath before and after. It may help if you can include the code of your service too. I am assuming its trivial.

    Rupinder


    #webMethods


  • 11.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Thu October 19, 2023 10:53 AM

    Hello,

    Thanks for your reply
    I have archived the packages as you requested, but I can’t find any difference between the two packages; they are identical. I also don’t see any difference in the classpath.
    It’s really strange.


    #webMethods


  • 12.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Thu October 19, 2023 10:59 AM

    Hi,

    might it be that this a package load order issue?

    That the package with the affected service gets loaded before the package containing the jar on which this service depends?
    In this case you will have to define a package dependency in the package properties in Designer to correct the load order.

    Regards,
    Holger


    #webMethods


  • 13.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Thu October 19, 2023 11:30 AM

    I have no dependencies on JAR files or services. It’s a Java program that simply uses the .endsWith method.


    #webMethods


  • 14.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Thu October 19, 2023 02:18 PM

    The endsWith method can be replaced by a FLOW service. There is no need to use Java in this case.

    What is the folder structure of the package? Are there nested folders with Java code in multiple levels? This can cause naming conflicts.


    #webMethods


  • 15.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Thu October 19, 2023 11:57 AM

    Can you please share the code of the entire class ? Not the service but the .java file.

    Rupinder Singh


    #webMethods


  • 16.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Thu October 19, 2023 12:13 PM

    The code of the entire class :

    java.java (2.0 KB)


    #webMethods


  • 17.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Thu October 19, 2023 12:35 PM

    Hi,

    I cannot see anything problematic here.

    Regards,
    Holger


    #webMethods


  • 18.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Thu October 19, 2023 01:07 PM

    There are no dependencies here. So I don’t see any problem. The reasons that you get such an error:

    1. The class was not compiled. In that case, the code\classes\S103\priv\java.class would be missing.
    2. The class was compiled but with the wrong JVM version. In that case the class would exist but be incompatible with the JVM that the server is running under. But that cannot be the case here as it works and then stops working on restart. Could there be a situation where you restart the server and somehow change the JVM that the server is running under ?

    One additional thing to try could be to rename your folder from java to something else. Unlikely that is an issue but just want to make sure java isnt a reserved word that confuses the server. But that is pure guess and unlikely.

    I think you may have run into a bug.

    Rupinder Singh


    #webMethods


  • 19.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Fri October 20, 2023 10:38 AM

    Hi,

    regarding the second point of your list:

    This would only be an issue when class was compiled with a newer major version java as the one the IS is running on.
    In this case there should be an error message with a class file version conflict.

    When viewing the class file with a hex editor, the first 4 Bytes should read as “CAFEBABE” and the next 2 Bytes after this contain the hexadecimal representation of the class file version. See Wikipedia which java version uses which class file version.

    Regards,
    Holger


    #webMethods


  • 20.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Mon October 23, 2023 08:44 AM

    I’ve tried all the suggested solutions, but it doesn’t resolve my issue.
    For your information, in the log traces, I have the following message:

    2023-10-23 14:09:53 CEST [ISS.0055.0003E] (tid=337) Initialization of Java Service failed due to error:
    com.wm.app.b2b.server.ServiceSetupException: java.lang.NoClassDefFoundError: IData


    #webMethods


  • 21.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Mon October 23, 2023 09:08 AM

    Hi,

    as IData is a very basic central class of IS, which also used internally, it should be available by default.

    Can you share the About page of your IS Admin UI with the classpath section, please?

    Additionally, please provide the server.log snippet, where the packages are loaded and activated (started up), including the line you have mentioned above.

    Regards,
    Holger


    #webMethods


  • 22.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Thu October 19, 2023 01:32 PM

    If it’s not an issue, can you share the package ?

    Rupinder Singh


    #webMethods


  • 23.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Mon October 23, 2023 09:46 AM

    @RCA , I’ve asked before but I’ll ask again: is this occurring in a local development environment or a regular environment?

    Have you tried moving the package to a different Integration Server to see if the same behavior occurs there? You could even just pull down a Docker image from the Software AG Container Registry to try against.

    If the same behavior occurs there (and that behavior is not observed with other packages on that other server), then it’s likely an issue with the package itself (e.g. a startup service doing something unusual, inappropriate class loader settings in your manifest.v3 file, etc).

    If the same behavior does NOT occur on the new IS, then it’s likely an issue with the Integration Server itself (e.g. settings that were changed, a missing fix, or perhaps a bad patch).

    As I’ve suggested before (and so have others), feel free to share your package. We could load it on our Integration Servers to help attempt to replicate the issue for you. If I were you, I’d also open a ticket with Software AG to attack the issue on multiple fronts.

    Percio


    #webMethods


  • 24.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Mon October 23, 2023 10:01 AM

    There is nothing obviously wrong with the code. But it’s not possible to debug further without actually have the entire package. IData belongs to com.wm.data package which you have in your imports. Unless you deleted the wm-isclient.jar file somehow, this should not happen.


    #webMethods


  • 25.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Mon October 23, 2023 10:03 AM

    @Percio_Castro1
    Yes, I have conducted the tests, and the package works perfectly in another environment. The issue is only present on my local instance.
    I think the easiest solution is to reinstall a new localhost instance.

    @Holger_von_Thomsen
    I cannot share the server.log because it contains confidential information.


    #webMethods


  • 26.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Mon October 23, 2023 10:21 AM

    @RCA , I agree. Sounds like something was inadvertently changed in your local installation and the easiest solution would be to reinstall. When reinstalling and reconfiguring the local IS, perform one step at a time and verify the issue hasn’t returned along the way. This way, if the issue does return, you can easily pinpoint which step of the installation/configuration caused it. Please do share if you ever find the root cause.

    Percio


    #webMethods


  • 27.  RE: Need to recompile Java Service after package reload or IS restarted

    Posted Mon October 23, 2023 01:33 PM

    Hi,

    I did not ask for the complete server.log but just the startup sequence, esp. package loading and starting order along with corresponding error messages.

    Beside package names, host names, IP-adresses and ports this part should not contain confidential life data as the issue seems to occure before the startup sequence is completed (“The IntegrationServer startup was completed in xxx seconds” and “ConfigFile directory saved” should be the last messages from this sequence).
    The previously mentioned informations can be masked as long as the structure can be identified where the issue arises from.
    Rename and recreate the server.log file when performing the next shutdown and start sequence, not restart only.

    Regards,
    Holger


    #webMethods