Wednesday, March 28, 2012

Polyglot Platform

Platform as a service (PaaS) like Salesforce, Heroku has evolved a new range of programmers called as Polyglot programmers; these programmers normally know  multiple languages.I have seen the era where a programmer used to code and master in single language across this career. But now that era is about to vanish and with the success of cloud and platforms like Heroku which support multiple languages on a single platform making demand of Polyglot programmers. This is amazing change going over and I am lucky to witness and part of it.....


I will keep posting on this.....


Thursday, February 23, 2012

Salesforce.com - Common issues while creating APEX from WSDL file

I faced lots of issues while creating APEX classes Generated by wsdl2apex tool of Salesforce. I really want to take note on some nasty ones which keep our days/night busy.

If you ever had chance to work this yourself you must know that Salesforce does not support WSDL with <Import> tags; it means if your client or fellow external application team member provides you a WSDL which have couple of these tags then Salesforce will straightaway reject these saying <import> is not supported. Only solution to work this is manually copying the referenced schema to the parent wsdl file.

Let say you WSDL file looks something like this..this is an example of Referenced Schema

 <wsdl:types>
   <xsd:schema targetNamespace="test.namespace">
      <xsd:import schemaLocation="testlocation" namespace="test.namespace"/>
    </xsd:schema>

 </wsdl:types>

Here above highlighted import tags are not supported. The solution for the above issue is simple ; just copy paste the content of schema from location "testlocation" inside <wsdl:types>, thats it. Some times there are dozens of import statements in WSDL and it becomes deficult to manually do so and these manual changes are error prone. So I will recommend to search for some WSDL flatner tool for this. I have used this one couple of times  http://wsdlflattener.codeplex.com .

Also if your WSDL  contains reference to another WSDL like the one highlighted below; this is an example of Referenced WSDL


<wsdl:definitions name="testservice" targetNamespace="testns" >
    <wsdl:import namespace="testwsdl" location="testlocation"/>

       <wsdl:types>.........
         ........
         .......
       </wsdl:types>
         ...................
         ...................
</wsdl:definitions>


This situation requires pure manual intervention as this is not supported by any flattner tool as of now.In fact the correct statement would be I am not able to find such tool myself till now.Now the steps needed to resolve this are -

  • Use  http://wsdlflattener.codeplex.com tool and create the flattened file.This will copy the Schemas from referenced WSDL location and auto merge some of the <WSDL:definition> tags.
  • Go to the referenced WSDL file ; copy the following tags from the referenced location to the parent WSDL - <wsdl:message> and <wsdl:portType>
  • Copy the targetnamespace="xyzee" from referenced WSDL location to <WSDL:definition> of Parent.
  • You need to check if any other namespace is required to be copied from referenced WSDL to  Parent WSDL:definition; you can do this my comparing the namespaces used.


Hope these steps will resolve some of your issues if you comes up with problems.








Tuesday, February 1, 2011

System.InvalidOperationException: Modifying a LOB requires that the connection be transacted


Most recently we spent our nights debugging an issue which comes up only at client's environment and not else where.The issue was
"System.InvalidOperationException: Modifying a LOB requires that the connection be transacted."

At the end it came out to be a environmental issue.If this issues comes up than there can be two reasons for this

Monday, December 6, 2010

Oracle Import Data Pump common issues ORA-39002: invalid operation , ORA-39001: invalid argument value

Import Data pump and Export Data pump utilitities when used ommonly give following errors.

ORA-39002: invalid operation + ORA-39070: Unable to open the log file. + ORA-29283: invalid file operation + ORA-06512: at "SYS.UTL_FILE", line 475 + ORA-29283: invalid file operation


ORA-39001: invalid argument value + ORA-39000: bad dump file specification + ORA-31640: unable to open dump file "c:\export\GeniePid2_20100828.dmp" for read + ORA-27041: unable to open file

Both of these issue came up when following import dump command was fired
impdp sys/password@tns directory=my_dir dumpfile=GeniePid2_AJ1.dmp remap_schema=GeniePid2:Pid2AJ1 logfile=GeniePid2_AJ1.log TRANSFORM=oid:n

Solution
  1. Create a directory or folder by any name like c:\export in Server Machine (Not Client machine).Please make sure this path must reside where Oracle server is running ; nobody told this to me and I kept banging my head for 2 hours.
  2. Create a directory which is logical or use by oracle for doing export or import grant the users dba role or exp_full_database or imp_full_database as per your usage
          SQL>create directory my_dir as ‘c:\export\';

          SQL> grant read,write on directory my_dir to public;

Both these points resolved my issue.

Thursday, October 7, 2010

Move location of Oracle Data File (.dbf) file

I faced space crunch issue on one of the Oracle Server. Oracle is installed on c: and virtually no space is left in c drive however d: drive have dozens of space left so we decided a simple workaround to change the location of some of the oracle data file from c drive to d drive. Here are the simple steps to perform it.

Shut down the Oracle 
SQL> shutdown immediate;

Manually move the .dbf files
I copied SYSTEM01.DBF file from C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF to D:\Oradata\. However you can copy all the .dbf files depending upon your requirement and space in target directory.

Restart the Oracle 
SQL>startup mount;

Alter the database
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF' TO 'D:\ORADATA\SYSTEM01.DBF';

Check the database
Fire the following query to check weather the changes are correct.
SQL>Select name from v$datafile;
Verify your .dbf file ; it must have the changed path now.

Open the altered Database
SQL> alter database open;


This might not be the best approach to solve the space issue but can be handy as a quick workaround.

Tuesday, September 7, 2010

Stop Crying Your Heart.....

Hold up... hold on... don't be scared


You'll never change what's been and gone

May your smile... Shine on... Don't be scared

Your destiny may keep you warm.



Cos all of the stars are fading away

Just try not to worry you'll see them some day

Take what you need and be on your way

And stop crying your heart out



Get up... Come on... why you scared

You'll never change what been and gone

Sunday, September 5, 2010

Future lies in Cloud



Everybody is talking about cloud ; most of the developers have heard of the term cloud but not really know what lies beneath it. The same thing happened to me as well and I decided to devote my precious couple of hours from my weekend to dig this out.
In just couple of hours finding I am pretty sure that the cloud is the next big thing which will revolutionize the world.

 Next big thing, How ?

If we can dwell into history we can easily find out that when electricity first became available and started to become the necessity for industries, those industries started to
generate/produce their own elctricity, soon they started to realize that this was not the best of the solution. The actuall revolution came when electricity was provided as service from centrally located Power Grids and then only its real power was utilized.

The same story can be rewritten now; instead of having our own set of power full processing units inside so called server rooms which is a comon sight in most of our companies.These companies also constantly running in the rat race of
upgrading those microprocessors and RAM units.So instead of doing this individually let have this available as service , centrally located which can be available through high speed internet.So why restrict this concept for companies ; we can think this to happen in our personal space also. Instead of purchasing a high speed laptop / desktop , soon we will opt for a WI- FI enabled hand held device capable of connecting cloud and doing all sort of work that you laptop does. So no need to update those OS/antiviruses and downloading songs/videos as all these will be available on the space allocated to you on cloud.

.In a developing nation like India only 10-15% of the total population have access to high speed internet as of now but surly this got to change very fast.

This is the reason biggies like google, IBM ete investing so much in this.

Another popular term Ubiquitous Cloud

So when the term ubiquitous is prefixed with cloud computing another set of theories start to hold the ground, lets assume we are in world of Ubiquitous Cloud which means only one machine exists .So in the world of seamless computing environment request for data prcessing will flow from any part of world to that one machine so this flow of wave will drive the cost and performance of request to be served.These theories will come into picture

1) Follow the moon : This theory says that put your computational machines where it is most cost saving irrespective of the timezones.For instance California can have their Processing machines located in India ; thus when their day start all their proceesing request follow the moon and being served by sleepy India.

2) Follow the Sun : If your machines are located in the same time zone then you are following the sun.Like commercial and entertainment industry will always follows
the sun.

3) Follow the law: Differences in privacy laws, censorship, and national security fears may restrict places where data can flow freely


So what is this Grid Computing ?

..........................