Introduction to JCode

This post is attempt to help audience with using Jcode utility provided by Software AG with webmethods Integration Server.

Instructions

In project, there are different time when one might need to forcefully compile all the java service in a package or in server. there could be n number of reason. most common of them all is the error when we try to execute a java service.

com.wm.ap.b2b.server.ServiceException: [ISS.0026.9102] Service ‘your java service name’ is not operational. To run this service, first recompile the Java source.

to recompile java service there are two ways.

1. open each and every java service and save it again.

2. use JCode to force frag and recompile of java code.

Benefit of second option is that it is faster and more sophisticated than first one. sometime you might not even have access to make changes in code in an environment.

To run utility follow below steps

Go to <SOFTWAREAG_HOME>/IntegrationServer/instances/default/bin

run –> sh jcode.sh makeall Default (.bat in case of windows)

this command will compile all java services present under Default package.

Different options to work with this command

jcode frag <pkg> <node> // create node fragments from source
comp <pkg> <node> // composite node fragments into source
make <pkg> // compile package’s nodes (new style)
makeold <pkg> // compile package’s nodes (old style)
makeall <pkg> // compile package’s nodes (new & old)
fragall <pkg> // frag all nodes in specified package
update <pkg> // compile and frag any changed nodes
upall <pkg> // same as update for all packages
all // frag & compile all packages (new & old)

if you didn’t had root access or sudo user, while installing on linux then you might see error about not able to find JAVA path or variable. to overcome that either you can ask administrator to add below java path to system file or you can below variables at command line and these paths will be set for a session.

export JRE_HOME=/opt/softwareag/ESB98/jvm/jvm
export JAVA_DIR=/opt/softwareag/ESB98/jvm/jvm
export IS_DIR=/opt/softwareag/ESB98/IntegrationServer/instances/default

Remember these variables will be set only for one session. as soon as you log off these will be gone and next time you have to set variables again.

Hope this will be helpful for you guys.

Comment\Feedback is much appreciated.

8 Responses

  1. While configuring and testing our build pipeline there were always a few Java services that weren’t compiled correctly after the build. So I had to manually compile quite a few Java services again and again and now I at least know how to automate it. Thanks for the post!

    1. Hello Stefan,

      If you are looking to automate compiling process then there is another option too. you can alternatively run wm.server.packages:compilePackage service under WmRoot package. however in higher environment, we generally don’t keep WmRoot package visible so this can be little tricky.

      If you are at latest version of IS then in designer Package Navigator view. Right click package and say Build Java/C Services that will kick in process to create .class files.

  2. After I ran wm.server.packages:compilePackage, I am getting below error :

    [ISS.0085.9087] Required parameter ‘package’ is missing.

    Could someone please suggest.

    Regards
    Priya

    1. Priya, are you still facing the issue? package name will be name of package where your java service reside or package you want to compile.

Leave a Reply

Your email address will not be published. Required fields are marked *