ankur jadiya

+ Follow
since Feb 15, 2013
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ankur jadiya

I am trying to implement quartz persistent job using spring and new to this . I have implemented the Job interface in class SimpleQuartzJob. When I run the main program , Job is persisting in the the database but the execute(JobExecutionContext context) method of SimpleQuartzJob is not triggering at the scheduled time. I am not able to figure why this is happening?




main Function

5 years ago
my requirement is when i delete the parent ,child should not be deleted but instead of deleting child,one of the child column department_ID which is foreign key must be update with some value , say one department(Parent Table) contains many employee and employee(child Table) table have Department_ID as a foreign key column .The problem i m facing when i delete the parent table nothing is reflected on child cause i have make updatable=false if i will make it true then on deleting parent ,child column is set to null or if i update the parent then also child Department_Id column set to null which is violating the requirement so that's why i make it false .I don't want child to be update when the parent make any changes only changes should reflected on delete operation ,only on one column. Please help me what should i do? thanks

This is my Praent Table(Department code)

This is child table Employee code

Deepak Nn wrote:Hi Everyone,

I am a beginner in hibernate and I am trying to write my first application but I am getting an error saying "Could not parse configuration: hibernate.cfg.xml" and I have been try to resolve this from last 2 days but with no success

Can anyone please help me in resolving this issue. Thanks in advance

my hibernate.cfg.xml file

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"


<property name="">update</property>
<property name="dialect">org.hibernate.dialect.DerbyDialect</property>
<property name="connection.url">jdbc:sqlserver://isvdbd3:1119</property>
<property name="connection.username">digite</property>
<property name="connection.password">marksession</property>
<property name="connection.driver_class"></property>
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
<property name="current_session_context_class">thread</property>
<mapping resource="employee.hbm.xml"/>


I am using MS sql as my database

Error stack trace is as below

Exception in thread "main" org.hibernate.HibernateException: Could not parse configuration: hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(
at org.hibernate.cfg.Configuration.configure(
at com.javatpoint.mypackage.StoreData.main(
Caused by: org.dom4j.DocumentException: Nested exception:
at org.hibernate.cfg.Configuration.doConfigure(
... 2 more

Someone please let know


Ankurjadiya wrote: hi deepak
can you check your dialect for my sql database dialect is different you are using Derby Dialect instead of SQLServerDialect you can try this

ankur wrote:Hi Anayonkar Shivalkar,

Thanks for replying as you know this is my first time can you tell if question related to particular topic how to ask question on that topic forum

This problem is related to hibenate and this is my first time to ask the question in this forum if any mistakes on asking question please tell me so that i can improve style of asking question thanks.
My problem is that when i am performing delete operation on parent table parent is deleted smoothly but in child table, update query is running.There is one-to-many relation exist in parent and child table
where Employee Table is parent and Project table is child table
when executing the program output is showing like this


Hibernate: update employee_project set employeeNumber=null where employeeNumber=?
Hibernate: delete from employee where EMPLOYEE_NUMBER=?

Employee pojo

and this is my Employee.hbm.xml

and this is my project.hbm.xml

and the logic is
of deleting is