Sitemap

Amicuk Programming Answers

Do i need to set Resource Ref's in teh deploy tool for a CMP bean?

-0001-11-30   Views:0

Advertisement

Hi, I have a CMP bean which i have deployed, it doesnt work, in the server log shows the following. [#|2005-03-10T14:13:21.046+1030|WARNING|sun-appserver-pe8.1|javax.enterprise.system.container.ejb.entity.finder|_ThreadID=16;|JDO74004: Bean 'PersonEn

Hi,
I have a CMP bean which i have deployed, it doesnt work, in the server log shows the following.
[#|2005-03-10T14:13:21.046+1030|WARNING|sun-appserver-pe8.1|javax.enterprise.system.container.ejb.entity.finder|_ThreadID=16;|JDO74004: Bean 'PersonEntityBean' method ejbFindByPrimaryKey:
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
SQL statement<select t0.person_id, t0.name from person t0 where t0.person_id = ?> with input values:java.lang.Integer:1.
Please examine the SQLException for more information.
NestedException: java.sql.SQLException: No database selected
THe database has been set up in the connection pools, i thought this was enough, as there is no coded names in the implementation code, am i wrong?
how do i get my CMP bean to communicate with the database?
do i need to set up any references?
thank you for your time
Gavin.

The replay answer
Advertisement
You set the JNDI name of the JDBC resource in deploytool. To do this, select your EJB JAR, select the General pane, and click Sun-specific Settings. Enter the JNDI name of your JDBC resource, and then set up the mappings & relationships. The J2EE 1.4 Tutorial's Container Managed Persistence Examples chapter has several examples that show how to do this.
-Ian Evans

Go to See the other 3 answers

Do i need to set Resource Ref's in teh deploy tool for a CMP bean?

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I have a CMP bean which i have deployed, it doesnt work, in the server log shows the following. [#|2005-03-10T14:13:21.046+1030|WARNING|sun-appserver-pe8.1|javax.enterprise.system.container.ejb.entity.finder|_ThreadID=16;|JDO74004: Bean 'PersonEn[More]

Some doubts in using resource-ref,connection pool n Data-source

Category:DefaultRelease time:2015-10-11Views:130

Hi all , I need little bit clarification in the following points. 1) Does the connection pool which is created can be displayed in JNDI Tree??? I am seeing only DataSOurce in the JNDI Tree Only. 2)In case of Bean Managed Persistance, in ejb-jar.xml,[More]

How to map a resource-ref in Jdev11 deployment plan editor

Category:DefaultRelease time:2015-10-11Views:130

Hi all, I have a ADF/BC web application where the BC4J application module does connect to a JNDI data source. The ViewController project does declare the Datasource as needed resource in its web.xml: <resource-ref> <res-ref-name>jdbc/wlogDS<[More]

Message Driven Bean - Resource Ref

Category:DefaultRelease time:2015-10-11Views:130

hi Can anyone guide me with the steps in creating the resource ref in the Message Driven bean. When i run i get the following C:\Sun\Projects\simple>appclient -client MSBApplicationClient.jar JNDI lookup failed: javax.naming.NameNotFoundException: No[More]

Resource Ref's settings of a CMP bean in SAS PE 8.2 - Deploytool

Category:DefaultRelease time:2015-10-11Views:130

Dear all, In the deploytool of SAS8.2, in the [Resource Ref's] tab of a CMP bean do I need to set anything here to enable the CMP bean to connect to the database? I already have a JDBC source registered in the server and it is called jdbc/mydatasourc[More]

Resource-ref binding

Category:DefaultRelease time:2015-10-11Views:130

i'm using the weblogic ejb server. i currently have a datasource configured with a jndi name of myDS. i have some stateless session beans using a resource-ref to access the datasource. i'm not a jndi expert at all, but i think jboss by default binds[More]

Looking up Managed ConnectionFactory by JNDI Resource-Ref

Category:DefaultRelease time:-0001-11-30Views:130

Thank you in advance for your help... I'm writing an Enterprise Java Bean using WebLogic Workshop that needs to access a connection factory defined in a deployed Resource Adapter. I'm trying to access the server managed connection factory through the[More]

Adding resource-ref  in web.xml

Category:DefaultRelease time:-0001-11-30Views:130

dos it make any difference adding      <resource-ref>            <description>Application Datasource </description>            <res-ref-name>jdbc/myDataSource</res-ref-name>            <res-type>javax.sql.DataSource<[More]

What's the actual function of resource-ref in web.xml

Category:DefaultRelease time:-0001-11-30Views:130

I was configuring JNDI datasource in tomcat and found an confusing fact. If I have the JNDI resource configuration in the context configuration of the project, I could get access to the JNDI element with or without the resource-ref configuration in m[More]

What's resource-ref for?

Category:DefaultRelease time:-0001-11-30Views:130

I'm a JNDI newbie, so I hope this isn't too dumb. :-) I have a web app that I'm running in Tomcat 4.1.10 against a MySQL database. The app gets the DB using JNDI as described in the JNDI howto that comes with Tomcat. Everything works fine. Question i[More]

Unable To lookup .... weblogic.jobscheduler  and  web-xml resource ref

Category:DefaultRelease time:-0001-11-30Views:130

Unable To lookup .... weblogic.jobscheduler and web-xml resource ref for timer manager JNDI NameNotFound Exception .... Do, i need to configure something get that working. Didn't find any thing on documentation or hosted examples.The default timerman[More]

Hot
We have a table that currently has latitude, longitude columns and are trying to decide what route to go as far as adding spatial data to future records. A spatial index will be placed on the new column. There appear to be 3 solutions: 1 Create a mat [More]
First off, I don't know much about macs so I need some help in backing up our computer. We have a MacBook Pro 10.6.2. It is a little over 3 years old so we don't have Snow Leopard. My husband has been using Backup to back up our info to an external H [More]
I'm only just starting to use my new macbook pro Still trying to get to grips with everything Amazon websites: they simply wont load on Safari and on Chrome they looked mangled Where am I going wrong? Is something not working somewhere? Thanks Omarye [More]
Got the following error log while trying to install: Exit Code: 7 Please see specific errors and warnings below for troubleshooting. For example,  ERROR: DS003, DW050 ... -------------------------------------- Summary -------------------------------- [More]
Hi Folks,               Our requirement is to generate the customer account statement for a set of cusomters during a particular period.                      we  use a script to generate the statement and convert it to pdf.This pdf is then stored in [More]
hi there I have a file chooser to select files. and store them in a File[] listfile. but if I need to add some more files to this listfile, how can I add them without deleting previous selected files? I know I can use List class to do this, can I jus [More]
- GlassFish Server Open Source Edition 3.1 - Server Version:     Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_jk/1.2.32      - JK Version:     mod_jk/1.2.32 () I have succesfully created two instances in a cluster, one of which is insta [More]
Hey, I'm trying to do what i do with a bitmap image to a movie file. I just go to modify/bitmap/trace and it traces my bitmap into vectors and makes it look all animated and such. I would like to do the same thing for a movie file that i have. Is the [More]
Ok, I am guilty of usually not backing up my computer and I feel I have been lucky so far. I was going to wait for Time Machine but maybe I should just start taking care of things now instead of waiting. I need some advice on the best way to make a b [More]
Hi Gurus, I have defined the pricing control as example, below: 10 ZK9A 20 ZK9B 30 ZK9C 40                            subtotal that is equal 10 until 30           50 ZKBB 60ZKBC 70ZKBD How to do with that o step 70 (zkbd) received the value of step 4 [More]