Announcement Announcement Module
Collapse
No announcement yet.
null ponter exception while creating data source. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • null ponter exception while creating data source.

    Hi i am getting this below exception while creating data source.
    please reply,it is urgent.

    java.lang.NullPointerException
    at org.apache.commons.dbcp.BasicDataSource.close(Basi cDataSource.java:486)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.beans.factory.support.Disposab leBeanAdapter.invokeCustomDestroyMethod(Disposable BeanAdapter.java:208)
    at org.springframework.beans.factory.support.Disposab leBeanAdapter.destroy(DisposableBeanAdapter.java:1 65)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.destroyBean(DefaultSingletonB eanRegistry.java:487)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.destroySingleton(DefaultSingl etonBeanRegistry.java:462)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.destroySingletons(DefaultSing letonBeanRegistry.java:430)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:388)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)

  • #2
    Can you provide the code or config where the datasource is instansiated?

    Comment


    • #3
      Also please use the [ code ] tags when pasting code.

      See here: http://www.screencast.com/t/NDliMTg2YWYt

      Comment


      • #4
        spring config file

        This is config file--------------->


        <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
        <property name="url" value="jdbc:oracle:thin:@ahjjsuij5949.kll.oio.com: 1521:a09mku"/>
        <property name="username" value="USER1"/>
        <property name="password" value="13cc22909ooopppiiupppwpwa"/>
        </bean>

        Comment

        Working...
        X