This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

not able to access remote EJB on JBOSS

 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I have got an SLSB EJBs (in a jar) packaged in an EAR deployed at a remote JBOSS server.

When I try to access it from my servlet deployed in my local JBOSS server using :




it gives the error :



What is wrong in this?

Am I using some wrong credentials so it's a security exception or am I doing something absolutely wrong??

I guess it is able to look up the EJB as we can see the 'JNDI looked up' output but while creating the Remote object, it is not able to???

Any insights would be appreciated...

Thanks.


 
Niraj Jha
Ranch Hand
Posts: 63
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please verify if the user have roles?
Because of this you are not able to instantiate remote object.
 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick response, Neeraj.


This is a custom product that keeps its users and roles in a database

I can see the roles defined as username itself.

but there's another table userHasBusinessRoles which is not showing any rows for the given username.

Is that causing the issue...

Also, if I can lookup the EJB, shouldn't I be able to create the Remote??? Is it possible to differentiate rights of a user at this level?? I mean, 'you can lookup the HomeObject but you cannot create the Remote'??



 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post the code for the AccountSession class/interface please?
 
Niraj Jha
Ranch Hand
Posts: 63
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although It should work but what security implementation is there I am not sure about it.
If it is possible then check the security implementation.
 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
don't have the code for the AccountSession class or any interface...
It's an out-of-box product which needs to be accessed... (apologies if I mislead you with 'custom product' in my first post)

 
Niraj Jha
Ranch Hand
Posts: 63
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aayush Singhal wrote:
but there's another table userHasBusinessRoles which is not showing any rows for the given username.

Is that causing the issue...


This might be the issue check the same table where user have the access and use same credentials.
 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Neeraj... Yes . that might be one issue... There is no user with the 'username' in that row. I'll try to insert something in this table...

Also there are 2 tables like : ROLE and ROLE_MEMBER.

The table ROLE has my specific username.

but the table ROLE_MEMBER has nothing for my userName.

Do we need to have ROLE_MEMBER for any specific ROLE or can we directly use the ROLE itself???


 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have inserted a value in userHasBusinessRoles table for my username. (copied the same value as for some admin-looking username )

But I am still getting the same error. I guess this ROLE and ROLE_MEMBER has to do something with this...

EDIT1 : See this line from the error : Principal: CallerPrincipal(members:com.convergys.security.authentication.realm.jboss30.CAAFJBoss30User@8314748c)
Principal: Roles(members)
 
Niraj Jha
Ranch Hand
Posts: 63
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you go for other credential ?
 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The password is encrypted for them all. I only have the password for this username...

Anyways, I am leaving for the day now... Will look it up again on Monday.

Thanks a ton for your help

good night.

have a good weekend.
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aayush Singhal wrote:I guess it is able to look up the EJB as we can see the 'JNDI looked up' output but while creating the Remote object, it is not able to???

I don't think this is correct. The invocation of create:

is not creating the remote object. Rather, create is a method you can call on the remote object i.e. the method is defined on the AccountSessionHome interface.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic