Announcement Announcement Module
Collapse
No announcement yet.
JNDI Lookup Spring 2 RAD 6 SDK 1.4 WinXP Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JNDI Lookup Spring 2 RAD 6 SDK 1.4 WinXP

    I have been developing a J2EE application in the IBM Rational Software Development Platform (RAD 6). I am using SDK 1.4 with Spring 2 on the Windows XP Professional platform.

    I need to perform a JNDI lookup to fetch the DataSource value ‘mesheets-datasource’ from the RAD workspace. I have created the Oracle Datasource with the the Applicaton Deployment Descriptor and the Admin Console. I have successfully tested the datasource connection within the RAD 6 Admin Console.

    Within the application, I have declared the datasource bean in my servlet context:
    <bean id="dataSource"
    class="org.springframework.jndi.JndiObjectFactoryB ean"
    singleton="true">
    <property name="jndiName">
    <value>mesheets-datasource</value>
    </property>
    </bean>
    This declaration has worked in the past, with RAD 5 and Spring 1.2. Is it correct for the RAD 6 and Spring 2 environment? I have been getting
    ORACLE exceptions:

    Method createManagedConnectionWithMCWrapper caught an exception during creation of the ManagedConnection for resource mesheets-datasource, throwing ResourceAllocationException. Original exception: java.lang.NullPointerException

    Any additional guidance would be appreciated

    Thank You.

  • #2
    Yes. The Spring 2 bean declaration is correct for RAD 6, SDK 1.4 and RAD 5, SDK 1.3.

    The RAD 6 environment, unlike the RAD 5 environment, requires the prefix "jdbc/XXXX" associated with the JNDI name. Where formerly the JNDI name "mesheets-datasource" was sufficient, the new property should read "jdbc/mesheets-datasource" in the Application Context, the Deployment Descriptor and the Admin Console.

    Comment

    Working...
    X