krunal prajapati

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

Recent posts by krunal prajapati

Hello,
I want to make left join using hibernate,
I can make left join using native query in hibernate like


but while I am using HQL I getting error,



and my hbm.xml and java files are shown below

MeIdiomas.hbm.xml



U4Textosussds.hbm.xml



MeIdiomas.java


U4Textosussds.java


Plans.java main method here


Now what I have to do to use HQL?
Thank you in advance,
Krunal
hello,

I want to make insert-update-delete application with integration of jsf+spring+hibernate.
In this application I am able to insert and delete record from datatable in jsf.

But I can't update value in datatable,

so I request you, please post sample application with insert-update-delete in jsf+spring+hibernate framework.

Hope you will do this,


Thank you,
Krunal Prajapati
13 years ago
thank you for suggestion,
I had problem with bean id naming and now it has been solved....


thank you again to both of you sir.
13 years ago
but I have problem in creating bean with name 'employeeDao'.

please refer error in bold.



run:
Jul 9, 2011 10:29:08 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from file [D:\Documents and Settings\KRUNAL\My Documents\NetBeansProjects\SpringHibernate\src\resources\spring-hibernate.xml]
file [D:\Documents and Settings\KRUNAL\My Documents\NetBeansProjects\SpringHibernate\src\resources\spring-hibernate.xml]
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeDao' defined in file [D:\Documents and Settings\KRUNAL\My Documents\NetBeansProjects\SpringHibernate\src\resources\spring-hibernate.xml]: Cannot resolve reference to bean 'hibernateTemplate' while setting bean property 'hibernateTemplate'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'hibernateTemplate' is defined
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at com.spring.hibernate.SpringHibernateTest.main(SpringHibernateTest.java:26)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'hibernateTemplate' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:510)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1056)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 10 more
Java Result: 1
BUILD SUCCESSFUL (total time: 5 seconds)
13 years ago
hello,

I have integrate spring with hibernate but i got error and i cant sovle it,


my file structure is following,




and my xml files are following,



2. spring-hibernate.xml


my java file is
1. springhibernatetest.java


2. employeedao.java



3. employee.java


and i got following error,

run:
Jul 8, 2011 3:56:50 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from file [C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\SpringHibernate\src\resources\spring-hibernate.xml]
file [C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\SpringHibernate\src\resources\spring-hibernate.xml]
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeDao' defined in file [C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\SpringHibernate\src\resources\spring-hibernate.xml]: Cannot resolve reference to bean 'hibernateTemplate' while setting bean property 'hibernateTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in file [C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\SpringHibernate\src\resources\spring-hibernate.xml]: Cannot resolve reference to bean 'mySessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'mySessionFactory' is defined
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at com.spring.hibernate.SpringHibernateTest.main(SpringHibernateTest.java:26)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in file [C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\SpringHibernate\src\resources\spring-hibernate.xml]: Cannot resolve reference to bean 'mySessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'mySessionFactory' is defined
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 10 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'mySessionFactory' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:510)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1056)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 20 more
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)


thanks in advance,
13 years ago
Hello all friends,

I have done it upto two level with use of jsp,servlet and javascript (Not ajax),
like,

when you will select country, then its corresponding state will come, and when you will choose state then district name will come, but it become very complex, because of when page will reload ,previous value (country, state)also should be maintained,

13 years ago
JSP
Thank you sagar,
It helped me a lot.

First we create object of class like,

A a = new A();

when this line of code will execute,

constructor of class A will call. ok

Now class A's constructor is like this,

A(){
super();
}

when this constructor will call,

A's superclass constructor will also called,

And If I don't write super(); in constructor, then also call to super class constructor,

so my question is How Long the super class' constructor will call ?

because in java every class create default constructor automatically(if not initialized).
hello,

I want to call servlet from javascript and my index.jsp is



I tried both javascript method
and my servlet class is mainDAO.java is

in doGet method



then how can I call servlet without using form ans submit button


thanks,
thanks for help,


in last I tried with html form, that's working well...

thanks again..
13 years ago
JSP
my first module's jsp is,




and my other OtherModule's index.jsp page is,




but i can not pass session in other application..

how can i solve that...


thanks,
Krunal
13 years ago
JSP
ya i have checked it but no one error is shown in error consol.

I think that, It can be possible b'cos of java plugin.

b'cos In my linux- firefox no java plugin installed.

Am i right....?
13 years ago
hi,

I have problem in applet with linux firefox,

I want to open .exe file on client machine with applet in browser.

I have signed jar too.

It works fine in windows in all browsers,

But applet is not displayed in Linux firefox,

thanks,
Krunal





13 years ago
hi
I am beginner for session in servlet.

can I set multiple session attribute in my servlet class
for Example.


I am maintain session with the use of loginID.

and username is for showing welcome + "username" while you login.

and rec_id is pk - for my main table.

then, am I right with this code.
13 years ago
Thank You so much Javin and Clapham.
With the help of you I understood it very practically.