Tuesday, 15 December 2020

Fix Error while running Income Tax India ITR Utility on Ubuntu

Most of the users having only Linux based operating system on individual Laptop/PC for day to day activity to high performance activity use. When Linux based users want to fill ITR using such system then they have either use online filling or download offline java utility that IT has officially provided.

Unfortunately IT department has not been well tested/verified or no any guidlines/support in case user face issue to run such a utility on Linux system. 

When you download any ITR type java utility then you may face following error on Linux system.  

 

Error : 

Error: Could not find or load main class com.itd.efiling.itr.main.ctrl.ThreeRedLightsIlluminate

Caused by: java.lang.NoClassDefFoundError: javafx/application/Application 


 

Cause of Error :

India income tax returns filing utilities are created using Java 8 SDK and use Java FX. These can only be run using Java 8 as Java FX was bundled with it. Newer versions of Java from Oracle as well as OpenJDK do not bundle Java Fx anymore.

 

Solution :

I tired to find out cause and based on it by applying following solution, ITR java utility ran successfully.

For this activity I have used following system

  • Operating System: Kubuntu 20.04
  • Kernel Version: 5.4.0-56-generic
  • OS Type: 64-bit

And my system I had preinstalled OpenJDK with version :

openjdk version "11.0.9.1" 2020-11-04

OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)


 

And javafx packet was not installed by default on the system.

To resolve the error I had applied following solution:

Steps :

1. Download javafx packet from url and install it.

 https://packages.ubuntu.com/search?keywords=openjfx 

2. Locate and note down the path of javafx on your system. It may be /usr/share/openjfx/lib 

3. Update ITR.sh file with following things. Note depends on .jar file name kindly update respective file and comment existing statement

#java -jar ITR-2_AY202021_PR3.2.jar

export PATH_TO_FX=/usr/share/openjfx/lib/

java --module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml,javafx.web -jar ITR-2_AY202021_PR3.2.jar

 

4. Execute the ITR.sh

Mainly you must have javafx on your system and while executing utility(.jar) you need to pass javafx path including modules javafx.controls,javafx.fxml,javafx.web as shown in below command

export PATH_TO_FX=/usr/share/openjfx/lib/ 

java --module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml,javafx.web -jar ITR-2_AY202021_PR3.2.jar

 


I hope this will help to you. Even your system is non-debien system but still basic purpose solve your error.

Also I would suggest Indian Income Tax department to updated upcoming such a utility to fix the issue.

 

10 comments:

  1. Very useful . I could do this successfully following your steps. Please keep up such good work !!

    ReplyDelete
  2. This is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work. palos hills Realtors

    ReplyDelete
  3. The Earned Income Tax Credit is intended to help taxpayers who work but earn only modest incomes by reducing their tax bill. The credit can apply to both individuals and families and caps out at very specific income levels based on the number of dependents the taxpayer claims. In many instances, this credit can generate a tax refund larger than what you paid in withholding taxes or give you a refund even if there was no tax due. bookkeeping and accounting

    ReplyDelete
  4. I invite you to the page where you can read with interesting information on similar topics. this page

    ReplyDelete
  5. Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. click here

    ReplyDelete
  6. Similar error was happening with ITR-1_AY202021_PR3.3.jar but following these steps didn't help in running the jar.
    Exception in Application start method
    java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1071)
    Caused by: java.lang.RuntimeException: Exception in Application start method
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
    at java.base/java.lang.Thread.run(Thread.java:829)
    Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
    at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
    at java.base/java.lang.Class.getConstructor0(Class.java:3342)
    at java.base/java.lang.Class.newInstance(Class.java:556)
    at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:936)
    at javafx.fxml/javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:980)
    at javafx.fxml/javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:227)
    at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:752)
    at javafx.fxml/javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2722)
    at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2552)
    at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2466)
    at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2435)
    at com.itd.efiling.offline.common.player.ctrl.ThreeRedLightsIlluminate.start(ThreeRedLightsIlluminate.java:25)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
    ... 1 more
    Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 22 more
    Exception running application com.itd.efiling.offline.common.player.ctrl.ThreeRedLightsIlluminate

    ReplyDelete
  7. Tax credits are great tools for financial progress. WOTC tax credits

    ReplyDelete
  8. Aymus Digital provides result-driven SEO Services in Pakistan, optimizing your website to rank higher on Google, attract organic traffic, and boost your online visibility. SEO Services In Pakistan

    ReplyDelete