Using UME to read binary attribute from LDAP (objectSID)

Hi,
I am trying to read the ObjectSID of an LDAP user (from MS Active directory) from an IUser object. This attribute is binary retrieved from the LDAP and if I defined a normal extra attribute in the datasourceconfiguration file and retrieve it as a String the value is wrong.
So my question is how can I define this as a binary attribute?
From the file C:\usr\sap\EWD\JC00\j2ee\configtool\dataSourceConfiguration.dtd you get the specification of the xml format for the datasourceconfiguration.
The Attribute element  has the following specification:
<!ATTLIST attribute name CDATA #REQUIRED          populateInitially (true|false) #IMPLIED
readonly (true|false) #IMPLIED
type (string|blob) #IMPLIED
cacheTime CDATA #IMPLIED>
Since you have type here, I tried setting it to blob under the user object as such:
For user:
<attribute name="guid" type="blob" populateInitially="true"/>
For attribute mapping:
<attribute name="guid">
<physicalAttribute name="objectSid"/>                    </attribute>     
However, I still get the following error when calling
iuser.getBinaryAttribute(UME_NAMESPACE,UME_GUID_NAME ):
Caused by: com.sap.security.api.UMRuntimeException: String attribute "com.sap.security.core.usermanagement"-->"guid" must be read using IPrincipal.getAttribute(com.sap.security.core.usermanagement,guid)
     at com.sap.security.core.imp.AbstractPrincipal.getBinaryAttribute(AbstractPrincipal.java:300)
     at com.sap.security.core.imp.UserWrapper.getBinaryAttribute(UserWrapper.java:261)
     at com.bouvet.portal.login.UserIntegrityLoginModule.getStatoilUser(UserIntegrityLoginModule.java:430)
     at com.bouvet.portal.login.UserIntegrityLoginModule.login(UserIntegrityLoginModule.java:255)
     at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:69)
     ... 41 more
This error indicates that the attributes is a string and not a binary attribute.
Anyone?

Create OSS and initial message is that this is not supported eventhough some of the configuration files point that direction. It's really easy to implement so maybe if I am lucky I'll get a hotfix.
Dagfinn
btw the field was objectGUID not objectSID

Similar Messages

  • Need help in retrieving attributes from LDAP using JNDI

    I am trying to retrieve attributes from LDAP using JNDI, but I'm getting the following error when I try to run my Java program.
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/naming/NamingException
    I have all the jar files in my classpath: j2ee.jar, fscontext.jar and providerutil.jar. The interesting thing is that it gets compiled just fine but gives an error at run-time.
    Could anyone tell me why I'm getting this error? Thanks!
    Here's my code:
    import javax.naming.*;
    import javax.naming.directory.*;
    import java.util.*;
    import java.io.*;
    class Getattr {
    public static void main(String[] args) {     
    // Identify service provider to use     
    Hashtable env = new Hashtable(11);     
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");      
    // user     info
    String userName = "username";     
    String password = "password";          
    // LDAP server specific information     
    String host = "ldaphostname";     
    String port = "portnumber";     
    String basedn = "o=organization,c=country";     
    String userdn = "cn=" + userName + "," + basedn;          
    env.put(Context.PROVIDER_URL, "ldap://" + host + ":" + port + "/" + basedn);     
    env.put(Context.SECURITY_PRINCIPAL, userdn);     
    env.put(Context.SECURITY_CREDENTIALS, password);     
    try {          
    System.setErr(new PrintStream(new FileOutputStream(new File("data.txt"))));     
    // Create the initial directory context     
    DirContext ctx = new InitialDirContext(env);          
    // Ask for all attributes of the object      
    Attributes attrs = ctx.getAttributes("cn=" + userName);          
    NamingEnumeration ne = attrs.getAll();                    
    while(ne.hasMore()){                         
    Attribute attr = (Attribute) ne.next();                                   
    if(attr.size() > 1){               
    for(Enumeration e = attr.getAll(); e.hasMoreElements() ;) {                                       
    System.err.println(attr.getID() + ": " + e.nextElement());                     
    } else {
         System.err.println(attr.getID() + ": " + attr.get());
    // Close the context when we're done     
    ctx.close();     
    } catch(javax.naming.NamingException ne) {
         System.err.println("Naming Exception: " + ne);     
    } catch(IOException ioe) {
         System.err.println("IO Exception: " + ioe);     

    That doesn't work either. It seems its not finding the NamingException class in any of the jar files. I don't know why? Any clues?

  • Read application item from LDAP

    We are using OpenLDAP authorization. The configuration data resides in the APEX authorization definition.
    Now my question: should it be feasible to read further attributes from the user logging in, without the need to redundantly define host, base dn etc. on page level?
    I imagine a LDAP authorization that gives me back more than only the APP_USER.
    Comments welcome.
    Tom

    The user and password are still available in the post-authentication part of the authentication. You could fetch more values here into application items without having to prompt the user for credentials again. If you do need to connect at a later point then you're out of luck really, since the password is blanked out after the authentication.
    I implemented a solution before where i connected to the ldap directory in post-authentication to retrieve the user's groups: {message:id=10197833}
    I'm also not sure since i haven't tried yet, but you could probably use the apex_ldap package to reduce the amount of code

  • Encoding problem while reading binary data from MQ-series

    Dear all,
    we are running on 7.0 and we have an encoding problem while reading binary data from MQ-series. Because we are getting flat strings from queue we use module "Plain2ML" (MessageTransformBean) for wrapping xml-elements around the incoming data.
    The MQ-Series-Server is using CCSID 850, which we configured in connection parameters in communication channel (both parameters for Queuemanager CCSID and also CCSID of target).If there are special characters in the message (which HEX-values differ from codepage to codepage) we get errors in our adapter while executing, please see stack-trace for further analysis below.
    It seems to us that
    1. method ByteToCharUTF8.convert() expects UTF-8 in binary data
    2. Both CCSID parameters are not used anyway in JMS-adapter
    How can we solve this problem without changing anything on MQ-site?
    Here is the stack-trace:
    Catching com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.af.modules.trans.MessageTransformBean.throwModuleException(MessageTransformBean.java:453)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:387)
        at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl0_0.process(ModuleLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:292)
        at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0_0.process(ModuleProcessorLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java:84)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertBinaryToXiMessageFilter.filter(ConvertBinaryToXiMessageFilter.java:304)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:112)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:87)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:123)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filter(TxManagerFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.DynamicConfigurationFilter.filter(DynamicConfigurationFilter.java:72)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.PmiAgentFilter.filter(PmiAgentFilter.java:66)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundCorrelationFilter.filter(InboundCorrelationFilter.java:60)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JmsHeadersProfileFilter.filter(JmsHeadersProfileFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageInvocationsFilter.filter(MessageInvocationsFilter.java:89)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JarmMonitorFilter.filter(JarmMonitorFilter.java:57)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ThreadNamingFilter.filter(ThreadNamingFilter.java:62)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.SenderChannelImpl.doReceive(SenderChannelImpl.java:263)
        at com.sap.aii.adapter.jms.core.channel.ChannelImpl.receive(ChannelImpl.java:437)
        at com.sap.aii.adapter.jms.core.connector.MessageListenerImpl.onMessage(MessageListenerImpl.java:36)
        at com.ibm.mq.jms.MQMessageConsumer$FacadeMessageListener.onMessage(MQMessageConsumer.java:399)
        at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.onMessage(JmsMessageConsumerImpl.java:904)
        at com.ibm.msg.client.wmq.v6.jms.internal.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:4249)
        at com.ibm.msg.client.wmq.v6.jms.internal.SessionAsyncHelper.run(SessionAsyncHelper.java:537)
        at java.lang.Thread.run(Thread.java:770)
    Caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:714)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:538)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:528)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:471)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:364)
        ... 36 more
    Caused by: sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:270)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:287)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:337)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223)
        at java.io.InputStreamReader.read(InputStreamReader.java:208)
        at java.io.BufferedReader.fill(BufferedReader.java:153)
        at java.io.BufferedReader.readLine(BufferedReader.java:316)
        at java.io.LineNumberReader.readLine(LineNumberReader.java:176)
        at com.sap.aii.messaging.adapter.Conversion.convertPlain2XML(Conversion.java:310)
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:709)
        ... 40 more
    Any ideas?
    Kind regards, Stefan

    Hi Stefan,
    for the first MTB now we are using only one parameter: Transform.ContentType = text/plain;charset="ISO-8859-1"
    The second MTB, which does the XML-Wrapping, is configured like this:
    Transform.Class = com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType = application/xml
    xml.conversionType = SimplePlain2XML
    xml.fieldNames = value
    xml.fieldSeparator = §%zulu§%
    xml.processFieldNames = fromConfiguration
    xml.structureTitle = payload
    Both CCSID configuration parameters from the "Source"-Tab we've set to 850.
    Now, we don't get an error anymore - sun.io.malformedInputException - , but, unfortunately, now special character conversion succeeded (we need an "ß" and we get an ISO-HEX-E1 -> á).  E1 is (different from ISO) an "ß" in 850.
    Any ideas?

  • I use LabVIEW 7.1 but I have some problem when, I use LabVEW to read the data from serial communication

    I use LabVIEW 7.1 but I have some problem when, I use LabVEW to read the data from serial communication.
    I use LabVIEW to read the data from serial communication then, i open the example (.vi) from Serial Communication - Advanced Serial Write and Read  from LabVIEW Example. BUT it have some error message that : Error - 1073807202 occured  at property node in visa configure serial port (instr).vi -> advance serial write and read .vi
    this error code is undefined. no one has provide a description for this code, or you might have wired a number that is not an error code to the error code input.
    I don't know why? please help me. thank you.

    When I copy that code into "Explain Error" I get: "VISA:  (Hex 0xBFFF009E) A code library required by VISA could not be located or loaded."
    You may have a bad install of VISA or the wrong version of VISA loaded. Try re-installing VISA. You can get the latest version from the NI support site: http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BBB002C0E91?opendocument&node=1....
    Also ensure that you are not pointing the example towards a serial port that does not exist.
    Please let us know what you find and what gets this working for you.
         Rob

  • Using additional userprofile attributes from LDAP

    Hi,
    my users are inside an OpenDS LDAP-Server connected to SSGD 4.41 - all works fine.
    I would like to store some additional SGD attributes like
    UserProfile.Multiple = yes/no
    (Multiple: Whether someone may log in using this user profile and whether this user profile will be shared by multiple users in the form of a "guest" account.)
    also inside the LDAP (extending my own LDAP-schema).
    Question: How can i tell SSGD to use this attribute UserProfile.Multiple from LDAP instead of looking into the
    local repository ?
    regards
    Danny

    Hi Danny,
    I don't think you can do this, as user profile data is never read from the LDAP directory. LDAP users always have to be mapped to a local profile (from the SGD datastore), meaning that any attributes on the user object from the LDAP directory wouldn't be considered when evaluating a user's profile.
    Does anyone else have a take on this?
    -- DD

  • Unable to Retrieve Attributes from LDAP Server

    I have a problem. I was wondering if anyone can assist me. I am new to LDAP servers and JNDI. I cannot retrieve any attributes from the users listed in my data entry. Any assistance would be greatly appreciated! Thanks.
    I created an entry in the LDAP server that looks like this:
    �o=somedn�
    |
    �ou=people, o=somedn�
    The �ou=people, o=somedn� entry contains fictitious users. The LDAP server is connected to a MySQL database. When I write Java code to read the attributes of a given user whose fullname (cn) is �Vinny Luigi�, as listed in the database, I receive an error that starts with the following:
    javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'cn=Vinny Luigi,ou=people'
    The code I used is based on the Sun JNDI tutorial. Sun�s code is at http://java.sun.com/products/jndi/tutorial/basics/directory/src/GetattrsAll.java. My version of the code is below:
    * @(#)GetattrsAll.java     1.5 00/04/28
    * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
    * Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free,
    * license to use, modify and redistribute this software in source and
    * binary code form, provided that i) this copyright notice and license
    * appear on all copies of the software; and ii) Licensee does not
    * utilize the software in a manner which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any
    * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
    * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
    * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE
    * HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE
    * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
    * MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN
    * NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
    * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
    * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT
    * OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS
    * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line
    * control of aircraft, air traffic, aircraft navigation or aircraft
    * communications; or in the design, construction, operation or
    * maintenance of any nuclear facility. Licensee represents and warrants
    * that it will not use or redistribute the Software for such purposes.
    import javax.naming.*;
    import javax.naming.directory.*;
    import java.util.Hashtable;
    * Demonstrates how to retrieve all attributes of a named object.
    * usage: java GetattrsAll
    class GetattrsAll
         static void printAttrs(Attributes attrs)
              if (attrs == null)
                   System.out.println("No attributes");
              else
                   /* Print each attribute */
                   try
                        for (NamingEnumeration ae = attrs.getAll(); ae.hasMore();)
                             Attribute attr = (Attribute) ae.next();
                             System.out.println("attribute: " + attr.getID());
                             /* print each value */
                             for (NamingEnumeration e = attr.getAll(); e.hasMore(); System.out.println("value: " + e.next()) )
                   } catch (NamingException e) {
                        e.printStackTrace();
         public static void main(String[] args) {
              // Set up the environment for creating the initial context
              Hashtable env = new Hashtable(100);
              env.put(Context.INITIAL_CONTEXT_FACTORY,
                        "com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL, "ldap://localhost:10389/o=somedn");
              try {
                   // Create the initial context
                   DirContext ctx = new InitialDirContext(env);
                   // Get all the attributes of named object
                   System.out.println("About to use ctx.getAttributes()");
                   Attributes answer = ctx.getAttributes("cn=Vinny Luigi,ou=people");
                   // Print the answer
                   printAttrs(answer);
                   // Close the context when we're done
                   ctx.close();
              } catch (Exception e) {
                   e.printStackTrace();
    The primary key of the database is id_pk. Below is a copy of the mapping.xml file which maps the LDAP server entry to the database:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE mapping PUBLIC "-//Penrose/DTD Mapping 1.2//EN" "http://penrose.safehaus.org/dtd/mapping.dtd">
    <mapping>
    <entry dn="o=somedn">
    <oc>organization</oc>
    <oc>top</oc>
    <at name="o" rdn="true">
    <constant>somedn</constant>
    </at>
    <aci>
    <permission>rs</permission>
    </aci>
    </entry>
    <entry dn="ou=people,o=somedn">
    <oc>inetOrgPerson</oc>
    <oc>organizationalPerson</oc>
    <oc>organizationalUnit</oc>
    <oc>person</oc>
    <oc>top</oc>
    <at name="cn">
    <constant>"fullname"</constant>
    </at>
    <at name="ou" rdn="true">
    <constant>people</constant>
    </at>
    <at name="sn">
    <constant>"lastname"</constant>
    </at>
    </entry>
    <entry dn="id_pk=...,ou=people,o=somedn">
    <oc>inetOrgPerson</oc>
    <oc>organizationalPerson</oc>
    <oc>person</oc>
    <oc>top</oc>
    <at name="Position_">
    <variable>usertable9.Position_</variable>
    </at>
    <at name="id_pk" rdn="true">
    <variable>usertable9.id_pk</variable>
    </at>
    <at name="fullname">
    <variable>usertable9.fullname</variable>
    </at>
    <at name="lastname">
    <variable>usertable9.lastname</variable>
    </at>
    <at name="cn">
    <variable>usertable9.fullname</variable>
    </at>
    <at name="sn">
    <variable>usertable9.lastname</variable>
    </at>
    <source name="usertable9">
    <source-name>usertable9</source-name>
    <field name="Position_">
    <variable>Position_</variable>
    </field>
    <field name="id_pk">
    <variable>id_pk</variable>
    </field>
    <field name="fullname">
    <variable>cn</variable>
    </field>
    <field name="lastname">
    <variable>sn</variable>
    </field>
    </source>
    </entry>
    </mapping>
    Thanks.

    The complete name (Distinguished Name) of the user you're searching is 'cn=Vinny Luigi,ou=people,o=somedn'.
    Regards,
    Ludovic.

  • Read 'userPassword' attribute via LDAP?

    Hi all,
    Sorry if this question has already been answered...
    I do not have access to a Sun ONE Directory server so I have not been able to answer this question for myself.
    Is it possible to read the 'userPassword' attribute from a Sun ONE Directory Server via LDAP?
    I know that this is not possible for MS AD, and I am guessing this is a standard used by all LDAP Servers.
    Thanks in advance for any help,
    Bryan Galvin

    If the privileges are set properly, you can read the password in the Sun directory. If the password is stored in clear text (not the default) then you will see the password. If it is encrypted then you will see an encrypted password string preceded by the encryption method used, for example:
    userPassword: {SHA}0twDi9KZ2bTTBL1PpYwcFxhWsCu=
    An "old" method of authentication involved hashing the user-supplied password with the same algorithm and comparing it to the entry in the directory. (apologies to those "oldies" still using that method!)

  • Reading binary data from a URL

    Below are 2 snippets of code that read data from a binary file. A small sample of the output is shown at the bottom of each code fragment. The first one uses the URL class to read a remote file. The ouput for this fragment is incorrect in some cases. The second uses a stream reader to read a local file (the output is correct in this case). Both fragments read the same file.
    As you can notice, some of the bytes read are the same in both cases. Some others are not.
    I hope you can suggest how I can fix my URL version.
    Thanks for your help.
    Miguel
    Program A: Reads a remote file with URL
    URL url = new URL("http:localhost//myfile.awg");
    URLConnection connection = url.openConnection();
    BufferedReader bin = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    while(true) {
    System.out.println(Integer.toHexString(bin.read()));
    7d 3 0 0
    22 30 3 3e
    fd b9 2a 0
    b2 2 0 1
    Program B: Rads a local file
    DataInputStream din = new DataInputStream(new BufferedInputStream
    (new FileInputStream("c:\\inetpub\\wwwroot\\myfile.awg")));
    while(true) {
    System.out.println(Integer.toHexString(din.read()));
    8e 3 0 0
    99 30 3 3e
    81 b9 2a 0
    b2 2 0 1

    What can I use instead?
    Thanks,
    MiguelBufferedInputStream as in Program B.

  • Read Navigational Attribute from Mulitprovider

    Hi Gurus,
    I need to read a navigational attribute from the Multiprovider in the user exit.  Could you please tell me in detail with coding how to do this ?

    Hi,
    Navigation attributes data exists in master data and not in multiprovider. If you want to use navigation attribute value in EXIT then check which is the base Infoobject and read the Infoobject table, from there you can read the value of required attribute.
    Regards,
    Durgesh.

  • Oracle reading binary files from other oracle home.

    Hi all,
    I have two oracle db installed on the same server but on different oracle home.
    It seems to me that the second oracle is reading the binaries from the other installation.
    I can start this database and the sap instance and it starts on the correct oracle home but I see that it is reading files on the first oracle home.
    for example, it saves the spfile under the first oracle_home\database directory. I started it using pfile=<the_correct_ora-home>\database\initSID.ora and set on this  init.ora file the correct path for  spfile.
    But even after this if i change any parameter, it stills change the spfile on the wrong <oracle_home>\database.
    Is there a way to fix this ? I mean to make the second oracle to see files under its own oracle home ?
    It is oracle 11g under windows 2008.
    Remember that all the environment variables is pointing to the correct oracle home and I can start SAP and Oracle as well on this oracle_home.
    Thanks in advance,
    Joao.

    Hi Orkun,
    No, we don't have anything else installed yet.
    Please see what I found out:
    Checking those binary errors I found out that the oracle service
    OracleServiceDPC (the second instance on this server) is being started from the wrong oracle_home path. Please
    see the path to the executables on that service properties:
    g:\oracle\dnc\11202\bin\ORACLE.EXE DPC
    It is pointing to the other oracle home DNC but starting instance DPC. How can I change that ?
    Please see that the oracle home, the listener, etc is correct pointing
    to oracle home G:\oracle\DPC\11202.
    I would like to disable this service and create the correct one.
    Is that possible ?
    thanks and regards,
    Joao

  • Reading binary content from HTTP?

    As long as i read text (ascii) data from a HttpURLConnection, the resulting stream (written to a file) is okay (readable). but when i want to read a PDF file with the same code, the written output file is not readable with the Acrobat reader (file type not supported or file corrupted):
                    //read data from HTTP server:
                    InputStream is = null;
                    HttpURLConnection con = null;
                    try {
                        System.out.print(key+": connecting ...");
                        con = (HttpURLConnection) url.openConnection();
                        if (con instanceof HttpsURLConnection) { //HTTPS URL?
                            //avoid "java.io.IOException: HTTPS hostname wrong:  should be <217.5.135.142>"
                            ((HttpsURLConnection) con).setHostnameVerifier(new HostnameVerifier() {
                                public boolean verify(String hostname, SSLSession session) {
                                    return true;
                        System.out.print(" reading ...");
                        try {
                            is = con.getInputStream();
                            try { //in case input stream is compressed via GZIP:
                                is = new GZIPInputStream(is);
                            } catch (IOException ioe) {
                                //ignore (input stream is not GZIP compressed)
                        } catch (IOException ioe) {
                            System.err.println("Error getting input stream. HTTP return code: "+con.getResponseCode()+" ("+con.getResponseMessage()+"). "+ ioe);
                            return;
                        IOUtils.writeStream(is, os);
                    } catch (Exception e) {
                        System.err.println("\nError getting content from URL: " + e);
                        return;
                    } finally {
                        if (is != null) { try { is.close(); } catch (IOException ioe) { ioe.printStackTrace(System.err); } }
                        if (con != null) { try { con.disconnect(); } catch (Exception e) { e.printStackTrace(System.err); } }
                        if (os != null) { try { os.close(); } catch (IOException ioe) { ioe.printStackTrace(System.err); } }
                    }when i open the written pdf file with a text editor, i noticed the the first line is
    DF-1.4
    so, the first character "P" is missing. but even when i add the "P" in the text file and save it, Acrobat Reader shows the same error.
    is there another way to load binary data from a HttpUrlConnection and/or write it to a file?

    yes, it's simple and works with text/ascii content from URLS:
         public static void writeStream(InputStream inputStream, OutputStream outputStream) throws IOException {
            if (inputStream != null && outputStream != null) {
                int count;
                byte[] bytes = new byte[128];
                while ((count = inputStream.read(bytes, 0, bytes.length)) != -1) { //use full read() method for GZIPInputStream to be treated correctly
                    outputStream.write(bytes, 0, count);     
        }//writeStream()it's pdf content that doesn't work (completely). the first two characters "%P" are mssing. if i add them by hand (e.g. my writting this two characters to the outputSTream before continuing with the PDF content), the resulting file is okay (can be read by acrobat reader).
    perhaps, some inner Java class misinterpret the "%P" characters as a special code sequence?

  • Using jsp to read a input from a radio button

    i am trying read a input from a radio button ,normly if the name of radio button is "priority" and if u referrence it as request.getParameter("priority") it shld work right but mine does not.
    <% rs = stmt.executeQuery("select PRIORITYNAME,PRIORITYDESC from TBL_PRIORITY ");
    <td>Priority</td>
    <% while(rs.next())
    %>
    <input name="priority" type="radio"><% out.println(rs.getString(1)); %><% out.println(rs.getString(2)); %><br>
    <%
    %>
    is it bcs i am using a loop !! bcs am populating the radio fields from a database

    i am trying read a input from a radio button ,normly
    if the name of radio button is "priority" and if u
    referrence it as request.getParameter("priority") it
    shld work right but mine does not.
    A couple of things not necessarily addressing your problem, but still..
    Avoid too much Java code in the JSP. Use existing tags or write new custom tags to do the task.
    Avoid database access form the JSP itself, if possible.
    <% rs = stmt.executeQuery("select
    PRIORITYNAME,PRIORITYDESC from TBL_PRIORITY ");
    <td>Priority</td>
    <% while(rs.next())
    %>
    <input name="priority" type="radio"><%
    out.println(rs.getString(1)); %><%
    out.println(rs.getString(2)); %><br>
    <%
    %>
    I'm not quite sure what are you trying to do with the above. You want the labels of the radio buttons to be obtained from the database as well as their values, is it?
    Does PRIORITYNAME correspond to the value of the radio button and PRIORITYDESC correspond to the label of the radio button?
    If that's the case, I think you need to do it as follows:
    Radio button is declared as follows in HTML
    <input name="priority" type="radio" value="<%rs.getString(1)"%>><%rs.getString(2)%></input>
    is it bcs i am using a loop !! bcs am populating the
    radio fields from a databaseNo

  • I want to use ODI to read XML messages from JMS queue and then process it..

    I want to use oracle ODI (Oracle Data Integrator) to read XML messages from JMS queue and then process it.. i also want to process and validate the data in it....
    Could anyone please tell me the steps to achieve the same. I tried some ways which i got on OTN, but not able to implement it exactly...
    As i m very new to ODI, it will be great if you provide detailed steps..
    Thanks in advance for your help....

    Hi,
    Were you able to do it? We are facing this same issue now and, despite the fact the docs say otherwise, it does not seem to be a trivial task.
    TIA,
    Tedi

  • Dynamic Attributes from LDAP Authentication

    Is it possible to have attributes pulled directly from an LDAP V3 Directory and made available as HTTP Headers instead of from the Data Store? Reason I ask is that I have an existing 2 Million end users in an eDirectory that I can not make a schema change to accomodate a Data Store so i have Sun DS for Config. So I have created a new LDAP Auth Module anc have that working with eDirectory, however AM wants a profile. If I choose to "ignore" it in the Core Authentication module I can authenticate but get an Error 500 if I try to fetch attributes.
    The current workaround I have is to Dynamically create profile and define all the attributes I want copied in the new profile. Problem is this information is static. it never gets updated by AM id the eDirectory is updated. The only option is to delete the user profile.
    Is there a way around this? Would this entail a custom Response Provider that obtains attributes directly from the eDirectory? Would I still need a profile if I have a custom response provider?
    Thanks in advance

    I don't believe you have to add any attributes to a directory server's schema in order to use it as an LDAPv3 data store. This config works fine for me:
    <!DOCTYPE Requests
    PUBLIC "-//iPlanet//Sun Java System Access Manager 2005Q4 Admin CLI DTD//EN" "jar://com/iplanet/am/admin/cli/amAdmin.dtd"
    >
    <Requests>
        <ServiceConfigurationRequests serviceName="sunIdentityRepositoryService" realm="/MyRealm">
            <AddSubConfiguration serviceName="sunIdentityRepositoryService" subConfigId="LDAPv3" priority="0" subConfigName="ALDAPv3DataStore"/>
        </ServiceConfigurationRequests>
        <ServiceConfigurationRequests serviceName="sunIdentityRepositoryService" realm="/MyRealm">
            <ModifySubConfiguration serviceName="sunIdentityRepositoryService" subConfigName="ALDAPv3DataStore">
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-ldap-server"/>
                    <Value>someserver.com:389</Value>
                </AttributeValuePair> 
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-connection_pool_min_size"/>
                    <Value>20</Value>
                </AttributeValuePair>
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-connection_pool_max_size"/>
                    <Value>90</Value>
                </AttributeValuePair>  
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-organization_name"/>
                    <Value>dc=someserver,dc=com</Value>
                </AttributeValuePair> 
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-authid"/>
                    <Value>uid=someuser,ou=people,dc=someserver,dc=com</Value>
                </AttributeValuePair>
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-authpw"/>
                    <Value>somepassword</Value>
                </AttributeValuePair>
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-users-search-attribute"/>
                    <Value>uid</Value>
                </AttributeValuePair>           
                <AttributeValuePair>
                    <Attribute name=""sun-idrepo-ldapv3-config-users-search-filter"/>
                    <Value>(objectclass=inetorgperson)</Value>
                </AttributeValuePair>           
                <AttributeValuePair>
                    <Attribute name="sunIdRepoSupportedOperations"/>
                    <!-- set according to LDAPv3Repo loadSupportedOps() -->
                    <Value>user=read,service</Value>
                    <!-- need this so we can assign services to the subrealm -->
                    <Value>realm=read,service</Value>
                    <Value>role=read</Value>
                    <Value>filteredrole=read</Value>
                    <Value>group=read</Value>
                </AttributeValuePair>
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-user-objectclass"/>
                    <Value/>     
                </AttributeValuePair>
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-user-attributes"/>
                    <Value>cn</Value>
                    <Value>entrydn</Value>
                    <Value>entryid</Value>
                    <Value>somecustomuserstatusattr</Value>
                    <Value>objectclass</Value>
                    <Value>sn</Value>
                    <Value>givenname</Value>
                    <Value>uid</Value>
                    <Value>userpassword</Value>
                    <Value>mail</Value>
                    <Value>telephonenumber</Value>
                    <Value>manager</Value>
                    <Value>somecustomattr</Value>
                    <Value>somecustomattr2</Value>
                </AttributeValuePair>
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-people-container-name"/>
                    <Value/>
                </AttributeValuePair>
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-people-container-value"/>
                    <Value/>
                </AttributeValuePair>
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-agent-search-attribute"/>
                    <Value/>     
                </AttributeValuePair>  
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-agent-container-name"/>
                    <Value/>     
                </AttributeValuePair>  
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-agent-container-value"/>
                    <Value/>     
                </AttributeValuePair>  
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-agent-search-filter"/>
                    <Value/>     
                </AttributeValuePair>  
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-agent-objectclass"/>
                    <Value/>     
                </AttributeValuePair>  
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-agent-attributes"/>
                    <Value/>
                </AttributeValuePair>  
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-isactive"/>
                    <Value>somecustomuserstatusattr</Value>
                </AttributeValuePair>  
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-psearchbase"/>
                    <Value>dc=someserver,dc=com</Value>
                </AttributeValuePair> 
                <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-cache-enabled"/>
                    <Value>false</Value>
                </AttributeValuePair>
             <AttributeValuePair>
                    <Attribute name="sun-idrepo-ldapv3-config-errorcodes"/>
                     <Value>80</Value>
               <Value>81</Value>
               <Value>91</Value>
               <Value>85</Value>          
                </AttributeValuePair>           
            </ModifySubConfiguration>
        </ServiceConfigurationRequests>
    </Requests>
    {code}
    Note that sun-idrepo-ldapv3-config-user-attributes is configurable and you can add/remove attributes your are interested in. Also I don't know if eDirectory supports persistent searches so you might need to leave that value blank                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • How do you stop all devices from going off when one is being called?

    After most recent update for apple, all my devices are going off at the same time when only one is where the call is gong to. I have 2 iPhones, 3 iPads and an iPad mini and one newer iPod. Is there a way to stop this? It is kind of a pain.

  • How to declare value binding to array list element in a pojo?

    I have a POJO called P, that contains an ArrayList member called w. class P { private ArrayList w = new ArrayList(5); w is initied in the class constructor. The POJO is in the SessionBean and I would like to reference individual elements in the Array

  • Business Area wrongly showing in Posting

    HI One of the employee has joined on 10th june 2009. his business area is XX01 while posting there is problem in account number staff medical which is Rs. 875. Debit is showing under XX01 but credit is showing under different business area. how is it

  • Binaural beat audio made in Logic Pro doesn't sync

    Now, I'm confused!... I've created a meditation exercise in Logic Pro with a binaural tone. (A 110 hz sine wave in the left channel, and 120 hz tone in the right...producing a binaural beat) It plays perfectly on the laptop, even if I try to create t

  • Turning off keychain login

    I just moved from a MacBook Pro to an iMac. In fact, I moved from about 5 years of using a MacBook Pro, which functioned as both a desktop (when attached to a monitor) and a laptop. As part of my security paranoia, I locked the keychain, and required