Announcement Announcement Module
Collapse
No announcement yet.
jee:jndi-lookup Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Judging from the stacktrace you are either not showing the actual element you are using or you are mixing spring versions...

    Comment


    • #3
      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?

      Comment


      • #4
        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).

        Comment

        Working...
        X