Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help on RDBMSRealm

0 views
Skip to first unread message

Rahul Rele

unread,
Mar 6, 2001, 1:14:09 AM3/6/01
to

I dont know about Weblogic 6, but I needed it in Weblogic 5.8 to
implemenmt RDBMSRealm

"Eric" <er...@cls.uob.com.sg> wrote:
>
>Hi,
>
>Pardon me if I am asking a simple question cos I am new
>to Weblogic.
>
>IS the rdbmsRealm.properties file needed to implement
>a RDBMSRealm
>for weblogic 6.0?
>
>Thanks in advance for any advice.
>Eric
>

Rahul Rele

unread,
Mar 6, 2001, 1:35:14 AM3/6/01
to

Hi Eric,

I dont work on WL 6, but I have done some work on RDBMSRealm in
5.8, but I think I can help you to answer at least one of your
questions. i.e How to set the RDBMSRealm as your class .

Edit the weblogic.properties file
Enable RDBMSRealm by editing your weblogic.properties file. Add
the following property:

weblogic.security.realmClass=examples.security.rdbmsrealm.RDBMSRealm

hope this helps.

"Eric" <er...@cls.uob.com.sg> wrote:
>
>Thanks Rahul Rele, but I think in version 6 you can use
>the console
>to configure it. I had followed the steps
>mentioned in the example (except the caching realm ).
>However it
>is still not working.
>
>"Rahul Rele" <rahul...@hotmail.com> wrote:
>>
>>This link will help you to set your Relam as the default
>>Realm
>>http://www.weblogic.com/docs51/examples/security/rdbmsrealm/Package-examples.security.rdbmsrealm.html
>>
>>"Eric" <er...@cls.uob.com.sg> wrote:
>>>
>>>Hi,
>>>
>>>I am new to Weblogic (version 6.0). Currently I am trying
>>>to use
>>>RDBMSRealm to do authentication.
>>>Thru the console, I created a new RDBMSRealm. Additional
>>>I also
>>>had coded some classes
>>>(RDBMSRealm.java, RDBMSDelegate.java, ...User... Group.....
>>> as
>>>mentioned in the docuementation).
>>>
>>>However, when I try to log in, it fails. I suspected
>>it
>>>is still
>>>using the FileRealm. Did I miss out anything here?
>>>How can I make my newly created realm as the default
>>realm?
>>>
>>>Secondly, I am thinking of using EJB to authentication
>>>for me.
>>>Not sure that should I be doing this?
>>>
>>>Lastly, I think it is quite a stupid question, but I
>>really
>>>can't
>>>the anwser anywhere. My question is what is
>>>needed to be added in the schema properties field when
>>>adding a
>>>new RDBMSRealm thru the console.
>>>
>>>I really appreciate if someone can anwser my doubts.
>>>
>>>Thanks in advance.
>>>Eric
>>>
>>
>

Arthur

unread,
Mar 6, 2001, 4:33:04 PM3/6/01
to

No, the file is not required for 6.0.
Once you set up your realm using the console
the information is now stored in the config.xml.

Regards,
--Arthur

Eric

unread,
Mar 6, 2001, 8:35:57 PM3/6/01
to

Hi,

Thanks for all the help I got.
Now I am able to get the server to read my RDBMSRealm. However,
now I have a null pointer exception.
Does anyone know what is going on? I had been trying to figure
out but with no explaination.

Thanks for any advice.

<Mar 5, 2001 6:32:23 PM GMT+08:00> <Emergency> <Server> <Unable
to initialize th
e server: 'Fatal initialization exception
Throwable: java.lang.NullPointerException
java.lang.NullPointerException
at java.security.Identity.hashCode(Identity.java:470)
at java.util.Hashtable.get(Hashtable.java:320)
at weblogic.security.acl.GroupImpl.isMember(GroupImpl.java:93)
at weblogic.security.acl.GroupImpl.addMember(GroupImpl.java:48)
at weblogic.security.acl.internal.FileRealm$FileRealmGroupImpl._addMembe
r(FileRealm.java:1705)
at weblogic.security.acl.internal.FileRealm.loadGroupMembersFromProps(Fi
leRealm.java:1037)
at weblogic.security.acl.internal.FileRealm.loadMembers(FileRealm.java:1
204)
at weblogic.security.SecurityService.initializeRealm(SecurityService.jav
a:279)
at weblogic.security.SecurityService.initialize(SecurityService.java:121
)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:343)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:169)
at weblogic.Server.main(Server.java:35)
'>

Eric

unread,
Mar 7, 2001, 1:30:45 AM3/7/01
to

An additional information that I had just found out. The RDBMS realm
getUser( name ) method is called
with the name supplied in the file realm. It is still reading the
user name from the file realm.
Does that mean that I had not fully configured my RDBMS Realm to
work? Should the rdbms realm will replace
the file realm as the default realm.

Regards
Eric

Arthur

unread,
Mar 7, 2001, 1:42:58 PM3/7/01
to

When you say the following:

"Now I am able to get the server to read my RDBMSRealm."

Do you mean you are able to see the users and groups from your
rdbms realm?

When do you get the error you mentioned below?

Are you using your own custom realm?

I would suggest using the rdbms example included with weblogic.
That is the one I was using to test.

Regards,
--Arthur

Prabu Arumugam

unread,
Mar 7, 2001, 2:03:17 PM3/7/01
to

When the weblogic is configured with custom realm, it always calls
custom realm before default realm. If the custom realm returns
null for getUser method call, they it uses values from the file
realm.
So, it does not completely replace default realm.

Eric

unread,
Mar 7, 2001, 8:50:30 PM3/7/01
to

Hi,

I am sorry if I have not explained my problem clearly.

Let me try it again.

I am trying to create a new RDBMSRealm to be default realm used
to do authentication.

I had put some println statement in all methods of the realm class.

Then I try to start the server with the following configuration
in config.xml.

================================================
<RDBMSRealm
DatabaseDriver="oracle.jdbc.driver.OracleDriver"
DatabasePassword="password"
DatabaseURL="databaseURL"
DatabaseUserName="username"
Name="RDBMS Realm"
RealmClassName="full class name"
SchemaProperties="GetUserKey=select ...;GetGroupKey=..."
/>

<Security
GuestDisabled="true"
Name="consumer"
PasswordPolicy="wl_default_password_policy"
Realm="myRDBMSRealm"
SystemUser="guest"
/>

<CachingRealm
BasicRealm="RDBMS Realm"
CacheCaseSensitive="true"
Name="Caching Realm"
/>

<Realm
CachingRealm="Caching Realm"
Name="myRDBMSRealm"
/>

================================================

When I start the server, the following exception is printed on
the screen.

URDBMSRealm calling the realm constructor.
URDBMSRealm: getUser getting the user. name = everyone
URDBMSRealm: getUser getting the user. name = guest
URDBMSRealm: getUser getting the user. name = javajoe
<Mar 7, 2001 5:43:52 PM GMT+08:00> <Emergency> <Server> <Unable


to initialize th
e server: 'Fatal initialization exception
Throwable: java.lang.NullPointerException
java.lang.NullPointerException
at java.security.Identity.hashCode(Identity.java:470)
at java.util.Hashtable.get(Hashtable.java:320)
at weblogic.security.acl.GroupImpl.isMember(GroupImpl.java:93)
at weblogic.security.acl.GroupImpl.addMember(GroupImpl.java:48)
at weblogic.security.acl.internal.FileRealm$FileRealmGroupImpl._addMembe
r(FileRealm.java:1705)
at weblogic.security.acl.internal.FileRealm.loadGroupMembersFromProps(Fi
leRealm.java:1037)
at weblogic.security.acl.internal.FileRealm.loadMembers(FileRealm.java:1
204)
at weblogic.security.SecurityService.initializeRealm(SecurityService.jav
a:279)
at weblogic.security.SecurityService.initialize(SecurityService.java:121
)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:343)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:169)
at weblogic.Server.main(Server.java:35)

I do not have all these names in my database table.
That make me think they are from the file realm.
Since the println statement is printed on the screen, I presume
that my RDBMSRealm is used instead of
the default file realm. However, by looking at the exception, it
seems that the server is still trying to use
the file realm. This is the part where I am confused.

Hope that I had did a better job this time.
Thanks for the prompt response.

Eric

Eric

unread,
Mar 7, 2001, 8:54:38 PM3/7/01
to

Hi,

Yes I agree with you. But the thing I do not understand is why
it is passing the user names found
in the file realm to my RDBMS realm. It should get the user name
from my database instead.

Please correct me if I am wrong.

Regards
Eric

0 new messages