• Post Reply Bookmark Topic Watch Topic
  • New Topic

ejb deployement in weblogic 7.0 server

 
Harsha Vardhan Madiraju
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i am unable to deploy my entity bean it says" unable to locate the datasource, check ur JNDI name....."

i did configure the connection pool and the datasource at the Weblogic console with correct jndi name, also i also checked that same datsource which is configured at console, is used in deployement descriptor file .
Pls help me, thanx in advance
harsha
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Send your deployment descriptors
 
Harsha Vardhan Madiraju
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is weblogic-ejb-jar.xml.............
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>

<!-- Generated XML! -->
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>DeptEJB2</ejb-name>
<entity-descriptor>
<pool>
</pool>
<entity-cache>
</entity-cache>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
<entity-clustering>
</entity-clustering>
</entity-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<jndi-name>DeptEJB2</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
this is ejb-jar.xml.............
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<!-- Generated XML! -->
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>DeptEJB2</ejb-name>
<home>DeptHome</home>
<remote>Dept</remote>
<ejb-class>DeptEJB</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>DeptEJB2</abstract-schema-name>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>DeptEJB2</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
this is weblogic-cmp-rdbms-jar.xml............

<!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd'>
<!-- Generated XML! -->
<weblogic-rdbms-jar>
<weblogic-rdbms-bean>
<ejb-name>DeptEJB2</ejb-name>
<data-source-name>MyDataSource</data-source-name>
<table-map>
<table-name>dept</table-name>
<field-map>
<cmp-field>id</cmp-field>
<dbms-column>dept_id</dbms-column>
</field-map>
<field-map>
<cmp-field>name</cmp-field>
<dbms-column>dept_name</dbms-column>
</field-map>
</table-map>
</weblogic-rdbms-bean>
<create-default-dbms-tables>True</create-default-dbms-tables>
</weblogic-rdbms-jar>
 
Ning Du
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should check whether your data source is successfully bounded with the right JNDI name.(Check the JNDI Tree,can you find the right JNDI name you bounded?)
 
Seetesh Hindlekar
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Harsha,
Weblogic 7.0
-------------
CMP Entity Bean requires Tx DataSource. Hope u have associated that in the weblogic-cmp-rdbms-jar.xml file.
If ur trying to associate a simple DataSource to your CMP EB, it will throw an error like the one described during deployment.
Rgds,
Seetesh
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!