Using JAAS on an Application Client Container

I am trying to authenticate users who are going to be accessing
EJBs from an Application Client Container developed using AWT/Swing.
I am able to authenticate users accessing these EJBs via the Web Client.
But some how I get the following error when I run the ACC client:
Nov 11, 2004 3:47:30 PM com.sun.enterprise.security.auth.login.PasswordLoginModule login
SEVERE: SEC1105: A PasswordCredential was required but not provided.
I have tried lc.login with/without the subject and/or principal with the same result.
Here is the login code
// Obtain a LoginContext, needed for authentication. Tell
// it to use the LoginModule implementation specified by
// the entry named "jdbcRealm" in the JAAS login
// configuration file and to also use the specified
// CallbackHandler.
LoginContext lc = null;
NameCallback namecb = new NameCallback( "Enter User name: " );
PasswordCallback passwdcb = new PasswordCallback( "Enter password: ", true );
Callback[] callbackparm = new Callback[2];
callbackparm[0] = namecb;
callbackparm[1] = passwdcb;
try {
System.out.println( "entering atUser: login()" );
//TextCallbackHandler callback = new TextCallbackHandler();
DialogCallbackHandler callback = new DialogCallbackHandler();
callback.handle( callbackparm );
//lc = new LoginContext( "jdbcRealm", callback );
System.out.println( "entering atUser: login() namecb.getName() = " + namecb.getName() );
System.out.println( "entering atUser: login() passwdcb.getPassword() = " +
passwdcb.getPassword() );
PasswordCredential pwd = new PasswordCredential (namecb.getName(), passwdcb.getPassword() );
System.out.println( "entering atUser: login() PasswordCredential pwd = " + pwd );
Subject subject = new Subject();
//subject.getPrincipals().addAll(tempPrincipals);
if (!subject.getPrincipals().contains(pwd)) {
Principal principal = new X500Principal( "CN=JdbcRealm,OU=AkanTech,O=Akan Technology, C=US" );
subject.getPrincipals().add( principal );
System.out.println( "entering atUser: login() subject.getPrincipals().add(pwd) = " +
subject.getPrincipals() );
if (!subject.getPrivateCredentials().contains(pwd)) {
subject.getPrivateCredentials().add( pwd );
subject.getPublicCredentials().add( pwd );
System.out.println( "entering atUser: login() subject.getPrivateCredentials().add(pwd) = " +
subject.getPrivateCredentials() );
System.out.println( "entering atUser: login() subject.getPrivateCredentials().add(pwd) = " +
subject.getPrivateCredentials() );
lc = new LoginContext( "jdbcRealm", subject, callback );
System.out.println( "entering atUser: login() loginContext = " + lc );
System.out.println( "entering atUser: login() lc.getSubject() = " + lc.getSubject() );
} catch (LoginException le) {
System.err.println("atUser login() LoginException: Cannot create LoginContext: " +
le.getMessage());
System.exit( -1 );
} catch (SecurityException se) {
System.err.println("atUser login() SecurityException: Cannot create LoginContext: " +
se.getMessage());
System.exit( -1 );
//} catch (UnsupportedCallbackException se) {
//System.err.println("atUser login() UnsupportedCallbackException: Cannot create LoginContext: " +
se.getMessage());
//System.exit( -1 );
} catch (Exception se) {
System.err.println("atUser login() Exception: Cannot create LoginContext: " + se.getMessage());
System.exit( -1 );
try {
// attempt authentication
lc.login();
} catch (LoginException le) {
System.err.println( "atUser login() LoginException Authentication failed: " + le.getMessage() );
System.exit( -1 );
System.out.println( "atUser login() Authentication succeeded!" );
Here is the content of: appclientlogin.conf
/* Copyright 2004 Sun Microsystems, Inc. All rights reserved. */
/* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */
default {
     com.sun.enterprise.security.auth.login.ClientPasswordLoginModule required debug=false;
certificate {
     com.sun.enterprise.security.auth.login.ClientCertificateLoginModule required debug=false;
jdbcRealm {
     com.akantech.security.jdbcrealm.JDBCLoginModule required debug=false;
Here is the content of sun-acc.xml.
I have tried with/without the client-credential entry with the same result.
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
-->
<!DOCTYPE client-container PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 8.0 Application Client Container//EN" "http://www.sun.com/software/appserver/dtds/sun-application-client-container_1_0.dtd">
<client-container>
<target-server name="winxppro" address="winxppro" port="3700"/>
<log-service file="C:/Sun/AppServer/lib/appclient/logs/client.log" level="WARNING"/>
<auth-realm classname="com.akantech.security.jdbcrealm.JDBCRealm" name="jdbc">
<property name="dbdrivername" value="com.ibm.db2.jcc.DB2Driver"/>
<property name="auth-type" value="jdbccustomrealm"/>
<property name="dburl" value="jdbc:db2://localhost:50000/authuser"/>
<property name="jaas-context" value="jdbcRealm"/>
</auth-realm>
<client-credential user-name="admin" password="akantech" realm="jdbc"/>
</client-container>
What am I missing?
I have read the following documentation but cant seem to figure out what I am missing.
http://docs.sun.com/source/819-0079/dgdesc.html#wp130029
http://docs.sun.com/source/819-0079/dgsecure.html
http://docs.sun.com/source/819-0079/dgsecure.html#wp32713
http://java.sun.com/security/jaas/doc/api.html
http://java.sun.com/security/jaas/doc/module.html
http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/index.html
I added a lot of log info in the JDBCLoginModule : authenticate() method.
It seems to me like the authenticate() method is never called. Because nothing is
logged from this method.
Thanks a million
Stephen

I have not been able to figure this one out yet so put it on the
back burner.
I am still waiting for an answer.
Did you find the answer?

Similar Messages

  • J2EE Application Client Container

    Hi everyone,
    I've three questions about J2EE Application Client Container.
    1) What do I have to install into the client computer so that my J2EE client application can run?
    2) Can I install my client application and also the client container through Java Web Start?
    3) Can I develop a (remote) client application that needs only J2SE but uses the Enterprise Java Beans?
    Thanks for the help

    Hi everyone,
    I've three questions about J2EE Application Client
    Container.
    1) What do I have to install into the client computer
    so that my J2EE client application can run?This is vendor specific. So you have to read your application server docmentation.
    If you are using Sun Java System Application Server (which is now open sourced at glassfish.dev.java.net), then here is a useful document for you:
    http://docs.sun.com/app/docs/doc/819-2642/6n4tspp7b?a=view
    >
    2) Can I install my client application and also the
    client container through Java Web Start?
    This is not yet required by Java EE platform, not in J2EE 1.4 and is not going to be rquired in Java EE 5 as well. So you have to ask your appserver vendor to see if they support Java Web Start for appclient container. Sun Java System Application Server 9.0 which is being developed in open source project glassfish (http://glassfish.dev.java.net) supports Java Web Start. You can check out.
    3) Can I develop a (remote) client application that
    needs only J2SE but uses the Enterprise Java Beans?No, you typically need additional libraries. Typically vendors provides a tool that makes a nice package that you can take to a remote host and run the appclient container there. e.g. if you are using Sun Java System Application Server, here is what you need to do:
    http://docs.sun.com/app/docs/doc/819-2642/6n4tspp7j?a=view#beale
    -- Sahoo
    >
    Thanks for the help

  • Using JAAS in a BC4J Client

    Hello
    We are building a BC4J application.
    We would like to use JAAS on the client side (Swing Client), to do some authorization.
    I made a test, authentication a user trough JAAS on the client as follow:
    // Auhorization
    CallbackHandler handler = new InfoCallbackHandler();
    String s = "oracle.security.jazn.tools.Admintool";
    LoginContext loginContext = new LoginContext(s, handler);
    loginContext.login();
    Subject subject = loginContext.getSubject();
    // authenticated action
    Subject.doAs(subject, this);
    This works, as long as the client has access to the jazn.xml file.
    As far as I understand, this loads the RealmLoginModule.
    The RealmLoginModule uses either a jazn.xml file, or LDAP for authentication.
    Now I'm curios about where the RealmLoginModule gets its information from, when the client is running on an other machine than the OC4J Server.
    Where does the RealmLoginModule get the connection information for the OC4J or LDAP- server from?
    Do I have to deliver the security information (jazn.xml file) to the client (I dont want to expose all this information to the Hackers on the client side)?
    Is there a way to delegate the JAAS calls to the middle tier (a security provider , LoginModule, that does RMI-calls to an EJB-component)?
    Is there a way to do authorization with the BC4J interfaces on the client (something like boolean ApplikacitonModule.isUserInRole(Role) or javax.security.auth.Subject ApplikacitonModule.getSubject() or java.util.Set ApplikacitonModule.getPrincipalsForSubject())?
    I would like to get a javax.security.auth.Subject representing the user (and password)
    that is authenticated in the middle tier. This is the Subject (defined by username & password)),
    used for the JNDI lookup, and by the whole J2EE (EJB) security, when creating a root ApplicationModule.
    Is this possible?
    Regards
    Matthais Gerber

    Hi,
    In JDeveloper 9.0.3, BC4J has JAAS support in the middle-tier. You could set jbo.security.enforce to "Test" or "Must" on the application module using "Configuration...", "Edit" in JDev. If you are using the default Oracle 9iAS JAAS you will also need to include BC4J Security library in the project. The jdk\jre\lib\securtiy\java.security should have login.configuration.provider=oracle.security.jazn.spi.LoginConfigProvider.
    You do not need to create LoginContext, CallbackHandler, etc. in either your client app or business objects.
    If you are not using OC4J, you need to have another loginmodule that implement javax.security.auth.spi.LoginModule. You need to set the jbo.security.loginmodule with you loginmodule name, include the class or jar in your library, specify the jaas config file on the java runtime option.
    Please refer to 9.0.3 online help "Working with Security in BC4J" for more information.
    Thanks,
    Yvonn

  • Application Client

    The J2EE specification requires support for a client container that runs standalone Java applications (known as J2EE application clients) and provides J2EE services to the applications. J2EE services include naming, security, and resource connections.
    The only information i could find about this topic was, how to deploy a J2EE Client module in JDeveloper.
    But how are J2EE application clients of OC4J/ORACLE IAS are launched.
    And how do they use the J2EE services(security...JAAS) mentioned above.

    The subject here is the CLIENT Container and NOT the J2EE Container.
    The tutorials you mentioned only contain Web clients.
    The testing client is a simple RMI/IIOP Client.
    The JDeveloper doc says:
    "Oracle9iAS provides full support for J2EE Client applications. For more information, refer to "Chapter 9, Application Clients in the J2EE Platform Specification".
    So have a look here, to know, what we are talking about:
    http://java.sun.com/j2ee/j2ee-1_3-fr-spec.pdf Chapter 9
    The others do it this way:
    http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/06060007.html
    How is this done for our product?
    How can i launch my client in an (Oracle) application-client-container against my EJB's hosted by an OC4J ?

  • Role based menu using JAAS

    Is it possible to implement role based menu using JAAS in web application ? My requirment is to enable or disable menu items on the screen based on the roles of the logged in user .
    Can some one help me on this ?

    Is it possible to implement role based menu using JAAS in web application ? My requirment is to enable or disable menu items on the screen based on the roles of the logged in user .
    Can some one help me on this ?

  • Application Client 2nd trial

    We have some EJB's running in an OC4J, which are acessed by a Swing client.
    Everything works fine so far.
    Now we want to deploy this client as an APPLICATION-CLIENT to the OC4J and launch it on the client-machine in a CLIENT-CONTAINER.
    The JDeveloper doc says:
    "Oracle9iAS provides full support for J2EE Client applications....
    To know, what the subject is have a look here:
    http://java.sun.com/j2ee/j2ee-1_3-fr-spec.pdf Chapter 9
    http://www.orionserver.com/docs/client-deployment.html
    http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/06060007.html
    How is this done for our product?
    How is it supported by JDeveloper ?
    How can i launch my client in an (Oracle) application-client-container against my EJB's hosted by an OC4J ?

    I understand that this thread is quite old, but I'd like to ask if this has ever been answered adequately and, if so, what the answer was?
    As I understand this, Mr. Miller is correct with everything he's said, however I see nothing more than passive mention of the Application Client Container in the Oracle documentation (and it is now May 2006).
    So, is this finally an available feature of the Oracle OC4J container, or is it in the documentation but not actually in the server product?
    If it does exist, I would really be interested in an example.
    Tom Fuller

  • I unable to run ejb with application client using oc4j j2ee container

    Hi,
    I have installe oracle9i (1.0.2.2) oc4j j2ee container.
    I unable to run the ejbs . please help me how to run ejbs with application client and which files are shall configure.
    See the client application is :
    public static void main (String []args)
    try {
    //Hashtable env = new Hashtable();
    //env.put("java.naming.provider.url", "ormi://localhost/Demo");
    //env.put("java.naming.factory.initial", "com.evermind.server.ApplicationClientInitialContextFactory");
    //env.put(Context.SECURITY_PRINCIPAL, "guest");
    //env.put(Context.SECURITY_CREDENTIALS, "welcome");
    //Context ic = new InitialContext (env);
    System.out.println("\nBegin statelesssession DemoClient.\n");
    Context context = new InitialContext();
    Object homeObject = context.lookup("java:comp/env/DemoApplication");
    DemoHome home= (DemoHome)PortableRemoteObject.narrow(homeObject, DemoHome.class);
    System.out.println("Creating Demo\n");
    Demo demo = home.create();
    System.out.println("The result of demoSelect() is.. " +demo.sayHello());
    }catch ( Exception e )
    System.out.println("::::::Error:::::: ");
    e.printStackTrace();
    System.out.println("End DemoClient....\n");
    When I am running client application I got this type of Exception
    java.lang.SecurityException : No such domain/application: sampledemo
    at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java : 2040)
    at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java : 1884)
    at com.evermind.server.rmi.RMIConnection.lookup(RMIConnection.java : 1491)
    at com.evermind.server.rmi.RMIServer.lookup(RMIServer.java : 323)
    at com.evermind.server.rmi.RMIContext.lookup(RMIConext.java : 106)
    at com.evermind.server.administration.LazyResourceFinder.lookup(LazyResourceFinder.java : 59)
    at com.evermind.server.administration.LazyResourceFinder.getEJBHome(LazyResourceFinder.java : 26)
    at com.evermind.server.Application.createContext(Application.java: 653)
    at com.evermind.server.ApplicationClientInitialContext.getInitialContext(ApplicationClientInitialContextFactory.java :179 )
    at javax.naming.spi.NamingManager.getInitialContext(NamingManger.java : 246)
    at javax.naming.InitialContext.getDefaultInitialCtx(InitialContext.java : 246)
    at javax.naming.InitialContext.init(InitialContext.java : 222)
    at javax.naming.InitialContext.<init>(InitialContext.java : 178)
    at DemoClient.main(DemoClient.java : 23)
    .ear file is copied into applications directory.
    I have configured server.xml file like this
    <application name="sampledemo" path="../applications/demos.ear" />
    demos.ear file Contains following files
    application.xml
    demobean.jar
    Manifest.mf
    demobean.jar file contains following files
    application-client.xml
    Demo.class
    DemoBean.class
    DemoHome.class
    ejb-jar.xml
    jndi.properties
    Mainifest.mf
    Please give me your valuable suggestions. Which are shall i configure .
    Thanks & Regards,
    Badri

    Hi Badri,
    ApplicationClientInitialContextFactory is for clients which got deployed inside OC4J container..
    For looking up EJB from a stand alone java client please use RMIInitialContextFactory..So please change ur code....
    Also please check ur server.xml
    Since you have specified your ejb domain as "sampledemo"
    you have to use that domian only for look up..But it seems that you are looking up for "Demo" domain instead of "sampledemo" domain...So change your code to reflect that..
    Code snippet for the same is :
    Hashtable env = new Hashtable();
    env.put("java.naming.provider.url", "ormi://localhost/sampledemo");
    env.put("java.naming.factory.initial", "om.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "guest");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    Context ic = new InitialContext (env);
    Hope this helps
    --Venky                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Client remote Authentication using JAAS and EJB Access

    Hi,
    I have a problem using JAAS in combination with Sun One Appserver 8.1 and a java remote client trying to access an EJB. Here is the scenario:
    I have implemented an EJB who's methods are protected through the deployment descriptor:
            <assembly-descriptor>
                 <security-role>
                    <description>role for clients outside of the server </description>
                    <role-name>sedna</role-name>
                  </security-role>
                <method-permission>
                  <role-name>sedna</role-name>
                  <method>
                    <ejb-name>ServerInfoBean</ejb-name>
                    <method-intf>Remote</method-intf>
                    <method-name>*</method-name>
                  </method>
                </method-permission>
                <method-permission>
                  <unchecked/>
                  <method>
                    <ejb-name>ServerInfoBean</ejb-name>
                    <method-name>getVersion</method-name>
                  </method>
                  <method>
                    <ejb-name>ServerInfoBean</ejb-name>
                    <method-name>create</method-name>
                  </method>
                </method-permission>
            </assembly-descriptor>I've deployed the EJB in a jar file which was packed into an ear file of a bigger application. The role has been mapped to the admin Principal in the sun-ejb-jar.xml descriptor.
    I can find the EJB, create it, and call the unchecked method getVersion and that works fine, so far so good.
    But then I try to access another method which is protected and then I get this exception
    org.omg.CORBA.NO_PERMISSION:   vmcid: 0x2000  minor code: 1806 completed: Maybe
            at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:179)
            at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:853)
            at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:137)
    ...I have to mention that I do make a login via the LoginContext. My jaas.config File has a reference to the com.sun.enterprise.security.auth.login.ClientPasswordLoginModule module.
    After login (which works perfectly) I lookup the context with a corbaname url which - if I understood it right - ignores the Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS settings.
    After that I make the calls to the EJB. And I am allways ANONYMOUS on the server side, which is definitely the problem. Because ANONYMOUS is not allowed to call the protected EJB Methods. But I made a jaas login in advance. So where am I making a mistake???
    Am I doing something wrong?
    Need help! Thx,
    Stephan

    Hi.
    I understand correctly that you call Subject.doAs on
    the client to call the remote EJB. I guess It isn't
    right way.I had also a bad feeling about this, so I forget it. But anyway it wasn't working with or without using that doAs().
    >
    >
    Subject contextSubject =
    Subject.getSubject(AccessController.getContext());
    contextSubject.getPrincipals();This code throws exceptions in the Appserver. Unfortunately they are catched somewhere so I'm unable to find out what was going wrong. But I guess, that these exceptions where security exceptions. Never the less thanks for the hint!
    But I don't think that doing the check on the server side is the way I want to go because that is programmatically security and I want to use the declarative security which can be used through the deployment descriptor. If used correctly - and supposed I do not completely misunderstand the specification - then it should be possible to create an EJB that is protected via it's deployment descriptor and access it through the client only if the client has been authenticated through JAAS mechanisms. After successful authentication the principal should be accessible through the EJB context but not for security check, that should allready been done at this time.
    Unfortunately I don't find any resource on the internet describing the scenario in such a detail that I can reproduce it. There are only very high level documentations and hints in forums.
    Again, thanks for your effort,
    Stephan

  • Access resource from other application using JAAS

    i use JAAS for autenticate and autorizate in my web application, but i need access a resource from the other application , but this application don�t use JAAS.
    How can i acces this resource from other application?
    i know need send the parameters JSESSIONID, but , always redirecto the login page.
    thank you for your help

    your signon url is consists of the following url http://server.domain.com:port/site/signon.html
    Can you ping server.domain.com from your client?
    If you can ping it, then make sure your port is added as a rule in the firewall of the server.
    Also make sure that the proxy setting of the client have an exception to server.domain.com.
    If you cannot ping it, make sure the server and the client are conneted to the same network and make sure the hosts file on the client reflects the ipaddress and the hostname of the server.
    Hakan

  • OEPE Application Client Project doesn't contain the required classes

    Greetings,
    I'm creating a full Enterprise Application Project containing an EJB project and an Application Client project. I'm adding a simple SLSB to the EJB project and the hole project deploys correctly. Now, I'm modifying the Application Client project's Main class in order to call the SLSB. The first thing I'm noticing is that the Application Client project doesn't compile as the referenced SLSB is not known. In order to solve that I need to go into project properties, Java Build Path page, projects tab, and add a refernce to the EJB project. This is not normal as an Application Client project should have all the required references to the components it is a client. Now the application client project compiles but the deployment fails with the following exception:
    <23 avr. 2009 13 h 33 CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1240486388461' for task '57'. Error is: 'weblogic.application.ModuleException: Exception activating module: EJBModule(ww205EJB.jar)
    Unable to deploy EJB: Facade from ww205EJB.jar:
    fr/simplex_software/slsb/Facade_7ky0ac_FacadeRemoteIntf
    weblogic.application.ModuleException: Exception activating module: EJBModule(ww205EJB.jar)
    Unable to deploy EJB: Facade from ww205EJB.jar:
    fr/simplex_software/slsb/Facade_7ky0ac_FacadeRemoteIntf
         at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:493)
         at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:107)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:411)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:74)
         Truncated. see log file for complete stacktrace
    java.lang.NoClassDefFoundError: fr/simplex_software/slsb/Facade_7ky0ac_FacadeRemoteIntf
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:335)
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:288)
         Truncated. see log file for complete stacktrace
    The class fr/simplex_software/slsb/Facade_7ky0ac_FacadeRemoteIntf is the RMI stub od the SLSB. Adding the SLSB ejb-jar to the Application Client project MANIFEST.MF Class-Path doesn't change anything.
    Many thanks in advance for any help.

    Yes, an Application Client needs RMI stubs. appc command does that but it's difficult to be used in Eclipse (OEPE). I wrote a script like that:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <project basedir="." default="build-project" name="ww204-ejb">
    <property name="jpa.project" value="../ww204-jpa"/>
    <target name="build-project">
    <echo message="${ant.project.name}: ${ant.file}" />
    <taskdef name="wlappc" classname="weblogic.ant.taskdefs.j2ee.Appc"/>
    <wlappc source="build/classes" forceGeneration="true" deprecation="true">
    <classpath>
    <pathelement location="${jpa.project}/build/classes"/>
    </classpath>
    </wlappc>
    </target>
    </project>
    and I added to the EJB/JPA WTP project a new ant builder to run this script at each build. The script generates the RMI stub in the project's output folder which is on the Application Client project's CLASSPATH. It works in general but there are still uncomprehensible problems sometimes.
    Kind regards,
    Nicolas

  • When i update to the latest version (7.0.3), there is a message appear to me when i open any application that contains notification such as (What'sApp or BBM),this message said (Connect to iTunes to use push Notification),How I can to stop these message?

    When i update to the latest version (7.0.3), there is a message appear to me when i open any application that contains notification such as (What'sApp or BBM) , this message said (Connect to iTunes to use push Notification) , How I can to stop these messages that appear to me constantly?

     Hi,
    One of my ex-colleagues has installed a NI-DAQ 6.5 in our system. [And I do not see any other naitional instruments card in the CPU of the computer, may be he removed it] I deleted the account and all his files in the system. When I am trying to install version8.0, its not getting installed and giving me a message that I should uninstall the previous version by going to Add/Remove programs in the control panel.
    I tried doing that, but the "Change/Remove" button does not seem to work...[There is no response and so unable to install the new version...]
    Any idea how can this problem be solved?
    It is a windowsXP operating system with SP2 installed on a machine with P4 processor.
    Thanks

  • Problem in using new InitialContext when running client application

    Hi All,
    We are having a web application which runs on weblogic server 6.1.
    We are loading a servelet at startup which will load the application specific
    properties file and bind it with the context.
    In one of the classes in the .ear file we are looking up the data source like
    this
    InitialContext _initialContext = new InitialContext();
    dataSource = (DataSource)
    initialContext.lookup(ClaimsConstants.CLAIMSRDBMS);
    con = dataSource.getConnection();
    This works fine through the jsp.
    But when I run a separate client program this lookup is failing.
    I tried another way of looking up like this
         Properties h = new Properties();
         h.put(Context.INITIAL_CONTEXT_FACTORY,
              "weblogic.jndi.WLInitialContextFactory");
         h.put(Context.PROVIDER_URL, url);
         Context _initialContext = new InitialContext(h);
    dataSource = (DataSource)
    initialContext.lookup(ClaimsConstants.CLAIMSRDBMS);
    But the weblogic server got hanged for some time after it gave no messages coming
    idle exception.
    If any body knows the solution for this please reply. I am trying to develop an
    application client but I don't know hoe to proceed. Any examples I can get for
    writing a application client using weblogic is very much welcome.
    Please give your valuable suggestions.

    Hi Krishna,
    servlet/jsp programs will work successfully in getting initial context of
    application server, because they runs at server side, and server
    automatically loaded the client library.
    If you are using application client, you need to point the weblogic.jar the
    application client classpath.What is the exception it is throwing?
    Can you test the weblogic samples from the following location of your
    installation
    \bea\wlserver6.1\samples\examples
    Thanks
    Kumar
    "Krishna Kumar" <[email protected]> wrote in message
    news:3def5758$[email protected]..
    >
    Hi All,
    We are having a web application which runs on weblogic server 6.1.
    We are loading a servelet at startup which will load the applicationspecific
    properties file and bind it with the context.
    In one of the classes in the .ear file we are looking up the data sourcelike
    this
    InitialContext _initialContext = new InitialContext();
    dataSource = (DataSource)
    initialContext.lookup(ClaimsConstants.CLAIMSRDBMS);
    con = dataSource.getConnection();
    This works fine through the jsp.
    But when I run a separate client program this lookup is failing.
    I tried another way of looking up like this
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    h.put(Context.PROVIDER_URL, url);
    Context _initialContext = new InitialContext(h);
    dataSource = (DataSource)
    initialContext.lookup(ClaimsConstants.CLAIMSRDBMS);
    But the weblogic server got hanged for some time after it gave no messagescoming
    idle exception.
    If any body knows the solution for this please reply. I am trying todevelop an
    application client but I don't know hoe to proceed. Any examples I can getfor
    writing a application client using weblogic is very much welcome.
    Please give your valuable suggestions.

  • How to upload a file which may contain text as well as image to the server using windows phone 8 application ?

    How to upload a file which may contain text as well as image  to the server using windows phone 8 application ?

    You're going to need to give way more detail about the situation before we can help.

  • Problem using application client for local stateful session bean

    Hi,
    I have deployed a local stateful session bean in Sun J2EE 1.4 application server.
    On running the applclient for the stateful session bean application client i get the following error:
    Warning: ACC006: No application client descriptor defined for: [null]
    cant we use application client for local stateful session beans. becoz the application runs smoothly when i changed the stateful sesion bean to remote.

    Hi,
    No, an ejb that exposes a local view can only be accessed by an ejb or web component packaged within the same application. Parameters and return values for invocations through the ejb local view are passed by reference instead of by value. That can't work for an application client since it's running in a separate JVM.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • AccessControlException using JAAS under 1.4. But it works under 1.3

    We're building a client/server Java application using Java 1.3.1_02. Client authentication is done by JAAS. When running client and server under 1.3 everything works fine. Now we want to run our application using 1.4.2_02 (still doing the build with 1.3.1_02). Accoding to Java's backwards compatibility this should be no problem. But there is a problem.
    The client logs in via JAAS on the server and gets a javax.security.auth.Subject instance, which is then passed again to the server to get the associated permissions (this is done by an Authenticator class):
            Subject subject = login(startupFrame);
            Authenticator authenticator
                    = ProxyFactory.getInstance().getAuthenticator();
            Identity.setPermissions(authenticator.getPermissions());The login itself works, the problem is the call of getPermissions. There's an AuthenticatorImpl class on the server whose getPermissions method is to be called. This class is wrapped by an RMIObjectWrapperImpl class which has an invokeMethod method. This method is called via rmi (client->server) by the client and looks like this:
        public final Serializable invokeMethod(final String name,
                                               final String[] typeNames,
                                               final Serializable[] params,
                                               final Authentication authentication) throws ... {
                final Subject subject = new Subject();
                final Set principals = subject.getPrincipals();
                principals.clear();
                principals.addAll(Arrays.asList(new AuthenticatorImpl()
                        .authenticate(authentication)));
                Policy.getPolicy().refresh();
                return (Serializable) Subject.doAsPrivileged(subject, new PrivilegedExceptionAction() {
                    public Object run() throws Exception {
                        try {
                            Object result = theMethod.invoke(delegate, params);
                            return result;
                        } catch (Exception e) {
                }, null);The line ... theMethod.invoke(...) calls the following AuthenticatorImpl.getPermissions() via rmi (server->server).
        public PermissionCollection getPermissions() throws ... {
            AccessControlContext acc = AccessController.getContext();
            Subject s = Subject.getSubject(acc);
            Policy p = Policy.getPolicy();
            return p.getPermissions(s, null);
        }When reaching the method's second line (Subject.getSubject) we obtain a java.security.AccessControlException.
    Do you have any ideas what's wrong?
    We're using a policy file for client and server, but even if we grant all permissions the problem still exists.
    If there's an error why doesn't it occur running under 1.3?
    Maybe the reason is that in 1.4 JAAS is a part of the JRE and some methods have become deprecated? (Under 1.3 we are using an external jar file containing an older JAAS version, under 1.4 the built-in JAAS classes are used).
    Thanks in advance

    It now works using 1.4.
    What I did is using Subject.doAs instead of Subject.doAsPrivileged.
    I'm a beginner in JAAS: Is it in consideration of security aspects ok to use doAs instead of doAsPrivileged here?
    And besides this: Isn't it a bug that the behaviour is different in 1.3 and 1.4?
    Thanks

Maybe you are looking for