While implementing sample custom realm, got ClassNotFound exception

I am trying to get the sample custom realm work. I followed every step in the documentation and had it deployed successfullyl. When I tried to log in, the authentication failed. Then I restarted the SunOne appserver, in the server.log file I got the error:
[22/Jul/2003:09:34:24] WARNING (24887): SEC1100: Disabled realm [jdbc] due to errors.
[22/Jul/2003:09:34:24] WARNING (24887): SEC1000: Caught exception.
com.sun.enterprise.security.auth.realm.BadRealmException: java.lang.ClassNotFoundException: samples.security.jdbcrealm.JDBCRealm
at com.sun.enterprise.security.auth.realm.Realm.doInstantiate(Realm.java:350)
at com.sun.enterprise.security.auth.realm.Realm.instantiate(Realm.java:284)
at com.iplanet.ias.security.RealmConfig.createRealms(RealmConfig.java:95)
at com.sun.enterprise.security.RealmManager.init(RealmManager.java:91)
at com.sun.enterprise.server.J2EEServer.startAuthenticationService(J2EEServer.java:1211)
at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:391)
at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:1415)
at com.iplanet.ias.server.ApplicationServer.onInitialization(ApplicationServer.java:212)
at com.iplanet.ias.server.J2EERunner.confPreInit(J2EERunner.java:114)
Since I am new to this, I couldn't locate the problem after checking everything many times. Can anyone help me? I need to get this part work first, then I can move ahead and make changes.
Thanks a million!

Thanks a lot, I did it and it worked.
I have more questions. For the custom realm database, I want to use a table just for username and password, and another table just for roles. Then use a third table as a bridge between the two. Can I do it in the sample application? Can I change JDBCLoginModule to do this? If yes, Where to put JDBCLoginModule and JDBCRealm after changes?
Really appreciate your help.

Similar Messages

  • Custom Realm for SJSAS 9.x using JAAS documentation too vague

    Hello there,
    I am trying to implement a custom realm for a particular web application on my SJSAS 9.x server. So far I have been unsuccessful and receive the following message in my server.log:
    [#|2006-10-20T13:51:56.390-0300|INFO|sun-appserver-pe9.0|javax.enterprise.system.core.security|_ThreadID=11;_ThreadName=httpWorkerThread-8080-1;javious;|SEC5046: Audit: Authentication refused for [javious].|#]
    The documentation I have been using for reference is at:
    http://docs.sun.com/app/docs/doc/819-3659/6n5s6m58k?a=view#beabs
    However, I have a number of questions.
    First of all, this section referenced by the URL above is identified as "Creating a custom realm". Then the second sentence of this section states "Note that client-side JAAS login modules are not suitable for use with the Application Server". Does this not mean that JAAS login modules are not suitable for use with SJSAS web applications since they are components of the Application Server? Is there a reason for providing information on creating a custom realm for this application server in which it is not suitable for? Why isn't it suitable for the application server? What if I want to implement my own realm for my web application so that I can maintain my application users separately in another application?
    Secondly, this section explains that I can create a custom realm simply by creating a custom JAAS login module and a custom realm class. It then goes on to explain how to construct these classes and what to include in them. Notably, the documentation states the following:
    The authenticateUser() method must end with the following sequence:
    String[] grpList;
    // populate grpList with the set of groups to which
    // _username belongs in this realm, if any
    return commitUserAuthentication(_username, _password,
      _currentRealm, grpList);Having looked at the API for authenticateUser I discovered that it is a void method, however the documentation states to return a value from "commitUserAuthentication(..). Also, my commitUserAuthentication method only excepts a single argument of type String[] representing a list of group names, therefore I am unable to supply the additional arguments as documented. This is confusing.
    Once finished reading the documentation, I am left hanging with hardly a clue as to what to do with these two new classes. Now having implemented a custom login module on Tomcat 5.x in earlier days, I did happen to have some experience to know to edit the security.properties, policy, and login.conf files. So anyhow from here I end up stumbling blindly through configuration of my domain1/login.conf and domain1/server.policy files. I also attempted to add my new realm within the admin console under security/realms and dropped my new jar file (with two classes) into the app server lib directory.
    All in all, this completely fails to work. I have even placed System.out.println statements in all of my implemented methods and none of this actually shows up in my server.log file. Why is this section so vague? Why isn't there a step-by-step example from start to finish of how to implement a simple custom realm in SJSAS9?
    Does anybody have any helpful suggestions?

    Well, once again, I'm going to have to provide my own answer.
    After much waiting and then deciding to invest much time researching documentation and tracking down information to assist in my solution, I have manage to find the golden egg for my own recipe of a solution.
    In addition to the very helpful info I have found at:
    http://developers.sun.com/prodtech/appserver/reference/techart/as8_authentication/index.html
    I have mange to get my custom realm to work with the additional configuration of my sun-application.xml for my ear file. Even though I only wanted to specify my custom realm for my web.xml file, it turns out that in addition to this, I had to also define it in my sun-application.xml file (manually in XML text mode - within Netbeans 5.5) as follows:
    <sun-application>
        <realm>mycustrealm</realm>
        <security-role-mapping>
            <role-name>mycust_role</role-name>
            <group-name>mycust_group</group-name>
        </security-role-mapping>
    </sun-application>

  • Custom Realm using LDAP?

    Hi,
    has anyone implemented a custom realm using LDAP? I was suprised to learn that
    ACLs are not supported in the LDAPRealm. Our corporate direction is to have a
    central LDAP security store - including ACLs. Unfortunately the LDAP server is
    MS SiteServer! Anyway, I assume this means I need to implement a custom realm
    - unless there is an alternative.
    -chris

    You are correct - you'll need to write a custom
    realm to do this.
    -Tom
    "Chris Jones" <[email protected]> wrote:
    >
    Hi,
    has anyone implemented a custom realm using LDAP? I was suprised to
    learn that
    ACLs are not supported in the LDAPRealm. Our corporate direction is
    to have a
    central LDAP security store - including ACLs. Unfortunately the LDAP
    server is
    MS SiteServer! Anyway, I assume this means I need to implement a custom
    realm
    - unless there is an alternative.
    -chris

  • Sun java system application server 8 custom realm lock the admin console up

    Hi:
    I implemented a custome realm. After I installed the custom realm to Sun App server 8 PE, I can get into the admin console any more. According to the log, the user is authenticated. However, this user isn't in write group to access the admin console. What would be the user group in a custom realm to access admin console?
    In version 7, even you set up custom realm the admin console still not affected by the custom realm. Why is the admin console in version 8 picking up custom realm?
    Thanks.

    Previous reply was quite misleading - there is no such thing as default admin password for standalone installation of Application Server. Default values only apply to Application Server installation installed through Creator or NetBeans installer.
    Otherwise, you have to specify admin user name and password at installation time. Admin username value is defaulted to "admin" so unless you changed it in your installation that should still apply. You had to enter explicit password values.
    If you forgot those, you can either uninstall and reinstall or you can take a look at Troubleshooting Guide for instructions on reseting admin authentication:
    http://docs.sun.com/source/817-6085/troubleshooting.html#1026910

  • Strange behavior w/ custom realm

    Hi,
    I've implemented a custom realm that exhibits a couple of inconsistencies
    that I'm hoping someone here has encountered:
    1. I've implemented AbstractListableRealm and overridden every method. I
    print out a debugging message and return null out of all the methods that
    return an object. I've developed a web app for which I require
    authentication for all URLs (i.e. /*). The login page comes up fine when I
    request a URL. The interesting this is that none of the authenticate
    methods or authUserPassword are ever called. Is this the correct behavior?
    If so, where do the passwords get checked?
    2. Authentication will always succeed as long as you type in a valid
    username; the password never seems to get checked. This is probably related
    to (1), but since authenticate or authUserPassword are never called, I don't
    see how authentication can ever fail.
    I'm running this against WLS5.1 sp8. The user list is stored in a database
    that I load once and cache in a Hashtable.
    Thanks in advance,
    Dhiren

    Decided to swap back in the Enermax PS (430W) since it had higher ratings for 5v and 3.3v (20A max on the 12V rail, the neo480 had dual 12v rails of 18A and 15A)
    Same thing happens - Power LED goes out when running doom3 or even a windowed DX9 3D demo app (i.e. something increasing the load)
    I guess it's a motherboard issue then...
    and the system did lock up once today (on the 3rd time running
    rthdribl  (windowed DirectX9 benchmark)
    http://www.daionet.gr.jp/~masa/rthdribl/
    I wonder how responsive MSI is going to be on this (no reply to my mail earlier this week) and  I'm not sure newegg would do anything on this but I guess I can call them to ask.

  • Custom Realm in WLS6.1

    Hello,
    Has anyone implemented authentication & authorization with a Custome realm
    in WLS 6.1.I need to implement a custom realm which accesses a policy director
    to grant access to resources.Can anyone please help with some ideas?
    btw,i went through the documentation of how to write a custom realm.i have a
    question on the following code snippet
    String userInfoFileName =
         configData.getProperty("UserInfoFileName");
    String groupInfoFileName =
         configData.getProperty("GroupInfoFileName");
    Where in the config do u need to specify values for the above mentioned properties.If
    anyone has implemented Authentication and Authorization with a custom realm,can
    u please help me with more explanation and a code snippet?
    Thanks,
    Kalyan

    nope..
    "Viswadas Leher" <[email protected]> wrote in message
    news:3cebb4e1$[email protected]..
    >
    >
    I have two web applications running in the same weblogic domain. Can Ispecify two
    different custom realms to the web apps. If yes how?.
    The only way i could get the custom realm class called by the server if ispecify
    it as
    <Realm CachingRealm="LeherCacheRealm"
    FileRealm="wl_default_file_realm" Name="wl_default_realm"/>
    in the config.xml. This causes the weblogic users, such as "system" etc toget invalidated.
    >
    >
    I tried using the following tags to specify it on a per application basis,which
    doesnot seem to work . Am i missing something?
    <CustomRealm Name="LeherRealm"RealmClassName="com.leher.security.weblogic.KinectaRealm"/>
    <CachingRealm BasicRealm="LeherRealm" CacheCaseSensitive="true"Name="LeherCacheRealm"/>
    <Application Deployed="true" Name="DummyApp" Path="F:\leher">
    <WebAppComponent AuthRealmName="LeherCacheRealm"
    Name="DummyApp" Targets="myserver" URI="dummyapp"/>
    </Application>
    Is it not possible to define different realms to different webapplications in the
    same domain.?

  • Admin Console Integration for Users in a Custom Realm

    We are implementing a custom realm and are having troubles getting our Users to
    show up in the User list.
    Our user class extends weblogic.security.acl.User, and is forced to use the default
    CTOR because our data access layer requires it.
    Unfortunately, getName() returns null if the User(String) constructor is not used.
    Furthermore, Identity::setName() is final, so it seems as though there is no
    way to set the user's name after construction.
    I am correct in this?
    If so, any thoughts on whether it is worth going down the path of making my user
    class implement Principal instead of extending weblogic.security.acl.User? I
    would be forced to try to guess at what methods in User are required to integrate
    with the admin console, I believe. I have not been able to find any documentation
    that specifies what api/contract the console uses when it attempts to display
    user, role, acl information for a custom realm.
    Any advice would be greatly appreciated.
    -chris

    My comments mixed with your text
    "Chris Goodacre" <[email protected]> wrote:
    >
    We are implementing a custom realm and are having troubles getting our
    Users to
    show up in the User list.
    Our user class extends weblogic.security.acl.User, and is forced to use
    the default
    CTOR because our data access layer requires it.
    Unfortunately, getName() returns null if the User(String) constructor
    is not used.Yes.
    Furthermore, Identity::setName() is final, so it seems as though there
    is no
    way to set the user's name after construction.
    I am correct in this?Yes. Changing a user's name on a constructed user object is like mutating that
    user to another user - a security hole. It isn't allowed.
    >
    If so, any thoughts on whether it is worth going down the path of making
    my user
    class implement Principal instead of extending weblogic.security.acl.User?I'd try to stay with extending weblogic.security.acl.User, but also implement
    weblogic.security.acl.CredentialChanger, so you can change passwords through the
    console (otherwise you get NullPointerExceptions).
    You really want to get around not being able to supply a user name as part of
    the ctor.
    I
    would be forced to try to guess at what methods in User are required
    to integrate
    with the admin console, I believe. I have not been able to find any
    documentation
    that specifies what api/contract the console uses when it attempts to
    display
    user, role, acl information for a custom realm.
    Any advice would be greatly appreciated.
    -chris1. Your realm should extend AbstractManageableRealm and implement DebuggableRealm
    if you want to integrate with the console.
    2. The only contract is to implement all the methods!
    3. Check the type of the user and group objects being passed to your realm - if
    they're not your user and group type, reject the call.
    4. The documentation is indeed terrible, and often wrong. The examples shipped
    are incomplete (the RBDMS realm shipped has approx 1/3 of the functionality).
    You'll get good with jad.
    Should all be better in 7.0 with JAAS. The realm interfaces is a dog.
    Good luck,
    simon.

  • While updating my iphone 4s to ios6, I had to restore it. Now every time I connect to itunes, I get the "Set Up Your iPhone" window with the set up as new iphone and restore from backup options. After the restore, I got everything except my apps back.

    While updating my iphone 4s to ios6, I had to restore it. Now every time I connect to itunes, I get the "Set Up Your iPhone" window with the set up as new iphone and restore from backup options. After the restore, I got everything except my apps and music back. Do I need to set the phone up as new again?

    Hi Vidbrent,
    If you are having issues updating or restoring your iPhone, you may find the following article helpful:
    Apple Support: If you can't update or restore your iOS device
    http://support.apple.com/kb/ht1808
    Regards,
    - Brenden

  • Got the Exception in ADF page while getting BPM task list

    Hi,
    My requirement is i,n ADF page i need to display BPM human task list in ADF region.
    while Deploying my applciation server got the below exeption and it's taking the more time too.
    Please find details of Exception below.
    06:56:08 PM] [Deployer:149192]Operation 'deploy' on application 'ADFResources_application1 [Version=V2.0]' is in progress on 'AdminServer'
    [06:56:09 PM] [Deployer:149193]Operation 'deploy' on application 'ADFResources_application1 [Version=V2.0]' has failed on 'AdminServer'
    [06:56:09 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application ADFResources_application1 [Version=V2.0] on AdminServer.: .
    [06:56:09 PM] Weblogic Server Exception: weblogic.application.ModuleException:
    [06:56:09 PM] Caused by: java.lang.ClassNotFoundException: oracle.bpm.web.security.faces.AuthenticationPhaseListener
    [06:56:09 PM] See server logs or server console for more details.
    [06:56:09 PM] weblogic.application.ModuleException:
    [06:56:09 PM] #### Deployment incomplete. ####
    [06:56:09 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
    is any thing i missed out to include the jar files.?
    Thanks,
    madhava

    Search which library you are missing from Jdeveloper ->Tools -> Manager Libraries by using the missing class name
    oracle.bpm.web.security.faces.AuthenticationPhaseListener

  • While created JCO i got following exception plese guide me

    Hi Guru.
    While created JCO i got following exception. I configured SLD also.
    I dint select message server information while cretin of  JCO. it would mandatory for creating JCO. because i dint get in information about message server while creating of JCO. if it need where can configure to get Message server in formation. please give me some guide lines
    Failed to create new JCO client connection WD_MODELDATA_DEST: com.sap.tc.webdynpro.services.sal.sl.api.WDSystemLandscapeException: Error while obtaining JCO connection. at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getJCOClientConnection(SystemLandscapeFactory.java:150) at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.createJCOClientConnection(SystemLandscapeFactory.java:356) at com.sap.tc.webdynpro.services.sal.sl.api.WDSystemLandscape.createJCOClientConnection(WDSystemLandscape.java:107) at com.sap.tc.webdynpro.tools.sld.ButtonBar.onActionFinish(ButtonBar.java:224) at com.sap.tc.webdynpro.tools.sld.wdp.InternalButtonBar.wdInvokeEventHandler(InternalButtonBar.java:265) at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87) at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67) at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleAction(WebDynproMainTask.java:101) at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:304) at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:659) at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59) at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to resolve connection parameter for WD_MODELDATA_DEST at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.resolveConnectionParameter4MsgServerJCODestination(JCOClientConnection.java:670) at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.resolveConnectionParameter(JCOClientConnection.java:486) at com.sap.tc.webdynpro.serverimpl.core.sl.AbstractJCOClientConnection.init(AbstractJCOClientConnection.java:252) at com.sap.tc.webdynpro.serverimpl.core.sl.AbstractJCOClientConnection.<init>(AbstractJCOClientConnection.java:226) at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.<init>(JCOClientConnection.java:106) at com.sap.tc.webdynpro.serverimpl.wdc.sl.SystemLandscapeFactory.getJCOClientConnection(SystemLandscapeFactory.java:148) ... 30 more Caused by: java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:393) at com.sap.tc.webdynpro.serverimpl.wdc.sl.JCOClientConnection.resolveConnectionParameter4MsgServerJCODestination(JCOClientConnection.java:564) ... 35 more
    Best regards
    Ramana

    Hi.
    Thanks for your response.
    But I am working for WebDynpro For JAVA with R/3 BAPI calls.
    For this scenarios , we would configure for WEB AS ABAP??
    I was configured for WEB AS JAVA..
    Could you please confirm me.
    While configure of WEB AS  for ABAP.  i have following attributes
    1. Web AS ABAP Name (SID):
    2. Installation Number
    3. Database Host Name:
    I need to ask BASIS guy for this setup.
    Best regards
    Ramana

  • "An unexpected error occurred while creating a custom installer."

    All;
    I—and I've seen several others in older posts—have been reported received the error "An unexpected error occurred while creating a custom installer" while attampting to build a customer ARD client installer.  My guess is that this is do to a issue related to 10.8.X (10.8.4, in my case) based console Mac but I cannot confirm this. I have verified that there are no outstanding OS, client or application updates or hot fixes, as well.
    Has anyone built an successful installer from Mountain Lion-installed Mac?  Is there any know workarounds?
    Thanks in advance, for any help. 

    Have the exact same problem.
    iMac running 10.8.4
    Got through the steps of creating a custom client installer.
    if I choose not to customize and just save an installer I don't get the error but it creates a file of Zero bytes in size.
    If I chose to configure, when I try to save I get:
    An unexpected error occurred while creating a custom installer. Please try again....
    Console log reports:
    9/1/13 12:32:29.603 AM Remote Desktop[1306]: open on /private/tmp/RemoteDesktopClientInstaller_HEATyAJ5CR/extracted/RemoteDesktopCli ent.pkg/Scripts/RemoteDesktopClient.pkg: No such file or directory
    I have tried to save this in several location, with no effect on the error or the information logged, with the exception of the name of the temp directory that DOES contains the file (zero bytes):
    RemoteDesktopClient.pkg
    Need help with this someone...!
    APPLE...I JUST purchase this Applciation for $80.....it just flat out does not work....

  • While doing sample  posting in QA32 tansaction below error getting

    Hi ....
    Recently we have changed the business area from 25 to 11 for all cost centers from 01.04.2014  but unfortunately we didn't change for one cost center now  one error is hitting  While doing sample  posting in QA32.
    The account assignment objects are defined for different business areas
    Message no. KI196
    Diagnosis
    You entered several account assignment objects assigned to different business areas. In a posting row all account assignment objects must be assigned to the same business area.
    Procedure
    Change the account assignment objects if required. The following business areas have been assigned so far:
    Business area        Type  Object
    OBJECT_IDENT_GET_OR
    ML11 ORD 86000352
    If account assignment objects of different business areas are posted to at the same time, whereby the business area of the posting row is derived from the real posting of the CO account assignment object, you can make the error message a caution or a note, or you can deactivate it entirely in Customizing. Use the Implementation Guide under "Controlling: General" and choose Change message control. Enter area KI and message number 196.
    Pls give me the solution it's urgent......

    Hi,
    You can make message KI196 to Warning message. Go To transaction code OBA5 and change this message to Warning instead of Error. Please find below text from the long text information of message KI196.
    Regards,
    Anand Raichura

  • How to access "Alternative Realm" or "Custom Realm" from components like Servlet ?

    Hello,
    Says if I have alternative realm or my custom realm which implement
    "ManageableRealm" interface. How can I access the realm from other
    component, like Servlet or EJB in same WLS ? I tried using code like this
    BasicRealm realm =
    Realm.getRealm("XmlRealm","weblogic","myclass.DebugRealm");
    if (realm != null) {
    Class realmClass = realm.getClass();
    out.println("Realm is " + realmClass.getName());
    Which "myclass.DebugRealm" is classname of my own realm. This realm works
    fine when using for authentication and authorization. But when I run this
    code on servlet, it seems that it doesn't return the realm it created when
    starting WLS, I mean the one that served authentication and authorization.
    But it create a new instance of this class (I knew it 'cos I put debug
    message in its constructor). So how can I get reference to the realm
    instance which is created when starting WLS ?
    Thank you in an advance,
    Siros

    Hello again,
    Sorry to say that now I've got the way. I post here again for someone who
    may face that same problem.
    So strange that, I just changed the realm name in below code to "custom" and
    then it works !! My realm is extended from "AbstractListableRealm" class and
    I think I named my realm as "XmlRealm" in it constructor by call
    super("XmlRealm");
    But seems like its "getName()" method always return "custom", so in servlet
    code, it' rather be.
    BasicRealm realm = Realm.getRealm("custom");
    if (realm != null) {
    Class realmClass = realm.getClass();
    out.println("Realm is " + realmClass.getName());
    This works fine and no instance of realm is created. Anyway I saw that
    constructor of "AbstractListableRealm" take String argument for "name" of
    the realm. So why it's always "custom" ???
    Comments are welcome,
    Siros
    "Siros Supavita" <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    Says if I have alternative realm or my custom realm which implement
    "ManageableRealm" interface. How can I access the realm from other
    component, like Servlet or EJB in same WLS ? I tried using code like this
    BasicRealm realm =
    Realm.getRealm("XmlRealm","weblogic","myclass.DebugRealm");
    if (realm != null) {
    Class realmClass = realm.getClass();
    out.println("Realm is " + realmClass.getName());
    Which "myclass.DebugRealm" is classname of my own realm. This realm works
    fine when using for authentication and authorization. But when I run this
    code on servlet, it seems that it doesn't return the realm it created when
    starting WLS, I mean the one that served authentication and authorization.
    But it create a new instance of this class (I knew it 'cos I put debug
    message in its constructor). So how can I get reference to the realm
    instance which is created when starting WLS ?
    Thank you in an advance,
    Siros

  • Drag and drop issue: got an exception

    Hi there,
    I'm facing a problem with drag and drop. Basically I try to drag an AnchorPane (and all its children), representing a sticky note, from an AnchorPane to another. While trying to do it I got an exception. I followed some steps from the Oracle's documentation, but didn't help me.
    I created a method that reacts on the DRAG_DETECTED event which is the following:
    @FXML private void stickyDragDetected(MouseEvent event) {
      System.out.println("Drag detected");
      Dragboard db = ((Node) event.getSource()).startDragAndDrop(TransferMode.COPY_OR_MOVE);
      ClipboardContent cc = new ClipboardContent();
      cc.put(new DataFormat(PojoTask.class.getName()), task.get().convertToPojo());
      db.setContent(cc);
      event.consume();
      System.out.println("End drag detected");
    }Some explanations:
    - PojoTask a simple Pojo without any properties (because they're not serializable)
    - The variable task is declared like this: ObjectProperty<Task> task = new SimpleObjectProperty<Task>();
    - Task is a class similar to PojoTask but with properties
    - I use the PojoTask's class name because it's a custom drag'n'drop
    When I drag the AnchorPane, i got this exception, repeated multiple times (and nothing else):
    Glass detected outstanding Java exception at -[GlassViewDelegate sendJavaDndEvent:type:]:src/com/sun/mat/ui/GlassViewDelegate.m:774
    Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: PrismEventUtils.convertToTransferMode: ambiguous drop action: 3
         at com.sun.javafx.tk.quantum.PrismEventUtils.convertToTransferMode(PrismEventUtils.java:193)
         at com.sun.javafx.tk.quantum.PrismEventUtils.glassDragEventToFX(PrismEventUtils.java:147)
         at com.sun.javafx.tk.quantum.PrismEventUtils.glassDragSourceEventToFX(PrismEventUtils.java:167)
         at com.sun.javafx.tk.quantum.QuantumToolkit.convertDragSourceEventToFX(QuantumToolkit.java:1141)
         at javafx.scene.Scene$DragSourceListener.dragDropEnd(Scene.java:2971)
         at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.handleDragEnd(GlassSceneDnDEventHandler.java:199)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleDragEnd(GlassViewEventHandler.java:420)
         at com.sun.glass.ui.View.handleDragEnd(View.java:685)
         at com.sun.glass.ui.View.notifyDragEnd(View.java:990)
         at com.sun.glass.ui.mac.MacPasteboard._putItemsFromArray(Native Method)
         at com.sun.glass.ui.mac.MacPasteboard.putItemsFromArray(MacPasteboard.java:148)
         at com.sun.glass.ui.mac.MacPasteboard.putItems(MacPasteboard.java:176)
         at com.sun.glass.ui.mac.MacSystemClipboard.pushToSystem(MacSystemClipboard.java:248)
         at com.sun.glass.ui.SystemClipboard.flush(SystemClipboard.java:28)
         at com.sun.glass.ui.ClipboardAssistance.flush(ClipboardAssistance.java:34)
         at com.sun.javafx.tk.quantum.QuantumClipboard.flush(QuantumClipboard.java:196)
         at com.sun.javafx.tk.quantum.QuantumToolkit.startDrag(QuantumToolkit.java:1189)
         at javafx.scene.Scene$DnDGesture.dragDetectedProcessed(Scene.java:2648)
         at javafx.scene.Scene$DnDGesture.process(Scene.java:2709)
         at javafx.scene.Scene$DnDGesture.access$8700(Scene.java:2603)
         at javafx.scene.Scene$MouseHandler.process(Scene.java:3340)
         at javafx.scene.Scene$MouseHandler.process(Scene.java:3164)
         at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3119)
         at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1559)
         at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2261)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:228)
         at com.sun.glass.ui.View.handleMouseEvent(View.java:528)
         at com.sun.glass.ui.View.notifyMouse(View.java:922)If i remove in my method everything that deals with the ClipboardContent I don't get the exception (but of course nothing is dragged). I also tried provided DataFormats, as well as trying to only pass a String as value for the ClipboardContent, but I still get the exception.
    Does anybody have an idea? Thanks!
    PS: I'm running on OS X 10.7.5, with JDK7u10 (with JavaFX 2.2.4).

    That does not exist - the workaround (maybe permanent solution - who knows) is
    File menu ==> export
    And BTW if you are not backingup all the time you are 100% guarenteed to lose all of your files and photos sooner or later
    LN

  • Java.lang.ClassNotFound Exception whenever I include .send()

    Everything runs fine, but when I add the .send(message); [it is in bold] I get a java.lang.ClassNotFound Exception.
    It still compiles, it just won't allow me to launch the program in the emulator. If I take that one piece of code out, everything runs fine again. I've been messing with it, and searching for a long time in an attempt to solve the problem but I've yet to come across a solution.
    I'm also using Bluej
    import java.io.*;
    import java.lang.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.io.*;//Add SMS text, Map selection (upload image/altitude-scale)
    import javax.microedition.lcdui.Font;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.wireless.messaging.*;
       public class cardcanvas extends GameCanvas implements Runnable, CommandListener {
        Image i, Mortar, Target, paintballcharleston, selectimg, Cursor;
        SendSMS sendtext;
        Thread t = new Thread(this);
        Command cmdfire=new Command("Fire", Command.BACK, 1 );
        Command cmdreset=new Command("Reset", Command.ITEM, 2 );
        String text, message;
        static Image Map;
        MessageConnection messageConnection;
        TextMessage textMessage;
        int mortarX=5500, mortarY=5500, targetX=5500, targetY=5500, distanceX, distanceY, delay, mapx=-250, mapy=-250, xvel=115, yvel=130, gameAction=0, timer=0;
        double A, B, C, b, degreeX, degreeY, degreeV, voltageX, voltageY, scale=1.4235, findDegree=90;//get scale of pixel:realtime feet
        boolean paintdown=false, paintup=false, paintright=false, paintleft=false, left, finish, firemor, initiate, click, bottom=true, noYdegree, reset, sms=false;
        public cardcanvas(){
            super(false);
            this.addCommand(cmdfire);
            this.addCommand(cmdreset);
            this.setCommandListener(this);
        public void intit() {}
        public void start() {
            t.start() {}
        public void run()
            try{
                while(true)
                    if(paintright) {
                        timer++;
                        if(timer>1&&timer<4) xvel=xvel+5;
                        if(timer>=4&&timer<6) xvel=xvel+10;
                        if(timer>=6) xvel=xvel+20;
                    if(paintleft) {
                        timer++;
                        if(timer>1&&timer<4) xvel=xvel-5;
                        if(timer>=4&&timer<6) xvel=xvel-10;
                        if(timer>=6) xvel=xvel-20;
                    if(paintup) {
                        timer++;
                        if(timer>1&&timer<4) yvel=yvel-5;
                        if(timer>=4&&timer<6) yvel=yvel-10;
                        if(timer>=6) yvel=yvel-20;
                    if(paintdown) {
                        timer++;
                        if(timer>1&&timer<4) yvel=yvel+5;
                        if(timer>=4&&timer<6) yvel=yvel+10;
                        if(timer>=6) yvel=yvel+20;
                    if(mapy<-320) mapy=-320;
                    if(mapx>0) mapx=0;
                    if(mapy>0) mapy=0;
                    if(mapx>197) mapx=197;
                    if(xvel>225)
                        mapx=mapx-5;
                        targetX=targetX-5;
                        mortarX=mortarX-5;
                        xvel=225;
                    if(xvel<5)
                        mapx=mapx+5;
                        targetX=targetX+5;
                        mortarX=mortarX+5;
                        xvel=5;
                    if(yvel>260)
                        mapy=mapy-5;
                        targetY=targetY-5;
                        mortarY=mortarY-5;
                        yvel=260;
                    if(yvel<5)
                        mapy=mapy+5;
                        targetY=targetY+5;
                        mortarY=mortarY+5;
                        yvel=5;
                        if(reset) {
                            mapx=-250;
                            mapy=-250;
                            xvel=115;
                            yvel=130;
                            left=false;
                            firemor=false;
                            finish=false;
                            initiate=false;
                            click=false;
                            bottom=true;
                            noYdegree=false;
                            reset=false;
                            targetX=5500;
                            targetY=5500;
                            mortarX=5500;
                            mortarY=5500;
                            A=0;
                            B=0;
                            C=0;
                            b=0;
                            degreeX=0;
                        if(initiate) {
                           distanceX=targetX-mortarX;
                           distanceY=targetY-mortarY;
                           A=distanceY;
                           B=distanceX;
                               if(distanceY<0)
                                    A=distanceY*-1;
                                    bottom=false;
                               if(distanceX<0)
                                    B=distanceX*-1;
                                    left=true;
                            A=A*scale;
                            B=B*scale;
                            C=Math.sqrt((A*A)+(B*B));
                                while(((A*(Math.tan(b)))<B+.00002))
                                    b=b+.0001;
                            b=b*180/3.1415926535897932384626435;
                            degreeX=b;
                                if(bottom)
                                    b=90-b;
                                    b=b+90;
                                    degreeX=b;
                                if(left)
                                    degreeX=360-b;
                            initiate=false;
                            text=("DegreeX is "+degreeX+" Range is "+C);
                             sendTextMessage();
                     verifyGameState();
                     paint(getGraphics());
                     Thread.currentThread().sleep(1);
                catch (Exception E) {}
        private void verifyGameState() {}
        public void sendTextMessage()
            try
                String message = " ";
                MessageConnection messageConnection = (MessageConnection)Connector.open("sms://18433036060");
                TextMessage textMessage = (TextMessage)messageConnection.newMessage(
                        MessageConnection.TEXT_MESSAGE, "18433036060");
                textMessage.setPayloadText(message);
                *messageConnection.send(textMessage);*
            catch (Exception e) {}
    }If I remove messageConnection.send(texstMessage); the error is gone.
    Thanks in advance for your time

    cardmidlet:
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    import java.io.IOException;
    import java.lang.*;
    public class cardmidlet extends MIDlet implements CommandListener {
        private Display display; Display map;
        cardmidlet midlet;
        private Form form; Form mapselection;
        private List menuList ;
        String[] elements=new String[]{"Initiate Program","Select Map","Help","About"};
        private Command selectCommand;
        Alert alert;
            private Command fnext=new Command("NEXT",Command.ITEM,1);
            private Command fback=new Command("BACK",Command.BACK,1);
            private Command mapnext=new Command("Next",Command.ITEM,1);
        private TextField uname; TextField mapchoice;
        public String nname, nmap;
        cardcanvas cd;
        protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
        protected void pauseApp() {
        public cardmidlet() {
             menuList();
             cd = new cardcanvas();
        public void menuList(){
             display = Display.getDisplay(this);
             menuList = new List("Menu", List.IMPLICIT, elements, null);
             selectCommand=new Command("open",Command.ITEM,1);
             menuList.setSelectCommand(selectCommand);
             menuList.setCommandListener(this);  
        protected void startApp() throws MIDletStateChangeException {
            display.setCurrent(menuList);
        public void about(){
            alert = new Alert("Option Selected", "This program is created by"+"\n"+" Chris Furlong.", null, null);
              alert.setTimeout(Alert.FOREVER);
              alert.setType(AlertType.INFO);
              display.setCurrent(alert);
        public void help() {
            alert = new Alert("Option Selected", "Use the 4 d-pad keys to move the cursor. Press the center button once to select the mortar position, and a second time to select the target position. When both the mortar and the target are on screen, press the upper left key to begin the firing process. If you place one on the map by mistake, simply reset the program with the upper right key and start over.", null, null);
            alert.setTimeout(Alert.FOREVER);
            alert.setType(AlertType.INFO);
            display.setCurrent(alert);
        public void InitiateProgram(){
            display=Display.getDisplay(this);
            uname=new TextField("Enter your name","",50,TextField.ANY);
            form =new Form("New User");
            form.append(uname);
            form.addCommand(fnext);
            form.addCommand(fback);
            form.setCommandListener(this);
            display.setCurrent(form);
        public void selectmap()
           /* display=map.getDisplay(this);
            mapchoice=new TextField("Enter Map Name","",50,TextField.ANY);
            mapselection=new Form("Map Selection");
            mapselection.append(mapchoice);
            mapselection.addCommand(mapnext);
            mapselection.addCommand(fback);
            mapselection.setCommandListener(this);
            display.setCurrent(mapselection);*/
            display = map.getDisplay(this);
            map choose=new map();
        public String name(){
            nname=uname.getString();
            return nname;
    /*   public String mapname() {
            nmap=mapchoice.getString();
            return nmap;
        public void commandAction(Command com, Displayable arg1) {
             if(com==selectCommand)
                if(menuList.getSelectedIndex()==3)
                    about();
                if(menuList.getSelectedIndex()==2)
                    help();
                if(menuList.getSelectedIndex()==1)
                    selectmap();
                if(menuList.getSelectedIndex()==0)
                    InitiateProgram();
            if(com==fback)
                display.setCurrent(menuList);
            if(com==fnext){
                display = Display.getDisplay(this);
                cd.start();
                display.setCurrent(cd);
            if(com==mapnext)
                display = map.getDisplay(this);
                map choose=new map();
                display.setCurrent(choose);
    }

Maybe you are looking for

  • Resetting a Centro

    I have to say that as a long term plam use I find the methond of resetting the Centro requiring the back cover being pulled off and the battery removed is the absolutely most assinine manner of resetting a device of this type I have seen. The fool wh

  • Product Costing with Moving Average Price

    Dear Experts, Please guide me solution of my below scenario : - FG Material (500013) Process Order Created of 1000 units at 1st August. - FG Material (500013) Process Order confirmed and GR posted at 3rd of August. - All stock of FG Material  (500013

  • With Holding tax On Down Payment not picking

    Dear All, I have configured with holding tax on Payment posting, assigned to vendor,company code it is working fine for invoice positng and vendor payment. When I am trying to post down payment f-48 the with holding tax codes selection screen is not

  • Picture freezes after recent upgrade to hub 4

    Hi  I recently upgraded to hub 4 due to a flt with the old one and the picture now freezes every so often on all channels including sport. its not an arieal flt as i have swapped it over to the tv and thats ok.  any ideas? Thanks Kevin Carver

  • Inputing array data through JTextFields

    Dear All, I am working on a little programme that will manipulate array variables. However, I will like the array data to be added though a GUI form made of text fields. I can input the data as part of the code, but I want it flexible. The array is l