Author Archives: Petr

[Salesforce.com] Regex too complicated

Working with the regular expressions in Salesforce.com is same as in the Java. But the regex have restrictions to its complexity. For example, this regex throws compilation error:

If you have to use multiple times the symbol * in your regex, the Salesforce.com evaluates your pattern as too complicated.

Workaround

The workaround is to use for example {0,9999} instead of *. Here is retyped first pattern, but without exception :)

Note: You can replace all asterisk. The value 9999 can be longer, for example 99999999 and everything will work in same way.

[Salesforce.com] Upsert on the User object

If you are trying to do the UPSERT operation on the User object, for example:

you will get error:

Workaround

The workaround for this case is use the Database object:

…and now you can happily use the upsert operation on the User object :)

Docker can’t connect to boot2docker (OSX)

When you are trying to connect docker to boot2docker on OSX, you probably got this error message:

Solution to fix this error:

Go to the Virtual Box -> Preferences -> Network -> Host-only networks

  • Delete the host only networks
  • and create one new.

Then open the command line run this commands:

Warning: The boot2docker command delete all your docker images!

Now, the docker could be works!

IBM Cognos: XQE-JDB-0004 A problem occurred finding the driver class “com.ibm.db2.jcc.DB2Driver”.

When you are trying to test the connection to the DB2 database from Cognos configuration and you are getting this error message:

XQE-JDB-0004 A problem occurred finding the driver class “com.ibm.db2.jcc.DB2Driver”.

This error cause because the Cognos cannot find the DB2 drivers. Solution of this problem is simple. You have to copy files db2jcc.jar and db2jcc4.jar to <Install_Cognos>\v5dataserver\lib and <Install_Cognos>\webapps\p2pd\WEB-INF\lib.

After you copy these files you need to restart the Cognos server.

DataStage: 64bit version of DataStage with 64bit Oracle Database on Windows

If you are trying to connect DataStage 64bit on Windows to Oracle Database 64bit you probably get error message like this:

I assume that you have done all prerequisites like set up the environment variables etc. More about prerequisites for Oracle connector in DataStage V11.3 you can find here http://ibm.co/1mu4WGo

This error message you are getting because the DataStage Engine (even in version 11.3) is still 32bit application on Windows. That means, you have to install the 32bit Oracle client and connect to Oracle DB with it. Oracle client have to be installed on the same host as DataStage Engine.

Datastage: APT_Communicator::connectTo: connect() failed due to Unix error = 10,061

If you are getting the error message while running the job:

You have to follow these steps to fix the issue:

  1. You must ensure that you have in hosts file these two entries
  2. Next step is try if this commands working fine
  3. Set the parameter $APT_USE_IPV4 in DataStage project to True (1)
    1. Open DataStage InfoSphere Administrator client
    2. Select the project and on the properties button
    3. On the general tab click on the “Environment” button
    4. The parameter $APT_USE_IPV4 is located in the “Parallel” category
    5. Change the value to True
    6. Try run the job again!

Source: http://www-01.ibm.com/support/docview.wss?uid=swg21622965

How to convert hexadecimal number to IP address in C++

When you need to convert hexadecimal number in C++ like 0DF52286 to standard IP address format like 13.245.34.134 you can use this code:

The method takes one argument which is the IP address in hexadecimal format.

Datastage error: Field “NAME” has keyprep export buffer overrun error

While running a job, you getting following error:

This error happens during processing data in Lookup stage and  the solution of this error is very simple. Check the key attributes in the lookup stage and ensure that all attributes have same type and length (check the extended parameter too). Continue reading