aspose file tools*
The moose likes Distributed Java and the fly likes number format exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "number format exception" Watch "number format exception" New topic
Author

number format exception

Sourav Satyajit Mishra
Greenhorn

Joined: May 08, 2008
Posts: 10
Hi All,

I was using RMI in my web appplication
I use an intermediate jsp file which takes the value from the Frontend then takes and writes into a Properties file
I then execute the main .java file from a .bat(batch file) to get the following error :

D:\Atarashii\Java\Apps\v110\src\java>java com.ab.abcfa.abtanka.bikedeucheservice.testcases.xcess0740Test 1>D:\Atarashii\Java\Apps\v110\Results\740_.txt java.lang.NumberFormatException: null at java.lang.Inteabr.parseInt(Unknown Source)
at java.lang.Short.parseShort(Unknown Source)
at java.lang.Short.parseShort(Unknown Source)
at com.ab.abcfa.abtanka.xsdeucheservice.connector.implementation.xcess0740InteractionDelegate.assignFields(xcess0740InteractionDelegate.java:232)
at com.ab.abcfa.abtanka.xsdeucheservice.connector.implementation.xcessInteractionImplementation.assignFields(xcessInteractionImplementation.java:255)
at com.ab.abcfa.abtanka.bikedeucheservice.testcases.xcess0740Test.execute(xcess0740Test.java:295)
at com.ab.abcfa.abtanka.bikedeucheservice.testcases.xcess0740Test.testabtProductdeuches(xcess0740Test.java:190)
at com.ab.abcfa.abtanka.bikedeucheservice.testcases.xcess0740Test.main(xcess0740Test.java:105)
com.ab.abcfa.abtanka.xsdeucheservice.connector.api.clientapi.xcessConnectorException: Error when executing interaction for abtProductdeuches!
at com.ab.abcfa.abtanka.xsdeucheservice.connector.implementation.xcess0740InteractionDelegate.execute(xcess0740InteractionDelegate.java:134)
at com.ab.abcfa.abtanka.xsdeucheservice.connector.implementation.xcessInteractionImplementation.execute(xcessInteractionImplementation.java:169)
at com.ab.abcfa.abtanka.bikedeucheservice.testcases.xcess0740Test.execute(xcess0740Test.java:297)
at com.ab.abcfa.abtanka.bikedeucheservice.testcases.xcess0740Test.testabtProductdeuches(xcess0740Test.java:190)
at com.ab.abcfa.abtanka.bikedeucheservice.testcases.xcess0740Test.main(xcess0740Test.java:105)
com.ab.abcfa.abtanka.xsdeucheservice.connector.api.clientapi.xcessConnectorException: Error encountered while processing xcess0740
at com.ab.abcfa.abtanka.bikedeucheservice.testcases.xcess0740Test.execute(xcess0740Test.java:301)
at com.ab.abcfa.abtanka.bikedeucheservice.testcases.xcess0740Test.testabtProductdeuches(xcess0740Test.java:190)
at com.ab.abcfa.abtanka.bikedeucheservice.testcases.xcess0740Test.main(xcess0740Test.java:105)

D:\Atarashii\Java\Apps\v110\src\java>pause
Press any key to continue . . .

--------INTERMEDIATE JSP ------------------------------------------------try {


---------------------------------------------------------------------------------

---------------------.JAVA file -------------------------------------------------



I dont know why i am getting it.....


----------------------------------<br />You may only be a person in this world, but for someone, you�re the world.
Sourav Satyajit Mishra
Greenhorn

Joined: May 08, 2008
Posts: 10
I did go thru few of the previous Questions on NUMBERFORMATEXCEPTION, but still confused as to how to proceed forward...
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
How to proceed?

I would say the first step would be capturing the text transmitted so you can see what you are really dealing with.

It appears you are not using best practice for Process - read the JavaDocs.

Bill


Sourav Satyajit Mishra
Greenhorn

Joined: May 08, 2008
Posts: 10
Thanks Bill for the Post...

I am transmiting the text from a Jsp Frontend,to the Intermediate Jsp file writing it to a .txt file.
From the .txt file which I pass it to a .java file which processes the txt file data to display me the required information.
But because of some reason I am getting the NumberformatException, which i am unable to figure out.

I am using a Method
final public void testGetJinseDeuche(String param) {
//business logic
}

which is gettin and setting the properties from the txt file..then executing the Execute method which goes of the interaction & Connection with the remote..

Properties props740 =new Properties();
props740.load(fis740);
String acctIden = null;
String channelCode = (String)props740.getProperty("ChannelCode");
serverIp = (String)props740.getProperty("Server");
port = (String)props740.getProperty("Port");

String consumerTypeCode= (String)props740.getProperty("ConsumerTypeCode");
.......
.......
........
props740.setProperty("AccountIdentifier", acctIden); // Staging
props740.setProperty("ConsumerTypeCode", consumerTypeCode);
props740.setProperty("ChannelCode",channelCode);
.......
.......
........

output= this.execute(props740);


I think I am unable to capture the .txt file, but i have an exception handler for that, in case it is not able to locate the file
 
Don't get me started about those stupid light bulbs.
 
subject: number format exception