Tuesday, September 10, 2019

Cannot Find The Tag Library Descriptor For “http://java.sun.com/jsp/jstl/core”

Error:

Cannot Find The Tag Library Descriptor For “http://java.sun.com/jsp/jstl/core”

Dear Folks,

you might face above error for two reasons.

1) Your Servlet Container does not support JSTL.

2) You did not configure configure your Servlet Container.

 

To resolve the issue either download JSTL jar and place it on desired location or the most easiest way is to download Apache TomEE server which supports JSTL and many other e.g., JMS, etc.

 

After installation, configure it in your IDE or make a package .war and deploy it on server and run your application.

 

I hope above post will help you in resolving your issue. If it helps then please do comment.

 

Thanks.

Monday, September 9, 2019

Spring Boot: Apache Cataline Could not load resource factory class

Error Message:
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans
SEVERE: Exception processing global JNDI Resources
javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory]



Answer:

While running Spring Boot Project, spring project was unable to start due to above error. After doing some research, I identified that this is due to corrupt installation of Apache Tomcat Server.

Steps to resolve :

1) Download Apache Tomcat Server.
2) Open Eclipse, add apache server again from "Servers" Tab.
3) Run Project.

Hopefully above post will resolve subjected issue. In case if this helps you then please do comment to increase validity of post.

Thanks.


Thursday, August 29, 2019

CREATING SHORTCUT ICON TO DISPLAY IN LINUX MENU

Dear Folks,

Today, I am going to describe how to create / bring icon in Linux Menu so instead of going to folder and running .sh (shell extension) file from there, you can simply call it from menu. Please follow below steps.

1) You must be on your home folder path. Mine is
/home/zeeshan/

2) Browse .local/share/applications.  (Please note you might not view .local folder until you set "Show All Hidden Files and Folders")

3) Create WebStorm.desktop file and inside file write below content (Please set path in Icon and Exec according to your installation)

[Desktop Entry]
Type=Application
Name=WebStorm
Comment=WebStorm Development
Icon=/home/zeeshan/Softwares/WebStorm-192.6262.59/bin/webstorm.svg
Exec=/home/zeeshan/Softwares/WebStorm-192.6262.59/bin/webstorm.sh
Terminal=false
Categories=Development;IDE;
StartupWMClass=WebStorm


4) Save WebStorm.desktop file and now you can simply browse it from your menu.

Please post your comments below in case if above post help you.

Thanks.




Saturday, September 22, 2018

Compile and Run Java Program From Sublime Text 3


Dear All,

Today, I am going to write about how you can compile and run your Java program from Sublime Text.

First, you need to set a Build System. To achieve it, follow below steps:
1) Goto Tools -> Build System  -> New Build System
2) A editor tab will open. Remove all predefined code and paste below code

{
    "shell_cmd": "javac $file_name && java $file_base_name",
    "working_dir": "${project_path:${folder}}",
    "selector": "source.java"
}

After pasting above code, save file with Java.sublime-build under sublime-text-3/Packages/User/.

Now, Goto Tools -> Build System and select Java (you will see new build after following above steps).

Now press Ctrl+B and enjoy the result. Please note that Ctrl+B is used to Build your program.

Enjoy coding with this lightweight software. Do comment if above post helps you.

Thanks.

Sunday, July 15, 2018

Difference Between Apache Common Logging and Log4J

Dear Folks,

Log4j is a logging framework, i.e. it provides the code to log messages while Commons-logging is an abstraction layer for logging frameworks, it doesn't log anything itself. For example if I write code using commons logging and deploy it on JBoss, the logging is done by log4j, but if I deploy it on WebSphere logging is done by WebSphere's own logging implementation. If I run the same code as a stand alone application it Java's own logging that is used.

Hope this help you in understanding the difference between two. 

Sunday, June 4, 2017

WRITE PERMISSION ON SAMBA DRIVE ON LINUX

Dear Readers,

You can find various post on installing SAMBA on Linux. In my post, I am sharing you the method through which you can allow windows users to write / copy data on your LINUX based drive.

Please remember that before that you have to create a user whom you can provide rights to copy data on Linux machine. User name should be common on Windows and LINUX.

Now, time to start real thing. Open your smb.config file (located in /etc/samba/ on LINUX drive)

[windowsSharing]
   comment = File sharing path for windows
   path = /home/user/abc/  [path which you want to share]
   writeable = yes
   browseable = yes
   public = yes
   guest ok = yes
   force user = your_user_name

Now save your file and run following command

sudo service smbd restart

After restart of service, you will be able to share your files between linux and windows.

If this post helps you then please leave a comment to increase its reliability. Also comments are welcomed to improve this post (if any).





Tuesday, July 26, 2016

Could not get lock /var/lib/dpkg/lock

Today, I tried to install Git on my Ubuntu machine and during that I received following exception related to locking. In my this post, I have shared all commands and error messages with you.


Command
sudo apt-get install git

Error Message
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?



After searching above message, I found a command

sudo lsof /var/lib/dpkg/lock

after pressing ENTER, it might asked you for password. Type the password and in result you might get following output

lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
unattende        1468 root    5uW  REG    8,1        0 154817 /var/lib/dpkg/lock

Type following command to kill the session with provided PID by your system. In my case PID # was 1468. I use following command to kill this process id.

sudo kill 1468

After execution of above statement, now I was able to download GIT by using following command again which I executed in start.

sudo apt-get install git

In case if this article helps you then please leave a comment to increase its credibility.

Thanks.

Docker Tutorial

 I have listed all the necessary commands of Docker below. In case if any is missing or if any improvement required, please share in comment...