Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

number format exception

 
Sourav Satyajit Mishra
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.....
 
Sourav Satyajit Mishra
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic