License error when Invoked from Java Code

Hi all,

I am getting a License error when Iam trying to call a perl script which builds TestRT (Test Real Time) application. When Iam calling the same script from command prompt it is building successfully.
Iam using Solaris 9 Operating system.

I have checked all the environment variables and they are same in both the cases and licence paths are also correct.

Has anyone faced this kind of problem, Please help me.
This is very urgent. Help me where can I find solution to this..

The error is given below.

Rational(R) Test RealTime - License manager: Cannot read data from license server
The license server process appears to be running, but is not
responding. If this persists, notify the System Administrator.
(The lmgrd and vendor daemon processes should be terminated and restarted.)
Feature: TestRealTime
Hostname: cadewsN87
License path: 1700@godavari:32891@ss30.uab.ericsson.se:1700@godavari:
27000@cadewsN87:/dev/null:
FLEXlm error: -16,287. System Error: 22 "Invalid argument"
For further information, refer to the FLEXlm End User Manual,
available at "www.globetrotter.com".