|
From: Lars F. <lar...@gm...> - 2003-08-19 08:32:03
|
Thomas, thanks a lot, this solved my problem ! I forgot to define the weblogic.xml stuff. Checked the docs yesterday but BEA always speaks of EJBs (and I don't use them now). This could be a topic for the WIKI and may help future Spring users (using WLS with EJBs before) to get started. Thanks again Lars > Lars, > > Try this: > > I'm assuming that you have a datasource set up in WebLogic and that it's > JNDI > name is cxwHibernate. You should check this name by viewing the JNDI tree > from > WebLogic console. > > Make sure that you have a <resource-ref> set up in web.xml that you > reference in > the applicationContext.xml (I'll use the name refHibernate). In > weblogic.xml > you link this resource-ref to the actual JNDI name specified in WLS > configuration (I'll use the name cxwHibernate). > > In application.xml use the following: > > <beans> > > <bean id="dataSource" > class="com.interface21.jndi.JndiObjectFactoryBean"> > <property name="jndiName"><value>refHibernate</value></property> > </bean> > > <!-- more bean definitions --> > > <beans> > > > In web.xml use: > > <resource-ref> > <description>The data source ref name</description> > <res-ref-name>refHibernate</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > > > In weblogic.xml use: > > <weblogic-web-app> > <description>WebLogic data source JNDI name</description> > <reference-descriptor> > <resource-description> > <res-ref-name>refHibernate</res-ref-name> > <jndi-name>cxwHibernate</jndi-name> > </resource-description> > </reference-descriptor> > </weblogic-web-app> > > If this does not work, could you post the web.xml and weblogic.xml that > you are > using. > > Thomas > > > Hi all, > > > > I have a problem with a DataSource definition in applicationContext.xml. > > > > I've defined a connection pool and a data source with WebLogic 8.1 but > > at deployment time Spring says: > > > > 18.08.2003 17.42 Uhr CEST> <Warning> <HTTP> <BEA-101162> <User defined > > listener com.interface21.web.context.ContextLoaderListener failed: > > com.interface21.context.ApplicationContextException: Cannot load > > configuration: problem > > instantiating or initializing beans; nested exception is: > > com.interface21.beans.FatalBeanException: afterPropertiesSet on > with > > name 'cwxDataSource' threw an exception; nested exception is: > > javax.naming.NameNotFoundException: While trying to look up > > comp/env/cxwHibernate in /app/webapp/springapp/22589165.; remaining name > > 'comp/env/cxwHibernate'.> > > > > This may be a WebLogic issue but I can't find any good BEA documentation > for > > this issue. > > > > Does anyone have experience configuring WebLogic JNDI with Spring ? > > > > Thanks > > Lars > > > > > > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > > Data Reports, E-commerce, Portals, and Forums are available now. > > Download today and enter to win an XBOX or Visual Studio .NET. > > > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > |