1 Reply Latest reply on Aug 17, 2012 4:40 PM by Filippe Spolti

    javax.naming.NameNotFoundException: logreaderDS not bound

    Filippe Spolti Novice

      Hi guys, im trying to deploy my app in a web profile on jboss-5-1-GA, but i always got a error: javax.naming.NameNotFoundException: logreaderDS not bound.

       

      If i deploy the app whithout changes in a any profile like default and all, the app works well....

       

       

      Anyone knows what's happening?

        • 1. Re: javax.naming.NameNotFoundException: logreaderDS not bound
          Filippe Spolti Novice

          Hello guys, problem solved.

           

          the cause is that the web profile have jndi tree simpler than the other profiles (all, default, etc...)

           

          So we need reconfigure the persistence.xml:

           

          <bean id="dataSourceJboss" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
              <property name="jndiName" value="logreaderDS" />
          </bean>

           

          TO:

           

          <bean id="dataSourceJboss" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
              <property name="jndiName" value="java:logreaderDS" />

          </bean>

           

          Now works fine on any profile.