Announcement Announcement Module
Collapse
No announcement yet.
Help? Cannot Wire datasource, JNDI name not found. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help? Cannot Wire datasource, JNDI name not found.

    Sun Webserver 7 + Spring + JNDI

    Problem: Seems like no matter what I do, I get:

    Name X is not bound in this Context.

    I've got this in applicationContext.xml:

    <jee:jndi-lookup id="dataSource" jndi-name="jdbcService" />

    web.xml:
    <resource-ref>
    <description>JDBC Connection Pool</description>
    <res-ref-name>jdbcServicePool</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref

    sun-web.xml:
    <sun-web-app>
    <context-root>/conap</context-root>
    <resource-ref>
    <res-ref-name>jdbcServicePool</res-ref-name>
    <jndi-name>jdbcService</jndi-name>
    </resource-ref>
    <jsp-config/>

    ...any clues?? This is working OK in GlassFish but I need it to work on SW7.

  • #2
    Try adding resource-ref="false" to jndi-lookup. It defaults to "true" which means that the lookup is performed under java:com/env name.

    regards
    Grzegorz Grzybek

    Comment


    • #3
      Originally posted by Grzegorz Grzybek View Post
      Try adding resource-ref="false" to jndi-lookup. It defaults to "true" which means that the lookup is performed under java:com/env name.

      regards
      Grzegorz Grzybek
      Just had a go at this with no success. It's become a real problem.

      Comment

      Working...
      X