• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Spring : Tomcat datasource via JNDI in my Spring configuration Problem

 
Greenhorn
Posts: 27
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I want to read Tomcat datasource via JNDI in my Spring configuration i am using oracle toplink
in spring applicationContext.xml i am using like below

<bean id="UserDatabase" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/jdbc/ISM_rep_user"></property>
<property name="lookupOnStartup" value="true"></property>
<property name="cache" value="true"></property>
<property name="proxyInterface" value="javax.sql.DataSource"></property>
</bean>

and in tomcat/conf/context.xml i am using below

<Resource name="jdbc/ISM_rep_user"
auth="Container"
type="javax.sql.DataSource"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"
maxActive="10"
maxIdle="5"
maxWait="15000"
username="ism_cust2"
password="iamse2_"
driverClassName="oracle.jdbc.OracleDriver" url="jdbcracle:thin:@xxx.gggg/>

and in web.xml i am using

<resource-ref>
<description>Connection Pool</description>
<res-ref-name>jdbc/ISM_rep_user</res-ref-name>
<res-type>javax.sql.Datasource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

I am still getting problem please give me some example

I am getting below Problem

[INFO] [talledLocalContainer] SEVERE: Exception sending context initialized even
t to listener instance of class org.springframework.web.context.ContextLoaderLis
tener
[INFO] [talledLocalContainer] org.springframework.beans.factory.BeanCreationExce
ption: Error creating bean with name 'org.springframework.context.weaving.Aspect
JWeavingEnabler#0': Initialization of bean failed; nested exception is org.sprin
gframework.beans.factory.BeanCreationException: Error creating bean with name 'l
oadTimeWeaver': Initialization of bean failed; nested exception is java.lang.Ill
egalStateException: ClassLoader [org.apache.catalina.loader.WebappClassLoader] d
oes NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a cust
om LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaa
gent:spring-agent.jar
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.Abs
tractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.

 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please don't duplicate post the same question to three different threads. I deleted the ones in someone else's thread that you were hijacking. And I locked the one that was moved here from the wrong forum, and I am leaving just this one open.

I don't know what your resolution is, but based on the exception, it looks unrelated to your lookup of a datasource in a JNDI tree.

Mark
 
sreekanth aleddulla
Greenhorn
Posts: 27
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oh sorry

I am facing a problem on that please
 
Ranch Hand
Posts: 477
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please use code tags
 
sreekanth aleddulla
Greenhorn
Posts: 27
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
code tag ?
 
sreekanth aleddulla
Greenhorn
Posts: 27
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ALL

Can anybody please let me know why i am getting the below error in (Tomcat datasource via JNDI in my Spring configuration Problem)


[INFO] [talledLocalContainer] org.springframework.beans.factory.BeanCreationExce
ption: Error creating bean with name 'org.springframework.context.weaving.Aspect
JWeavingEnabler#0': Initialization of bean failed; nested exception is org.sprin
gframework.beans.factory.BeanCreationException: Error creating bean with name 'l
oadTimeWeaver': Initialization of bean failed; nested exception is java.lang.Ill
egalStateException: ClassLoader [org.apache.catalina.loader.WebappClassLoader] d
oes NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a cust
om LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaa
gent:spring-agent.jar
 
reply
    Bookmark Topic Watch Topic
  • New Topic