cancel
Showing results for 
Search instead for 
Did you mean: 

Deployment error while deploying Custom Jar

Former Member
0 Kudos

Hi All,

I have created an custom jar file and trying to deploy it on our

development server.

I followed the steps as below:

1) Go to ESO home directory --> bin --> configure.exe

2) Select Custom JAR file and Update WAR and EAR file in configure task

3) Select Custom JAR files when Asked

4) Click on Next (Wait till WAR and EAR file is generated)

5) Open Visual Admin

6) Remove fcsourcing from deploy

7) Deploy and Start Fcsourcing newly generated EAR file.-->  Placed in

   Fsapps folder

When we "Start and Deploy" the newly created fcsourcing.ear, it fails.

  

Please find attached screenshot. And guide us if we are missing any

step.

Thanks,

Saloni

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Saloni can you please tell me the process how you created the java files  and compiled then as we have some dependency on the session . Please let me know the tool used  and how you maintain session variable as code wont compile without that .

Thanks and Regards,

Piyush Srivastava

Former Member
0 Kudos

Hi Piyush,

I created java files in Eclipse and compiled it without errors. I couldnt run the code as didnt connect eclipse to database server.

How to maintain session variable?  I wasnt getting any compilation errors if dependent files were packaged.

The code is as below:

package com.frictionless.custom.wkfreminder;

import com.frictionless.api.common.exception.ChainedException;
import com.frictionless.api.common.log.LogMessageIfc;
import com.frictionless.api.common.log.Logger;
import com.frictionless.api.common.platform.*;
import com.frictionless.api.util.IapiSystemUtilities;
import com.frictionless.custom.MailUtil;

public final class sendWorkflowReminder
    implements IapiTaskIfc
{

    public sendWorkflowReminder(IapiSessionContextIfc session)
    {
        this.session = session;
        logMsg = Logger.createLogMessage(session);
    }

    public boolean execute()
        throws ChainedException
    {
        logMsg.setLogMessage("** Starting sendWorkflowReminder **");
        Logger.info(logMsg);
        IapiDbHandleIfc dbHandle = session.getDbHandle();
        try
        {
            java.sql.PreparedStatement ps = dbHandle.prepareStatement("SELECT WK.performer_object_name, WK.biz_doc_object_name, WK.root_parent_object_name, ACC.email, ACC.first_name , LANG.DISPLAY_NAME FROM FCI_WORK_ITEM WK, FCI_UPP_USER_ACCOUNT ACC, FCI_SYS_LANGUAGEPACK LANG WHERE WK.PERFORMER_OBJECT_ID = ACC.OBJECTID AND ACC.DISPLAY_LANGUAGE_OBJECT_ID = LANG.OBJECTID AND WK.APPROVAL_STATUS = 0 AND WK.IS_APPROVAL_STEP = 1 AND WK.START_DATE_DATETIME <= sysdate - 5");
            dbHandle.beginTransaction();
            dbHandle.executeQuery(ps);
            for(; dbHandle.next(); Logger.info(logMsg))
            {
                String toWhom = dbHandle.getString(1);
                String conDocName = dbHandle.getString(2);
                String parentAgr = dbHandle.getString(3);
                String emailRecipient = dbHandle.getString(4);
                String firstName = dbHandle.getString(5);
                String language = dbHandle.getString(6);
                String adminAddress = IapiSystemUtilities.getSystemProperty(session, "custom", "wkf_reminderemail", null);
                String subject = "";
                String mail_message = "";
                if(language.equals("English"))
                {
                    subject = "Workflow Reminder Note for : " + toWhom;
                    mail_message = "Hello " + firstName + ",\n\n";
                    mail_message = mail_message + "The workflow for contract document: " + conDocName + " in: " + parentAgr + " has been active for at least 5 days and needs your attention. \n\n";
                    mail_message = mail_message + "Approval workflow cannot continue without your prompt attention to this matter. Please review and accept or reject the document as soon as possible. If the document is rejected, a time consuming approval workflow must start again. Please ensure any reason for rejection is valid. \n\n";
                    mail_message = mail_message + "Thanks in advance for your support,\n\n";
                    mail_message = mail_message + "TSCM Administrator\n\n";
                    mail_message = mail_message + "Please do not reply to this message. If you have difficulty using this application, please contact tscm@telus.com.";
                } else
                {
                    subject = "Rappel de chaine d'approbation pour : " + toWhom;
                    mail_message = "Bonjour " + firstName + ",\n\n";
                    mail_message = mail_message + "La proc\351dure d'approbation pour le document contractuel: " + conDocName + " dans: " + parentAgr + " est actif depuis au moins 5 jours et requi" + "\350" + "re votre attention. \n\n";
                    mail_message = mail_message + "Veuillez examiner et modifier le contrat tel que requis au sein du syst\351me. La chaine d'approbation ne peut pas continuer sans votre attention sur ce sujet. Veuillez consulter et accepter ou rejeter le document le plus t\364t possible. Si le document est rejet\351, la chaine d'approbation compl\351te doit recommencer. Pri\351re de vous assurer de que la raison du rejet est valide. \n\n";
                    mail_message = mail_message + "Merci \340 l'avance pour votre soutien,\n\n";
                    mail_message = mail_message + "TSCM Administrator\n\n";
                    mail_message = mail_message + "Pri\350re de pas r\351pondent pas \340 ce message.  Si vous avez des difficult\351s \340 utiliser le system, veuillez communiquer avec tscm@telus.com.";
                }
                MailUtil.sendMail(session, subject, mail_message, emailRecipient, adminAddress, adminAddress);
                logMsg.setLogMessage(" Email reminder sent to : " + emailRecipient);
            }

            dbHandle.endTransaction();
        }
        catch(Exception e)
        {
            logMsg.setException(e);
            Logger.error(logMsg);
        }
        logMsg.setLogMessage("** End sendWorkflowReminder **");
        Logger.info(logMsg);
        return true;
    }

    public String getDescription()
    {
        return "Finds all active workflows starting more than 5 days ago that are still active and sends a reminder email to the approver";
    }

    public IapiSessionContextIfc getSessionContext()
    {
        return session;
    }

    private IapiSessionContextIfc session;
    private LogMessageIfc logMsg;
}

Please guide me as I am stuck.

Thanks,

Saloni

Former Member
0 Kudos

Hi Saloni ,

According to the screenshot of error attached there is some error in the number format .But that is not properly visible .There is a string involved  and we have to use a intparse method to change into integer.

Please check which variable it is and if u get the string variable just pass that variable to integerparse method .

if possible please attach full screenshot of error as input string variable is not visible in the screenshot attached by you .

hope this would be some help.

Regards ,

Piyush Srivastava

Former Member
0 Kudos

Hi Piyush,

From error details, I am unable to track which variable is throwing number format exception.

Please find below detailed error log, and see if you get any idea why this error is appearing.

  1. com.sap.engine.services.servlets_jsp.server.exceptions.WebIOException: Incorrect War file.

                at com.sap.engine.services.servlets_jsp.descriptor.jar.WebWar.getWebDescriptor(WebWar.java:130)

                at com.sap.engine.services.servlets_jsp.descriptor.jar.WebWar.getWebDescriptor(WebWar.java:170)

                at com.sap.engine.deploy.tool.deployer.ExtendedEarReader.loadDescriptorFromFile(ExtendedEarReader.java:238)

                at com.sap.engine.deploy.tool.deployer.ExtendedEarReader.getFullEarDescriptor(ExtendedEarReader.java:123)

                at com.sap.engine.services.deploy.gui.runtime.EarLoader.loadEar(EarLoader.java:137)

                at com.sap.engine.services.deploy.gui.runtime.MainDeployPanelLogical.loadEarAction(MainDeployPanelLogical.java:169)

                at com.sap.engine.services.deploy.gui.runtime.EarDialog.setEar(EarDialog.java:79)

                at com.sap.engine.services.deploy.gui.DeployDialogLogical.okButtonAction(DeployDialogLogical.java:294)

                at com.sap.engine.services.deploy.gui.DeployDialogLogical.actionPerformed(DeployDialogLogical.java:71)

                at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)

                at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)

                at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)

                at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)

                at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)

                at java.awt.Component.processMouseEvent(Component.java:5115)

                at java.awt.Component.processEvent(Component.java:4912)

                at java.awt.Container.processEvent(Container.java:1569)

                at java.awt.Component.dispatchEventImpl(Component.java:3630)

                at java.awt.Container.dispatchEventImpl(Container.java:1627)

                at java.awt.Component.dispatchEvent(Component.java:3477)

                at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)

                at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)

                at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)

                at java.awt.Container.dispatchEventImpl(Container.java:1613)

                at java.awt.Window.dispatchEventImpl(Window.java:1606)

                at java.awt.Component.dispatchEvent(Component.java:3477)

                at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)

                at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

                at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

                at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)

                at java.awt.Dialog$1.run(Dialog.java:542)

                at java.awt.Dialog$3.run(Dialog.java:569)

                at java.security.AccessController.doPrivileged(Native Method)

                at java.awt.Dialog.show(Dialog.java:567)

                at java.awt.Component.show(Component.java:1133)

                at java.awt.Component.setVisible(Component.java:1088)

                at com.sap.engine.services.deploy.gui.DeployDialogLogical.showDialog(DeployDialogLogical.java:378)

                at com.sap.engine.services.deploy.gui.ApplicationsPanel.deployAction(ApplicationsPanel.java:413)

                at com.sap.engine.services.deploy.gui.ApplicationsPanel.actionPerformed(ApplicationsPanel.java:357)

                at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)

                at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)

                at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)

                at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)

                at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)

                at java.awt.Component.processMouseEvent(Component.java:5115)

                at java.awt.Component.processEvent(Component.java:4912)

                at java.awt.Container.processEvent(Container.java:1569)

                at java.awt.Component.dispatchEventImpl(Component.java:3630)

                at java.awt.Container.dispatchEventImpl(Container.java:1627)

                at java.awt.Component.dispatchEvent(Component.java:3477)

                at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)

                at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)

                at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)

                at java.awt.Container.dispatchEventImpl(Container.java:1613)

                at java.awt.Window.dispatchEventImpl(Window.java:1606)

                at java.awt.Component.dispatchEvent(Component.java:3477)

                at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)

                at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

                at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

                at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Caused by: com.sap.engine.services.servlets_jsp.server.exceptions.WebContainerSAXException: Cannot parse web.xml.

                at com.sap.engine.services.servlets_jsp.descriptor.jar.WebWar.getConvertedWebDescriptor(WebWar.java:368)

                at com.sap.engine.services.servlets_jsp.descriptor.jar.WebWar.getWebDescriptor(WebWar.java:84)

                ... 61 more

Caused by: com.sap.engine.services.servlets_jsp.server.exceptions.WebWrongDescriptorException: Incorrect value [$SESSION_TIMEOUT$] for tag [session-timeout].

                at com.sap.engine.services.servlets_jsp.descriptor.xml.WebDescriptorDocument.initTimeOut(WebDescriptorDocument.java:465)

                at com.sap.engine.services.servlets_jsp.descriptor.xml.WebDescriptorDocument.loadDescriptorFromElement(WebDescriptorDocument.java:182)

                at com.sap.engine.services.servlets_jsp.descriptor.xml.WebDescriptorDocument.loadDescriptorFromDocument(WebDescriptorDocument.java:134)

                at com.sap.engine.services.servlets_jsp.descriptor.jar.WebWar.getConvertedWebDescriptor(WebWar.java:366)

                ... 62 more

Caused by: java.lang.NumberFormatException: For input string: "$SESSION_TIMEOUT$"

                at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)

                at java.lang.Integer.parseInt(Integer.java:468)

                at java.lang.Integer.<init>(Integer.java:609)

                at com.sap.engine.services.servlets_jsp.descriptor.xml.WebDescriptorDocument.initTimeOut(WebDescriptorDocument.java:463)

                ... 65 more

Thanks,

Saloni

Former Member
0 Kudos

Hi Piyush,

Please let me know how to maintain session variable? I have created code in Eclipse and added all necessary lib jars to compile the code. But didnt connect my eclipse project to database. And didnt test it by running in eclipse. I just tried to deploy the jar on server. Then I get below error on Session_Timeout variable.

Caused by: java.lang.NumberFormatException: For input string: "$SESSION_TIMEOUT$"

                at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)

As asked in your earlier post, I dont know how to maintain session variable. Please guide me to resolve this issue.

Thanks,

Saloni

Former Member
0 Kudos

Hi Saloni ,

Sorry for replying late , was busy with relocation .

In the past I also have tried to override the sendEmail method available in sourcing to try sending HTML emails ,At that time I was using SAP Sourcing version 5.1 ,and I also faced the same issue of session, But my code was not even compiling.

Below is what I feel may be the solution.

So the problem is to maintain the session variable , but actually this can only be retrieved when someone is logged into the application , if  esourcing application is installed on SAP Netweaver Platform you can try compiling the same code on Netweaver Developer Studio Java, while compiling it will ask for J2ee Engine credentials(passcode) , enter it and the class file will be generated on the Netweaver which  I think u can directly use while creating the scheduled task.

Please let me know if u find anything .

Regards,

Piyush Srivastava

Former Member
0 Kudos

Hi Piyush,

I was using Eclipse to develop custom jar earlier. But as per you post above, I installed NWDS(SAP NetWeaver Development Studio) and compiled same code here.

I created a main method to test the code, when I run it, I am getting the same error session object is null.

It didnt ask J2EE engine credentials while compiling.

Please elaborate on steps involved. Also, I am not aware what will be passcode used for J2ee credentials(where can we find the passcode?)

Can you please share your gtalk Id so that we can discuss steps. My gtalk ID is saloni15 on gmail.

Thanks,

Saloni

9650263999

Former Member
0 Kudos

Hi Piyush,

Can you please provide your inputs on this problem? I am stuck here.

Thanks,

Saloni