Narasimha Swami

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

Recent posts by Narasimha Swami

Hi Guys,

I just wanted to know if there is any way in Struts 2 to print the property names which are bound by model driven interceptor. The issue is that I have couple of DTOs which are bound to model driven interceptor, but one of their properties has wrong value(which leads to an NumberFormatException while binding), I need to know which is that.

Thanks in advance
13 years ago
Ya I found it out as soon as I posted the question. I have the app deployed in the tomcat instance which starts lots of threads. May be these threads have to be turned down. For now I just placed an small code snippet in start/stop init script to notify me if tomcat has not properly shut down. So that I can bring it down using kill command. Although forcing kill on the process is a bad idea.
14 years ago
Hi Guys,

I have an issue with multiple tomcat instances' processes hanging over even on shutdown. I have fairly different configs for both the instances. But when I shutdown either of them sometimes one or other instance hangs over, which is not completely shutdown, they (hanged processes) just keep clogging up like this for a time. In some bad time they would have consumes all of the heap and I have no room to stop and start the instance. I have to issue manual kill for all the processes. I know there are several reasons for this happening can some one tell the few of them so that I can figure out and fix this bug. Although Tcat seems to be an fair option, but I am looking for a quick fix for now. Thank in advance.
14 years ago
Oh there i am a dunce I will try a aplhanumeric comparator
16 years ago
Well i learnt 2 comes after 1 not 19, 20 comes after 19 not 2 ...
16 years ago
Well for a test i manually altered the string array order and fed to the sorting algorithm here is the output that i got for SortedSet








>
16 years ago
Well as i said i even tried Arrays.sort also with String.CASE_INSENSITIVE_ORDER no luck. Well you are right i suppose because the development machine has FAT32 and the implementing machine has NTFS. Oh no whats next.
16 years ago
Hello All,
I am having a small piece of code in my project that retrieves file names from a directory applying filename filter. Well i am happening to get them fine in sorted order. But when i implement that program in other machine it happens that all the file names are in unsorted order. I applied several sorting techniques Collator, SortedSet etc. no luck</stro>
*Any could help me on this. By the way my development machine has JDK 1.6 while implementing system has only JRE1.5 which comes embedded with jBase. Consider i have nothing to do with jBase thats another team's project.








16 years ago
Whats up no JMF questions or what?
16 years ago

Hey guys,

I was able to capture video from a web cam and save it in a avi file. Then thought of working with RTP. Well everything worked fine except that the live stream captured from webcam is streamed to applet player in html page so cool locally, but doesn't stream to remote machines (on LAN) . Besides tricky part is that the player gets created and i see no exception messages in Java Console. By the way i have signed the jar file to ensure applet security. Any suggestions are appreciated.
16 years ago
Ok again i solved my problem by myself by altering overrided hashCode method's definition
Any way i solved this problem by altering the table customer_products as

Table:customer_products
-----------------------
cp_id int PRIMARY KEY
customer_id int
product_id int

Now a new problem arises when saving customer_products i use "Set" as
Customer cust=new Customer();
....set all properties of customer....
CustomerProducts cp=new CustomerProducts();
cp.setCustimerId(cust.getId());
cp.setProduct(1);
cust.getCustomerProducts().add(cp);
cp.setCustimerId(cust.getId());
cp.setProduct(2);
cust.getCustomerProducts().add(cp);

but when i get the size of Set as cust.getCustomerProducts().size(); i get size as 1 i.e. only last record is in Set.
Its no way related to JSP. I posted this in wrong category. Well i did read them. As i said it works fine actually, the problem is for a single customer there supposed to be many products related. But when fetched i get only one per customer. I don't know where am i going wrong.
Hi
I have three tables

Table:customer
--------------
customer_id String PRIMARY KEY
name String
address String

Table:products
--------------
product_id String PRIMARY KEY
name String

Table:customer_products
-----------------------
customer_id PRIMARY KEY
product_id PRIMARY KEY

Now in one-to-many mapping i fetch an Customer i must get
all records of customer_products related to customer_id of customer table.But I get only one record of customer_department per customer.Please help me in retrieving all the records of customer_products relating to customer_id of customer table. Here are POJOs and hbm files

customer.hbm.xml
<class class="pojo.Customer" table="customer">
<id column="customer_id" name="customerId" type="string">
<generator class="assigned"/>
</id>
.......
..........
...........
<set name="customerProducts" inverse="true">
<key column="customer_id"/>
<one-to-many class="pojo.CustomerProducts"/>
</set>
</class>

customerProducts.hbm.xml
<class class="pojo.CustomerProducts" table="customer">
<composite-id class="pojo.CustomerProductsPK" mapped="true">
<key-property column="customer_id" name="customerId"/>
<key-property column="product_id" name="productId"/>
<key-many-to-one name="customer" class="pojo.Customer"/>
</composite-id>
</class>

Customer.class an Serializable one

For ORM
Set customerProducts=new HashSet();
....... getter and setter of customerProducts.....

CustomerProducts.class an Serializable one

For ORM
Customer customer;
........ getter and setter of customer.....
Paste the code of your action class and jsp,unless confidential.
16 years ago
JSP