1

I have the following setup in my application:

ABCAPI.java (TestAPIInterface.jar)

public void search(FormData data);

ABCAPIBean.java (TestAPI.ear)

public void search(FormData data) 
{
    //log
    //more code
}

ABCAction.java (TestUI.war)

public void loadList(session) {
     //get ABCAPIBean
     api.search(loadFormData(session));
}
public FormData loadFormData(session) {
     //get some information from ABCCore class based on form filters
}

ABCCore.java (TestCore.jar)

Deployed the following packages in JBoss, tomcat servers

JBoss Clusters (node1, node2)

TestAPI.ear
TestAPIInterface.jar
TestCore.jar

Tomcat Web servers (node1, node2)

TestUI.war
TestAPIInterface.jar
TestCore.jar

Everything seems to be working fine until I made a few code changes to ABCCore.java file & deployed latest TestCore.jar into all servers.

Now when accessing the UI, I am getting results and error alternatively. When I checked the logs, whenever UI application requests ABCAPIBean from node1, it is throwing error 'InvalidObjectException', and when it requests from node2, it is giving results. This is happening with the new constant introduced in 'ABCCore.java'.

One possible issue is with the latest jar but I eliminated it by copying TestCore.jar from node2 to node1. I still see the same issue in node1. Any other suggestions ?

P.S: I don't see log statement (ABCAPIBean) in Jboss node1 but I see it in Jboss node2. InvalidObjectException is coming in the tomcat UI log

jmrk
  • 34,271
  • 7
  • 59
  • 74
Sumanth
  • 595
  • 3
  • 14
  • 39

1 Answers1

1

This looks like a deployment error. If you're sure you have the good versions of your jar and war files respectively on your servers, you can try a cleaning of the deployments.

In Tomcat, stop the process, remove the work directory content, and start again. There's also a similar work directory in JBOSS, and you could proceed the same way (stop, clean, start).

By the way you didn't say if you are on Windows or Linux. There were old bugs on Tomcat on Windows, called "jar locking" that could give these kind of errors.

Eugène Adell
  • 3,089
  • 2
  • 18
  • 34
  • 1
    This is linux. Issue is with the deployment in JBoss cluster. I need to do the bounce in the following way: stop node2 first, then node1. While starting JBoss servers, node1 first, then node2. I didn't follow this earlier and got into this issue. I don't know the reason behind it – Sumanth Mar 15 '18 at 03:06
  • maybe have a look at this solution to accelerate hot deployments : https://stackoverflow.com/a/9752554/7748072 – Eugène Adell Mar 15 '18 at 08:26