Robert Tomson

Greenhorn
+ Follow
since Nov 12, 2010
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Robert Tomson

got it again,
now my jndi lookup start with "java:global/...."

i only succeeded because there was server log entry "INFO: Portable JNDI names for EJB UserDAOBean .........."
9 years ago
now I can see how missed this topic subject is, cause its all about getting reference to ejb,

anyway, i have recreated this project but now with maven and the problem is back ^^ my ejb is null again
i had to remove from web.xml

added
(name="UserDAOBean") to @Stateless annotation of my UserDAOBean

so now iam using it like this in JSF Managed Bean

@Mark Spritzler
i have tried to do as you suggested, as far as i could understand it, but with no luck , and of course i dont know if it still applies to my new(maven) situation

can you explain it in 'simple english', like for an idiot :P
hope i dont ask for too much
9 years ago

Mark Spritzler wrote:It looks like the username is not being passed in.

Try putting breakpoint in your userdetails and seeing what is null.

You are using j_username in your username field on your form, correct?

Mark



username is correct, i am using login form generated by spring.

but my userDAO is null, and thats the problem

edit : i probably need to use jndi lookup, looking into this right now

eidt 2: got it
1) added in web.xml
2)
in my UserDetailsService


still if there is better/more 'pro' way i would like to here it :P
9 years ago
hi, i have created simple CRUD app(beginner here) which is working fine, so now i want to add authentication

after trial of errors i am finally able to successfully deploy my app, but at first login attempt i am receiving :

my UserDetailsService implementation

part of applicationContext-security.xml


is it possible to use @EJB annotation in UserDetailsService, same way i am using it in JSF Managed Bean ?
9 years ago
thank you very much , its working, haha now when i know the answer its seams logical :P
it was automatically generated by netBeans

hi, i am working on recreating tree from database table,



what i need to do is to select all items where parentIndex is null

so in mysql i can do : SELECT * FROM `treemenu` WHERE parentIndex IS NULL

how should query look like in jpa to get same results ?

"SELECT t FROM TreeMenu t WHERE t.parentIndex IS NULL" gives me 'unknown state or association field [parentIndex]'
touche
shame i have wasted 2 days on that issue
Hi,
i am complete beginner if it comes to JPA/EJB so i dont know, if i will be able to explain myself correctly but here we go:

here is my database


and two automatically generated by netBeans classes (based on that database)




and in the third class UserDAOBean i am doing createUser updateUser deleteUser ... etc.
i am able to successfully persist() or remove() user but i can not update(merge ?) username(PK)



any ideas ?