Where is username/password in webservice call

Hi,
I'm have a webservice client based on a simple WLS sample client that makes a
call of the form:
<my service name>Port port = <my service name>_Impl().get<my service name>Port()
The get<my service name>Port can optionally take "username" and "password" parameters
to allow the client to invoke a secured web service. How are "username" and "password"
passed? In the SOAP message itself, in HTTP...? I dumped the SOAP request using
the verbose option and do not see the username or password.
We want to be able to have .NET clients invoke these secured web services also
and have not been able to figure out how a .NET client specifies username/password
to invoke our web service. Has anyone done this?
Thanks in advance.

WLS use HTTP basic auth. The user name and passwd are in the HTTP
header.
I know that we test basic auth with .Net, but not sure how to set username
and passwd in the .net client.
http://manojc.com
"Jack Ottofaro" <[email protected]> wrote in message
news:3edfaa1c$[email protected]..
>
Hi,
I'm have a webservice client based on a simple WLS sample client thatmakes a
call of the form:
<my service name>Port port = <my service name>_Impl().get<my servicename>Port()
>
The get<my service name>Port can optionally take "username" and "password"parameters
to allow the client to invoke a secured web service. How are "username"and "password"
passed? In the SOAP message itself, in HTTP...? I dumped the SOAP requestusing
the verbose option and do not see the username or password.
We want to be able to have .NET clients invoke these secured web servicesalso
and have not been able to figure out how a .NET client specifiesusername/password
to invoke our web service. Has anyone done this?
Thanks in advance.

Similar Messages

  • How to pass username/password through WebService proxy client to E-BS.

    Hi
    We are using ADF Webservice proxy client to integrate E-Business suite with ADF. It asks for username/password to access details from E-BS. In the generated webservice XSD file, a method is available with 2 parameters.
    1) SOAP header( Contains Username, responsibility and 2 more fields)
    2) Class object(Nested Object)
    However i didn't find "*Password*" field anywhere in it. Then how can I pass "*Password*" along with username to invoke this method?
    When i checked SOAP, the password is defined like this
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXX</wsse:Password>a
    Thanks
    Raja

    hi Dario
    Thank you for your post. It is really helpful. Now I got stuck with a doubt, in this piece of code
    final Binding binding = ((BindingProvider) servicePort).getBinding();
    List<Handler> handlerList = binding.getHandlerChain();
    if (handlerList == null)
    handlerList = new ArrayList<Handler>();
    They didn't mention properly about "*servicePort*". What object is this?
    I checked in Oracle document, even in that I was not clear with that piece of code.
    public class HandlerWS{ 
    @Resource WebServiceContext ctx;
    @WebMethod()
    public String getProperty(String propertyName) {  
    return (String) ctx.getMessageContext().get(propertyName);
    public class Main {
    public static void main(String[] args) {
    HandlerWS test;
    try {
    test = new HandlerWS(new URL(args[0] + "?WSDL"), new
    QName("http://example.org", "HandlerWS") );
    } catch (MalformedURLException murl) { throw new RuntimeException(murl); }
    HandlerWSPortType port = test.*getHandlerWSPortTypePort*();
    What is this HandlerWSPortType object???. Can you give me little more explanation about it?
    Thanks

  • Track webservice calls in BPEL

    Hi,
    I would like to know if there is any table in orabpel where i can find teh webservice calls recevied and the status of the call and who/which application requested it?
    in my project, we use two technologies for integration, one is GIS (genetran integration suite) and BPEL. The GIS tries to call BPEL webservice to get details. but sometimes the webservice fails and being both of them (GIS & BPEL) are clusted servers with 2 nodes for GIS & 3 nodes for BPEL i am not able to find where is the exact failure.
    your help is much appreciated. Thanks in advance.
    PS: This is my first post in this forum so pelase bare with any mistakes i made.
    Regards
    Murali

    I hope you are putting the code in the click event of a a custom Regular button and not using the one that can be drag-drop from the connectionset.
    Try sap-username as parameter instead of sap-user in above code statement.
    var cURL = "http://....?sap-client=<client no>&sap-username=<username>&sap-password=<password>" ;

  • XML as result from webService call from JSP

    I have a jsp page, where I will invoke a WebService call, which will return
              a big XML object back to me, of which I need to select few key-value pair as
              display item in a table only as result.
              Any idea how to achieve this,
              Thanks & have a nice day!
              Vikky

    I have a jsp page, where I will invoke a WebService call, which will return
              a big XML object back to me, of which I need to select few key-value pair as
              display item in a table only as result.
              Any idea how to achieve this,
              Thanks & have a nice day!
              Vikky

  • On my login page where my username is and I enter my password, there is a message someone has put there I'd like to remove, and we can't figure what setting to go to to edit it.  Please help.

    On my login page where my username is and I enter my password, there is a message someone has put there I'd like to remove, and we can't figure what setting to go to to edit it.  Please help.

    it's in system preferences > security and privacy > general > show a message when the screen is locked.

  • Invalid username/password to call a remote session bean

    I am having a problem accessing a remote session bean,
    javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: Invalid username/password for default (admin); nested exception is:
         javax.naming.AuthenticationException: Invalid username/password for default (admin) [Root exception is javax.naming.AuthenticationException: Invalid username/password for default (admin)]
         at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:168)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
    Ejb is delpoyed into an OC4J instance on an application server,
    Tried all username, password, still invalid,
    I am using url as the following:
    env.put(Context.PROVIDER_URL, "ormi://hostname:12401/");
    Does the OC4J instance config affect the url, or url is only related with ip and port?
    Any idea? Thanks a lot.

    When you install OC4J 10.1.3 and run the command "java -jar %J2EE_HOME%\j2ee\home\oc4j.jar", the system will ask for password for the oc4jadmin user.
    I do not recall 10.1.2 version having this feature.
    If you were able to create new user in administrator group, make sure that orion-application.xml contains the following entries.
    <namespace-access>
              <read-access>
                   <namespace-resource root="">
                        <security-role-mapping name="&lt;jndi-user-role&gt;">
                             <group name="Administrator" />
                        </security-role-mapping>
                   </namespace-resource>
              </read-access>
              <write-access>
                   <namespace-resource root="">
                        <security-role-mapping name="&lt;jndi-user-role&gt;">
                             <group name="Administrator" />
                        </security-role-mapping>
                   </namespace-resource>
              </write-access>
         </namespace-access>
    This will allow RMI access to remote users.

  • Username/password token question... wss4j

    I have an axis webservice which requires client to send username/password tokens for authentication. my server
    does the "authentication" with no problem (match client's username and password with server's password).
    I have many users (that means many clients with different usernames and passwords) when the user calls
    one of my allowed methods I want to know which user called that method.
    I would appreciate if you help me finding out which "client"(user) is calling the allowed method.
    I use wss4j to process username/password tokens.
    In my wssd file I have following to show where my password checking will take place:
          <requestFlow>
            <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
              <parameter name="passwordCallbackClass" value="com.alex.ws.callback.PWCallback"/>
              <parameter name="action" value="Timestamp UsernameToken"/>
            </handler>
          </requestFlow>In my Callnack class com.alex.ws.callback.PWCallback I have:
        public void handle(Callback[] callbacks)
                throws IOException, UnsupportedCallbackException {
            for (int i = 0; i < callbacks.length; i++) {
              System.out.println("1");
                if (callbacks[i] instanceof WSPasswordCallback) {
                    WSPasswordCallback pc = (WSPasswordCallback) callbacks;
    if (pc.getUsage() == WSPasswordCallback.KEY_NAME) {
    pc.setKey(key);
    } else {
    pc.setPassword(UserStore.getPassword(pc.getIdentifer()));
    } else {
    throw new UnsupportedCallbackException(callbacks[i],
    "Unrecognized Callback");
    When the user sends SOAP message with Username/Password token
    PWCallback class works fine and authentication is done with no problem.
    One of my allowed method is :
    public String doIt(String msg)
       System.out.println("Here is the message:"+msg);
      String username= "";
    //some code to find the username
    //of the sender. Please help me in here
       System.out.println("Here is the username that sent the msg:"+username);
    }Can you help me to find out how I can find out the "username" of client within the allowed method.

    While reading the API docs for WSS4j, I came across the section called "Reporting Security results to services/applications" in the summary for org.apache.ws.axis.security package.
    link: http://ws.apache.org/wss4j/apidocs/org/apache/ws/axis/security/package-summary.html (almost bottom of page)
    There is some example code of how to access the security result data from the server side WS implementation code. Here's the example code in case you miss it:
        public void ping(javax.xml.rpc.holders.StringHolder text,
            org.apache.ws.axis.oasis.ping.TicketType ticket)
            throws java.rmi.RemoteException {
            text.value = "Echo " + text.value.trim();
            // get the message context first
            MessageContext msgContext = MessageContext.getCurrentContext();
            Message reqMsg = msgContext.getRequestMessage();
            Vector results = null;
            // get the result Vector from the property
            if ((results =
                (Vector) msgContext.getProperty(WSHandlerConstants.RECV_RESULTS))
                 == null) {
                System.out.println("No security results!!");
            System.out.println("Number of results: " + results.size());
            for (int i = 0; i < results.size(); i++) {
                WSHandlerResult hResult = (WSHandlerResult)results.get(i);
                String actor = hResult.getActor();
                Vector hResults = hResult.getResults();
                for (int j = 0; j < hResults.size(); j++) {
                       WSSecurityEngineResult eResult = (WSSecurityEngineResult) hResults.get(j);
                    // Note: an encryption action does not have an associated principal
                     // only Signature and UsernameToken actions return a principal
                    if (eResult.getAction() != WSConstants.ENCR) {
                        System.out.println(eResult.getPrincipal().getName());
        }

  • Web Services - Username / password

    Hi,
    I was just playing around with web-services and wanted to create a simple web-service where a client will send a username/password to a web-service running on a local Tomcat server (port 8080). In response, the service will return a "hello <username>" and display a password valid message on the client side. I am writing both the client code as well as the server code using the Java/axis classes. I have the following code so far .. please let me know if I have done it correctly and how do I proceed with writing the service-code?
    //the client that sends a username and requests a webService
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    public class ClientDOC
         public static void main(String args[])
              try
                   String sEndpoint = "http://localhost:8080/axis/services/RPCuser";
                   String sOperationName = "HelloUser";
                   String sUserName = String.parseString(arg[0]);
                   String sPassword = String.parseString(arg[1]);
                   //making connection
                   Service userNameService = new Service();
                   Call SOAP_call = new Call(userNameService.createCall());
                   SOAP_call.setTargetEndPointAddress(new java.net.URL(sEndpoint));
                   SOAP_call.setUsername(sUserName);
                   SOAP_call.setPassword(sPassword);
                   SOAP_call.setOperationName(new java.lang.string(sOperationName));
                   System.out.println("Calling HelloUser Service");
                   System.out.println(call.invoke(new Object[]{} );
              catch (Exception e)
                   System.err.println(e.toString());
    Web-Service
    ~~~~~~~~~~
    package services.RPCuser;
    public class ServiceRPC
         public String HelloUser(void)
              try
                   String sMsg = null;
                   //TODO? How do get the Username and Password parameter
                   String sUserName = ;
                   String sPassword = ;
                   if (sPassword == "pass")
                        sMsg = "Hello "+sUserName;
                   else
                        sMsg = "Invalid Password";
              catch (Exception e)
                   System.err.println(e.toString());
    }

    <S12:Envelope xmlns:S11="..." xmlns:wsse="..." xmlns:wsu= "...">
    <S12:Header>
    <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:Username>TestUser</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TestPassword</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </S12:Header>
    </S12:Envelope>

  • Oracle 10gR2 WebService Call-In & Call-Out via PL/SQL (Step-by-Step Guide)

    Hi Everyone,
    This guide is for those of you who tried to Call-In and Call-Out WebService via Oracle 10gR2 using PL/SQL but failed a couple of times, re-installed a couple of times and retry, got it to work but don't know what made it work scenarios.
    Hope this helps ;-)
    Thanks,
    Henry Wu
    Instructions on how to use Oracle10gR2 Webservice Call-Out feature (Oracle JAX-RPC DII - Dynamic Invocation (DII) APIs)
    PREREQUISITE
    =================================================================
    1. Download Oracle Database 10g Release 2 (10.2.0.1.0) (ZIP, ~655MB)
    http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html
    http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
    1.1 Choose Enterprise Edition
    2. Download 10.1.3.1 Callout Utility for 10g (R1 +R2) RDBMS (ZIP, ~13MB)
    http://download.oracle.com/technology/sample_code/tech/java/jsp/dbws-callout-utility-10131.zip
    2.1 Extract to C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131
    3. Download OC4J Standalone - Oracle Containers for J2EE (OC4J) 10g Release 3 (10.1.3.3) (ZIP, ~93MB; Pure Java—runs on all certified platforms)
    http://www.oracle.com/technology/software/products/ias/index.html (Download Site)
    http://download.oracle.com/otn/java/oc4j/101330/oc4j_extended_101330.zip
    3.1 Extract to C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
    STEP-BY-STEP PROCEDURES
    =================================================================
    1. Prepare the database
    1.1 Connect to SYS account (or any account that can connect as SYSDBA)
    1.2 alter system set shared_pool_size=96M scope=both
    1.3 alter system set java_pool_size=80M scope=both
    1.4 ALTER USER SCOTT ACCOUNT UNLOCK;
    1.5 ALTER USER SCOTT IDENTIFIED BY "tiger";
    1.6 ALTER USER SCOTT QUOTA UNLIMITED ON USERS;
    1.7 GRANT PUBLIC TO SCOTT;
    1.8 GRANT Create Public Synonym TO SCOTT;
    2. Load Oracle SOAP client to SCOTT (for Oracle 10g Release 2 Database)
    2.1 Commands
    2.1.1 Open command prompt (cmd.exe)
    2.1.2 loadjava -u scott/tiger -r -v -f -genmissing -s -grant public C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\webservices\lib\soap.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\lib\dms.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\jlib\javax-ssl-1_1.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\servlet.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\mail.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\activation.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\http_client.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\ejb.jar
    2.1.3 It will take around 3 minutes and you will see "something" like the following when it completes (count may not be exact) :
    Classes Loaded: 909
    Resources Loaded: 75
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 984
    Errors: 0
    2.1.3 Close this command prompt
    3. Load Oracle JAX-RPC client to SYS (for Oracle 10g Release 2 Database)
    3.1 Commands
    3.1.1 Open command prompt (cmd.exe)
    3.1.2 loadjava -u sys/oracle -r -v -f -genmissing -s -grant public C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\dbwsclientws.jar C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\dbwsclientdb102.jar
    3.1.2.1 It will take around 15 minutes and you will see "something" like following when it completes (count may not be exact) :
    Classes Loaded: 4027
    Resources Loaded: 81
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 61
    Classes skipped: 0
    Synonyms Created: 4108
    Errors: 0
    3.1.3 Close this command prompt
    4. Execute UTL_DBWS packages to SYS (for Oracle 10g Release 2 Database)
    4.1 Commands
    4.1.1 Connect to SYS account only
    4.1.2 Execute the following (in TOAD you should execute them as Script, press the "thunder" button)
    4.2.1 @"C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\utl_dbws_decl.sql"
    4.2.2 @"C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\utl_dbws_body.sql"
    4.2.3 CREATE PUBLIC SYNONYM utl_dbws FOR sys.utl_dbws;
    5. Call-out a free Web Service using SCOTT
    5.1 Commands
    5.1.1 Connect to user SCOTT with password of TIGER
    5.1.2 Copy and Paste the following "Anonymous Block" (sample #1) and execute it :
    5.1.2.1 It sould return "PL/SQL DII client return ===> Redwood City"
    declare
    service_ utl_dbws.SERVICE;
    call_ utl_dbws.CALL;
    service_qname utl_dbws.QNAME;
    port_qname utl_dbws.QNAME;
    operation_qname utl_dbws.QNAME;
    string_type_qname utl_dbws.QNAME;
    retx ANYDATA;
    retx_string VARCHAR2(1000);
    retx_double number;
    retx_len number;
    params utl_dbws.ANYDATA_LIST;
    l_input_params utl_dbws.anydata_list;
    l_result ANYDATA;
    l_namespace VARCHAR2(1000);
    begin
    -- open internet explorer and navigate to http://webservices.imacination.com/distance/Distance.jws?wsdl
    -- search for 'targetNamespace' in the wsdl
    l_namespace := 'http://webservices.imacination.com/distance/Distance.jws';
    -- search for 'service name' in the wsdl
    service_qname := utl_dbws.to_qname(l_namespace, 'DistanceService');
    -- this is just the actual wsdl url
    service_ := utl_dbws.create_service(HTTPURITYPE('http://webservices.imacination.com/distance/Distance.jws?wsdl'), service_qname);
    -- search for 'portType name' in the wsdl
    port_qname := utl_dbws.to_qname(l_namespace, 'Distance');
    -- search for 'operation name' in the wsdl
    -- there will be a lot, we will choose 'getCity'
    operation_qname := utl_dbws.to_qname(l_namespace, 'getCity');
    -- bind things together
    call_ := utl_dbws.create_call(service_, port_qname, operation_qname);
    -- default is 'FALSE', so we make it 'TRUE'
    utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
    -- search for 'operation soapAction' under <wsdl:operation name="getCity">
    -- it is blank, so we make it ''
    utl_dbws.set_property(call_, 'SOAPACTION_URI', '');
    -- search for 'encodingstyle' under <wsdl:operation name="getCity">
    utl_dbws.set_property(call_, 'ENCODINGSTYLE_URI', 'http://schemas.xmlsoap.org/soap/encoding/');
    -- search for 'binding style'
    utl_dbws.set_property(call_, 'OPERATION_STYLE', 'rpc');
    -- search for 'xmlns:xs' to know the value of the first parameter
    -- under <wsdl:message name="getCityResponse"> you will see the line <wsdl:part name="getCityReturn" type="xsd:string" />
    -- thus the return type is 'string", removing 'xsd:'
    string_type_qname := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    -- in the line <wsdl:operation name="getCity" parameterOrder="zip">
    -- the parameterOrder is 'zip', thus we put in 'zip'
    -- the 'ParameterMode.IN' is used to specify that we will be passing an "In Parameter" to the web service
    -- the 'ParameterMode.IN' is a constant variable in the sys.utl_dbws package
    utl_dbws.add_parameter(call_, 'zip', string_type_qname, 'ParameterMode.IN');
    utl_dbws.set_return_type(call_, string_type_qname);
    -- supply the In Parameter for the web service
    params(0) := ANYDATA.convertvarchar('94065');
    -- invoke the web service
    retx := utl_dbws.invoke(call_, params);
    -- access the returned value and output it to the screen
    retx_string := retx.accessvarchar2;
    dbms_output.put_line('PL/SQL DII client return ===> ' || retx_string);
    -- release the web service call
    utl_dbws.release_service(service_);
    end;
    5.1.3 Copy and Paste the following "Anonymous Block" (sample #2) and execute it :
    5.1.3.1 It should return "PL/SQL DII client return ===> twelve thousand three hundred and forty five"
    declare
    service_ utl_dbws.SERVICE;
    call_ utl_dbws.CALL;
    service_qname utl_dbws.QNAME;
    port_qname utl_dbws.QNAME;
    operation_qname utl_dbws.QNAME;
    string_type_qname utl_dbws.QNAME;
    retx ANYDATA;
    retx_string VARCHAR2(1000);
    retx_double number;
    retx_len number;
    params utl_dbws.ANYDATA_LIST;
    l_input_params utl_dbws.anydata_list;
    l_result ANYDATA;
    l_namespace VARCHAR2(1000);
    begin
    -- open internet explorer and navigate to http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL
    -- search for 'targetNamespace' in the wsdl
    l_namespace := 'http://www.dataaccess.com/webservicesserver/';
    -- search for 'service name' in the wsdl
    service_qname := utl_dbws.to_qname(l_namespace, 'NumberConversion');
    -- this is just the actual wsdl url
    service_ := utl_dbws.create_service(HTTPURITYPE('http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL'), service_qname);
    -- search for 'portType name' in the wsdl
    port_qname := utl_dbws.to_qname(l_namespace, 'NumberConversionSoap');
    -- search for 'operation name' in the wsdl
    -- there will be a lot, we will choose 'NumberToWords'
    operation_qname := utl_dbws.to_qname(l_namespace, 'NumberToWords');
    -- bind things together
    call_ := utl_dbws.create_call(service_, port_qname, operation_qname);
    -- default is 'FALSE', so we make it 'TRUE'
    utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
    -- search for 'operation soapAction' under <operation name="NumberToWords">
    -- it is blank, so we make it ''
    utl_dbws.set_property(call_, 'SOAPACTION_URI', '');
    -- search for 'encodingstyle'
    -- cannot find xml tag 'encodingstyle', so we just use the following as the generic encoding style
    utl_dbws.set_property(call_, 'ENCODINGSTYLE_URI', 'http://schemas.xmlsoap.org/soap/encoding/');
    -- search for 'binding style'
    -- although 'document' was used, it produced an error, thus we will use 'rpc'
    -- this value is generally only 'document' or 'rpc'
    utl_dbws.set_property(call_, 'OPERATION_STYLE', 'rpc');
    -- search for 'xmlns:xs' to know the value of the first parameter
    -- under <xs:element name="NumberToWords"> you will see the line <xs:element name="ubiNum" type="xs:unsignedLong" />
    -- thus the return type is 'unsignedlong', removing 'xs:'
    -- however, upon testing, using 'unsignedlong' produced an error, while 'string' did not, so we will use 'string'
    string_type_qname := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    -- under <xs:element name="NumberToWords"> you will see the line <xs:element name="ubiNum" type="xs:unsignedLong" />
    -- the element name is 'ubiNum', thus we put in 'ubiNum'
    -- the 'ParameterMode.IN' is used to specify that we will be passing an "In Parameter" to the web service
    -- the 'ParameterMode.IN' is a constant variable in the utl_dbws package
    utl_dbws.add_parameter(call_, 'ubiNum', string_type_qname, 'ParameterMode.IN');
    utl_dbws.set_return_type(call_, string_type_qname);
    -- supply the In Parameter for the web service
    params(0) := ANYDATA.convertvarchar('12345');
    -- invoke the web service
    retx := utl_dbws.invoke(call_, params);
    -- access the returned value and output it to the screen
    retx_string := retx.accessvarchar2;
    dbms_output.put_line('PL/SQL DII client return ===> ' || retx_string);
    -- release the web service call
    utl_dbws.release_service(service_);
    end;
    NOTES AND REFERENCES
    =================================================================
    This detailed step-by-step guide was produced with the following guide http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm
    I could still not load Oracle JAX-RPC client to SCOTT (step 4) as it produces an error. See the following for more details :
    http://forums.oracle.com/forums/thread.jspa?threadID=633219&tstart=0
    Also, I could not consume some of the other free Web Services out there for reasons I don't know, hope someone can help clarify. See the following for more details :
    http://forums.oracle.com/forums/thread.jspa?threadID=630733&tstart=0
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Instructions on how to use Oracle10gR2 Webservice Call-In feature
    PREREQUISITE
    =================================================================
    1. Download Oracle Database 10g Release 2 (10.2.0.1.0) (ZIP, ~655MB)
    http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html
    http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
    1.1 Choose Enterprise Edition
    2. Download OC4J Standalone - Oracle Containers for J2EE (OC4J) 10g Release 3 (10.1.3.3) (ZIP, ~93MB; Pure Java—runs on all certified platforms)
    http://www.oracle.com/technology/software/products/ias/index.html (Download Site)
    http://download.oracle.com/otn/java/oc4j/101330/oc4j_extended_101330.zip
    2.1 Extract to C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
    STEP-BY-STEP PROCEDURES
    =================================================================
    1. Connect to SYS account and create user STORE
    CREATE USER store IDENTIFIED BY store;
    GRANT connect, resource TO store;
    2. Connect to Oracle using the user STORE and password STORE
    CONNECT store/store;
    3. Execute the following objects for this excercise
    CREATE SEQUENCE order_sq;
    CREATE TABLE product_types (
    product_type_id INTEGER
    CONSTRAINT product_types_pk PRIMARY KEY,
    name VARCHAR2(10) NOT NULL
    CREATE TABLE products (
    product_id INTEGER
    CONSTRAINT products_pk PRIMARY KEY,
    product_type_id INTEGER
    CONSTRAINT products_fk_product_types
    REFERENCES product_types(product_type_id),
    name VARCHAR2(30) NOT NULL,
    description VARCHAR2(50),
    price NUMBER(5, 2)
    CREATE TABLE customers (
    customer_id INTEGER
    CONSTRAINT customers_pk PRIMARY KEY,
    first_name VARCHAR2(10) NOT NULL,
    last_name VARCHAR2(10) NOT NULL,
    dob DATE,
    phone VARCHAR2(12)
    CREATE TABLE orders (
    order_id INTEGER
    CONSTRAINT orders_pk PRIMARY KEY,
    product_id INTEGER
    CONSTRAINT purchases_fk_products
    REFERENCES products(product_id),
    customer_id INTEGER
    CONSTRAINT purchases_fk_customers
    REFERENCES customers(customer_id),
    quantity INTEGER NOT NULL
    INSERT INTO customers (
    customer_id, first_name, last_name, dob, phone
    ) VALUES (
    1, 'John', 'Brown', '01-JAN-1965', '800-555-1211'
    INSERT INTO product_types (
    product_type_id, name
    ) VALUES (
    1, 'Book'
    INSERT INTO products (
    product_id, product_type_id, name, description, price
    ) VALUES (
    1, 1, 'Modern Science', 'A description of modern science', 19.95
    COMMIT;
    CREATE OR REPLACE PACKAGE dbfunc AS
    FUNCTION place_order (
    p_product_id INTEGER,
    p_customer_id INTEGER,
    p_quantity INTEGER
    RETURN VARCHAR2;
    END dbfunc;
    CREATE OR REPLACE PACKAGE BODY dbfunc AS
    FUNCTION place_order (
    p_product_id INTEGER,
    p_customer_id INTEGER,
    p_quantity INTEGER
    RETURN VARCHAR2 IS
    v_customer_count INTEGER;
    v_product_count INTEGER;
    v_order_id INTEGER;
    BEGIN
    -- count the number of products with the
    -- supplied p_product_id (should be 1 if the product exists)
    SELECT COUNT(*)
    INTO v_product_count
    FROM products
    WHERE product_id = p_product_id;
    IF v_product_count = 0 THEN
    RETURN 'No such product';
    END IF;
    -- count the number of customers with the
    -- supplied p_customer_id (should be 1)
    SELECT COUNT(*)
    INTO v_customer_count
    FROM customers
    WHERE customer_id = p_customer_id;
    IF v_customer_count = 0 THEN
    RETURN 'No such customer';
    END IF;
    -- get the next value from orders_sq
    SELECT order_sq.nextval
    INTO v_order_id
    FROM dual;
    -- place the order
    INSERT INTO orders (
    order_id, product_id, customer_id, quantity
    ) VALUES (
    v_order_id, p_product_id, p_customer_id, p_quantity
    COMMIT;
    RETURN 'Order placed with id of ' || v_order_id;
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK;
    RETURN 'Order not placed';
    END place_order;
    END dbfunc;
    4. Install and Configure OC4J
    4.1 Change Directory
    4.1.1 Open command prompt (cmd.exe)
    4.1.2 CD C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\bin
    4.2 Configure Environment variables (type in command prompt)
    4.2.1 set JAVA_HOME=C:\oracle\product\10.2.0\db_1\jdk
    4.2.2 set ORACLE_HOME=C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
    4.3 Starting OC4J for the first time
    4.3.1 oc4j -start
    4.3.2 If this is not your first time to "start" oc4j, go to step 4.3.4
    4.3.3 Set oc4jadmin password (use the password "oracle" w/o the quotation marks)
    08/03/21 17:13:54 Set OC4J administrator's password (password text will not be displayed as it is entered)
    Enter password:
    Confirm password:
    Confirm password: The password for OC4J administrator "oc4jadmin" has been set.
    08/03/21 17:14:01 The OC4J administrator "oc4jadmin" account is activated.
    4.3.4 OC4J has started if you see the message :
    08/03/21 17:14:16 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
    4.3.5 Leave this command prompt open
    4.4 Configure Data Source
    4.4.1 Open a new command prompt via the cmd.exe command
    4.4.2 type "hostname" and then press enter
    4.4.3 Keep this command prompt open for later use
    4.4.4 Open Windows Explorer and navigate to the folder C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\config
    4.4.5 Open the file data-sources.xml
    4.4.6 Modify and Save the file so that it will look something like the following :
    4.4.6.1 Note that "hpv2710us" is my hostname found in step 4.4.2
    4.4.6.2 Note that "ORCLDEV" is the name of my Oracle Instance. (Default installation uses ORCL only)
    <connection-pool name="Example Connection Pool">
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource"
    user="store"
    password="store"
    url="jdbc:oracle:thin:@//hpv2710us:1521/ORCLDEV">
    </connection-factory>
    </connection-pool>
    4.4.7 Close the text editor
    4.4.8 Close the Windows Explorer
    4.4.9 Close this command prompt (type exit)
    5. Publishing a PL/SQL Package as a Database Web Service
    5.1 Create the config.xml file
    5.1.1 Open Notepad.exe
    5.1.2 Copy and Paste the following :
    5.1.2.1 Note that "hpv2710us" is my hostname found in step 4.4.2
    5.1.2.2 Note that "ORCLDEV" is the name of my Oracle Instance. (Default installation uses ORCL only)
    <web-service>
    <display-name>PLSQL Web Service</display-name>
    <description>PLSQL Sample</description>
    <destination-path>./dbfunc.ear</destination-path>
    <temporary-directory>/tmp</temporary-directory>
    <context>/plsqlsample</context>
    <stateless-stored-procedure-java-service>
    <jar-generation>
    <schema>store/store</schema>
    <db-url>jdbc:oracle:thin:@hpv2710us:1521:ORCLDEV</db-url>
    <prefix>db.func.place.order</prefix>
    <db-pkg-name>dbfunc</db-pkg-name>
    </jar-generation>
    <uri>/dbfunc</uri>
    <database-JNDI-name>jdbc/OracleDS</database-JNDI-name>
    </stateless-stored-procedure-java-service>
    <wsdl-gen>
    <wsdl-dir>wsdl</wsdl-dir>
    <option name="force">true</option>
    <option name="httpServerURL">http://localhost:8888</option>
    </wsdl-gen>
    <proxy-gen>
    <proxy-dir>proxy</proxy-dir>
    <option name="include-source">true</option>
    </proxy-gen>
    </web-service>
    5.1.3 Save file as config.xml in the directory C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\config
    5.1.3.1 Note it should be config.xml and not config.txt
    5.1.4 Close the text editor
    5.2 Publish dbfunc Oracle Package as a Web Service
    5.2.1 Open a new command prompt via the cmd.exe command
    5.2.2 CD C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home
    5.2.3 mkdir ear
    5.2.4 CD ear
    5.2.5 set ORACLE_HOME=C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
    5.2.6 set CLASSPATH=.;%ORACLE_HOME%\webservices\lib\wsdl.jar;%ORACLE_HOME%\lib\xmlparserv2.jar;%ORACLE_HOME%\soap\lib\soap.jar
    5.2.7 java -jar %ORACLE_HOME%\webservices\lib\WebServicesAssembler.jar -config C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\config\config.xml
    Please wait ...
    STORE.DBFUNC
    5.2.8 java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin oracle -deploy -file C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\ear\dbfunc.ear -deploymentName dbfunc
    08/03/21 17:46:23 Notification ==>Application Deployer for dbfunc COMPLETES. Operation time: 296 msecs
    5.2.9 java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin oracle -bindWebApp -appname dbfunc -webModuleName dbfunc_web
    5.2.10 java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin oracle -bindAllWebApps -appname dbfunc
    5.2.11 Close this command prompt (type exit)
    6. Test dbfunc Web Service
    6.1 Restart OC4J
    6.1.1 Open the command prompt you used to start OC4J in step 4.1.1/4.3.1
    6.1.2 In the keyboard, hit Ctrl+C
    6.1.2.1 Type "Y" and then hit Enter
    08/03/21 18:02:51 Shutting down OC4J...
    Terminate batch job (Y/N)? Y
    6.1.2.2 Note that the command prompt should still be open
    6.1.2.2.1 If you accidentally closed the command prompt just do the following
    6.1.2.2.1.1 Do 4.1.1 to 4.2.2 and then proceed to 6.1.3
    6.1.3 oc4j -start
    Starting OC4J from C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home...
    08/03/21 18:07:57 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
    6.1.4 Leave this command prompt open
    6.2 Use the Web Service to "Order an Item"
    6.2.1 Connect to Oracle using the user STORE and password STORE
    6.2.2 select * from orders
    6.2.2.1 Zero row should return
    6.2.3 Open Internet Explorer
    6.2.4 Navigate to http://localhost:8888/plsqlsample/dbfunc
    6.2.5 Input the following :
    6.2.5.1 param0 value: 1
    6.2.5.2 param1 value: 1
    6.2.5.3 param2 value: 10
    6.2.6 Click the Invoke button
    6.2.7 A pop-up window will appear having the following contents :
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <SOAP-ENV:Body>
    - <ns1:placeOrderResponse xmlns:ns1="http://db.func.place.order/dbfunc.wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <return xsi:type="xsd:string">Order placed with id of 1</return>
    </ns1:placeOrderResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    6.2.8 Go back to SQLPLUS or Toad and execute "select * from orders" again
    6.2.8.1 There should be one row
    ORDER_ID, PRODUCT_ID, CUSTOMER_ID, QUANTITY
    1, 1, 1, 10
    NOTES AND REFERENCES
    =================================================================
    This detailed step-by-step guide was produced with the following article by Jason Price http://www.oracle.com/technology/pub/articles/price_10gws.html

    Success!!!
    I had to grant this permissions:
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'getClassLoader', '' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'accessClassInPackage.sun.util.calendar', '' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'setFactory', '' )
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.util.PropertyPermission', 'HTTPClient.socket.idleTimeout', 'write' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.net.SocketPermission', 'localhost', 'resolve' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.net.SocketPermission', '127.0.0.1:8084', 'connect,resolve' );
    As I wrote earlier, WS_TEST is my user into which I load JAX-RPC client. Note that, if you load JAX-RPC client into user another than SYS, you have NOT to use -s -grant public option (wassam wrote about this too). Another thing is that I (finally) didn't load OC4J. To consume WebService I use utl_dbws.invoke(call_Handle CALL, request SYS.XMLTYPE) function.
    voytec001

  • Problems setting up username & password for SQL

    Due to the outstanding advice I recieved from this excellent forum, I have managed to overcome my first problem with declaring a new Class.
    This leads me to request help with my next biggest problem:
    Setting up a user GUI that takes a "username" & "password" that will be used to access a password protected database.
    I am a simple bloke, with simple thought processes, so please, go easy on me...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class DBQuery1 {
         String username = "" , password = "";
         public static void main(String[] arguments) {
              PassDB UPass = new PassDB();
              String data = "jdbc:odbc:JavaTestDataBase";
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection conn = DriverManager.getConnection(data, "" + username, "" + password);
                   Statement st = conn.createStatement();
                   ResultSet rec = st.executeQuery(
                        "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
                        + "WHERE (Title='Mr') ORDER BY ContactID");
              /*     ResultSet rec2 = st.executeQuery(
                        "SELECT Subject, ContactID FROM Calls "
                        + "WHERE (Subject Is Not Null) ORDER BY ContactID");
              System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
              while(rec.next()) {
                   System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
              st.close();
              catch (SQLException s) {
                   System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
              catch (Exception e) {
                   System.out.println("Error: " + e.toString() + e.getMessage());
    class PassDB extends javax.swing.JFrame implements ActionListener {
         String username = "", password = "";
         JTextField uname = new JTextField(10);
         JTextField pword = new JTextField(10);
         // JPasswordField pword = new JTextField(10);
         PassDB() {
              super("duBe's database logon");
              setSize(220, 160);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JPanel pane = new JPanel();
              JLabel unameLabel = new JLabel ("Username: ");
              JLabel pwordLabel = new JLabel ("Password: ");
              JButton submit = new JButton("OK");
              submit.addActionListener(this);
              pane.add(unameLabel);
              pane.add(uname);
              pane.add(pwordLabel);
              pane.add(pword);
              pane.add(submit);
              setContentPane(pane);
              setVisible(true);
         public void actionPerformed(ActionEvent evt) {
              PassDB clicked = (PassDB)evt.getSource();
              username = uname.getText();
              password = pword.getText();
    This code generates two errors, stating:
    C:\Java_progs>javac DBQuery1.java
    DBQuery1.java:14: non-static variable username cannot be referenced from a static context
    Connection conn = DriverManager.getConnection(data, "" +
    username, "" + password);
    ^
    DBQuery1.java:14: non-static variable password cannot be referenced from a static context
    Connection conn = DriverManager.getConnection(data, "" +
    username, "" + password);
                    ^
    2 errors*****************************
    The code works when I remove the reference to the variables "username" & "password" in Connection "conn" call & replace them with the actual username & password, but this is not exactly what I was after. I was hoping to make the program responsive to each individual user, not set in code.
    I also would like to make the program pause after the call in "main" to "PassDB" to wait for "PassDB" to exit before continuing.
    I would also like to make "PassDB" destroy itself after the "OK" button is pressed & the "username" & "password" set.
    If that isn't enough for you, I would really like the program to search 2 different database tables, return their values & compare them to be sure that they are the same.
    When I try & search 2 different tables, as in:
    ResultSet rec = st.executeQuery(
                        "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
                        + "WHERE (Title='Mr') ORDER BY ContactID");
                   ResultSet rec2 = st.executeQuery(
                        "SELECT Subject, ContactID FROM Calls "
                        + "WHERE (Subject Is Not Null) ORDER BY ContactID")javac tells me that "ResultSet" is set to null 0
    As always, I am extremely appreciative of any assistance you are able to offer.
    Kind regards
    duBedat
    [email protected]

    This is where I'm at now:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class DBQuery {
         static String username = "" ;
         static String password = "" ;
         public static void main(String[] arguments) {
         PassDB UPass = new PassDB();
         String data = "jdbc:odbc:JavaTestDataBase";
         try {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Connection conn = DriverManager.getConnection(data, "" + DBQuery.username, "" + DBQuery.password);
              Statement st = conn.createStatement();
              ResultSet rec = st.executeQuery(
              "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
              + "WHERE (Title='Mr') ORDER BY ContactID");
              /*     ResultSet rec2 = st.executeQuery(
                   "SELECT Subject, ContactID FROM Calls "
                   + "WHERE (Subject Is Not Null) ORDER BY ContactID");
              System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
              while(rec.next()) {
                   System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
              st.close();
         catch (SQLException s) {
              System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
         catch (Exception e) {
              System.out.println("Error: " + e.toString() + e.getMessage());
    class PassDB extends javax.swing.JFrame implements ActionListener {
         static boolean getOut = false;
         JTextField uname = new JTextField(10);
         JTextField pword = new JTextField(10);
         // JPasswordField pword = new JTextField(10);
         public PassDB() {
              super("duBe's database logon");
              setSize(220, 160);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JPanel pane = new JPanel();          
              JLabel unameLabel = new JLabel ("Username: ");
              JLabel pwordLabel = new JLabel ("Password: ");
              JButton submit = new JButton("OK");
              submit.addActionListener(this);
              pane.add(unameLabel);
              pane.add(uname);
              pane.add(pwordLabel);
              pane.add(pword);
              pane.add(submit);
              setContentPane(pane);
              while(getOut == false)
                   setVisible(true);                         
         public void actionPerformed(ActionEvent evt) {
              PassDB clicked = (PassDB)evt.getSource();
              DBQuery.username = uname.getText();
              DBQuery.password = pword.getText();
              getOut = true;               
    }          Any advice is greatly appreciated
    duBe

  • Problem with username/password using SQLAuthenticator

    I want to setup SQLAuthenticator but authentication is refused because wrong username/password.
    I am using JDev Studio Edition Version 11.1.2.1.0 with integrated WLS.
    As a base I take this two URLs:
    http://weblogic-wonders.com/weblogic/2010/03/11/configuring-sql-authenticator-with-weblogic-server/ and
    http://biemond.blogspot.com/2008/12/using-database-tables-as-authentication.html
    1. I create db tables (default table names for SQLAuthenticator), but don't fill users and groups - OK
    2. In WLS I create new SQLAuthenticator Authentication provider inside deafult realm myrealm - OK
    3. I put this provider to the top among all three providers
    4. In JDev I configure ADF Security - define Enterprise Roles to matching to the names in GROUPS table of SQLAuthenticator - ??
    5. I Define Application users and roles and setup Resource grants
    6. I run my application
    7. In database tables USERS, GROUPMEMBERS, GROUPS I can see users and roles from Jdev, that means, at deploy time, this tables are filled too
    8. In WLS I can see Users and Groups under myrealm which are transfered at deploy time and mirrors USERS, GROUPMEMBERS, GROUPS
    9. In USERS table I can see password is encripted by {SHA-1}
    But when try to login I am always rejected with "Invalid username or password".
    Before setting up SQLAuthenticator (only default options) the logins were successful, so application shold be OK.
    I try also with Plaintext Passwords Enabled and put into USERS table unencripted password, but without success.
    I can confirm that SQLAuthenticator mechanism actually get password from USERS table. I replaced default SQL for getting password from
    SELECT U_PASSWORD FROM USERS WHERE U_NAME = ?
    to
    select get_pwd(?) as U_PASSWORD from dual. In my get_pwd PL/SQL function I perform logging in I can see that this function was called.
    So the problem is in WLS when comparing passwords.
    Any suggestions, where to start digging?
    Ragards,
    Sašo
    Edited by: Sašo C. on 5.10.2011 7:26
    Edited by: Sašo C. on 5.10.2011 7:32

    The problem is solved! Crucial was hint from http://biemond.blogspot.com/2008/12/using-weblogic-provider-as.html:
    The Control Flag for my new SQLAuthenticator Authentication provider must be changed from Optional to Sufficient AND
    the Control Flag for existing DefaultAuthenticator must be changed from Required to Sufficient!
    It seems that before SQLAuthenticator took password from USERS table, but didn't use it in the authentication process.
    Regards,
    Sašo

  • Invalid username/password logon

    Hi to all:
    I am installing ECC in AIX with RDBMS Oracle 10.2.0.2 in Productive System in HA mode with HAMP. When balancing the services Cluster I have problems starting SAP.
    I have executed the R3trans –x and this is the log file:
    4 ETW000 R3trans version 6.14 (release 700 - 15.06.07 - 15:50:00).
    4 ETW000 unicode enabled version
    4 ETW000 ===============================================
    4 ETW000
    4 ETW000 date&time   : 16.03.2008 - 00:43:05
    4 ETW000 control file: <no ctrlfile>
    4 ETW000 R3trans was called as follows: R3trans -x
    4 ETW000  trace at level 2 opened for a given file pointer
    4 ETW000  [dev trc     ,00000]  Sun Mar 16 00:43:05 2008                              71  0.000071
    4 ETW000  [dev trc     ,00000]  db_con_init called                                    28  0.000099
    4 ETW000  [dev trc     ,00000]  create_con (con_name=R/3)                             46  0.000145
    4 ETW000  [dev trc     ,00000]  Loading DB library '/usr/sap/PRD/SYS/exe/run/dboraslib.o' ...
    4 ETW000                                                                              66  0.000211
    4 ETW000  [dev trc     ,00000]  load shared library (/usr/sap/PRD/SYS/exe/run/dboraslib.o), hdl 0
    4 ETW000                                                                           13557  0.013768
    4 ETW000  [dev trc     ,00000]  Library '/usr/sap/PRD/SYS/exe/run/dboraslib.o' loaded
    4 ETW000                                                                              44  0.013812
    4 ETW000  [dev trc     ,00000]  function DbSlExpFuns loaded from library /usr/sap/PRD/SYS/exe/run/dboraslib.o
    4 ETW000                                                                              52  0.013864
    4 ETW000  [dev trc     ,00000]  Version of '/usr/sap/PRD/SYS/exe/run/dboraslib.o' is "700.08", patchlevel (0.107)
    4 ETW000                                                                              81  0.013945
    4 ETW000  [dev trc     ,00000]  function dsql_db_init loaded from library /usr/sap/PRD/SYS/exe/run/dboraslib.o
    4 ETW000                                                                              48  0.013993
    4 ETW000  [dev trc     ,00000]  function dbdd_exp_funs loaded from library /usr/sap/PRD/SYS/exe/run/dboraslib.o
    4 ETW000                                                                              74  0.014067
    4 ETW000  [dev trc     ,00000]  New connection 0 created                              31  0.014098
    4 ETW000  [dev trc     ,00000]  0: name = R/3, con_id = -000000001 state = DISCONNECTED, perm = YES, reco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO
    4 ETW000                                                                              56  0.014154
    4 ETW000  [dev trc     ,00000]  db_con_connect (con_name=R/3)                         47  0.014201
    4 ETW000  [dev trc     ,00000]  find_con_by_name found the following connection for reuse:
    4 ETW000                                                                              45  0.014246
    4 ETW000  [dev trc     ,00000]  0: name = R/3, con_id = 000000000 state = DISCONNECTED, perm = YES, reco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO
    4 ETW000                                                                              52  0.014298
    4 ETW000  [dev trc     ,00000]  Got LIBPATH=/usr/lib:/lib:/usr/sap/PRD/SYS/exe/run:/oracle/PRD/102_64/lib from environment
    4 ETW000                                                                             358  0.014656
    4 ETW000  [dev trc     ,00000]  Oracle Client Version: '10.2.0.2.0'                   60  0.014716
    4 ETW000  [dev trc     ,00000]  -->oci_initialize (con_hdl=0)                         30  0.014746
    4 ETW000  [dev trc     ,00000]  Client NLS settings: AMERICAN_AMERICA.UTF8          3826  0.018572
    4 ETW000  [dev trc     ,00000]  Logon as OPS$-user to get SAPSR3's password           38  0.018610
    4 ETW000  [dev trc     ,00000]  Connecting as /@PRD on connection 0 (nls_hdl 0) ... (dbsl 700 250407)
    4 ETW000                                                                              48  0.018658
    4 ETW000  [dev trc     ,00000]  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    4 ETW000                                                                              52  0.018710
    4 ETW000  [dev trc     ,00000]    0 UTF8                                                      1 0x110f9a780 0x110fb2bf8 0x110fb24a8
    4 ETW000                                                                              62  0.018772
    4 ETW000  [dev trc     ,00000]  Allocating service context handle for con_hdl=0       38  0.018810
    4 ETW000  [dev trc     ,00000]  Allocating server context handle                      31  0.018841
    4 ETW000  [dev trc     ,00000]  Attaching to DB Server PRD (con_hdl=0,svchp=0x110fb5d98,srvhp=0x110fb5fb8)
    4 ETW000                                                                              97  0.018938
    4 ETW000  [dev trc     ,00000]  Assigning server context 0x110fb5fb8 to service context 0x110fb5d98
    4 ETW000                                                                           41433  0.060371
    4 ETW000  [dev trc     ,00000]  Allocating user session handle                        89  0.060460
    4 ETW000  [dev trc     ,00000]  Starting user session (con_hdl=0,svchp=0x110fb5d98,srvhp=0x110fb5fb8,usrhp=0x110fa2560)
    4 ETW000                                                                              58  0.060518
    4 ETW000  [dev trc     ,00000]  Assigning user session 0x110fa2560 to service context 0x110fb5d98
    4 ETW000                                                                           11081  0.071599
    4 ETW000  [dev trc     ,00000]         BEGIN DBMS_APPLICATION_INFO.SET_MODULE (:A0, :A1); END;                                                              
    4 ETW000                                                                              83  0.071682
    4 ETW000  [dev trc     ,00000]         BEGIN DBMS_APPLICATION_INFO.SET_CLIENT_INFO (:A0); END;                                                              
    4 ETW000                                                                             212  0.071894
    4 ETW000  [dev trc     ,00000]  Now '/@PRD' is connected (con_hdl 0, nls_hdl 0).
    4 ETW000                                                                            1018  0.072912
    4 ETW000  [dev trc     ,00000]         ALTER SESSION SET NLS_SORT = BINARY                                                                               
    4 ETW000                                                                              58  0.072970
    4 ETW000  [dev trc     ,00000]         SELECT USERID, PASSWD FROM SAPUSER WHERE USERID IN (:A0, :A1)                                                        
    4 ETW000                                                                             417  0.073387
    4 ETW000  [dev trc     ,00000]  OCI-call failed with -1=OCI_ERROR                    960  0.074347
    4 ETW000  [dev trc     ,00000]     SQL error 942: 'ORA-00942: table or view does not exist'
    4 ETW000                                                                              48  0.074395
    4 ETW000  [dbsloci.    ,00000]  *** ERROR => ORA-942 when accessing table SAPUSER
    4 ETW000                                                                              53  0.074448
    4 ETW000  [dev trc     ,00000]     set_ocica() -> OCI or SQL return code 942          28  0.074476
    4 ETW000  [dev trc     ,00000]  Disconnecting from connection 0 ...                   87  0.074563
    4 ETW000  [dev trc     ,00000]  Rolling back transaction ...                          34  0.074597
    4 ETW000  [dev trc     ,00000]  Closing user session (con_hdl=0,svchp=0x110fb5d98,usrhp=0x110fa2560)
    4 ETW000                                                                             187  0.074784
    4 ETW000  [dev trc     ,00000]  Now I'm disconnected from ORACLE                     486  0.075270
    4 ETW000  [dev trc     ,00000]  Try to connect with default password                  29  0.075299
    4 ETW000  [dev trc     ,00000]  Connecting as SAPSR3/<pwd>@PRD on connection 0 (nls_hdl 0) ... (dbsl 700 250407)
    4 ETW000                                                                              48  0.075347
    4 ETW000  [dev trc     ,00000]  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    4 ETW000                                                                              51  0.075398
    4 ETW000  [dev trc     ,00000]    0 UTF8                                                      1 0x110f9a780 0x110fb2bf8 0x110fb24a8
    4 ETW000                                                                              63  0.075461
    4 ETW000  [dev trc     ,00000]  Assigning username to user session 0x110fa2560        30  0.075491
    4 ETW000  [dev trc     ,00000]  Assigning password to user session 0x110fa2560        43  0.075534
    4 ETW000  [dev trc     ,00000]  Starting user session (con_hdl=0,svchp=0x110fb5d98,srvhp=0x110fb5fb8,usrhp=0x110fa2560)
    4 ETW000                                                                              52  0.075586
    4 ETW000  [dboci.c     ,00000]  *** ERROR => OCI-call 'OCISessionBegin' failed with rc=1017
    4 ETW000                                                                           22605  0.098191
    4 ETW000  [dbsloci.    ,00000]  *** ERROR => CONNECT failed with sql error '1017'
    4 ETW000                                                                              48  0.098239
    4 ETW000  [dev trc     ,00000]     set_ocica() -> OCI or SQL return code 1017         29  0.098268
    4 ETW000  [dblink      ,00431]  ***LOG BY2=>sql error 1017   performing CON [dblink#3 @ 431]
    4 ETW000                                                                             141  0.098409
    4 ETW000  [dblink      ,00431]  ***LOG BY0=>ORA-01017: invalid username/password; logon denied [dblink#3 @ 431]
    4 ETW000                                                                              47  0.098456
    2EETW169 no connect possible: "DBMS = ORACLE                           --- dbs_ora_tnsname = 'PRD'"
    In node 2 of a Cluster System I have the Test instance. The solution that we proposed is with two instances of RDBMS Oracle (one in Node 1, and other in Node 2) for productive system. In Node 2, we have 2 instances of Oracle in Node 2.
    listener.ora:
    epsbgst:oraprd 12> cat listener.ora
    Filename......: listener.ora
    Created.......: created by SAP AG, R/3 Rel. >= 6.10
    Name..........:
    Date..........:
    @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/LISTENER.ORA#4 $
    ADMIN_RESTRICTIONS_LISTENER = on
    LISTENER =
      (ADDRESS_LIST =
            (ADDRESS =
              (PROTOCOL = IPC)
              (KEY = PRD.WORLD)
            (ADDRESS=
              (PROTOCOL = IPC)
              (KEY = PRD)
            (ADDRESS =
              (COMMUNITY = SAP.WORLD)
              (PROTOCOL = TCP)
              (HOST = epsbgst)
              (PORT = 1537)
    STARTUP_WAIT_TIME_LISTENER = 0
    CONNECT_TIMEOUT_LISTENER = 10
    TRACE_LEVEL_LISTENER = OFF
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PRD)
          (ORACLE_HOME = /oracle/PRD/102_64)
    tnsnames.ora:
    epsbgst:oraprd 13> cat tnsnames.ora
    Filename......: tnsnames.ora
    Created.......: created by SAP AG, R/3 Rel. >= 6.10
    Name..........:
    Date..........:
    @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/TNSNAMES.ORA#4 $
    PRD.WORLD=
      (DESCRIPTION =
        (ADDRESS_LIST =
            (ADDRESS =
              (COMMUNITY = SAP.WORLD)
              (PROTOCOL = TCP)
              (HOST = epsbgst)
              (PORT = 1537)
        (CONNECT_DATA =
           (SID = PRD)
           (GLOBAL_NAME = PRD.WORLD)
    sqlnet.ora:
    epsbgst:oraprd 15> cat sqlnet.ora
    Filename......: sqlnet.ora
    Created.......: created by SAP AG, R/3 Rel. >= 6.10
    Name..........:
    Date..........:
    @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/SQLNET.ORA#4 $
    AUTOMATIC_IPC = ON
    TRACE_LEVEL_CLIENT = OFF
    NAMES.DEFAULT_DOMAIN = WORLD
    05.01.06 unsorported parameter now
    #NAME.DEFAULT_ZONE = WORLD
    05.01.06 set the default to 10
    SQLNET.EXPIRE_TIME = 10
    05.01.06 set to default
    #TCP.NODELAY=YES
    05.01.06 set to 32768
    DEFAULT_SDU_SIZE=32768
    How I can see with what user and password the R3trans try to connect to database??
    I have read the following notes:
    Note 400241
    Note 50088
    Note 361641
    I am trying with this script that I have readed in NOTE 361641 :
    sqlplus /NOLOG @?/rdbms/admin/oradbusr.sql SAPPRD UNIX PRD X;
    But these throw No Match. I think the problem is that I have not filled the fields with correct values.
    If I executed this script:
    SELECT OWNER FROM DBA_TABLES WHERE TABLE_NAME = 'T000';
    The result is:
    SAPSR3
    The SAP System ID (SAPSID) = PRD
    Database ID (DBSID) = PRD
    Thanks you very much in advance!!!

    I have executed the R3trans -x with oraprd user.
    The answer to your query is:
    SQL> select owner from dba_tables where table_name='SAPUSER';
    OWNER
    OPS$PRDADM
    I have executed the R3trans also with prdadm, this is the result:
    epsbgst:prdadm 7> cat trans.log
    4 ETW000 R3trans version 6.14 (release 700 - 15.06.07 - 15:50:00).
    4 ETW000 unicode enabled version
    4 ETW000 ===============================================
    4 ETW000
    4 ETW000 date&time   : 16.03.2008 - 15:44:23
    4 ETW000 control file: <no ctrlfile>
    4 ETW000 R3trans was called as follows: R3trans -x
    4 ETW000  trace at level 2 opened for a given file pointer
    4 ETW000  [dev trc     ,00000]  Sun Mar 16 15:44:23 2008                              76  0.000076
    4 ETW000  [dev trc     ,00000]  db_con_init called                                    28  0.000104
    4 ETW000  [dev trc     ,00000]  create_con (con_name=R/3)                             49  0.000153
    4 ETW000  [dev trc     ,00000]  Loading DB library '/usr/sap/PRD/SYS/exe/run/dboraslib.o' ...
    4 ETW000                                                                              69  0.000222
    4 ETW000  [dev trc     ,00000]  load shared library (/usr/sap/PRD/SYS/exe/run/dboraslib.o), hdl 0
    4 ETW000                                                                            5735  0.005957
    4 ETW000  [dev trc     ,00000]  Library '/usr/sap/PRD/SYS/exe/run/dboraslib.o' loaded
    4 ETW000                                                                              45  0.006002
    4 ETW000  [dev trc     ,00000]  function DbSlExpFuns loaded from library /usr/sap/PRD/SYS/exe/run/dboraslib.o
    4 ETW000                                                                              50  0.006052
    4 ETW000  [dev trc     ,00000]  Version of '/usr/sap/PRD/SYS/exe/run/dboraslib.o' is "700.08", patchlevel (0.107)
    4 ETW000                                                                             207  0.006259
    4 ETW000  [dev trc     ,00000]  function dsql_db_init loaded from library /usr/sap/PRD/SYS/exe/run/dboraslib.o
    4 ETW000                                                                              48  0.006307
    4 ETW000  [dev trc     ,00000]  function dbdd_exp_funs loaded from library /usr/sap/PRD/SYS/exe/run/dboraslib.o
    4 ETW000                                                                              75  0.006382
    4 ETW000  [dev trc     ,00000]  New connection 0 created                              35  0.006417
    4 ETW000  [dev trc     ,00000]  0: name = R/3, con_id = -000000001 state = DISCONNECTED, perm = YES, reco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO
    4 ETW000                                                                              56  0.006473
    4 ETW000  [dev trc     ,00000]  db_con_connect (con_name=R/3)                         48  0.006521
    4 ETW000  [dev trc     ,00000]  find_con_by_name found the following connection for reuse:
    4 ETW000                                                                              44  0.006565
    4 ETW000  [dev trc     ,00000]  0: name = R/3, con_id = 000000000 state = DISCONNECTED, perm = YES, reco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO
    4 ETW000                                                                              53  0.006618
    4 ETW000  [dev trc     ,00000]  Got LIBPATH=/usr/lib:/lib:/usr/sap/PRD/SYS/exe/run:/oracle/client/10x_64/instantclient from environment
    4 ETW000                                                                             391  0.007009
    4 ETW000  [dev trc     ,00000]  Oracle Client Version: '10.2.0.2.0'                   73  0.007082
    4 ETW000  [dev trc     ,00000]  -->oci_initialize (con_hdl=0)                         30  0.007112
    4 ETW000  [dev trc     ,00000]  Client NLS settings: AMERICAN_AMERICA.UTF8          2073  0.009185
    4 ETW000  [dev trc     ,00000]  Logon as OPS$-user to get SAPSR3's password           40  0.009225
    4 ETW000  [dev trc     ,00000]  Connecting as /@PRD on connection 0 (nls_hdl 0) ... (dbsl 700 250407)
    4 ETW000                                                                              48  0.009273
    4 ETW000  [dev trc     ,00000]  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    4 ETW000                                                                              54  0.009327
    4 ETW000  [dev trc     ,00000]    0 UTF8                                                      1 0x110f990c0 0x110fb1538 0x110fb0de8
    4 ETW000                                                                              61  0.009388
    4 ETW000  [dev trc     ,00000]  Allocating service context handle for con_hdl=0       38  0.009426
    4 ETW000  [dev trc     ,00000]  Allocating server context handle                      32  0.009458
    4 ETW000  [dev trc     ,00000]  Attaching to DB Server PRD (con_hdl=0,svchp=0x110fb46d8,srvhp=0x110fb48f8)
    4 ETW000                                                                              86  0.009544
    4 ETW000  [dboci.c     ,00000]  *** ERROR => OCI-call 'OCIServerAttach' failed with rc=12541
    4 ETW000                                                                            4950  0.014494
    4 ETW000  [dbsloci.    ,00000]  *** ERROR => CONNECT failed with sql error '12541'
    4 ETW000                                                                              49  0.014543
    4 ETW000  [dev trc     ,00000]     set_ocica() -> OCI or SQL return code 12541        29  0.014572
    4 ETW000  [dev trc     ,00000]  Try to connect with default password                  86  0.014658
    4 ETW000  [dev trc     ,00000]  Connecting as SAPSR3/<pwd>@PRD on connection 0 (nls_hdl 0) ... (dbsl 700 250407)
    4 ETW000                                                                              49  0.014707
    4 ETW000  [dev trc     ,00000]  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    4 ETW000                                                                              50  0.014757
    4 ETW000  [dev trc     ,00000]    0 UTF8                                                      1 0x110f990c0 0x110fb1538 0x110fb0de8
    4 ETW000                                                                              51  0.014808
    4 ETW000  [dev trc     ,00000]  server_detach(con_hdl=0,stale=0,svrhp=0x110fb48f8)
    4 ETW000                                                                              46  0.014854
    4 ETW000  [dev trc     ,00000]  Detaching from DB Server (con_hdl=0,svchp=0x110fb46d8,srvhp=0x110fb48f8)
    4 ETW000                                                                              46  0.014900
    4 ETW000  [dev trc     ,00000]  Deallocating server context handle 0x110fb48f8        32  0.014932
    4 ETW000  [dev trc     ,00000]  Allocating server context handle                      31  0.014963
    4 ETW000  [dev trc     ,00000]  Attaching to DB Server PRD (con_hdl=0,svchp=0x110fb46d8,srvhp=0x110fb48f8)
    4 ETW000                                                                              53  0.015016
    4 ETW000  [dboci.c     ,00000]  *** ERROR => OCI-call 'OCIServerAttach' failed with rc=12541
    4 ETW000                                                                            2022  0.017038
    4 ETW000  [dbsloci.    ,00000]  *** ERROR => CONNECT failed with sql error '12541'
    4 ETW000                                                                              47  0.017085
    4 ETW000  [dev trc     ,00000]     set_ocica() -> OCI or SQL return code 12541        28  0.017113
    4 ETW000  [dblink      ,00431]  ***LOG BY2=>sql error 12541  performing CON [dblink#3 @ 431]
    4 ETW000                                                                             140  0.017253
    4 ETW000  [dblink      ,00431]  ***LOG BY0=>ORA-12541: TNS:no listener [dblink#3 @ 431]
    4 ETW000                                                                              46  0.017299
    2EETW169 no connect possible: "DBMS = ORACLE                           --- dbs_ora_tnsname = 'PRD'"
    The listener are running with oraprd user.
    Can you help me??
    Thanks you very much in advance!!

  • ERROR: ORA-01017: invalid username/password; logon denied

    Hi all
    I need your kind help.
    I have installed Oracle Audit Vault Server  Release 10.2.3.2 in Linux system and collection agent in Windows system. Adding and starting DBAUD collector went fine however  adding REDO collector return back errors when executing avorcldb add_collector command as follow
    [oracle@avsrv ~]$
    [oracle@avsrv ~]$  avorcldb add_collector -srcname orcl -agentname avagent01 -colltype REDO -av Lugaopc:1521:orcl
    collector REDO_Collector for source orcl already exists
    initializing REDO Collector
    ERROR: could not get AV source user connection using jdbc:oracle:oci:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaopc)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
    ERROR: ORA-01017: invalid username/password; logon denied
    [oracle@avsrv ~]$
    Here is the contents of avorcldb.log file
    09-09-13 16:58:44 [INFO ] Processing command add_collector
    09-09-13 16:58:44 [INFO ] Processing arg -srcname = orcl
    09-09-13 16:58:44 [INFO ] Processing arg -agentname = avagent01
    09-09-13 16:58:44 [INFO ] Processing arg -colltype = REDO
    09-09-13 16:58:44 [INFO ] Processing arg -av = Lugaopc:1521:orcl
    09-09-13 16:58:44 [INFO ] Connect info : Lugaopc:1521:orcl
    09-09-13 16:58:45 [INFO ] Got AV admin connection using jdbc:oracle:oci:@AVDB
    09-09-13 16:58:45 [INFO ] Executing SQL as [ADM@AV] select s.host||':'||a1.num_value||':'||a2.char_value from avsys.av$attrvalue a1, avsys.av$attrvalue a2, avsys.av$source s, avsys.av$attrdef ad1, avsys.av$attrdef ad2 where source_name = :1 and a1.inst_id = s.source_id and a2.inst_id = s.source_id and a1.attr_id = ad1.attr_id and ad1.attr_name = 'PORT' and a2.attr_id = ad2.attr_id and ad2.attr_name = 'DB_SERVICE'
    09-09-13 16:58:45 [INFO ] Using bind value orcl
    09-09-13 16:58:45 [INFO ] Return value = Lugaopc:1521:orcl
    09-09-13 16:58:45 [INFO ] Connect info : Lugaopc:1521:orcl
    09-09-13 16:58:45 [INFO ] Executing SQL as [ADM@AV] select to_char(source_id) from avsys.av$source where source_name = :1
    09-09-13 16:58:45 [INFO ] Using bind value orcl
    09-09-13 16:58:45 [INFO ] Return value = 1
    09-09-13 16:58:46 [INFO ] Got source user connection using jdbc:oracle:oci:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaopc)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
    09-09-13 16:58:46 [INFO ] Executing SQL as [ADM@AV] select decode(c.status, 1, 'active', 0, 'dropped', null) from avsys.av$collector c, avsys.av$source s where source_name = :1 and collector_name = :2 and c.source_id = s.source_id
    09-09-13 16:58:46 [INFO ] Using bind value orcl
    09-09-13 16:58:46 [INFO ] Using bind value REDO_Collector
    09-09-13 16:58:46 [INFO ] Return value = active
    09-09-13 16:58:46 [MESG ] collector REDO_Collector for source orcl already exists
    09-09-13 16:58:46 [INFO ] Executing SQL as [ADM@AV] select decode(c.status, 1, 'active', 0, 'dropped', null) from avsys.av$collector c, avsys.av$source s where source_name = :1 and collector_name = :2 and c.source_id = s.source_id
    09-09-13 16:58:46 [INFO ] Using bind value orcl
    09-09-13 16:58:46 [INFO ] Using bind value REDO_Collector
    09-09-13 16:58:46 [INFO ] Return value = active
    09-09-13 16:58:46 [MESG ] initializing REDO Collector
    09-09-13 16:58:46 [INFO ] Executing SQL as [ADM@AV] select username from avsys.av$source where source_name = :1
    09-09-13 16:58:46 [INFO ] Using bind value orcl
    09-09-13 16:58:46 [INFO ] Return value = AVSRCUSR1
    09-09-13 16:58:46 [INFO ] Executing SQL as [ADM@AV] {? = call avsys.dbms_audit_vault.reset_source_user(?)}
    09-09-13 16:58:46 [INFO ] Adding mask for user password
    09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] select table_name from user_tables where upper(table_name) = upper(:1)
    09-09-13 16:58:46 [INFO ] Using bind value STREAMS_HEARTBEAT
    09-09-13 16:58:46 [INFO ] Return value = STREAMS_HEARTBEAT
    09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] drop table streams_heartbeat
    09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] create table streams_heartbeat( src_dbname varchar2(4000), job_number number, heartbeat_time timestamp)
    09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] declare dbs_name varchar2(4000); begin select global_name into dbs_name from global_name; insert into streams_heartbeat values (dbs_name, 0, SYSTIMESTAMP); end;
    09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] create or replace procedure update_heartbeat IS begin update streams_heartbeat set heartbeat_time=(select systimestamp from dual); commit; end;
    09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] select table_name from user_tables where upper(table_name) = upper(:1)
    09-09-13 16:58:46 [INFO ] Using bind value CAPTURE_RULES
    09-09-13 16:58:46 [INFO ] Return value = CAPTURE_RULES
    09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] drop table capture_rules
    09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] create table capture_rules( rule_name  varchar2(50), rule_scope varchar2(6),  rule_type  varchar2(3),  obj_name   varchar2(100))
    09-09-13 16:58:46 [INFO ] Executing SQL as [ADM@AV] select global_name from global_name
    09-09-13 16:58:46 [INFO ] Return value = AVDB.AVSRV
    09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] select db_link from user_db_links where db_link = :1
    09-09-13 16:58:46 [INFO ] Using bind value AVDB.AVSRV
    09-09-13 16:58:46 [INFO ] Return value = AVDB.AVSRV
    09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] drop database link "AVDB.AVSRV"
    09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] select version from v$instance
    09-09-13 16:58:46 [INFO ] Return value = 11.2.0.1.0
    09-09-13 16:58:46 [INFO ] Creating DB link using AVDB.AVSRV,AVSRCUSR1,{avsrcusr_pwd},Lugaopc,1521,orcl
    09-09-13 16:58:46 [INFO ] Connecting as srcuser_ora01 to @(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaopc)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
    09-09-13 16:58:46 [INFO ] Output from SQLPlus
    09-09-13 16:58:46 [INFO ]
    09-09-13 16:58:46 [INFO ] Package created.
    09-09-13 16:58:46 [INFO ]
    09-09-13 16:58:46 [INFO ] No errors.
    09-09-13 16:58:47 [INFO ]
    09-09-13 16:58:47 [INFO ] Package body created.
    09-09-13 16:58:47 [INFO ]
    09-09-13 16:58:47 [INFO ] No errors.
    09-09-13 16:58:47 [INFO ]
    09-09-13 16:58:47 [INFO ] Package created.
    09-09-13 16:58:47 [INFO ]
    09-09-13 16:58:47 [INFO ] No errors.
    09-09-13 16:58:47 [INFO ]
    09-09-13 16:58:47 [INFO ] Package body created.
    09-09-13 16:58:47 [INFO ]
    09-09-13 16:58:47 [INFO ] No errors.
    09-09-13 16:58:47 [INFO ] Executing SQL as [USR@SRC] select distinct name from user_errors where name = :1
    09-09-13 16:58:47 [INFO ] Using bind value DBMS_SRC_STREAMS_COLLECTOR
    09-09-13 16:58:47 [INFO ] Return value = null
    09-09-13 16:58:47 [ERROR] could not get AV source user connection using jdbc:oracle:oci:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaopc)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
    09-09-13 16:58:47 [ERROR] ORA-01017: invalid username/password; logon denied
    java.sql.SQLException: ORA-01017: invalid username/password; logon denied
        at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:765)
        at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:414)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
        at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:162)
        at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
        at java.sql.DriverManager.getConnection(DriverManager.java:525)
        at java.sql.DriverManager.getConnection(DriverManager.java:140)
        at oracle.av.avca.jdbc.JdbcConnection.<init>(JdbcConnection.java:87)
        at oracle.av.orcldb.DAO.initConnection(DAO.java:79)
        at oracle.av.orcldb.DAO.<init>(DAO.java:64)
        at oracle.av.orcldb.commands.AddCollector.setupCollector(AddCollector.java:746)
        at oracle.av.orcldb.commands.AddCollector.execute(AddCollector.java:230)
        at oracle.av.orcldb.Command.process(Command.java:89)
        at oracle.av.orcldb.Main.process(Main.java:118)
        at oracle.av.orcldb.Main.main(Main.java:132)
    I have searched the forum to my level best without clear solution
    Regards
    Sadock

    Hi gurus
    I don't believe if this is missing solution from oracle community. I have decided to installed the collction agent and source database in linux system, so now both auditt vault server and collction agent are running in Linux system (but separately)
    I am wondering, avorcldb add_collector -srcname ORCL -agentname avagent01 -colltype DBAUD and  avorcldb add_collector -srcname ORCL -agentname avagent01 -colltype OSAUD -orclhome /u01/app/oracle/product/11.2.0/dbhome_1 are working fine and  I am able to start these collectors
    The  avorcldb verify -src Lugaosrv:1521:ORCL.LUGAOSRV -colltype ALL command also return good results
    [oracle@avsrv ~]$ avorcldb verify -src Lugaosrv:1521:ORCL.LUGAOSRV -colltype ALL
    Enter Source user name: srcuser_ora01
    Enter Source password:          
    source ORCL.LUGAOSRV verified for OS File Audit Collector collector
    source ORCL.LUGAOSRV verified for Aud$/FGA_LOG$ Audit Collector collector
    source ORCL.LUGAOSRV verified for REDO Log Audit Collector collector
    [oracle@avsrv ~]$
    The problem still I am facing is when attempting to add REDO collector. In fact the collector is added successful and i can see it even on EM console.
    [oracle@avsrv ~]$ avorcldb add_collector -srcname ORCL -agentname avagent01 -colltype REDO -av Lugaosrv:1521:ORCL.LUGAOSRV
    source ORCL verified for REDO Log Audit Collector collector
    Adding collector...
    Collector added successfully.
    remember the following information for use in avctl
    Collector name (collname): REDO_Collector
    initializing REDO Collector
    ERROR: could not get AV source user connection using jdbc:oracle:oci:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaosrv)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL.LUGAOSRV)))
    ERROR: ORA-01017: invalid username/password; logon denied
    [oracle@avsrv ~]$
    Any help will be appreciated
    Sadock

  • Making a REST webservice call. Error code: 401 Access to the requested resource is not allowed

    Hi All,
    I’m having a hard time figuring out how to make Rest WebService calls.
    I tried executing this directly through browser and I get an error.
    http:localhost:8080/rest/bean/atg/userprofiling/ProfileServices/loginUser?arg1=[email protected]&arg2=Password
    13:18:20,613 ERROR [RestSecurityServlet] Error code: 401
    Access to the requested resource is not allowed: /atg/userprofiling/ProfileServices
    atg.rest.RestException: Access to the requested resource is not allowed: /atg/userprofiling/ProfileServices
    at atg.rest.processor.RestSecurityProcessor.checkAccess(RestSecurityProcessor.java:546)
    at atg.rest.processor.RestSecurityProcessor.handleGetRequest(RestSecurityProcessor.java:313)
    at atg.rest.processor.RestSecurityProcessor.doRESTGet(RestSecurityProcessor.java:199)
    at atg.rest.servlet.RestPipelineServlet.serviceRESTRequest(RestPipelineServlet.java:417)
    at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:260)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:320)
    at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:264)
    at atg.rest.servlet.HeadRestServlet.service(HeadRestServlet.java:130)
    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:267)
    From the documentation I understand that I need to create a session, is the session only necessary to access secured components since this
    particular method “ProfileServices.loginUser “ has been declared as not secure in restSecurityConfiguration.xml
    Also, are there two different ways in which I can log in
    1.       Using RestSession.createSession providing the username and password.
    2.       Or using ProfileServices.loginUser or ProfileFormHandler
      Can someone please clarify

    If you are invoking the REST web-service from a Java client then you can create a RestSession object using the createSession method. But in your case you seem to be invoking it with a HTTP request which by default would be treated as a GET request by ATG's REST implementation. Therefore being a GET, it would try to fetch a property "loginUser" from /atg/userprofiling/ProfileServices component (based on your URL) which would always fail.
    To invoke loginUser() method of ProfileServices with your passed argument you need to tell ATG's REST system to treat your incoming request not as GET but as a POST request which you can do using  atg-rest-http-method control parameter in your request like this
    http:localhost:8080/rest/bean/atg/userprofiling/ProfileServices/loginUser?arg1=[email protected]&arg2=Password&atg-rest-http-method=POST
    It should work this way provided your restSecurityConfiguration.xml is proper.

  • Logon failure with username/password authentication in WLE 5.1

    Hi,
    I have WLE 5.1 configured and running on a Win2K system. I am able to
    build and run the simpapp sample program. I am also able to build the
    interceptor_cxx sample and run with all interceptors other than the
    security interceptor. What I realised in this case was that the
    PersonQueryClient did not perform any login of a user from which the
    security interceptor could extract user ID information (have I missed
    something? I am a WLE and CORBA newbie) so I modified the ubb config
    file to define SECURITY as USER_AUTH and add the AUTHSVC, modified
    personqueryclientc.cpp to get access to the SecurityLevel2 principal
    authenticator, built the app, created a user with the tpussradd command,
    and ran the app (the AUTHSVC successfully starts).
    The Tobj::AuthType returned by the get_auth_type method of the
    PrincipalAuthenticator is Tobj::TOBJ_APPAUTH as I expect. I call the
    logon method with the parameters (user_name, argv[0], sys_password,
    password, 0) where user_name is the same as the user I created with the
    tpusradd command, argv[0] is personqueryclient (I've tried tpusradd'ing
    the user both with the "-c personqueryclient" argument and without),
    sys_password is the password I specified when tmloadcf was run against
    the modified ubb config file, password is the password I specified when
    I ran tpusradd. The logon always fails returning
    Security::SecAuthFailure. In the ULOGxxxx file the following message is
    displayed:
    181605.NUMBAT!TMSYSEVT.2180: LIBTUX_CAT:1484: WARN: .SysClientSecurity:
    User tbartley on SITE1 authentication failure
    I've tried running in the following manners all with the same result:
    1. With or without the security_cxx interceptor registered
    2. With the user in or not in a group
    3. With the the user created using the "-c personqueryclient" arg to
    tpusradd or not
    If I change the security level down to APP_PW then everything works and
    the security_cxx interceptor sees a client name of personqueryclient and
    a username of personqueryclient. The logon fails if I use a sys_password
    other than the one specified to tmloadcf and succeeds if I use the
    correct password.
    Can anyone tell me what I might be doing wrong in the username/password
    authentication case?
    Here's the code I inserted to personqueryc.cpp to perform the logon:
    // Get SecurityCurrent object
    CORBA::Object_var var_security_current_oref
    = bootstrap.resolve_initial_references("SecurityCurrent");
    SecurityLevel2::Current_var var_security_current_ref =
    SecurityLevel2::Current::_narrow(var_security_current_oref.in());
    // Get the principal authenticator
    SecurityLevel2::PrincipalAuthenticator_var
    var_principal_authenticator_oref =
    var_security_current_ref->principal_authenticator();
    char user_name[100] = "";
    char password[100] = "";
    char sys_password[100] = "";
    // Narrow to a BEA Principal Authenticator
    Tobj::PrincipalAuthenticator_var v_bea_pa =
    Tobj::PrincipalAuthenticator::_narrow(var_principal_authenticator_oref.in());
    // See what level of logon has been turned on
    Tobj::AuthType auth_type = v_bea_pa->get_auth_type();
    cout << "Auth type: ";
    switch (auth_type) {
    case Tobj::TOBJ_APPAUTH: cout << "TOBJ_APPAUTH"; break;
    case Tobj::TOBJ_SYSAUTH: cout << "TOBJ_SYSAUTH"; password[0] = '\0';
    break;
    case Tobj::TOBJ_NOAUTH: cout << "TOBJ_NOAUTH"; break;
    default: cout << "TOBJ_<unknown>"; break;
    cout << endl;
    cout << "Username: ";
    cin >> user_name;
    switch (auth_type) {
    case Tobj::TOBJ_APPAUTH: {
    cout << "User password: ";
    cin >> password;
    // fall through
    case Tobj::TOBJ_SYSAUTH: {
    cout << "App password: "; cin >> sys_password;
    break;
    default: {
    break;
    // now that we've got all the data necessary, logon
    Security::AuthenticationStatus status =
    v_bea_pa->logon(user_name,
    argv[0],
    sys_password,
    password,
    0); // user data
    cout << "Logon result: ";
    switch (status) {
    case Security::SecAuthSuccess: cout << "SecAuthSuccess"; break;
    case Security::SecAuthFailure: cout << "SecAuthFailure"; break;
    case Security::SecAuthContinue: cout << "SecAuthContinue"; break;
    case Security::SecAuthExpired: cout << "SecAuthExpired"; break;
    default: cout << "SecAuth<unknown>"; break;
    cout << endl;
    if (status != Security::SecAuthSuccess) {
    cerr << "Invalid password." << endl;
    exit(1);
    Here are the entries I added to the ubb config file:
    *RESOURCES
    SECURITY USER_AUTH
    AUTHSVC AUTHSVR
    *SERVERS
    AUTHSVR SRVGRP=SYS_GRP SRVID=6 RESTART=Y GRACE=600 MAXGEN=2 CLOPT="-A"
    I do not have the WLE Security Services installed (i.e. the package
    that provides SSL and crypto). Is this required? It's not clear to me
    from the documentation if this is required for username/password based
    authentication or not.
    Thanks for any help,
    Tim Bartley

    Hi Michael
    I am using SSL in my application. So that it asks for the certificate username
    and password while startup. But now i want to mention the username and password
    in weblogic.properties file itself. So that the client need not have to provide
    the username and password everytime. I am using weblogic server 5.1 version.
    How do i do this?
    Hope my question is clear. Please help.
    with regds
    siva
    Michael Young <[email protected]> wrote:
    Hi.
    It's not 100% clear to me what you are asking for. Do you want authentication
    turned off for
    your application? That will certainly turn off prompting for authentication
    information. You
    can set your ACL for your application (in your properties file) to allow
    everyone to execute
    it. Something like:
    weblogic.allow.execute.<myApplication>=everyone
    But maybe you want some kind of silent authentication so that not everyone
    can execute your
    app? I suppose you could pass authentication info in a cookie. I really
    don't know enough
    about your application, though.
    I suggest you post this question in weblogic.developer.interest.security
    - you have a better
    chance of getting an answer there for security related questions.
    Hope this helps.
    Michael
    siva wrote:
    Hi all,
    I have the following requirements. I have an application which asksfor the authentication
    information like username and password at first. The application isrunning in
    weblogic5.1 server. Is there a way where in weblogic.properties file,i mention
    the username and password so that the application will not ask forin the browser.
    please help. It's urgent.
    with regds
    siva--
    Developer Relations Engineer
    BEA Support

Maybe you are looking for

  • Fixed Asset Auditing Configuration

    Dear All, I need a help for doing Fixed Asset Audit Configuration. Any one kindly give me a guide line for how to do the step by step configuration for Fixed Asset Auditing and view the audit report Thanks & Regards, S. Umamageshwaran

  • Io7 does not allow imessage or facetime

    I have followed all steps to enter my Apple ID to activate iMessage and Facetime and it is still not working.  I have done a doft reset for the phone, I have tried while on wi-fi only wtihout cellular service being activated.  How can this be fixed?

  • Where are the settings and import buttons

    I finally got my home sharing to work.  But after selecting all, there are no "settings" or "import" buttons on the bottom right of iTunes.  Help!

  • Disk Utility missing the Erase tab

    Tonight, I was attempting to reformat my Mac Mini FileVault encrypted hard drive. I have Mountain Lion 10.8 installed on it, and I have a bootable Mountain Lion USB stick. I booted from the USB device, and first tried to format. Everything was greyed

  • IPHone 3GS question. PLEASE HELP

    I called AppleCare and sent my iPhone 3GS in for repair. The empty box came on the Thursday (august 11) and shipped it via Fed ex on Friday. I remember reading in the label "overnight Shipment" and so I expected it to be delivered by Apple on saturda