Hi Indu, Please continue further questions related to your problem in this thread.
Thanks. ---------- Forwarded message ---------- From: Nirmal Fernando <[email protected]> Date: Tue, May 1, 2012 at 3:14 PM Subject: Re: WSO2 + JPA - Problem we are facing To: Indu Shekhar Mudigonda <[email protected]> Hi Indu, Please send your questions to [email protected], that way you can get the right answers quickly and that's the way to go! :) Anyway, I've searched through Internet and found few relevant links. http://old.nabble.com/Issue-in-implementing-JPA-support-on-ESB-Smooks-Mediator-td33443274.html http://wso2.org/mailarchive/architecture/2009-October/000669.html And I think WSO2 human task component is an ideal example for you. Please find the link to it below. https://svn.wso2.org/repos/wso2/trunk/graphite/components/business-processes/humantask/org.wso2.carbon.humantask/ And I could see where persistenc.xml should go. https://svn.wso2.org/repos/wso2/trunk/graphite/components/business-processes/humantask/org.wso2.carbon.humantask/src/main/resources/META-INF/ On Tue, May 1, 2012 at 2:06 PM, Indu Shekhar Mudigonda <[email protected]>wrote: > Hi Nirmal ! > > We are working on a WSO2 Application Server based project 4.2.1. > We need webservices communicating with a MySQL db. > The technology we are trying to use is JPA, Hibernate. > > We got webservices running, connecting to the db directly (using JDBC > connections). > It is JPA configuration that is giving us problems. > > We figured that JPA's persistence.xml should be in > src/main/resources/META-INF/ dir. > The Carbon-Studio create CarbonApplicationProject creates only > src/main/java > > When we try to create src/main/resources/META-INF and then try to create > aar file, it does not include the resources/META-INF/persistence.xml > Next We put persistence.xml in > OurPackage/artifacts/services/axis2/G3DataTest/resources/META-INF > Now the persistence.xml gets included in aar file. But we still get the > error, when deploying the file on to WSAS. > > We are getting an error: > ERROR {org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver} - > org/hibernate/MappingNotFoundException > java.lang.NoClassDefFoundError: org/hibernate/MappingNotFoundException > at > org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:124) > > A display of Classpath before accessing persistence.xml shows: > > ....;D:\Indu\wso2as-4.1.2\repository\components\lib\hibernate-3.2.7.ga.jar;D:\Indu\wso2as-4.1.2\repository\components\lib\hibernate-commons-annotations-4.0.1.Final.jar;D:\Indu\wso2as-4.1.2\repository\components\lib\hibernate-core-4.1.2.Final.jar;D:\Indu\wso2as-4.1.2\repository\components\lib\hibernate-entitymanager-4.1.2.Final.jar;D:\Indu\wso2as-4.1.2\repository\components\lib\hibernate-jpa-2.0-api-1.0.1.Final.jar;D:\Indu\wso2as-4.1.2\repository\components\lib\httpcore-4.0.jar;.... > > How do we place this persistence.xml in resources/META-INF/ dir ? > Is there any documentation related to this? > > Or any resource we can contact to get our issues resolved? > > I will appreciate your any help in this regards. We are stuck with this > issue over the last one week. > > On a side note, is there any training offerred by WSO2 on its products. We > can take some training if needed to get along with the project. > > thank you for any help provided. > > -Indu > -- Thanks & regards, Nirmal Software Engineer- Platform Technologies Team, WSO2 Inc. Mobile: +94715779733 Blog: http://nirmalfdo.blogspot.com/ -- Thanks & regards, Nirmal Software Engineer- Platform Technologies Team, WSO2 Inc. Mobile: +94715779733 Blog: http://nirmalfdo.blogspot.com/
_______________________________________________ User mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/user
