aspose file tools*
The moose likes JBoss/WildFly and the fly likes JDataStoreDS not bound error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JDataStoreDS not bound error" Watch "JDataStoreDS not bound error" New topic
Author

JDataStoreDS not bound error

Kriti Garg
Ranch Hand

Joined: Sep 13, 2004
Posts: 50
Hi all,

I am new to this field.

I am developing an CMP entity bean using JBuilderX and JBoss3.2.1 and follwed a article to generate an entity bean using borland JDataStoreDS.


For this ......

1)i put dx.jar,jds.jar,jdsserver.jar in deploy folder of JBoss from lib folder of JbuilderX

2)Created a jdatastore-ds.xml like this

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>JDataStoreDS</jndi-name><connection-url>jdbc:borland slocal:E:\JBuilderX\samples\JDataStore\datastores\employee.jds</connection-url>
<driver-class>com.borland.datastore.jdbc.DataStoreDriver</driver-class>
<user-name>Sample</user-name>
<password></password>
</local-tx-datasource>
</datasources>

3)I Import the schema from database and created a enity bean correspondinf to the table "Employee" and a session bean to call this entity bean.

4)jboss.xml looks like...

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
<jboss>
<enterprise-beans>
<entity>
<ejb-name>Employee</ejb-name>
<local-jndi-name>Employee</local-jndi-name>
</entity>
<session>
<ejb-name>EmpSession</ejb-name>
<jndi-name>EmpSession</jndi-name>
</session>
</enterprise-beans>
</jboss>

5)jbosscmp-jdbc.xml looks like this....
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN" "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">
<jbosscmp-jdbc>
<defaults>
<datasource>java:/JDataStoreDS</datasource>
<datasource-mapping>InterBase</datasource-mapping>
</defaults>
<enterprise-beans>
<entity>
<ejb-name>Employee</ejb-name>
<datasource>JDataStoreDS</datasource>
<datasource-mapping>InterBase</datasource-mapping>
<table-name>EMPLOYEE</table-name>
<cmp-field>
<field-name>deptNo</field-name>
<column-name>DEPT_NO</column-name>
</cmp-field>
<cmp-field>
<field-name>empNo</field-name>
<column-name>EMP_NO</column-name>
</cmp-field>
<cmp-field>
<field-name>firstName</field-name>
<column-name>FIRST_NAME</column-name>
</cmp-field>
<cmp-field>
<field-name>fullName</field-name>
<column-name>FULL_NAME</column-name>
</cmp-field>
<cmp-field>
<field-name>hireDate</field-name>
<column-name>HIRE_DATE</column-name>
</cmp-field>
<cmp-field>
<field-name>jobCode</field-name>
<column-name>JOB_CODE</column-name>
</cmp-field>
<cmp-field>
<field-name>jobCountry</field-name>
<column-name>JOB_COUNTRY</column-name>
</cmp-field>
<cmp-field>
<field-name>jobGrade</field-name>
<column-name>JOB_GRADE</column-name>
</cmp-field>
<cmp-field>
<field-name>lastName</field-name>
<column-name>LAST_NAME</column-name>
</cmp-field>
<cmp-field>
<field-name>phoneExt</field-name>
<column-name>PHONE_EXT</column-name>
</cmp-field>
<cmp-field>
<field-name>salary</field-name>
<column-name>SALARY</column-name>
</cmp-field>
</entity>
</enterprise-beans>
</jbosscmp-jdbc>

5) When i run Jboss i get the following error...

10:15:36,316 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
<none>
Incompletely deployed packages:
[org.jboss.deployment.DeploymentInfo@78bb48a7 { url=file:/E:/JBoss/jboss-3.2.1/server/default/deploy/ProductModule.jar }
deployer: org.jboss.ejb.EJBDeployer@1904e0d
status: Deployment FAILED reason: Verification of Enterprise Beans failed, see above for error messages.
state: FAILED
watch: file:/E:/JBoss/jboss-3.2.1/server/default/deploy/ProductModule.jar
lastDeployed: 1103863530347
lastModified: 1103863530284
mbeans:
]MBeans waiting for classes:
<none>
MBeans waiting for other MBeans:
[ObjectName: jboss.j2ee:jndiName=Employee,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: JDataStoreDS; - nested throwable: (javax.naming.NameNotFoundException: JDataStoreDS not bound)]

10:15:36,347 INFO [URLDeploymentScanner] Started


Let me know if i am proceeding right and what should be done exactly
to get rid of this .

Kriti
Jeff Shelley
Ranch Hand

Joined: May 21, 2003
Posts: 70
If you deploy only the datasource does it throw any errors?
also, if you invoke "list", on the JNDIView from the jmx-console, do you see the datasource your trying to hook up to?


It's almost Friday
Kriti Garg
Ranch Hand

Joined: Sep 13, 2004
Posts: 50
trying to configure JDataStore(of Borland) as DataSource.
ERROR [STDERR] javax.naming.NameNotFoundException: JDataStoreDs not bound

the jbosscmp-jdbc lokks like this
<jbosscmp-jdbc>
<defaults>
<datasource>java:/JDataStoreDS</datasource>
<datasource-mapping>InterBase</datasource-mapping>
</defaults>
<enterprise-beans>
................


And Employee is a table...

EmployeeSessionBean is
..............
javax.naming.Context context = new javax.naming.InitialContext();
Object object = context.lookup("java:comp/env/ejb/Employee");
EmployeeHome empHome = (EmployeeHome) javax.rmi.PortableRemoteObject.
narrow(object, EmployeeHome.class);
Employee emp = empHome.findByPrimaryKey(empNo);
empName = emp.getFirstName() + " " + emp.getLastName();
.....

I am new to this world

so pls help
 
 
subject: JDataStoreDS not bound error