Seetharaman Venkat

Greenhorn
+ Follow
since Nov 07, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Seetharaman Venkat

Solved it,
Created a new folder beans, added my applicationContext.xml to it and added the bean folder to the classpath. I was able to call my services without a glitch.
13 years ago
I am currently trying to implement Spring MVC inorder to test a service.

I have a implemented a Controller, I inject an serviceClass, via one of the methods in the service class I create a bean factory and using which I call other services.
I deploy the project in Tomcat (applicationContext.xml is in WEB-INF). type in the url. The controller calls the service class, but when the service class is creating a factory the console throws this

802 INFO 42531[http-8080-exec-4] - org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from file [C:\WINDOWS\applicationContext.xml]

and throws a stack trace.

applicationContext.xml is in the WEB-INF folder, why is it looking into C:\WINDOWS\applicationContext.xml?
13 years ago
Any Ideas, suggestions?
Thanks you for the suggestion, James.

Now I am faced with another issue;
I am planning to utilize ehCache for secondary level caching,
and since I am using Hibernate+JPA and there will be entity classes with Transient variables, is there any way i could save thae transient variable information in the secondary level cache?

Please let me know.





Any thoughts or Ideas on this?
I am moving from EJB to spring, some legacy code has tedious SQLs (which call stored procedures), using JPA I have succesfully replace the SQL but was unable to substitute the procedure calls made by the legacy SQL, hence was exploring options on that. (I did not post the actual Tables names or package names , hence replaced it with dummy or generic names in my post.)
1) Could we use non-mapped variables in an Enity Object(which uses JPA annotations)
eg



2) Is there way we could use the Annotation mapping and Call to a Stored procedures in the same entity class?


3) Here is one more scenario
Table mapped to the below two
->-->@OneToOne TEST_TABLE1 on TEST_TABLE1_ID->>@OneToOne TEST_TABLE3 on TEST_TABLE3_ID
->--->@OneToOne TEST_TABLE2 on TEST_TABLE2_ID->>@OneToOne TEST_TABLE4 on TEST_TABLE4_ID

Now there is a condition: TEST_TABLE3, TEST_TABLE4 hava a column VALUE. And I want all values were TEST_TABLE3.VALUE==TEST_TABLE4.VALUE.
How do I do that? IS there a way to efficiently perform and implement the above three scenarios?

Please let me know, I will appreciate your help.



I am using Spring+Hibernate+JPA in order to implement the feature.
Could someone please suggest me a solution for this situation?
I have the following issue while implementing 2 onetomany association while loading an entity



Initially I had an issue of using "Collection" (for both variables) for @OnetoMany associations, hibernate threw an stack trace, then i decided to use "Set" for one, and "Collection" for another and solved the issue.

Now here is the scenario, while retriving the actuall values of: C has a collection of size 2, and B has a set of size 3 (cross verified it from the Database). But when I try to print the values of A, the 2 values contained in C are printed out properly, but each value in B is printed out 2 times, resulting in 6 outputs, but the actual should have been 3.

So if the actual values contained by C=x, and B=y, the number of values B prints after an iteration is x*y (i.e. y values are printed x times).

have any of you faced this issue before, or is this a bug? Is there a diffenet way to solve this issue?

Let me know!!!
I took me a while to figure this simple solution:
class Info{
private int infoID;
private String name;
private String address;
@OneToOne(optional = true)
@JoinColumn(name = "userID ", referencedColumnName = "userID ", insertable = false, updatable = false)
private Membership membership;
}

Now I will be looking into writing queries on Secondary tables to restrict null values on getting "columnCode =72", wish me luck
I was unable to find a solution with Hibernate, so i decided to go with JPA+Hibernate.

Now I have two issuess:
1) How to I restrict/filter, and obtain on 'non-null' values from a Tables column?
2) I still havent figured out a way to Join two tables based on a 'non-primary key' column.
3) Write an HQL query along with annotations saying "get me records with columnCode =72 " during joins; where columnCode is COLUMN_CODE (is a Secondary Table, with a one-to-one relation with a Primary Table) in a COLUMNS table.

I would apperciate if anyone could direct me in this issue! or provide me links!
Is there no way to achieve the above scenario? The silence is appalling!
Hi Mr.Mckenzie,
Thank you.

Heres the scenario

Table named Feedback has an infoID
class Feedback{
private int feedbackID;
private Info info;
}

using the many-to-one mapping I was able to obtain a unidirectional one2one mapping between Feedback and Info.

Now I need to gather Membership information too, so that I can assimilate all the information and send an email reminder to the Service Desk with all the details from Feedback, Info, Membership table. The only thing common between Info and Membership is the UserID. So, I need some suggestion to implement this.

Sorry about not being clear the first time. At the moment, I am not using JPA.