Question

Print Agent ifs8: Ifs.Fnd.FndSystemException: Explorer: An Unhandled Exception has occurred

  • 25 May 2023
  • 3 replies
  • 215 views

Userlevel 3
Badge +10

The print agent in IFS8 suddenly stops working with an un-handled exception condition. Exception thrown by handler operation: EJB Exception.

I have tried stopping and restarting the Print agent running on a dedicated windows server. I’ve also restarted the batchserver process on the Linux server where the IFS application is running.

I’ve tried reinstalling the print agent and even rebooting the server where the print agent is running.

The only thing I have found that clears the condition is to restart the IFS application on the Linux server. This causes a major interruption for my users.

Any suggestions are welcomed.

 

Here is the full error:

Pop-up error in the IFS application

Ifs.Fnd.FndSystemException: Explorer: An Unhandled Exception has occurred ---> Ifs.Fnd.FndSystemException: Unexpected error while calling server method PrintReport/ReportFormatRequest ---> Ifs.Fnd.FndSystemException: ifs.fnd.gateway.GatewayException: Exception thrown by handler operation: EJB Exception:
--- IFS Extended Server exception stack trace ---
    at ifs.fnd.gateway.GatewayException.raise(GatewayException.java:112)
    at ifs.fnd.gateway.client.EJBServerConnection.invoke(EJBServerConnection.java:145)
    at ifs.fnd.gateway.client.ServerCommunicator.invoke(ServerCommunicator.java:162)
    at ifs.fnd.gateway.client.IfsClientGateway.doPostImpl(IfsClientGateway.java:830)
    at ifs.fnd.gateway.IfsAbstractGateway.doPost(IfsAbstractGateway.java:253)
    [...]
    at ifs.fnd.gateway.IfsAbstractGateway.service(IfsAbstractGateway.java:186)
Caused by: javax.ejb.EJBTransactionRolledbackException: EJB Exception:
    [...]
    at ifs.application.printagentservice.PrintAgentInternal_9uwzlm_PrintAgentInternalLocalImpl.processOneJob(Unknown Source)
    at ifs.application.infoservices.impl.PrintReportImpl.reportFormatRequest(PrintReportImpl.java:173)
    at ifs.application.infoservices.PrintReportWrapper.reportFormatRequest(PrintReportWrapper.java:101)
    at ifs.application.infoservices.PrintReportBean.reportFormatRequest(PrintReportBean.java:378)
    at ifs.application.infoservices.PrintReportBean.reportFormatRequest(PrintReportBean.java:399)
    [...]
    at ifs.fnd.sf.j2ee.FndAbstractBean.aroundInvoke(FndAbstractBean.java:162)
    [...]
    at ifs.application.infoservices.PrintReport_tvvmj4_PrintReportLocalImpl.__WL_invoke(Unknown Source)
    [...]
    at ifs.application.infoservices.PrintReport_tvvmj4_PrintReportLocalImpl.reportFormatRequest(Unknown Source)
    [...]
    at ifs.fnd.gateway.client.EJBServerConnection.invoke(EJBServerConnection.java:129)
    ... 23 more
Caused by: javax.ejb.EJBException: Unpredictable runtime error is caught. See the nested exception.
    [...]
    at ifs.fnd.sf.j2ee.FndAbstractBean.aroundInvoke(FndAbstractBean.java:162)
    [...]
    at ifs.application.printagentservice.PrintAgentInternal_9uwzlm_PrintAgentInternalLocalImpl.__WL_invoke(Unknown Source)
    ... 53 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
    [...]
    at ifs.application.printagentservice.impl.PrintAgentInternalImpl.convertRDLtoXSL(PrintAgentInternalImpl.java:1305)
    at ifs.application.printagentservice.impl.PrintAgentInternalImpl.generatePdf(PrintAgentInternalImpl.java:1060)
    at ifs.application.printagentservice.impl.PrintAgentInternalImpl.processOneJob(PrintAgentInternalImpl.java:482)
    at ifs.application.printagentservice.PrintAgentInternalWrapper.processOneJob(PrintAgentInternalWrapper.java:39)
    at ifs.application.printagentservice.PrintAgentInternalBean.processOneJob(PrintAgentInternalBean.java:47)
    ... 66 more
 ---> Ifs.Fnd.AccessProvider.FndConnectionFailedException: There is currently a problem connecting to 'http://plavifsapp1.flpi.com:58080'. Server responds with error.
Most likely causes:

 * Application server is currently restarting.
 * Application server is not correctly configured.

(HTTP response: 'Internal Server Error')

Contact your system administrator if this condition persists.
   --- End of inner exception stack trace ---

Server stack trace:
   at Ifs.Fnd.AccessProvider.FndConnection.HandleHttpStatusErrors(HttpWebResponse result, Exception innerException)
   at Ifs.Fnd.AccessProvider.FndConnection.GetResponseWithoutPersistencyHandler(String intface, String operation, FndRequestContext requestContext, FndManualDecisionCollection decisions, Byte[] requestHeaderBytes, Byte[] requestBodyBytes)
   at Ifs.Fnd.AccessProvider.FndConnection.GetResponse(String intface, String operation, FndRequestContext requestContext, FndManualDecisionCollection decisions, Byte[] requestHeaderBytes, Byte[] requestBodyBytes, FndApfAsyncInvoke asyncInvokeHandle)
   at Ifs.Fnd.AccessProvider.FndConnection.CallGetResponse(String intface, String operation, FndRequestContext requestContext, FndManualDecisionCollection decisions, Byte[] requestHeaderBytes, Byte[] requestBodyBytes, FndApfAsyncInvoke asyncInvokeHandle)
   at Ifs.Fnd.AccessProvider.FndConnection.AsyncGetResponse(String intface, String operation, FndRequestContext requestContext, FndManualDecisionCollection decisions, Byte[] requestHeaderBytes, Byte[] requestBodyBytes, FndApfAsyncInvoke asyncInvokeHandle)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
   at Ifs.Fnd.AccessProvider.FndConnection.GetResponseDelegate.EndInvoke(IAsyncResult result)
   at Ifs.Fnd.AccessProvider.FndConnection.InvokeGetResponse(String intface, String operation, FndRequestContext requestContext, FndManualDecisionCollection decisions, Byte[] requestHeaderBytes, Byte[] requestBodyBytes, Boolean& abandoned, Boolean forcedSync)
   at Ifs.Fnd.AccessProvider.FndConnection.InvokeInternal(Object requestBody, Object responseBody, String intface, String operation, FndRequestContext requestContext, FndManualDecisionCollection decisions, Boolean forcedSync)
   --- End of inner exception stack trace ---
   at Ifs.Fnd.AccessProvider.FndConnection.InvokeInternal(Object requestBody, Object responseBody, String intface, String operation, FndRequestContext requestContext, FndManualDecisionCollection decisions, Boolean forcedSync)
   at Ifs.Fnd.AccessProvider.FndConnection.InvokeInternal(String intface, String operation, Object requestBody, Object responseBody, FndRequestContext requestContext, Boolean forcedSync)
   at Ifs.Fnd.AccessProvider.Activity.FndActivityContext.Invoke(String intface, String operation, Object request, Object response)
   at Ifs.Fnd.AccessProvider.Activity.FndActivityCommand.ExecuteNonQuery(Object body)
   at Ifs.Fnd.Explorer.Extenders.InfoServices.ServerInterface.Ifs.Fnd.Explorer.Extenders.InfoServices.IPrintReport.ReportFormatRequest(Double resultKey, String formatRequest, String langCode, String& pdfFile, Byte[]& pdf)
   at Ifs.Fnd.Explorer.Extenders.InfoServices.PrintDialog.ReportFormatRequest(PrintInstance instance, String& filename, Byte[]& pdfData)
   at Ifs.Fnd.Explorer.Extenders.InfoServices.PrintDialog.PreviewReport(PrintInstance instance)
   at Ifs.Fnd.Explorer.Extenders.InfoServices.PrintDialog.FormatPrintRequest(Boolean print)
   at Ifs.Fnd.Explorer.Extenders.InfoServices.PrintDialog.cmdPreview_Execute(Object sender, FndCommandExecuteEventArgs e)
   at Ifs.Fnd.Windows.Forms.FndCommand.OnExecute(Component component)
   at Ifs.Fnd.Windows.Forms.FndCommandButton.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   --- End of inner exception stack trace ---


3 replies

Userlevel 3
Badge +10

Charith,

Thank you for your reply. I have been fighting this issue on/off for a couple of years. I have been restarting the middleware monthly. The funny thing is, the printer issues usually occurs a few days after the restart. At least that’s what it seems like. Once restarted it does not occur again for quite a while. The X11.XToolkit error did catch my eye, but I did not find your suggestion. I will give it a try on my test system which also can experience this error. It may be some time before I can report on the success or failure since I cannot force the error to occur.

Doug

Userlevel 7
Badge +31

Hi @dmanuele,

I noticed the “java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit” error in your error stack. When I did a quick search online, several articles suggest adding the following JVM Option:

-Djava.awt.headless=true

In IFS MWS, you can add this JVM Option in the “Custom Java Parameters” screen in the installer wizard. 

Please note that I haven’t tested this JVM Option myself, so make sure to perform this in a test environment first and then move to production after testing and verifying that it is not causing any issues. 

In addition to this, have you updated the JDK in the IFS Middleware Server manually or do you have any other version of the JDK installed on the application server host? IFS relies on the Java version packaged with IFS Middleware Server and it should only be updated through deliveries sent by IFS. 

Hope this helps!

Userlevel 3
Badge +10

The fact that the application restart fixes the problem makes me think that the issue is with Java memory.  Back when we had version 8 I never had this problem with a print agent, but I did have problems with the application server.  There were memory leaks in the code.  If I remembered to restart the instance every 6 weeks we were fine.  I then added some more RAM and could extend that period to about 8 weeks.

Between monthly Windows updates and patches this usually wasn’t difficult to achieve.

If it wasn’t for the application restart fixing things I was going to suggest that perhaps the password for the ifsprint account was expired.

Reply