Salesforce + Git + Eclipse + EGIT = Better and Distributed Source Control

During my J2EE and .Net days, I was much dependent on the subversion repository. I had never thought my code without SVN. When I moved to Salesforce few years back, the first thing I missed is code repository to have better source code control. As svn creates either “.svn” or “_svn” folder, it was not supported by the force.com IDE and I struggled much to get it work out. Salesforce saves only real time information. So it is very difficult to know what was changed in past related to any issue as well as complete code backup.

Era of Git

Git has emerged as the most powerful source code repository and widely accepted by the developer communities. If I will talk about Git this article is going to be out of discussion scope.

Architecture of GIT
Architecture of GIT

Above figure describes Architect of Git. The one thing to notice in above figure is that Git has local repository as well as remote repository which make it better and more flexible than any other code repository tool.

Remote and Local Repository in GIT
Remote and Local Repository in GIT

As you can see in above diagram also, user can work on completely different branch which is stored on his local repository and when he thinks that he is ready to push the code on Git, just commit the changes on remote repository.

Continue reading “Salesforce + Git + Eclipse + EGIT = Better and Distributed Source Control”

Complete Salesforce Deployment Guide using Ant Migration Tool

Step by Step tutorial of Salesforce Migration using ANT tool with Proxy settings and retrieving content from Salesforce Organization. Also fix some common errors like java.lang.OutOfMemoryError or unable to find tools.jar

Following are the many tools available for Salesforce deployment like

  1. Change sets (From Salesforce site)
  2. Eclipse (Using “Deploy to force.com server” option in Eclipse)
  3. ANT (Java based tool)

We are going to discuss the ANT based migration, step by step:

Prerequisite:
JDK 1.5 or above

Step 1:
Download ANT distribution from – “http://ant.apache.org/bindownload.cgi

Step 2:
Set Environment variable “ANT_HOME“. The path should be of parent folder of “bin”. Also add the “bin” folder to your path.

Step 3:
Check whether ANT is installed or not properly by running command “ant -version“. It might be possible that you receive message something like unable to find tools.jar. You can copy this jar from “JDK_HOME/lib/tools.jar” to “JRE/lib” folder.

Continue reading “Complete Salesforce Deployment Guide using Ant Migration Tool”

Eclipse Error – Unable to refresh from server in Force.com

Solve the force.com error of the eclipse while getting the refresh from server. “com.salesforce.ide.api.metadata.types.Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor”

This morning when i started the eclipse and tried to refresh the contents from salesforce server, i got an error something like “com.salesforce. ide.api.metadata.types. Metadata$JaxbAccessorF_fullName cannot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor“.
I started searching for the solution and found below solution on salesforce community.
Note – I was using Windows 7 operating system.

Solution 1:

  • Use JRE v6 update 27 – 64bit (downgraded from JRE 7)
  • Use JDK v6 update 27 – 64 bit (downgraded from JDK 7)
  • Re-installed Eclipse SDK 3.6.2

Continue reading “Eclipse Error – Unable to refresh from server in Force.com”

Uninstall plugin from Eclipse

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags with Leave a comment on Uninstall plugin from Eclipse

Tutorial of how to Uninstall plugin from Eclipse with screen shots of the steps

Follow below steps to uninstall the plugin from Eclipse:

Open Eclipse and go to Help | About Eclipse

Below window will be opened.

Eclipse Installation details
Eclipse Installation details

Continue reading “Uninstall plugin from Eclipse”

Step By Step Hibernate Tutorial Using eclipse WTP

Author posted by Jitendra on Posted on under category Categories Hibernate, My SQL and tagged as Tags , with 31 Comments on Step By Step Hibernate Tutorial Using eclipse WTP

Step By Step Hibernate (ORM Tool) Tutorial Using eclipse WTP

Hibernate is the ORM tool widely used in java community to persist the java object using Object Relational Mapping (ORM) concept. ORM reduces number of lines to interact with database with optimized query language which is Hibernate Query language (HQL).

In this example, we will create a simple login application using hibernate tool of eclipse. We will use eclipse WTP (Web Tools Platform), to install “Hibernate Tools”. Follow below steps :

In Eclipse IDE, menu bar, select “Help” >> “Install New Software …” put the Eclipse update site URL “http://download.jboss.org/jbosstools/updates/stable/helios”

Eclipse Install New Software - Hibernate
Eclipse Install New Software - Hibernate

Continue reading “Step By Step Hibernate Tutorial Using eclipse WTP”

How to start the tomcat in debug mode for debugging in eclipse

Author posted by Jitendra on Posted on under category Categories JAVA and tagged as Tags , with 2 Comments on How to start the tomcat in debug mode for debugging in eclipse

This is the tutorial on How to start the tomcat in debug mode for debugging in eclipse

1. Open the startup script in (your_tomcat_home) {Location is : %CATALINA_HOME%binstartup.bat }
2. Add the following lines at the first blank line in the file ( around line 8 )
Windows :

set JPDA_ADDRESS=8000
set JPDA_TRANSPORT=dt_socket

Linux:

export JPDA_ADDRESS=8000
export JPDA_TRANSPORT=dt_socket

3. Change the execute line at the end to include “jpda”
Window:

call “%EXECUTABLE%” jpda start %CMD_LINE_ARGS%

Linux:

exec “$PRGDIR”/”$EXECUTABLE” jpda start “$@”

Creating Business Service and Service Program in ORMB / CC&B / Oracle Utilities

Creating Business Service and Service Programin ORMB / CC&B / Oracle Utilities

In Previous article, we have seen that how to create the Data Area and benefits of using Data Area. This article will focus on creating the Business Service and Service Program in CC&B.

First we have to create the Business Service in application then we have to code it in JAVA and deploy the updated “cm.jar“ file on server.

Go to “Admin | S | Service Program +“ and enter the Service name, Description and select the “Java Based Service” as Service Type.  In this example my service name is “PERSER“.

Now go to “Admin | B | Business Service +“ and enter the Business Service name and select the previously create service “PERSER“ for Service Name using look up. In this case the Business Service Name is “CM_PERSER“.
Now go to the “Schema” and add following code and click on Save. Continue reading “Creating Business Service and Service Program in ORMB / CC&B / Oracle Utilities”

Resolve Missing Builder error for eclipse in CC&B (ORMB)

Author posted by Jitendra on Posted on under category Categories JAVA, Oracle and tagged as Tags , with 2 Comments on Resolve Missing Builder error for eclipse in CC&B (ORMB)

How to Resolve Missing Builder error for eclipse in CC&B (ORMB)

CC&B (Customer Care And Billing System) or ORMB (Oracle Revenue Management And Billing System) (Previously named as “SPL” before Oracle acquires it) are the same application with use in different domain.  This application is used to maintain all the billing, collection and payment related operations of the underlying company.  I am going to write few articles on this product from today which i feel can be helpful to others.

One problem faced by most of the starters of CC&B (ORMB) in eclipse is “Missing Builder (com.splwg.tools.dbConnection)” error as shown in below image.

Missing Builder error in CC&B (ORMB)
Missing Builder error in CC&B (ORMB)

Because of this error, eclipse does not compile any java files and therefore “cm.jar deployment” doesn’t work. Continue reading “Resolve Missing Builder error for eclipse in CC&B (ORMB)”

Eclipse – How to upgrade from Galileo (3.5) to Helios (3.6)

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags with 1 Comment on Eclipse – How to upgrade from Galileo (3.5) to Helios (3.6)

Eclipse – How to upgrade from Galileo (3.5) to Helios (3.6)

I needed to work on Tomcat 7 and at that time i was using Eclipse Galileo. So i needed to upgrade Eclipse Galileo to Helios any how to get work done.

So below is the steps which i used to upgrade my eclipse.

To upgrade installed software, do the following:

  1. Help > Check for Updates.
  2. If updates are found, proceed through the install wizard and click Finish at the end.
  3. If you are upgrading the platform itself, when you are prompted to restart it is strongly recommended to do so. A restart many not be required when updating other features, but always select to restart if you are unsure.

Note, to upgrade from Galileo(3.5) to Helios (3.6), you first need to add the Helios software repository as follows:

  1. Window > Preferences > Install/Update > Available Software Sites.
  2. Click “Add”.
  3. Enter
  4. http://download.eclipse.org/releases/helios
  5. Click “Ok”.

Change default Keyboard shortcuts in eclipse

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags with Leave a comment on Change default Keyboard shortcuts in eclipse

How to Change default Keyboard shortcuts in eclipse

Go to Windows | Preferences | General | Keys

Eclipse Change Key Combination
Eclipse Change Key Combination

Select the functionality and in text box shown by red color, select new key combination needs to be set.