Results 1 to 4 of 4

Thread: jee:jndi-lookup

  1. #1

    Default jee:jndi-lookup

    Hi,

    I am trying to lookup a jdbc-datasource on WebLogic using jndi-lookup in my context-file.

    Code:
    <jee:jndi-lookup id="dataSource" jndi-name="ds.jndi.name"/>
    but when I run my junit-test I get the following error:

    Invalid property 'exposeAccessContext' of bean class [org.springframework.jndi.JndiObjectFactoryBean]: Bean property 'exposeAccessContext' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

    Even if I set the expected type to javax.sql.Datasource it doesnt work. What am I doing wrong here?
    BTW, I am using spring-jee-3.1


    /

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    Judging from the stacktrace you are either not showing the actual element you are using or you are mixing spring versions...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    Hi Marten, thanks for your reply.

    My maven-dependency is spring-****-3.1.3.RELEASE.
    In my application-context.xml I use spring-jee-3.1.xsd

    When I try to use the above jndi-lookup it gives me this error. What do you mean by actual element, are you saying that itīs not the <jee:jndi-lookup/> element that gives me this error? This element has an attribute expose-access-context which defaults to false, and I guess this is what causes the error?

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    I'm not interested in the maven dependency... Also the bean class it concerns is in context not in jdbc. I'm interested in the actual versions so you probably want to build the war and see which jars are included (or do a mvn depenency:tree to see all incoming dependencies).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •