0 Replies Latest reply on Jan 29, 2009 4:02 PM by Rahul Sanjay

    Problem while deploying seam application in weblogic 10.3

    Rahul Sanjay Newbie

      I am trying to deploy seam-hibernate application in weblogic10.3. It throws the following Exception.


      javax.naming.NameNotFoundException: Unable to resolve 'riskds'. Resolved ''; remaining name 'riskds'
           at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
           at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
           at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
           at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
           at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)


      my hibernate.cfg.xml is


      hibernate-configuration>
          <session-factory>
              <property name="show_sql">true</property>
              <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
              <property name="connection.datasource">riskds</property>
              <property name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
              <property name="transaction.flush_before_completion">true</property>
           <!-- <property name="connection.autocommit">false</property>--> 
              <property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
              <property name="hibernate.jdbc.batch_size">0</property>
              <mapping class="com.oracle.riskwf.entity.RiskDetails"/> 
              <mapping class="com.oracle.riskwf.entity.Region"/> 
              <mapping class="com.oracle.riskwf.entity.UserDetails"/> 
              <mapping class="com.oracle.riskwf.entity.Documents"/> 
              <mapping class="com.oracle.riskwf.entity.RoutingRules"/> 
                    
           </session-factory>
      </hibernate-configuration>



      The datasource riskds is already created in weblogic and tested ok.


      Because of this Exception the deployment failed. But the same code woks fine with the Tomcat . only change in hibernate.cfg.xml is


      <property name="connection.datasource">java:comp/env/jdbc/oracle1</property>



      In tomcat its there as jdbc/oracle1.


      Please help me as I am unable to proceed further. Thanks in advance.