Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

avinash sudh

+ Follow
since Apr 22, 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 avinash sudh

Hi ... Will HibernateTransactionManager rollback hibernate operations only or will it rollback any operation(like a jdbc insert) on the db.

If it does not rollback jdbc transactions then please let me know as to what could be done to rollback a combination(hibernate/jdbc) of db transactions.

Below is the code that i am using.

<beans xmlns="";

<bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager" />
<property name="transactionAttributes">
<prop key="save">PROPAGATION_REQUIRED</prop> ------- adding transaction interceptor on all the save methods.

<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="dataSource" ref="dataSource" />
<property name="sessionFactory" ref="sessionFactory" />

public void save(Product product){
jdbc call to insert into a table; }
public class ProductQohDaoImpl extends HibernateDaoSupport implements ProductQohDao{

public void save(ProductQoh productQoh){
int x = 1/0; ---deliberately throwing an exception to rollback the transactions

Thank you for your help.
Hi all,

I am new to hibernate and as I am learning Hibernate I get a feeling that i am missing out on the basics. Could you please let me know the prerequisites that I need to know before starting with Hibernate? Is it JPA and EJB?


Thank you so much for the explanation given about the issue. It resolved my issue.
Peter ... thank you for giving me the link to the Maven central
7 years ago
Hi Carles,

I think I can ... I would like to change it to overcome this error.
Hi all,

I am trying to generate java classes out of ApiExceptionExtended.xsd. ApiExceptionExtended.xsd is an extension of ApiException.xsd.
However I am running into this error.

C:\Users\avinashms\POC\xero_POC\XSD_Download\XeroAPI-Schemas-master\v2.00\xsd_experiment>xjc -d src -p org.xero.poc.apiextended ApiExceptionExtended.xsd

parsing a schema...
[ERROR] cos-all-limited.1.2: An all model group must appear in a particle with {min occurs} = {max occurs} = 1, and that particle must be part of a pair which constitutes the {content type} of a complex ty
pe definition.
line 35 of file:/C:/Users/avinashms/POC/xero_POC/XSD_Download/XeroAPI-Schemas-master/v2.00/xsd_experiment/ApiExceptionExtended.xsd

[ERROR] s4s-elt-invalid-content.1: The content of '#AnonType_ElementsApiExceptionExtended' is invalid. Element 'element' is invalid, misplaced, or occurs too often.
line 38 of file:/C:/Users/avinashms/POC/xero_POC/XSD_Download/XeroAPI-Schemas-master/v2.00/xsd_experiment/ApiExceptionExtended.xsd
Below are the ApiException.xsd and ApiExceptionExtended.xsd files :

ApiException.xsd file :

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="ApiException" elementFormDefault="qualified" xmlns:xs="">;

<!-- API Exception -->
<xs:complexType name="ApiException">
<xs:element name="ErrorNumber" type="xs:integer" minOccurs="1" maxOccurs="1" />
<xs:element name="Type" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="Message" type="xs:string" minOccurs="1" maxOccurs="1" />



ApiExceptionExtended.xsd file :

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="ApiException"

<xs:include schemaLocation="ApiException.xsd" />

<xs:include schemaLocation="Account.xsd" />
<xs:include schemaLocation="BankTransaction.xsd" />
<xs:include schemaLocation="BrandingTheme.xsd" />
<xs:include schemaLocation="Contact.xsd" />
<xs:include schemaLocation="CreditNote.xsd" />
<xs:include schemaLocation="Currency.xsd" />
<xs:include schemaLocation="Employee.xsd" />
<xs:include schemaLocation="ExpenseClaim.xsd" />
<xs:include schemaLocation="Invoice.xsd" />
<xs:include schemaLocation="Items.xsd" />
<xs:include schemaLocation="Journal.xsd" />
<xs:include schemaLocation="ManualJournal.xsd" />
<xs:include schemaLocation="Organisation.xsd" />
<xs:include schemaLocation="Payment.xsd" />
<xs:include schemaLocation="Receipt.xsd" />
<xs:include schemaLocation="Report.xsd" />
<xs:include schemaLocation="TaxRate.xsd" />
<xs:include schemaLocation="Tracking.xsd" />
<xs:include schemaLocation="User.xsd" />

<!-- API Exception -->
<xs:complexType name="ApiExceptionExtended">
<xs:extension base="ApiException">
<xs:element name="Elements" minOccurs="1" maxOccurs="1">
<xs:element name="DataContractBase" type="xs:anyType" />

Please let me know what I could do to fix it.
Thanks a lot Peter. Could you please tell me the location of Maven central and how you figured out the version of parent pom?
7 years ago
Hi i am getting the following error when i try to install the "Apache camel oauth tutorial" project(which is at I have attached the pom.xml file. Please let me know what the issue is.

Scanning for projects...
The build could not read 1 project -> [Help 1]

The project org.apache.camel:camel-example-gauth:2.12-SNAPSHOT (C:\Users\avinashms\camel-example-gauth\pom.xml) has 1 error
Non-resolvable parent POM: Could not find artifact org.apache.camel:examples:pom:2.12-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 22, column 13 -> [Help 2]
o see the full stack trace of the errors, re-run Maven with the -e switch.
e-run Maven using the -X switch to enable full debug logging.

or more information about the errors and possible solutions, please read the following articles:
Help 1]
Help 2]

Below is my pom.xml file :

7 years ago