Hi Hemanth; Yes, if you want to use Hibernate then you need to put Hibernate configuration file in the location where it can find. As I know Hibernate has implement to load config files from context class loader and there is no way to provide a class loader into it. If you put config file inside the aar file then those file can not be access from the context class loader , therefore to solve the problem we need to put those files into WEB-INF/lib directory.
Thanks Deepal > Hi All, > > > I am using Hibernate with AXIS2 . My application runs stand-alone from > Eclipse.However, when I try deploying it as a service on Tomcat, the > class-loader is unable to load the xml files related to Hibernate. > THis was because AXIS will load the service in its own classloader. > One of my team-member suggested that I should make a jar of all the > xml files,class files and place it > in *<TOMCAT_HOME>/webapps/axis/WEB-INF/lib.* > *Previously*: > 1.Built all the classfiles, xml input files, > services.xml,manifest.mf, wsdl file into an .aar file > 2.Placed the .aar file in <TOMCAT_HOME>/webapps/axis/WEB-INF/services > folder. > > > > *Now*: > 1.Created a jar of all the classfiles, xml input files > 2.Placed the jar file in <TOMCAT_HOME>/webapps/axis/WEB-INF/lib folder. > 3.Built the services.xml,manifest.mf, wsdl file into an .aar file > 4.Placed the .aar file in <TOMCAT_HOME>/webapps/axis/WEB-INF/services > folder. > > Now, I am able to use Hibernate to connect to the database and the > relevant files are also being loaded by classloader. > > *But my query is why should I place the jar containing service > specific files in the /WEB-INF/lib which will make the jar available > to all the services.* > *Is there any other way to get this working..* > > > Please give your inputs on the same. > > > > > > Regards, > ** > *Yamini * > > ------------------------------------------------------------------------ > > NOTICE: If received in error, please destroy and notify sender. Sender > does not intend to waive confidentiality or privilege. Use of this > email is prohibited when received in error. > -- Thanks, Deepal ................................................................ "The highest tower is built one brick at a time" --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
