Gerald Holl

Greenhorn
+ Follow
since Jul 14, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gerald Holl

Hello,

I read some examples concerning EJB QL but they didn't satisfy me.

Consider the following example:
two tables:
DVD and Users
DVD PK is an id, Users PK is the username.

The mapping table between DVD and Users had been created by using the @ManyToMany annotation.

Now I want to search all the DVDs of user "jimbo".

Ok, let's try it:


It doesn't work, I get an exception that the SQL grammar isn't correct.
I also tried some other queries but they result in the same error.

I have no idea what's wrong. Help appreciated.
I have problems with ManyToMany relationships in EJB 3.0 (JBoss 4.0.3RC1)

Consider the following example:

class Book:



class BookAuthor:


I don't know how to add a book and it's author.
If I add a book do I have to create a Set that holds all the authors? And do I have to add that book to the books Set of the author bean?
I have absolutely no idea how this works. I didn't find a good tutorial (not even on the JBoss website) with google.

Hope that somebody can explain me how it works.

Thanks,
Gerald
Hello Norman,

I solved it with help from the JBoss forum:
The file common-httpclient.jar was missing.

Anyway, the response time in this forum is quite faster than of the JBoss forum, that's the reason why I prefer posting here
18 years ago
Sorry, I've forgotten the most important part :roll:

The getSubscriptionId() method should return a String (it doesn't). It's the point where error occurs.
18 years ago
Hello!

I deployed some EJB3 session beans with JBoss 4.0.3RC1 without errors but I always get a NoClassDefFoundError when I call a method on the client.
Here are some lines of the (console) test client:


The getSubsriptionId() Method returns a simple string. The lookup works fine.

RemoteSearch is the remote interface that the session bean implements.

Here is the whole error:


I didn't find any hints with google, I hope somebody can help me.

cheers,
Gerald
18 years ago
Thanks for the explanation, I had some troubles translating it into english.

I think it would be better to use a ManyToMany relation instead of creating the mapping table myself.
Hello!

Does anybody know if complex primary keys (in my case the primary key consists of two keys, varchar and an integer) are supported in EJB 3.0?

My database schema contains some mapping tables and so I have to use complex primary keys that consists of two unique keys (as mentioned above).


Thanks,
Gerald