OpenLDAP and Java

HI All ,
I am a newbie to the JNDI world and i have to connect to OpenLDAP using Java and the SSL protocol. I have to perform operations like authenticating the user, changing password , deleting user.
Can u please provide me with some code snippets so that i can get a head start regarding the same.

Can u please http://www.catb.org/~esr/faqs/smart-questions.html#writewell
How To Ask Questions The Smart Way
Eric Steven Raymond
Rick Moen
Write in clear, grammatical, correctly-spelled language
We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal — in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

Similar Messages

  • Problem with OpenLDAP and JNDI

    I'm having problem working with OpenLDAP and JNDI.
    First I have changed LDAP's slapd.conf file:
    suffix          "dc=antipodes,dc=com"
    rootdn          cn=Manager,dc=antipodes,dc=com
    directory     "C:/Program Files/OpenLDAP/data"
    rootpw          secret
    schemacheck offthan i used code below, to create root context:
    package test;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.naming.NameAlreadyBoundException;
    import javax.naming.directory.*;
    import java.util.*;
    public class MakeRoot {
         final static String ldapServerName = "localhost";
         final static String rootdn = "cn=Manager,dc=antipodes,dc=com";
         final static String rootpass = "secret";
         final static String rootContext = "dc=antipodes,dc=com";
         public static void main( String[] args ) {
                   // set up environment to access the server
                   Properties env = new Properties();
                   env.put( Context.INITIAL_CONTEXT_FACTORY,
                              "com.sun.jndi.ldap.LdapCtxFactory" );
                   env.put( Context.PROVIDER_URL, "ldap://" + ldapServerName + "/" );
                   env.put( Context.SECURITY_PRINCIPAL, rootdn );
                   env.put( Context.SECURITY_CREDENTIALS, rootpass );
                   try {
                             // obtain initial directory context using the environment
                             DirContext ctx = new InitialDirContext( env );
                             // now, create the root context, which is just a subcontext
                             // of this initial directory context.
                             ctx.createSubcontext( rootContext );
                   } catch ( NameAlreadyBoundException nabe ) {
                             System.err.println( rootContext + " has already been bound!" );
                   } catch ( Exception e ) {
                             System.err.println( e );
    }this worked fine, I could see that by using "LDAP Browser/Editor".
    and then I tried to create group with code:
    package test;
    import java.util.Hashtable;
    import javax.naming.*;
    import javax.naming.ldap.*;
    import javax.naming.directory.*;
    public class MakeGroup
         public static void main (String[] args)
              Hashtable env = new Hashtable();
              String adminName = "cn=Manager,dc=antipodes,dc=com";
              String adminPassword = "secret";
              String ldapURL = "ldap://127.0.0.1:389";
              String groupName = "CN=Evolution,OU=Research,DC=antipodes,DC=com";
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              //set security credentials, note using simple cleartext authentication
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,adminName);
              env.put(Context.SECURITY_CREDENTIALS,adminPassword);
              //connect to my domain controller
              env.put(Context.PROVIDER_URL,ldapURL);
              try {
                   // Create the initial directory context
                   LdapContext ctx = new InitialLdapContext(env,null);
                   // Create attributes to be associated with the new group
                        Attributes attrs = new BasicAttributes(true);
                   attrs.put("objectClass","group");
                   attrs.put("samAccountName","Evolution");
                   attrs.put("cn","Evolution");
                   attrs.put("description","Evolutionary Theorists");
                   //group types from IAds.h
                   int ADS_GROUP_TYPE_GLOBAL_GROUP = 0x0002;
                   int ADS_GROUP_TYPE_DOMAIN_LOCAL_GROUP = 0x0004;
                   int ADS_GROUP_TYPE_LOCAL_GROUP = 0x0004;
                   int ADS_GROUP_TYPE_UNIVERSAL_GROUP = 0x0008;
                   int ADS_GROUP_TYPE_SECURITY_ENABLED = 0x80000000;
                   attrs.put("groupType",Integer.toString(ADS_GROUP_TYPE_UNIVERSAL_GROUP + ADS_GROUP_TYPE_SECURITY_ENABLED));
                   // Create the context
                   Context result = ctx.createSubcontext(groupName, attrs);
                   System.out.println("Created group: " + groupName);
                   ctx.close();
              catch (NamingException e) {
                   System.err.println("Problem creating group: " + e);
    }got the error code: Problem creating group: javax.naming.directory.InvalidAttributeIdentifierException: [LDAP: error code 17 - groupType: attribute type undefined]; remaining name 'CN=Evolution,OU=Research,DC=antipodes,DC=com'
    I tried by creating organizational unit "ou=Research" from "LDAP Browser/Editor", and then running the same code -> same error.
    also I have tried code for adding users:
    package test;
    import java.util.Hashtable;
    import javax.naming.ldap.*;
    import javax.naming.directory.*;
    import javax.naming.*;
    import javax.net.ssl.*;
    import java.io.*;
    public class MakeUser
         public static void main (String[] args)
              Hashtable env = new Hashtable();
              String adminName = "cn=Manager,dc=antipodes,dc=com";
              String adminPassword = "secret";
              String userName = "cn=Albert Einstein,ou=Research,dc=antipodes,dc=com";
              String groupName = "cn=All Research,ou=Research,dc=antipodes,dc=com";
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              //set security credentials, note using simple cleartext authentication
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,adminName);
              env.put(Context.SECURITY_CREDENTIALS,adminPassword);
              //connect to my domain controller
              env.put(Context.PROVIDER_URL, "ldap://127.0.0.1:389");
              try {
                   // Create the initial directory context
                   LdapContext ctx = new InitialLdapContext(env,null);
                   // Create attributes to be associated with the new user
                        Attributes attrs = new BasicAttributes(true);
                   //These are the mandatory attributes for a user object
                   //Note that Win2K3 will automagically create a random
                   //samAccountName if it is not present. (Win2K does not)
                   attrs.put("objectClass","user");
                        attrs.put("samAccountName","AlbertE");
                   attrs.put("cn","Albert Einstein");
                   //These are some optional (but useful) attributes
                   attrs.put("giveName","Albert");
                   attrs.put("sn","Einstein");
                   attrs.put("displayName","Albert Einstein");
                   attrs.put("description","Research Scientist");
                        attrs.put("userPrincipalName","[email protected]");
                        attrs.put("mail","[email protected]");
                   attrs.put("telephoneNumber","999 123 4567");
                   //some useful constants from lmaccess.h
                   int UF_ACCOUNTDISABLE = 0x0002;
                   int UF_PASSWD_NOTREQD = 0x0020;
                   int UF_PASSWD_CANT_CHANGE = 0x0040;
                   int UF_NORMAL_ACCOUNT = 0x0200;
                   int UF_DONT_EXPIRE_PASSWD = 0x10000;
                   int UF_PASSWORD_EXPIRED = 0x800000;
                   //Note that you need to create the user object before you can
                   //set the password. Therefore as the user is created with no
                   //password, user AccountControl must be set to the following
                   //otherwise the Win2K3 password filter will return error 53
                   //unwilling to perform.
                        attrs.put("userAccountControl",Integer.toString(UF_NORMAL_ACCOUNT + UF_PASSWD_NOTREQD + UF_PASSWORD_EXPIRED+ UF_ACCOUNTDISABLE));
                   // Create the context
                   Context result = ctx.createSubcontext(userName, attrs);
                   System.out.println("Created disabled account for: " + userName);
                   //now that we've created the user object, we can set the
                   //password and change the userAccountControl
                   //and because password can only be set using SSL/TLS
                   //lets use StartTLS
                   StartTlsResponse tls = (StartTlsResponse)ctx.extendedOperation(new StartTlsRequest());
                   tls.negotiate();
                   //set password is a ldap modfy operation
                   //and we'll update the userAccountControl
                   //enabling the acount and force the user to update ther password
                   //the first time they login
                   ModificationItem[] mods = new ModificationItem[2];
                   //Replace the "unicdodePwd" attribute with a new value
                   //Password must be both Unicode and a quoted string
                   String newQuotedPassword = "\"Password2000\"";
                   byte[] newUnicodePassword = newQuotedPassword.getBytes("UTF-16LE");
                   mods[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute("unicodePwd", newUnicodePassword));
                   mods[1] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute("userAccountControl",Integer.toString(UF_NORMAL_ACCOUNT + UF_PASSWORD_EXPIRED)));
                   // Perform the update
                   ctx.modifyAttributes(userName, mods);
                   System.out.println("Set password & updated userccountControl");
                   //now add the user to a group.
                        try     {
                             ModificationItem member[] = new ModificationItem[1];
                             member[0]= new ModificationItem(DirContext.ADD_ATTRIBUTE, new BasicAttribute("member", userName));
                             ctx.modifyAttributes(groupName,member);
                             System.out.println("Added user to group: " + groupName);
                        catch (NamingException e) {
                              System.err.println("Problem adding user to group: " + e);
                   //Could have put tls.close()  prior to the group modification
                   //but it seems to screw up the connection  or context ?
                   tls.close();
                   ctx.close();
                   System.out.println("Successfully created User: " + userName);
              catch (NamingException e) {
                   System.err.println("Problem creating object: " + e);
              catch (IOException e) {
                   System.err.println("Problem creating object: " + e);               }
    }same error.
    I haven't done any chages to any schema manually.
    I know I'm missing something crucial but have no idea what. I have tried many other code from tutorials from net, but they are all very similar and throwing the same error I showed above.
    thanks in advance for help.

    I've solved this.
    The problem was that all codes were using classes from Microsoft Active Directory, and they are not supported in OpenLDAP (microsoft.schema in OpenLDAP is just for info). Due to this some fields are not the same in equivalent classes ("user" and "person").
    so partial code for creating user in root would be:
    import java.util.Hashtable;
    import javax.naming.ldap.*;
    import javax.naming.directory.*;
    import javax.naming.*;
    import javax.net.ssl.*;
    import java.io.*;
    public class MakeUser
         public static void main (String[] args)
              Hashtable env = new Hashtable();
              String adminName = "cn=Manager,dc=antipodes,dc=com";
              String adminPassword = "secret";
              String userName = "cn=Albert Einstein,ou=newgroup,dc=antipodes,dc=com";
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              //set security credentials, note using simple cleartext authentication
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,adminName);
              env.put(Context.SECURITY_CREDENTIALS,adminPassword);
              //connect to my domain controller
              env.put(Context.PROVIDER_URL, "ldap://127.0.0.1:389");
              try {
                   // Create the initial directory context
                   LdapContext ctx = new InitialLdapContext(env,null);
                   // Create attributes to be associated with the new user
                        Attributes attrs = new BasicAttributes(true);
                                  attrs.put("objectClass","user");
                   attrs.put("cn","Albert Einstein");
                   attrs.put("userPassword","Nale");
                   attrs.put("sn","Einstein");
                   attrs.put("description","Research Scientist");
                   attrs.put("telephoneNumber","999 123 4567");
                   // Create the context
                   Context result = ctx.createSubcontext(userName, attrs);
                   System.out.println("Successfully created User: " + userName);
              catch (NamingException e) {
                   System.err.println("Problem creating object: " + e);
    }hope this will help anyone.

  • OpenLDAP and Solaris 10, I'm out of ideas

    Hi All,
    I have configured OpenLDAP sucessfully and set following results indicating that the user is loaded on the LDAP database
    test5:/ $ cat /etc/passwd | grep admin777
    test5:/ $ getent passwd admin777
    admin777:x:5011:1000::/:/bin/bash
    test5:/ $ id admin777
    uid=5011(admin777) gid=1000(users) groups=1000(users)
    test5:/ $ ldaplist -l passwd admin777
    dn: uid=admin777,ou=People,dc=example,dc=com
    shadowMin: 10
    sn: sn
    userPassword: {SSHA}Uy4yMkk71zNJ6XoAAhoKgjYPzXNnU4r5
    loginShell: /bin/bash
    uidNumber: 5011
    gidNumber: 1000
    shadowMax: 30
    objectClass: inetOrgPerson
    objectClass: posixAccount
    objectClass: shadowAccount
    uid: admin777
    shadowLastChange: 15166
    cn: cn
    homeDirectory: /
    shadowWarning: 7
    test5:/ $
    I've also added an overall security policy in the LDAP database
    # Policies, example.com
    dn: ou=Policies,dc=example,dc=com
    pwdFailureCountInterval: 0
    pwdMaxFailure: 3
    pwdMustChange: TRUE
    pwdAttribute: userPassword
    pwdMinLength: 3
    ou: Policies
    pwdSafeModify: FALSE
    pwdInHistory: 6
    pwdGraceAuthNLimit: 0
    pwdCheckQuality: 1
    objectClass: top
    objectClass: device
    objectClass: pwdPolicy
    pwdLockoutDuration: 1920
    cn: default
    pwdAllowUserChange: TRUE
    pwdExpireWarning: 432000
    pwdLockout: TRUE
    pwdMaxAge: 7516800
    But it seems that this policy is not activated, for example the pwdMinLength: is set to 3, but when the user changes his/her password, it seems that the Solaris policy takes over from the /etc/default/passwd file
    test5:/ $ ssh [email protected]
    * * * * * * * * * * * * W A R N I N G * * * * * * * * * * * * * *
    THIS SYSTEM IS RESTRICTED TO AUTHORIZED USERS FOR AUTHORIZED USE
    ONLY. UNAUTHORIZED ACCESS IS STRICTLY PROHIBITED AND MAY BE
    PUNISHABLE UNDER THE COMPUTER FRAUD AND ABUSE ACT OR OTHER
    APPLICABLE LAWS. IF NOT AUTHORIZED TO ACCESS THIS SYSTEM,
    DISCONNECT NOW. BY CONTINUING, YOU CONSENT TO YOUR KEYSTROKES
    AND DATA CONTENT BEING MONITORED. ALL PERSONS ARE HEREBY
    NOTIFIED THAT THE USE OF THIS SYSTEM CONSTITUTES CONSENT
    TO MONITORING AND AUDITING.
    * * * * * * * * * * * * W A R N I N G * * * * * * * * * * * * *
    Password:
    Last login: Tue Jul 12 11:14:22 2011 from test5.example.
    Sun Microsystems Inc. SunOS 5.10 Generic January 2005
    Sun Microsystems Inc. SunOS 5.10 Generic January 2005
    Sourcing //.profile-EIS.....
    test5:/ $ id
    uid=5011(admin777) gid=1000(users) groups=1000(users)
    test5:/ $ passwd
    passwd: Changing password for admin777
    Enter existing login password:
    New Password:
    passwd: Password too short - must be at least 8 characters.
    Please try again
    New Password:
    test5:/ $ cat /etc/default/passwd
    #ident @(#)passwd.dfl 1.7 04/04/22 SMI
    # Copyright 2004 Sun Microsystems, Inc. All rights reserved.
    # Use is subject to license terms.
    MAXWEEKS=13
    MINWEEKS=
    PASSLENGTH=8
    # NAMECHECK enables/disables login name checking.
    # The default is to do login name checking.
    # Specifying a value of NO will disable login name checking.
    NAMECHECK=YES
    It seems that the Solaris password policy forces the user to use the Solaris policy and ignore the LDAP ppolicy, below is my slapd.conf file
    test5:/ $ cat /usr/local/etc/openldap/slapd.conf
    # See slapd.conf(5) for details on configuration options.
    # This file should NOT be world readable.
    include /usr/local/etc/openldap/schema/core.schema
    include /usr/local/etc/openldap/schema/cosine.schema
    include /usr/local/etc/openldap/schema/inetorgperson.schema
    include /usr/local/etc/openldap/schema/nis.schema
    include /usr/local/etc/openldap/schema/ppolicy.schema
    include /usr/local/etc/openldap/schema/DUAConfigProfile.schema
    include /usr/local/etc/openldap/schema/solaris.schema
    include /usr/local/etc/openldap/schema/java.schema
    # Define global ACLs to disable default read access.
    # Do not enable referrals until AFTER you have a working directory
    # service AND an understanding of referrals.
    #referral ldap://root.openldap.org
    loglevel 256
    pidfile /usr/local/var/run/slapd.pid
    argsfile /usr/local/var/run/slapd.args
    # Load dynamic backend modules:
    modulepath /usr/local/libexec/openldap
    moduleload ppolicy.la
    # modulepath /usr/local/libexec/openldap
    # moduleload back_bdb.la
    # moduleload back_ldap.la
    # moduleload back_ldbm.la
    # moduleload back_passwd.la
    # moduleload back_shell.la
    # BDB database definitions
    database bdb
    suffix "dc=example,dc=com"
    checkpoint 32 30
    cachesize 10000
    rootdn "cn=Manager,dc=example,dc=com"
    # Cleartext passwords, especially for the rootdn, should
    # be avoid. See slappasswd(8) and slapd.conf(5) for details.
    # Use of strong authentication encouraged.
    rootpw "{SSHA}6FWujVb4YNHJDyniwoWaHTMfXBJBM8u7"
    # The database directory MUST exist prior to running slapd AND
    # should only be accessible by the slapd and slap tools.
    # Mode 700 recommended.
    directory /usr/local/var/openldap-data
    # Indices to maintain
    index objectClass eq
    index uid,uidNumber,gidNumber,shadowExpire,shadowLastChange eq
    overlay ppolicy
    ppolicy_default "cn=default,ou=Policies,dc=example,dc=com"
    ppolicy_use_lockout
    Edited by: King Rat on 12-Jul-2011 02:20
    Edited by: King Rat on 12-Jul-2011 02:21

    Hi there are you still working on this?
    I'm also working on this. My setup is a little differant and I'm a little behind. I installed OpenLDAP server is installed on RHEL 5.5 and it is working with all the Linux servers, but Solaris 10 is giving me trouble. I see your using the ppolicy.schema I have not see this before I have been told to use the solaris.schema and the DUAConfigProfile.schema. It looks like you are using it with a overlay is this needed?
    This is what my user account looks like.
    dn: uid=user00,ou=People,dc=test,dc=net
    uid: user00
    cn: user00
    objectClass: account
    objectClass: posixAccount
    objectClass: top
    objectClass: shadowAccount
    userPassword: {MD5}X03MO1qnZdYdgyfeuILPmQ==
    shadowLastChange: 13048
    shadowMax: 99999
    shadowWarning: 7
    loginShell: /bin/bash
    uidNumber: 600
    gidNumber: 500
    homeDirectory: /home/user00
    gecos: user00
    Can you post the command you used to setup the client.
    Example:
    ldapclient init -a profileName=profile -a domainName=test.net 10.0.0.2
    I also have these items and ACLs in the slapd.conf file.
    # Allow LDAPv2 client connections. This is NOT the default.
    allow bind_v2
    access to attrs=shadowLastChange,userPassword
    by self write
    by * auth
    access to *
    by * read
    Anyway I hope this helps and if you could help me with the client setup that would be great.

  • Whats is difference between Java JRE  and  Java SDK

    Hi,
    what is the difference between Java JRE and Java SDK...
    i think both of them have the same set of files to be installed...
    I am not able to understand where they differ

    The JRE (Java runtime Environment) contains just the stuff necessary to run Java and the SDK (System Development Kit) contains the extra stuff necessary (and also helpful) to develop in Java.

  • What is difference between C# Gzip and Java swing GZIPOutputStream?

    Hi All,
    I have a Java swing tool where i can compress file inputs and we have C# tool.
    I am using GZIPOutputStream to compress the stream .
    I found the difference between C# and Java Gzip compression while a compressing a file (temp.gif ) -
    After Compression of temp.gif file in C# - compressed file size increased
    while in java i found a 2% percentage of compression of data.
    Could you please tell me , can i achieve same output in Java as compared to C# using GZIPOutputStream ?
    Thank a lot in advance.

    797957 wrote:
    Does java provides a better compression than C#?no idea, i don't do c# programming. and, your question is most likely really: "does java default to a higher compression level than c#".
    Btw what is faster compression vs. better compression?meaning, does the code spend more time/effort trying to compress the data (slower but better compression) or less time/effort trying to compress the data (faster but worse compression). most compression algorithms allow you to control this tradeoff depending on whether you care more about cpu time or disk/memory space.

  • What is the diffrence between package javax.sql and java.sql

    Is javax designed for J2EE?
    And when to use package javax?

    Hi,
    What is the diffrence between package javax.sql and java.sql?The JDBC 2.0 & above API is comprised of two packages:
    1.The java.sql package and
    2.The javax.sql package.
    java.sql provides features mostly related to client
    side database functionalities where as the javax.sql
    package, which adds server-side capabilities.
    You automatically get both packages when you download the JavaTM 2 Platform, Standard Edition, Version 1.4 (J2SETM) or the JavaTM 2, Platform Enterprise Edition, Version 1.3 (J2EETM).
    For further information on this please visit our website at http://java.sun.com/j2se/1.3/docs/guide/jdbc/index.html
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Micro Systems
    http://www.sun.com/developers/support/

  • What is the diffrence between My Runnable Interface and Java Runnable

    Hi folks
    all we know that interfaces in java just a decleration for methods and variables.
    so my Question is why when i create an interface its name is "Runnable" and i declared a method called "run" inside it.then when i implements this interface with any class don't do the thread operation but when i implement the java.lang.Runnable the thread is going fine.
    so what is the diffrence between My Runnable Interface and Java Runnable?
    thnx

    Hi folks
    all we know that interfaces in java just a decleration
    for methods and variables.
    so my Question is why when i create an interface its
    name is "Runnable" and i declared a method called
    "run" inside it.then when i implements this interface
    with any class don't do the thread operation but when
    i implement the java.lang.Runnable the thread is going
    fine.
    so what is the diffrence between My Runnable Interface
    and Java Runnable?
    thnxClasses and interfaces are not identified by just their "name", like Runnable. The actual "name" the compiler uses is java.lang.Runnable. So even if you duplicate the Runnable interface in your own package, it's not the same as far as the compiler is concerned, because it's in a different package.
    Try importing both java.util.* and java.awt.* (which both have a class or interface named List), and then try to compile List myList = new ArrayList();

  • Java SE and Java EE

    I am a IT graduate and I still need some clarification on the relationship between Java SE and Java EE API. Does EE include SE?
    For application development, I know I can use only SE without the EE, but can I use EE alone without SE?
    Any good articles addressing my questions?
    Thank you very much
    R

    Java EE in fact extends java SE, its primarily aim is to simplify developing multitier enterprise applications (Java SE provides all the necessary basic libraries etc.)
    Because Java EE is an extension of Java SE, you cant use EE without SE - without SE there is no EE.

  • SSO between Portal and Java WD application

    Hi Experts,
    I am using CE 7.2 on localhost and I am very new to SAP.
    I need to know how can I get SSO between Portal and Java WD.  I have a WD application that displays the logged in user using "IUser currentUser = WDClientUser.getCurrentUser().getSAPUser()", as well I can use "IUser user = UMFactory.getAuthenticator().getLoggedInUser()".  Both work.
    Q1. What is the difference in the 2 above?
    Q2. My WD application is set to authenticate user.  The WD application is in URL iView.  I need SSO between Portal and WD application.   Is there a way to get this SSO without SAP Backend (ECC), for now I just need SSO between Portal and Java WD appl.
    Everything is in localhost.
    Please advice. Thanks.

    > need to know how can I get SSO between Portal and Java WD.
    Then I suggest you ask your question in the Web Dynpro Java forum instead of the Web Dynpro ABAP one.

  • J2me and java card, need help to communicate

    we are trying to put together a reader to read smartcards using j2me and we figure that it would be easiest if we could develop it to work with java cards rather than standard smart cards, the problem is we get garbage when we communicate to it, the chip sends us crap, any suggestions what might be wrong, any calls we might be missing, has anyone worked with j2me and java cards or smart cards, any help would be appreciated.
    einar

    .... reader app and the ME behind it .... smells like mobile ....
    First of all - if you want to have one mobile application running on this just make sure that whatever is written in ME can use drivers from the reader chip ....
    Workin on the PC is something completely different. There was one good example how to develop one host application in Java provided with the JCOP tools long ago ... I don't know if this is now in the new Eclipse tools.
    But - there was a small API provided that can give you good hints what to do - and - once you have it on the reader side - you can easily integrate ME methods with this ...

  • Eclipse 3.4 and Java 6 compatibility

    Hi All,
    I have a tomcat plugin inside Eclipse 3.4.2. Recently I upgraded from Java 5 to Java 6. When I try to start Tomcat from Eclipse,I get the following error:
    Error occurred during initialization of VM
    java.lang.UnsatisfiedLinkError: java.lang.Float.floatToIntBits(F)I
         at java.lang.Float.floatToIntBits(Native Method)
         at java.lang.Math.<clinit>(Math.java:801)
         at sun.net.www.ParseUtil.lowMask(ParseUtil.java:512)
         at sun.net.www.ParseUtil.<clinit>(ParseUtil.java:559)
         at sun.misc.Launcher.getFileURL(Launcher.java:388)
         at sun.misc.Launcher$ExtClassLoader.getExtURLs(Launcher.java:165)
         at sun.misc.Launcher$ExtClassLoader.<init>(Launcher.java:137)
         at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:121)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.Launcher$ExtClassLoader.getExtClassLoader(Launcher.java:118)
         at sun.misc.Launcher.<init>(Launcher.java:51)
         at sun.misc.Launcher.<clinit>(Launcher.java:39)
         at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1304)
         at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1286)
    Kindly suggest what needs to be done? If I am posting it in a wrong forum please suggest me the right one too.
    I would like to know if Eclipse 3.4 and Java 6 are compatible or not.
    Thanks in advance.

    ShubhaPradeep wrote:
    I have a tomcat plugin inside Eclipse 3.4.2. Recently I upgraded from Java 5 to Java 6. When I try to start Tomcat from Eclipse,I get
    Error occurred during initialization of VM
    java.lang.UnsatisfiedLinkError: java.lang.Float.floatToIntBits(F)IAre we talking 64-bit Linux?
    I had issues launching eclipse on CentOS 5 64-bit and Sun JDK 1.6,
    resolved by launching eclipse with the -vm option specifying Sun JDK 1.5 java.
    [https://www.centos.org/modules/newbb/viewtopic.php?post_id=95784&topic_id=11661]

  • Problem with win2000sp3 and Java web start

    I have JRE and Java web start (1.2.0_01, build b01) which come downloading file j2re-1_4_1_01-windows-i586-i.exe from sun.
    I have win2000pro running on my PC.
    I had updated win2000 to service pack 2 and everything was fine.
    Now i decided to update to service pack 3 (in the process I also updated other components) from Microsoft and:
    1) Java applets seem to be running fine within i.e.
    2) If i try to run an application from java web start my PC freezes and I have to restart it.
    3) Staroffice 6.0, which runs on Java, seems to be fine.
    I reinstalled both sp3 and jre etc, with no result.
    Is this a known problem?
    Thanks to all.
    Maurizio

    I suspect that you have hit a known problem with Swing on Java 1.4.1 with buggy video drivers. Do you have an ATI card? They are the worst offenders. ATI released new drivers for its Radeon line today. They fix the problem.

  • Problem with JSP and Java Servlet Web Application....

    Hi every body....
    I av developed a web based application with java (jsp and Java Servlets)....
    that was working fine on Lane and Local Host....
    But when i upload on internet with unix package my servlets and Java Beans are not working .....
    also not access database which i developed on My Sql....
    M using cpanel support on web server
    Plz gave me solution...
    Thanx looking forward Adnan

    You need to elaborate "not working" in developer's perspective instead of in user's perspective.

  • Report Script returns no data and "java.io.FileNotFoundException" error

    When attempting to write to a new file (Eg: C:\TEST.txt), Report Script returns no data and "java.io.FileNotFoundException" error occurs.
    This error occurs only in Essbase 9.3.1.3 release, however it works fine in release 9.3.1.0.
    After running the report the script, it pops up the follwing message:
    "java.io.FileNotFoundException: ..\temp\eas17109.tmp (The system cannot find the file specified): C:\TEST.txt"
    When checked the TEST.txt, it was empty.

    Sorry folks, I just found out the reason. Its because there was no data in the combination what I was extracting.
    but is this the right error message for that? It should have atleast create a blank file right?

  • I continually get a Java error. I've uninstalled and reinstalled firefox and nothing has helped. I've updated flash and Java.

    I have used Firefox as my default browser for many years. I've recently started getting a Java error message. It pops up continually. I have updated flash and java. I have uninstalled and re-installed Firefox and nothing has helped. I have had to start using Chrome instead of Firefox which I don't care for but I don't have the java error with Chrome. How do I fix this problem? The error reads as follows:
    Java Script Application
    Error: syntax error

    Your '''JavaScript''' error has nothing to do with the Java plugin . It is likely caused by an added extension (the earlier forum threads [/questions/944619] and [/questions/943088] mention disabling or updating the Social Fixer extension will resolve the problem).
    You can read this article for help troubleshooting your extensions: [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]

Maybe you are looking for