Smriti Anchu

Ranch Hand
+ Follow
since Dec 21, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Smriti Anchu

Hi,

I am getting the following error
"log4j:ERROR setFile(null,true) call failed." When i try to run the application.

The below code is the sample class file which is used for put properties into the the Properties file.



In the action class, I am calling the above class to write the logger


When I try to run the application, it is giving me the following error when trying to write it to the log file

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: "Mail.log" (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:165)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:349)
at com.test.util.LogHooks.initLogger(LogHooks.java:141)
at com.test.util.LogHooks.writeOutputLog(LogHooks.java:155)
at com.test.action.MailAction.executeProcess(MailAction.java:103)
at com.tk.startup.EmailStartUp.main(EmailStartUp.java:45)

Anybody could you please tell me as to how to avoid this error file when trying to run the applicaiton

thanks in advance
Smriti
17 years ago
Hi,

I am getting the following error
"log4j:ERROR setFile(null,true) call failed." When i try to run the application.

The below code is the sample class file which is used for put properties into the the Properties file.



In the action class, I am calling the above class to write the logger


When I try to run the application, it is giving me the following error when trying to write it to the log file

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: "Mail.log" (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:165)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:349)
at com.test.util.LogHooks.initLogger(LogHooks.java:141)
at com.test.util.LogHooks.writeOutputLog(LogHooks.java:155)
at com.test.action.MailAction.executeProcess(MailAction.java:103)
at com.tk.startup.EmailStartUp.main(EmailStartUp.java:45)

Anybody could you please tell me as to how to avoid this error file when trying to run the applicaiton

thanks in advance
Smriti
17 years ago
Hi ,

I am having a template in .doc format. In my application I want to read this .doc file and insert the text to .txt file.. But when I am doing this, I find some special ASCII characters are also inserted into the text file.. I dont want these special characters but only the the text (words) present in the word file



Please help me in this regard

thanks
Smriti
17 years ago
Hi,

I am also facing the same problem.. DId you find the solution to your problem.. If so, please tell me what you did

regards
Smriti
Hi All,

The problem with mine is that.. My page is Extremely horizontally wide with data divided into different columns.. I want to print the entire page with all the contents..
Right now, when it is given for print, only 1 sheet is getting printed with little values in it... and the rest of the data is not getting printed..

How do i apply page break so taht.. i can get the contents of the page fully in one sheet or different sheets

please help me

regards
Smriti
Hi all,

I have a JSP page with around 370 columns... WHile prining I want all the columns to be printed... either in one sheet or in different sheets.. COuld you please tell me how to do it??? I tried using <P style="page-break-before: always">.. I am just getting one page with some 10-15 columns in it....



PLEASE PLEASE PLEASE help me in this

thanks
SMriti
Hi all,

This is the code written in validation.xml file.. now its validating multiple email address...but here dot (.) is optional,if i make dot (.) compulsory by giving something like this (\.) , it wont take next email(eg. [email protected],[email protected])

<field property="email"
depends="mask">
<arg0 key="createperson.email" />
<var>
<var-name>mask</var-name>
<var-value>^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$</var-value>
</var>
</field>

Kindly help me in this

bye
smriti
17 years ago
Hi all,

I have a Swing application. In one of the UI, through a popup menu, we create a rectangle.. Like this we can create n number of rectangles on the UI.. There is an option to rotate the rectangle.

When i try to rotate the rectangle, the application should not allow one rectangle to overlap with other.

For eg. There is a rectangle whose coordinate points are {(1,1), {2,1), {1,2), (2,2)}.. When i rotate this rectangle its new coordinate points will be {(1,2), (2,3), (1,4), (-1,3)}. Suppose there is already a rectangle in this new position, then it should not allow me to move the present rectangle rather than stay at the same position.

As this very urgent... Need your help in this.. I need a sample code, which solves the above problem

Thanks in advance
Smriti
17 years ago
How do i validate? Can u give me some example.

regards
smriti
20 years ago
How do i use a NumberFormat

I tried in the following manner


But when i start typing digits into the textfield it is allowing me to enter more than 2 decimal digits.

regards s
smriti
20 years ago
No,
The code is written below:
20 years ago
i created a renderer but even then the background is not set to white in disabled mode.

i entered the foll. code in getListCellRenderer method

if (!list.isEnabled) {
setbackground(Color.WHITE)
}
20 years ago
i tried using formattedTextField..

but if i give the format to be of
JFormattedTextField tamount;
MaskFormatter amount;

try {
amount = new MaskFormatter("################.##");
}
catch(IOException e){}

tamount = new JFormattedTextField(amount);


When i use the above, the application wants me to enter all the 16 numbers. and 2 fraction digits. How do i avoid this?

regards
smriti
20 years ago
Hi,

Is there any other way other than using JFormattedTextField ?


smriti
20 years ago
Hi Dave,
I am using swing. I tried your code,

I dont want to limit the numbers to only 2 but i want the user not to enter more than 2 decimals.
For ex. the number can be 4311.22 and not 4311.222222. I want to limit the number of digits in the decimal place to 2.


thanks
smriti
20 years ago