aum sharma

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

Recent posts by aum sharma

Hi All,

I am trying to use HibernateCompositeUser type to handle i18n specific data in my application. i am trying to use the below approach.

I have a table named master table which contains all locale independent data while i have created another table master_translation which contains all locale sensitive information. Master table contains a reference to the master_translation.here is the detailed table structure


now i am using HibernateCompositeUser type to handle this internal process. here is the mapping for master class.


where type="masteri18n" is hibernate CompositeUserType.now when i am fetching the master content it is correctly fetching the data based on the language and my Master class contain a reference to the Master_translation which holding locale specific data. Problem getting started when i am trying to insert the data in to the respectice tables.Here is a code snap shot from the CompositeUserType


what i am trying to do is first saving my Master_i18n and den set it reference in to the Master Though Master_i18n getting saved properly but when it comes to the Master itself hibernate is creating SQL for all the fields which are defined in the Master_i18n


and finally its throwing the following exception

i have just started getting familiar with Custom mapping type so not sure what exactly i am doing wrong. Any help/pointer in this regard will be much helpful.
Agree with what you all have suggested and i was looking any possibiliy for the entire XML validtion.
Regarding error handling way,it is a standard way to handle validation error and shoing it in a standard way.i am using this techinique to validate XML file outside Jaxb 2.x since the way JAXB does validation is not a good way.
Well Yes it showing error for missing tag as well invalid data type.but problem is if more than one required tag is missing it will throw error only for the first required tag as found from top-bottom process,no other error for other missing tags
Hi All,
i am trying to validate XML with a predefined XSD so that if validation is OK i can go ahead with parsing XML,for parsing i am using JAXB 2.x but i am doing validation outside of JAXB.
here is a part of my XML and XSD

and XML is

the code for validation is something like

it is validating the XML against XSD and showing the error also

but The validator reports a single error per wrong element.
It does not report multiple errors because there is only one error report per complex type.
i want that validator should validate complete XML document and come up with all error and warning for any missing tags or invalidTh data type
is there any way to achieve this
Thanks in advance

--
With Regards
Umesh Awasthi
Software Engineers never die… They just go Offline
http://www.travellingrants.com/
Hi All,
I am new to hibernate and trying to learn its nuts and bolts.i have a table Destination which has destinationid as unique Key i also have UUID as unique key in the destination table. i want to provide a method by which user can fetch Destination based on destinationid also so i tried to use HQL as below

my Destination class has reference of many other subclasses as collection, all of which has been defined as lazy load

there are around 9-10 classes whcih are being refred from inside Desttination class all being lazily loaded.
I am importing destination xml and this xmlis being provided by some third part system so there is no way i can associate UUID and i need to decide if import is to be done in update mode or for new destination.so destinationid is the only way i can find to check if the destination is already in the DB or not.
my problem is for new destination the above HQL query is working fine and new destination is being imported in to the DB but for the existing it seems that its not working as expected and Query seems to be in hanged state

i am new to hibernate but after seeing the query generated by hibernate for the already existing destination,it seems it is facing some kind of cyclic references but i am not sure how to avoid this or is there any better way to check for an already existing entity based on the unique key (not primary key)
Thanks in advance
Hi all,

I am surprized how my last post got disappeared from here since there was nothing wrong with the content nor i got any notification why it was removed

While Working on my regular office hours, i was having an idea to develop some good open source Information management system by which an organisation can do all its internal work from payrol to Leavemanagemtn to any other work an organisation of any type have..
Though i am not an subject matter expert and i know there are many good solution out there. My question to the community is if any one interested in starting with me can join hands with me..


I am looking forward from exp person only and since i am in the sea of JAVA from last 5+ yeards so this will be my thum up choice..
Looking forwards for your comments,feedback as well as some hand join...Please provide your email id and some experience information so that i can get in touch with you and also note that this is not any slection ceiteria this is a pure co-operative work



Thanks in advance
14 years ago
Hi All,

I need to develop A Bread Crumb functionality in our web application and as the Application itself is in Java (Struts2 FrameWork) so need to create a Bread Crumb functionality using Java.

i am new to this concept of BreadCrumb so not sure where to start and this is the best place to get some direction.if any one have Prior Experience in this please share info with me where can i start is there any reading available for this.

We need to develop this functionality for fresh new so we will not go for any third party solution.


Hope to get some light on this topic.

Thanks
aum
15 years ago
JSP
i tried all the things

even i used SSL for testing it all, but the problem is still there
16 years ago
JSP
Hi All,

I am facing a problem while developing web application,
when user get log off from my application i am removing the user object from the session so every new request now forcing user to provide valid user id/password

but if user click browser back button he is getting back to the previous page i.e secured page
i set the header from the server declared meta header in my jsp page then tested but problem was still there.

then in order to enhance the process i implimented SSL and now my applicationis running on secure port but it dosen't make any improvement in to my application

regarding using javascript i don't want to go for that option as javascript may be turned off at client side and its behaviour is not consistent

if any one have resolved this problem earlier pleaes share his experience with me so that i can move ahead

thanks in advance,
aum
16 years ago
JSP
Hi all,

i am developing an application in struts2 and trying to used object backed data transfer method in struts2 i have created a bean namely address where i have declared all the properties.

Now i want that my struts2 intercepter will fill this beans by itself when it called,below is the code snap i have written in my REgsitration class

public class UserRegistrationAction extends ActionSupport {

/**
*
*/
private static final long serialVersionUID = 1L;


public String execute() throws Exception{
System.out.println("test");
System.out.println("test1 "+getAddressBean().getCity());



return SUCCESS;
}


private AddressBean addressBean;


/**
* @return the addressBean
*/
public AddressBean getAddressBean() {
return addressBean;
}

/**
* @param addressBean the addressBean to set
*/
public void setAddressBean(AddressBean addressBean) {
this.addressBean = addressBean;
}
}

but when i am running this aplication i am getting the Null POINTER exception on server

SEVERE: Servlet.service() for servlet default threw exception
java.lang.NullPointerException
at com.dograpress.raisonne.registration.UserRegistrationAction.validate(UserRegistrationAction.java:88)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:200)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:186)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)

can anybody suggest me what is the likely cause of this exception.Thanks in advanve



-aum
16 years ago