Category: Java Frameworks
Hibernate | javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction
You may face following exception while trying to update data in a database table using hibernate: javax.persistence.OptimisticLockException : Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.abc.pkg.db.entities.customer.CustomerOfferScheduledTask#2504849] The reason is optimistic lock is applied on
Secure Apache Webserver
By default Apache web server does not come with all the securities enabled. We have to enable enhanced securities before making it live & accessible to the outside world. Remove Server Version Banner : Modify httpd.conf and add following directives
How To get list of all system defined properties in java
Just write below line in your main java program and it will show you all System defined properties. System.out.println(System.getProperties()); Some of the important properties that we can use generally: 1. user.dir will give project root directory location. 2. java.class.path will
Salesforce | Using Javascript to set value in parent Visualforce page field
Suppose you have a Visualforce page with a form and you have a link to open a popup. The page loaded in popup needs to set a value back into a textbox in the parent page. Here is how you
Eclipse – Java decompiler (jd-eclipse)
If you are working with eclipse IDE, it provides many plugins and one of them is java decompiler. This plugin will decompile all your class files to give you Java source code. JD-Eclipse is a plug-in for the Eclipse platform.
Zoho CRM | Reduce API call consumption
This is a simple idea to reduce API calls consumption when you pull data from Zoho CRM into an integrated piece of code (like server side code in PHP or Java that connects to Zoho CRM to retrieve records). In
Java | Shallow and Deep comparison of objects
There are two types of object comparison in java – shallow and deep. when you use ‘==’ operator, you are comparing the references for equality. It means you are comparing memory addresses of the objects. It is called shallow comparison.
Java | Unable to add data to list created with Collections.emptyList()
If you initialize a List in Java with method Collections.emptyList(), you will not be able to add data to this list. You will not get any exception if you try to add data to it, but data will not be
Maven | Using Properties defined in pom.xml in .properties file
We are working on a web application built in spring MVC. We have some resources inside src/main/resources folder (Maven Project). The resources are Property files with data in the form of key-value pairs. We are using maven property placeholder syntax