shashanka jena

Greenhorn
+ Follow
since Aug 23, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by shashanka jena

Thanks Agador,
After following your suggestion my ealier error has gone but now another error is coming in different column and the error is as below :

Record 1: Rejected - Error on table REPO, column MATURITY_DATE.
ORA-01858: a non-numeric character was found where a numeric was expected

I double checked the data type of maturity_date which is a date and also I checked in my csv file all data for maturity_date is date type.

Could you please suggest me.

Thanks,
Shashanka
15 years ago
Hi,
I am stuck up with the below mentioned error since from copule of days any help in this regard is really great.
I am trying to load data to oracle database using Oracle sql loader.
I have to load data to two different tables using one control file, for first table all the datas are null and in the control file itself I am providing these data and primary key for this first table is loaded by calling a sequence. For this no problem, real problem starts when I am trying to load data to the second table by giving a csv file.
For second table for the first column itself it is not loading data from csv file because it is giving error as data size is more then max size in table. I have double checked the data size is less then the declared size also I am trimming the data in the control file.

More over when I am trying to load data for only second table using a control file by giving the same csv file it is working fine and successfully loading the data to the respective table.
Sample code of my control file :
OPTIONS(SKIP=1)
LOAD DATA
APPEND
INTO TABLE BATCH
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
(
BATCH_ID "BATCH_ID_SEQ.nextval",
BATCH_DATE "null",
BATCH_TYPE ,
------
------
-------
)
INTO TABLE REPO
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
(
REPO_ID "LI_MARGIN.CITI_REPO_ID_SEQ.nextval",
BATCH_ID "LI_MARGIN.MARGIN_BATCH_ID_SEQ.currval"
CLIENT "TRIM(:CLIENT_MNEMONIC)",
ACCOUNT_NO "TO_NUMBER(:ACCOUNT_NO)",
TRANS_TYPE "TRIM(:TRANS_TYPE)",
------
------
-------

)

For table repo I am providing the csv file from cmd
My SQL Loader command : CONTROL=C:\Repo.ctl DATA=C:\repo.csv log=C:\log.txt userid=***/*****

Erro I am getting : For Repo table for CLIENT column it saying the actual value is more then the max size available.
Note : For CLIENT field the size in table is 8char where as data in csv is 7char , also I am trimming.

Thanks in Advance,
Shashanka

15 years ago
Hi,
Can we clone Singleton object, if not why ?
Actually I am trying to clone Singleton object it is showing error, even after implementing the Cloneable interface I am getting same error.

Can anybody explain me the proper reason.

Thanks in Advance
Shashanka
16 years ago
Earlier I was using struts 1.1 and in that ActionError was working fine but currently I am using struts 1.2 and with this ActionError is depricated so I am trying to use ActionMessages in my form bean by overriding validate() and getting an error as follows :
The method saveMessages(HttpServletRequest, ActionMessages) is undefined for the type LookupForm
LookupForm is my form bean class name
My code of validate() inside form bena class i.e LookupForm

public ActionMessages validate(HttpServletRequest request) {

ActionMessages messages = new ActionMessages();

if (getName() == null || getName().trim().length() == 0)
{
messages.add("Name", new ActionMessage("error.name.required"));
saveMessages(request,messages);
}
else if (getAge() == null || getAge().trim().length() == 0)
{
messages.add("Age", new ActionMessage("error.age.required"));
}
if(messages.size() > 0){
saveMessages(request,messages);
System.out.println("inside from bean and no. of error messages added is= "+ messages.size());
}
return messages;
}
16 years ago
JSF
Hi Herman,
Thanks for your suggestion.I have already implemented your suggestion and got my output.

Regards,
Sahshanka
17 years ago
Hi Herman ,
Whatever you suggested me to do I have already done that .By doing as follows

<% if (session.getAttribute("email") != null){ %>
<tr>
<td><p align="left"><font class="text">E-mail ID:<%=session.getAttribute("email") %></font></td>
</tr>
<% } %>

The E-Mail ID: field is not getting displayed since we are checking "email" field is not eqaul to null but for the first time loading of the page "email" field is null so it will not execute the above code and E-mail ID : field will not be displyed.
17 years ago
Hi,
I have a field Employee Id in the jsp page at the top and so many related field to this employee as Employee name,emp salary etc at the bottom of the page.
Once I enter a valid employee id and submit the page the related datas from of the employee are fetched from database and displayed in the same page.I am able to display the data in the same page but for the first time when the page is loaded that is before submiting employee id the other fields are displying null.
I want to remove those null.
Below I am providing some partial code of my jsp page:

<html:form action="/inquire" method="post" onsubmit="return validateInquireForm(this);">

<html:errors/>

<table border="0" cellpadding="3" cellspacing="3" width="100%">
<tbody>
<tr>
<td><p align="right"><font class="text">Employee No.</font></td>
<td>
<html:text property="emp_number"></html:text> 
<html:submit value="Fetch"></html:submit>
</td>
</tr>
</tbody>
</table>
<html:javascript formName="InquireForm" />
</html:form>
<%--String email=(String) session.getAttribute("email"); --%>


<table border="0" cellpadding="3" cellspacing="3" width="100%">
<tbody>


<tr>
<td><p align="left"><font class="text">E-mail ID:<%=session.getAttribute("email") %></font></td>
</tr>

<tr>
<td><p align="left"><font class="text">Employee Name:<%=session.getAttribute("empname") %></font></td>

</tr>
17 years ago
I have a jsp page in which so many fields are there.I want to write the values entered in the field of jsp page to an Excel sheet.
My code is saving the excel sheet in my machine as per the location choosed by me.
I got the idea of using JExcel.jar.But I don't know the APIs of JExcel.
We are puting the database connectivity code in a file named OracleDs(jndi name) and this file is read through lookup() method of IntialContext class.This OracleDs file is inside deploy folder of JBoss server.
My question is if I will write the database connectivity code in strut-config.xml file's <data-source> tag then whether it is required to remove the OracleDs file from deploy folder of the server.
17 years ago
I have two button in a jsp page lets say "Add" and "Subtract" for add and subtraction operation respectively.For both the button can I wrirte a single servlet for doing the two differnet operations ?
18 years ago