You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if a module fails to publish on to a server, a NPE will be thrown without any further information as to which module failed to publish. A solution is to wrap the call to either publishDir in JEEPublisher.publishModule (or the call to publishSmart in ApplicationPublisher.publishDir) with a try/catch and print out an error message informing the user which module failed to publish.
Example Stack Trace:
java.lang.NullPointerException
at org.eclipse.wst.server.core.util.PublishHelper.publishSmart(PublishHelper.java:331)
at org.eclipse.wst.server.core.util.PublishHelper.publishSmart(PublishHelper.java:367)
at org.eclipse.wst.server.core.util.PublishHelper.publishSmart(PublishHelper.java:367)
at org.eclipse.wst.server.core.util.PublishHelper.publishSmart(PublishHelper.java:188)
at com.ibm.ws.st.core.internal.ApplicationPublisher.publishDir(ApplicationPublisher.java:886)
at com.ibm.ws.st.jee.core.internal.JEEPublisher.publishModule(JEEPublisher.java:170)
at com.ibm.ws.st.core.internal.ApplicationPublisher.publishModuleAndChildren(ApplicationPublisher.java:147)
at com.ibm.ws.st.core.internal.ApplicationPublisher.publishModuleAndChildren(ApplicationPublisher.java:153)
at com.ibm.ws.st.core.internal.ServerExtensionWrapper.publishModuleAndChildren(ServerExtensionWrapper.java:358)
at com.ibm.ws.st.core.internal.WebSphereServerBehaviour.publishApplication(WebSphereServerBehaviour.java:1195)
at com.ibm.ws.st.core.internal.WebSphereServerBehaviour.publishModules(WebSphereServerBehaviour.java:946)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:987)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3172)
at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
The text was updated successfully, but these errors were encountered:
… publish
When a module fails to publish in OLT, only a NPE will be thrown,
without any further useful information being shown. To fix this, I've
surrounded the function that throws the NPE with a try/catch and when an
NPE is caught, a message and a stack trace will be printed out.
johnmcollier
added a commit
to johnmcollier/open-liberty-tools
that referenced
this issue
Oct 4, 2017
Currently if a module fails to publish on to a server, a NPE will be thrown without any further information as to which module failed to publish. A solution is to wrap the call to either publishDir in JEEPublisher.publishModule (or the call to publishSmart in ApplicationPublisher.publishDir) with a try/catch and print out an error message informing the user which module failed to publish.
Example Stack Trace:
The text was updated successfully, but these errors were encountered: