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.
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.
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.
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.
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.
There are no dependencies here. So I don’t see any problem. The reasons that you get such an error:
The class was not compiled. In that case, the code\classes\S103\priv\java.class would be missing.
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.
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.