wood burning stoves*
The moose likes EJB and other Java EE Technologies and the fly likes J2EE Developers Guide Chapter 4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "J2EE Developers Guide Chapter 4" Watch "J2EE Developers Guide Chapter 4" New topic
Author

J2EE Developers Guide Chapter 4

Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I'm using the pdf file that came with Sun's J2EE bundle, and I've compiled, deployed and successfully run 3 of the examples.

In chapter 4 they begin using Entity Beans, and I have not gotten the first 'account' example to work in 2 days of trying.

Is there anything that any of you can point to and say "on page x they have a typo it should say 'do foo', instead of 'do bar'". My colleagues at work have begun to call me the sailor, because my swearing has risen alarmingly.

I do everything they say.. and it seems that every time I try do tweak or fiddle, I get a different error.

I've gotten all of these:
- the narrow fails in the client
- ejb couldn't be created
- jdbc didn't bind properly

I can't overly stress that I've done *exactly* what the docs say to do. I've been over the same procedures at least 15 times. I've even tried using mySQL instead of cloudscape (most of my errors in the first day were SQL errors). But after pushing and pulling, it seems my error has occured earlier and earlier. Today I'm sitting all the way back up at "couldn't make ejb".

I am *really* at the point of chucking this !@()*&$@ and going for a beer and playing pool. In fact, I'm leaving right now. GRRRRRR!
Madhu Juneja
Ranch Hand

Joined: Mar 10, 2001
Posts: 176
What is the problem you are getting ? can you explain the steps. I have deployed the bean created in chapter 4 and i did not face any problem.
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1845
Mike,

In chapter 4 they begin using Entity Beans, and I have not gotten the first 'account' example to work in 2 days of trying.

I think you are referring to the account example of J2ee which is an BMP. If you can tell the specific error/exception you are getting people here can definetly help you out as we have gone through the stage you are going through, though we would like to forget that part.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Yes, it's the first BMP example.

This is very frustrating, but it finally worked this AM.

Just like in all the times previous, I removed all traces of previous tries. Re-did everything. And now it works.

One question though. In the J2EE DOS window that remains open when you start the app server... there are five error messages, all the same.

"Cannot find principal mapping information for data source with JNDI name jdbc/Cloudscape"

However, if I scroll to the top of this window, during app server startup, there is the line:
"Binding DataSource, name = jdbc/Cloudscape, url = jdbc:cloudscape:rmi:CloudscapeDB;create=true"
and there is no error information (appears to be no real feedback so perhaps there is an error, but just not being reported)

I had a brainstorm while writing this URL, that maybe the create=true was a problem, so I removed it, and restarted everything. But this makes no change. Also discovered that you need to use the cloudIJ tool and say "delete from account;" whenever you want to run the example again

What is the error message trying to tell me? The app still works, and I don't like seeing this message. It's like my car is beeping that my fuel is low, but I can still drive for 5 hours.

[This message has been edited by Mike Curwen (edited April 06, 2001).]
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1845

It's like my car is beeping that my fuel is low, but I can still drive for 5 hours.

Quite true. I too found this message when using J2EE
Cannot find principal mapping information for data source with JNDI name jdbc/Cloudscape
But in the end decided to forget it.
By the way if you are trying to connect to oracle i may be able to help you.
KiranKK
Greenhorn

Joined: May 23, 2001
Posts: 1
You can solve this problem by just giving some dummy userid and password for the cloudscape database.
GO to this link.. http://developer.java.sun.com/developer/onlineTraining/J2EE/Intro/jdbc.html
This link says that :::::::::::
The J2EE server output might show the following message each time database access is attempted. The message means no user name and password were supplied to access the database. You can ignore this message because a user name and password are not required to access the Cloudscape database, and this example works just fine regardless of the message.
Cannot find principal mapping information for data source with JNDI name jdbc/Cloudscape

Kiran

[This message has been edited by KiranKK (edited May 23, 2001).]
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

THANK-YOU!!!

ARGH! My J2EE console window has never been cleaner!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: J2EE Developers Guide Chapter 4
 
Similar Threads
JBoss EJB Client Jar
classpath Catch-22
Websphere 7, MySQL, EJB3 & OpenJPA
Head First Java
RMI apps on J2EE app server