How to avoid hard coding the files path in the pom.xml of the projects
Generally people use <wsdl>${project.basedir}/src/main/resources/wsdl/WorldService.wsdl</wsdl> or use ${basedir} to mention the paths in pom.xml.
Though it all depends on the project requirements but it can be an issue while changing the project name or changing the path of the project or if the path is different at the system where you are porting your code or war files from your local after development. It will be better if you give the relative path in the pom.xml to free yourself to change the path at every code transfers. It can be done very easily by just mentioning the below entry -
<wsdlLocation>classpath:wsdl/WorldService.wsdl</wsdlLocation>
===============================================================================================
How to solve Brightness issue in Windows
Sometimes, it happens that we can’t control the brightness of the screen while working on Windows. Brightness can be stuck to lowest level or highest level.
So you can check below way before going for others –
Generally people use <wsdl>${project.basedir}/src/main/resources/wsdl/WorldService.wsdl</wsdl> or use ${basedir} to mention the paths in pom.xml.
Though it all depends on the project requirements but it can be an issue while changing the project name or changing the path of the project or if the path is different at the system where you are porting your code or war files from your local after development. It will be better if you give the relative path in the pom.xml to free yourself to change the path at every code transfers. It can be done very easily by just mentioning the below entry -
<wsdlLocation>classpath:wsdl/WorldService.wsdl</wsdlLocation>
===============================================================================================
How to solve Brightness issue in Windows
Sometimes, it happens that we can’t control the brightness of the screen while working on Windows. Brightness can be stuck to lowest level or highest level.
So you can check below way before going for others –
- Go to device manager
- Expand Display Adapters
- If you see below two kind of adapters then right click on ‘Microsoft Basic Display Adapter’ & disable it.
- If no-one is Intel HD Graphics like shown below then right click & update the driver -> Browse MyComputer -> Let me pick from the list -> Select Intel HD Graphics. Click Next.
- Restart the computer & now you must be able to adjust the brightness & may be you have to adjust the screen resolution.
===============================================================================================
One issue I was facing & googled for that issue.
Issue is that I am not able to select a word in Notepad++ by just double tapping on my laptop's touchpad.
And I am having Win10 with latest updates there.
For just workaround, left button of touchpad is working for this but not tapping.
Below is the URL for its details -
github.com/notepad-plus-plus/notepad-plus-plus/issues/3895
===============================================================================================
Issue : Not able to change the pendrive name while using it in windows?
Solution : Try below steps & you must be able to change the name accordingly but you still have to follow the naming
conventions.
Step1 : Try unplugging & plugging the pendrive after changing the name, if you can't see the changed name still
then try next step.
Step2 : Try to put the pendrive in other machine or USB port, then change the name. If still not working then follow
next step 3.
Step3 : Take the copy of your files on your machine or hard drive. Then format the pendrive by - Right click on
pendrive icon -> Format... Then also check once for any virus in your files. If no virus & format is done
properly, then try to change the name by - (1) Press F2 after selecting the pendrive icon & change the
name. (2) Right click on pendrive icon -> Rename
Hopefully, now your issue must be solved.
===============================================================================================
Issue : While using outlook, you see that it is not connected to Exchange & it is displaying 'Need Password'.
When you click on that message to provide the password, the pop-up window disappears & you don't get the chance
to provide the password & so your mailbox not getting updated.
Solution : There will be many suggestions on the internet but what I tried & worked for me is-
a) Open the MS Word & logout from your account from there.
b) Open Office365 & logout from that account also.
c) Now check in MS word if you can login, you will not be able to login as pop-up disappears there too.
d) Now the age old way, restart your machine & open outlook, now you must be asked for the credentials. Provide
those & your outlook must be connected. Even your MS Word will be auto logged-in.
===============================================================================================
Issue : Many times it happens when multiple components in the application are interacting with the MSSQL but connection
session is created by single entity & that session is being used by all the components of the application, then due to
delay in the DB commands by different components the active session is closed & application failes.
Solution : Check the logs to find the time difference between 2 DB calls & check in the SQL Server configuration manager, if
this time is set less than that you found in the logs. If yes then it is the reason & session is getting closed for being
inactive for that time. So you need to increase that time i.e. 'Keep Alive' field like shown in below image -
One issue I was facing & googled for that issue.
Issue is that I am not able to select a word in Notepad++ by just double tapping on my laptop's touchpad.
And I am having Win10 with latest updates there.
For just workaround, left button of touchpad is working for this but not tapping.
Below is the URL for its details -
github.com/notepad-plus-plus/notepad-plus-plus/issues/3895
===============================================================================================
Issue : Not able to change the pendrive name while using it in windows?
Solution : Try below steps & you must be able to change the name accordingly but you still have to follow the naming
conventions.
Step1 : Try unplugging & plugging the pendrive after changing the name, if you can't see the changed name still
then try next step.
Step2 : Try to put the pendrive in other machine or USB port, then change the name. If still not working then follow
next step 3.
Step3 : Take the copy of your files on your machine or hard drive. Then format the pendrive by - Right click on
pendrive icon -> Format... Then also check once for any virus in your files. If no virus & format is done
properly, then try to change the name by - (1) Press F2 after selecting the pendrive icon & change the
name. (2) Right click on pendrive icon -> Rename
Hopefully, now your issue must be solved.
===============================================================================================
Issue : While using outlook, you see that it is not connected to Exchange & it is displaying 'Need Password'.
When you click on that message to provide the password, the pop-up window disappears & you don't get the chance
to provide the password & so your mailbox not getting updated.
Solution : There will be many suggestions on the internet but what I tried & worked for me is-
a) Open the MS Word & logout from your account from there.
b) Open Office365 & logout from that account also.
c) Now check in MS word if you can login, you will not be able to login as pop-up disappears there too.
d) Now the age old way, restart your machine & open outlook, now you must be asked for the credentials. Provide
those & your outlook must be connected. Even your MS Word will be auto logged-in.
===============================================================================================
Issue : Many times it happens when multiple components in the application are interacting with the MSSQL but connection
session is created by single entity & that session is being used by all the components of the application, then due to
delay in the DB commands by different components the active session is closed & application failes.
Solution : Check the logs to find the time difference between 2 DB calls & check in the SQL Server configuration manager, if
this time is set less than that you found in the logs. If yes then it is the reason & session is getting closed for being
inactive for that time. So you need to increase that time i.e. 'Keep Alive' field like shown in below image -
===============================================================================================
If you want to have your own proxy server then install Squid in your machine. This simple installation worked for me so may work for you also.
I have not done any fancy settings, as I just needed some proxy through which all internet traffic goes to keep the records.
If you have installed on your local then you just need to change the following setting in squid.conf found at \etc\squid in the installation folder-
# And finally deny all other access to this proxy
http_access deny all
change above to - http_access allow all
This way you are giving access to everyone, who is using your proxy.
You can configure this proxy setting to allow only specific user, but that will be required if you are putting this constraint else this much should work.
By default below port settings will be available but you can change it if you are using this port for other application -
# Squid normally listens to port 3128
http_port 3128
Now apply this proxy setting to your browser. If you can access the internet then you are done & you can see this activity to access internet in the access.log file at -
\var\log\squid in the installation folder.
But this simple setting changes if you are using some other machine or VM which are using different DNS servers & squid doesn't know about that.
Then your proxy will not work as it will not be able to resolve the website addresses.
To resolve this issue you need to get the DNS server address & add that in the squid.conf file at -
dns_nameservers 8.8.8.8 208.67.222.222
Just add your DNS server ip at the end of above line.
You can get the DNS server being used on that machine or VM by executing below command in command prompt & copy the value of DNS Servers -
C:\Users\Administrator>ipconfig -all
If you want to have your own proxy server then install Squid in your machine. This simple installation worked for me so may work for you also.
I have not done any fancy settings, as I just needed some proxy through which all internet traffic goes to keep the records.
If you have installed on your local then you just need to change the following setting in squid.conf found at \etc\squid in the installation folder-
# And finally deny all other access to this proxy
http_access deny all
change above to - http_access allow all
This way you are giving access to everyone, who is using your proxy.
You can configure this proxy setting to allow only specific user, but that will be required if you are putting this constraint else this much should work.
By default below port settings will be available but you can change it if you are using this port for other application -
# Squid normally listens to port 3128
http_port 3128
Now apply this proxy setting to your browser. If you can access the internet then you are done & you can see this activity to access internet in the access.log file at -
\var\log\squid in the installation folder.
But this simple setting changes if you are using some other machine or VM which are using different DNS servers & squid doesn't know about that.
Then your proxy will not work as it will not be able to resolve the website addresses.
To resolve this issue you need to get the DNS server address & add that in the squid.conf file at -
dns_nameservers 8.8.8.8 208.67.222.222
Just add your DNS server ip at the end of above line.
You can get the DNS server being used on that machine or VM by executing below command in command prompt & copy the value of DNS Servers -
C:\Users\Administrator>ipconfig -all
===============================================================================================
How to count the number of lines or number of results of a command execution in command prompt?
You can use - find /c /v "" & like shown below for 2 examples -
How to count the number of lines or number of results of a command execution in command prompt?
You can use - find /c /v "" & like shown below for 2 examples -
======================================================================
While working on eclipse, one might have seen below error when executing the code on eclipse -
Error occurred during initialization of VM
java.lang.UnsatisfiedLinkError: java.io.FileInputStream.available0()I
at java.io.FileInputStream.available0(Native Method)
at java.io.FileInputStream.available(Unknown Source)
at sun.nio.cs.StreamDecoder.inReady(Unknown Source)
at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at sun.misc.MetaIndex.registerDirectory(Unknown Source)
at sun.misc.Launcher$ExtClassLoader$1.run(Unknown Source)
at sun.misc.Launcher$ExtClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.Launcher$ExtClassLoader.getExtClassLoader(Unknown Source)
at sun.misc.Launcher.<init>(Unknown Source)
at sun.misc.Launcher.<clinit>(Unknown Source)
at java.lang.ClassLoader.initSystemClassLoader(Unknown Source)
at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
While searching on the google, I got below solution -
In eclipse go to -
Window -> Preferences -> Installed JREs
And check the path of the JRE, which is causing this issue & being used in your project.
Select that JRE & press 'Edit' button & see if you are getting the JRE path like shown below -
Error occurred during initialization of VM
java.lang.UnsatisfiedLinkError: java.io.FileInputStream.available0()I
at java.io.FileInputStream.available0(Native Method)
at java.io.FileInputStream.available(Unknown Source)
at sun.nio.cs.StreamDecoder.inReady(Unknown Source)
at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at sun.misc.MetaIndex.registerDirectory(Unknown Source)
at sun.misc.Launcher$ExtClassLoader$1.run(Unknown Source)
at sun.misc.Launcher$ExtClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.Launcher$ExtClassLoader.getExtClassLoader(Unknown Source)
at sun.misc.Launcher.<init>(Unknown Source)
at sun.misc.Launcher.<clinit>(Unknown Source)
at java.lang.ClassLoader.initSystemClassLoader(Unknown Source)
at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
While searching on the google, I got below solution -
In eclipse go to -
Window -> Preferences -> Installed JREs
And check the path of the JRE, which is causing this issue & being used in your project.
Select that JRE & press 'Edit' button & see if you are getting the JRE path like shown below -
Now delete above JRE from eclipse & select the path of jdk for the new jvm in eclipse like shown below -
=================================================================================
Microsoft edge is a good one & in fact better than browsers from Microsoft. But you might have observed that it is reacting slow & it seems to hang in between or seems it is loosing the control & you are getting frustrated with its such behaviour.
Then try to restart the computer after below little change & observe if there is improvement for you -
Go to 'Turn Windows features on or off'. If don't know then either you can go to it via 'Control Panel', then click on this option on the left panel. Otherwise type 'windows features' after pressing windows button. There uncheck the 'Internet Explorer 11'.
Restart the system & you will see the improvement.
===============================================================================================
Suppose you are writing code where you need the details of the CPU of the machine where the code needs to be executed, so you can execute the below command via your code to get these details -
WMIC CPU Get /Format:List
And above command will give the details as shown in the below image -
Then try to restart the computer after below little change & observe if there is improvement for you -
Go to 'Turn Windows features on or off'. If don't know then either you can go to it via 'Control Panel', then click on this option on the left panel. Otherwise type 'windows features' after pressing windows button. There uncheck the 'Internet Explorer 11'.
Restart the system & you will see the improvement.
===============================================================================================
Suppose you are writing code where you need the details of the CPU of the machine where the code needs to be executed, so you can execute the below command via your code to get these details -
WMIC CPU Get /Format:List
And above command will give the details as shown in the below image -
===============================================================================================
While working on Scala on Eclipse, if you see error like -
com.typesafe.sslconfig is missing
To resolve, include the dependency of ssl-config-core_2.11-0.2.1 or any version of Scala you are using in your project.
Similarly if you see the error like -
Symbol 'term com.typesafe' is missing from the classpath. This symbol is required by 'value akka.actor.ActorSystem.config'. Make sure that term typesafe is in your classpath and check for conflicting dependencies with -Ylog-classpath. A full rebuild may help if 'ActorSystem.class' was compiled against an incompatible version of com.
To resolve, include the dependency of config-1.3.0 or any version applicable to your project.
===============================================================================================
Check the beautiful output of the contents on your drive or in your folder in Command Prompt using 'tree' command.
c:/>tree
While working on Scala on Eclipse, if you see error like -
com.typesafe.sslconfig is missing
To resolve, include the dependency of ssl-config-core_2.11-0.2.1 or any version of Scala you are using in your project.
Similarly if you see the error like -
Symbol 'term com.typesafe' is missing from the classpath. This symbol is required by 'value akka.actor.ActorSystem.config'. Make sure that term typesafe is in your classpath and check for conflicting dependencies with -Ylog-classpath. A full rebuild may help if 'ActorSystem.class' was compiled against an incompatible version of com.
To resolve, include the dependency of config-1.3.0 or any version applicable to your project.
===============================================================================================
Check the beautiful output of the contents on your drive or in your folder in Command Prompt using 'tree' command.
c:/>tree
===============================================================================================
Cannot start Eclipse & getting below kind of error-
To resolve this error, open eclipse.ini file & check :-
1) If you are using 32 bit or 64 bit eclipse
2) If your eclipse is using correct jdk version
3) If jdk exists in that path used in eclipse.ini file
4) try to use correct jdk path under -vm field in eclipse.ini
5) If using jdk9 or above, then check the format of below fields, if these are similar to below-
--add-modules=ALL-SYSTEM
--add-opens=java.base/java.lang=ALL-UNNAMED
For me, (5) worked by making it like given above.
Cannot start Eclipse & getting below kind of error-
To resolve this error, open eclipse.ini file & check :-
1) If you are using 32 bit or 64 bit eclipse
2) If your eclipse is using correct jdk version
3) If jdk exists in that path used in eclipse.ini file
4) try to use correct jdk path under -vm field in eclipse.ini
5) If using jdk9 or above, then check the format of below fields, if these are similar to below-
--add-modules=ALL-SYSTEM
--add-opens=java.base/java.lang=ALL-UNNAMED
For me, (5) worked by making it like given above.
maven configuration problem in sts
Solution at stackoverflow.com/questions/56275210/spring-tool-suite-maven-configuration-problem
I fixed by adding this property to my pom.xml
<properties> <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> </properties>
Solution at stackoverflow.com/questions/56275210/spring-tool-suite-maven-configuration-problem
I fixed by adding this property to my pom.xml
<properties> <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> </properties>
Deserialization vulnerability
Serialization and deserialization in Java | Snyk Blog
A First Look Into Java's New Serialization Filtering - DZone Security
One can find this & something like Log4j vulnerabilities over the internet & till date I wonder how these are being considered as the issue of language or some library.
For me it is like blaming the Government for not making the traffic law where one person needs to wear a helmet while driving 2 wheeler, in case one gets the head injury while driving his/her 2 wheeler.
Means I can understand the sense in this?
If one gets it, then please help me also....
Serialization and deserialization in Java | Snyk Blog
A First Look Into Java's New Serialization Filtering - DZone Security
One can find this & something like Log4j vulnerabilities over the internet & till date I wonder how these are being considered as the issue of language or some library.
For me it is like blaming the Government for not making the traffic law where one person needs to wear a helmet while driving 2 wheeler, in case one gets the head injury while driving his/her 2 wheeler.
Means I can understand the sense in this?
If one gets it, then please help me also....