Problems in getting userid from Appscontext object

Hi,
Just a novice on OA ..Need a way to get userid .Currently i initiate an appsContext object using a DBC filepath. and then call getUserID() on the initialized object but I get it as -1 .
WebAppsContext app = new WebAppsContext("dbc file name along with the path");
app.getUserID(); // Gets me -1
As a cross check on the appsContext object app I acquired a jdbc connection from the appscontext object and fired a dummy query , which did worked implying the object app has been initialized.
Hopin for a quick resolution or an alternate way of doin this,.

Hi .
sorry i hadnt made my reqmt clear ...
the thing is i m hitting a servlet from OA. And in this servlet i need to fetch userid so that i can query on fnd_users for getting the logged in user description , letz say i get user desc as abc ..so as to display welcome abc on top of the my custom page.
as itz a normal servlet ..i dont have pagecontext object ..just the usual servlet stuff like httpRequest . So how to get userid / user desc in this case...
any alternate way .. does an OA exception trace has userid info that can be extracted....
just a quest ..does AppsContext.getUserID() return -1 if itz initialized thru DBC filepath ?
Regards,
Ashley.

Similar Messages

  • Problem in getting the function template object from the repository.

    Hi all,
    I have created a par file. I have a JCO connection in that. I am facing problems in getting the function template object from the repository. This thing is running successfully when i try to deploy it in Tomcat. But i am facing problems when i try to deploy it in SAP EP 6.0.
    Below is statement which is giving error after being deployed to SAP EP6.
    This is executing fine when executed in Tomcat Server.
    // getting the object of function template
    IFunctionTemplate functionTemplate =
    aRepository.getFunctionTemplate("YADDNEWUSER");
    Note : YADDNEWUSER is the name of the RFC which I am calling from my JAVA Code.
    Thanks in advance,
    Divija

    This sounds like a bug in the smart upload code. I have used this stuff before, but it's probably an older version, so maybe they broke something. Enumerations aren't usually guaranteed to keep things in any particular order. I would say for now, make a method to take the enumeration and a param name to find the value. And write to the JSPSmart people.

  • How to get userid from username

    Hi All,
    How can I get userid from username?
    Thanks,
    Anup Garg

    Hi Anup,
    Userids are stored in Infotype PA0105 ( table ) and  field USRID.
    PERNR  is the Employee Number.
    To know the Employee name check Infotype PA0002 ( table ) and fields
    NACHN     Last Name
    NACH2     Second Name
    VORNA     First Name
    CNAME     Complete Name
    Best regards,
    raam

  • Problem to get Connection from JBoss AS

    PLEASE HELP ME....
    I GOT ERROR WHILE I TRYED TO GET A CONNECTION FROM JBOSS APP. SERVER.
    THE CODE IS
    package com.beo.atlas.common;
    public final class ServiceLocator     {
         private static final String JBOSS_INITIAL_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory";
         private static final String JBOSS_PROVIDER_URL = "localhost:8080";
         private static final String JBOSS_URL_PKG_PREFIXES = "org.jboss.naming:org.jnp.interfaces";
         public static final String ATLAS_DATASOURCE = "java://myatlasdbpool";
         private static java.util.Hashtable dataSourceCache = null;
         private static ServiceLocator locator = null;
         static     {
              System.out.println("Locator Initializing");
              dataSourceCache = new java.util.Hashtable();
              locator = new ServiceLocator();
         private ServiceLocator()     {     }
         public static ServiceLocator newInstance()     {
              System.out.println("Returning the Locator Object");
              return locator;
         public java.sql.Connection getDBConnection() throws java.sql.SQLException,javax.naming.NamingException     {
              System.out.println("Getting Data base Connection....");
              if(dataSourceCache.containsKey(ATLAS_DATASOURCE))     {
                   System.out.println("Trying to get Connection from CACHE...");
                   System.out.println("Returning Connection Object from cache.");
                   return (java.sql.Connection)dataSourceCache.get(ATLAS_DATASOURCE);
              System.out.println("FAILED to get Connection from CACHE");
              System.out.println("Trying to create new Connection...");
              java.util.Properties props = new java.util.Properties();
              props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,JBOSS_INITIAL_CONTEXT_FACTORY);
              props.put(javax.naming.Context.PROVIDER_URL,JBOSS_PROVIDER_URL);
              props.put(javax.naming.Context.URL_PKG_PREFIXES, JBOSS_URL_PKG_PREFIXES );
              javax.naming.InitialContext context = new javax.naming.InitialContext(props);
              Object o = context.lookup(ATLAS_DATASOURCE);
              System.out.println("Object Created...");
              javax.sql.DataSource dataSource = null;
              try     {
              dataSource = (javax.sql.DataSource)javax.rmi.PortableRemoteObject.narrow(o,javax.sql.DataSource.class);
              }catch(Exception e)     {     
              java.sql.Connection con = dataSource.getConnection();
              dataSourceCache.put(ATLAS_DATASOURCE,con);
              System.out.println("Returning new Connection Object.");
              return con;          
    ERROR
    Locator Initializing
    Returning the Locator Object
    Getting Data base Connection....
    FAILED to get Connection from CACHE
    Trying to create new Connection...
    Object Created...
    java.lang.ClassCastException
    at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(Unknown S
    ource)
    at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    at com.beo.atlas.common.ServiceLocator.getDBConnection(ServiceLocator.ja
    va:56)
    at AtlasClient.printData(AtlasClient.java:16)
    at AtlasClient.main(AtlasClient.java:8)
    Caused by: java.lang.ClassCastException: org.jnp.interfaces.NamingContext
    ... 5 more

    I've got the same problem. Working with JBoss 4.0.3 and Tomcat 5.5. The lookup goes fine and returns an object of type remote home, however when I perform the narrow() I get ClassCastException. I'm sure the client and the server have got the same file version as I built from the same source.
    [error]
    Caused by: java.lang.ClassCastException
         at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
         at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
    [error]

  • TS3276 can't download mail from windows live account.  I have deleted and re-set up the account but still won't work.  I can go online and access with no problem or get mail from other apple devices.

    Not able to get mail from windows live account.

    Firefox can find plugins in several locations, but Firefox 21 changed the location of the "shared" plugin folder so older installers like the Microsoft Windows Media Plugin no longer drop the DLL file in the correct location.
    There apparently are two ways to address this:
    (1) Change a Firefox preference so that Firefox checks the old location. Here's how:
    (i) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (ii) In the filter box, type or paste '''plugins''' and pause while the list is filtered
    (iii) Double-click '''plugins.load_appdir_plugins''' to switch its value from false to true.
    This will take effect after you restart Firefox.
    (2) Copy the plugins folder to the new location. Here's how on Win 7 64-bit:
    Open a Windows Explorer window to:
    C:\Program Files (x86)\Mozilla Firefox
    Right-click and copy the '''Plugins''' folder
    Double-click the '''browser''' folder to open it
    Right-click and paste
    Right-click the new copy of '''Plugins''' and rename it to '''plugins'''
    After restarting Firefox, the plugins in that folder should now be available.
    ''Edit: I suggest just doing #1.''

  • Getting userid from Win95....

    Hi there,
    In Forte RunTime version 3.0.E, I can get the userid by executing the
    following line
    iWindowsUserName = task.part.OperatingSystem.NodeName;
    However, with run time verion 3.0.F.2, I get my system ID number instead.
    Has anyone encountered this problem?
    Damiao Lo
    SaskTel
    Regina, Canada
    (306) 777-3252

    Yes, using the Access Server SDK, you can get the user DN of the user whose ObSSOCookie is generated. You cannot get the userid directly using any API, but using the API functions you can get the DN, from there you can get the userid.
    First, create an access gate in the OAM admin console. Then install and configure the Access Server SDK. Then you will have to write the following code (psudocode given). This will accomplish what you are looking for. The code can be written in C C++ or Java.
    Initialize the Asdk (ObConfig::initiate(asdk_path))
    Then create obUserSession object using the obssocookie value as an argument to the ctor
    obUserSessionObj.getUserIdentity - this will give the userDN.
    Close the Asdk connection.
    Hope this helps. Let us know.

  • Using EL to get values from View Objects

    Hello again!
    I' m using jdev 11.1.1.4.0, with adf and business components
    Is there any way i can get a value to an af:outputText from a view object's field without
    a) having to expose all fields that I need in bindings tab?
    b) having to declare all fields to a backing bean
    I have a statistical table with about 30 numbers in a record and it would make my project impossible to follow!
    Some EL on the af:outputText with a parameter to a function on my backing bean, would sound perfect, but I've read that it's impossible...
    Any clues?
    Thank you for your efforts!
    Nikos

    I did not understand you.
    will the drag and drop your attribute on your page will solve your problem?
    or do you need to create attributeValues biding for single attribute? if yes do the following:
    1- From your page, right click and select Go to Page Definition.
    2- From the binding section, click the plus green icon to create a new control biding, and choose attributeValues from the list.
    3- select your data source from the list or create a new one, then select the attribute you need.
    4- now you have a biding, and you can set the value for your output text.
    value =#{biding.yourAttribute.inputValue}

  • Having problems connecting getting results from MySQL

    Hi,
    I'm trying to learn some aspects of J2EE but i'm a bit
    stuck with EJB and i'm not sure what is going wrong so that's why i'm here :)
    What I want to do is very simple.
    I have a working MySQL database "musiccatalog" and I want to query it using any sort of client so to do that
    I create an Entreprise Application using netBeans 4.1
    Then I create a new CMP Bean called Album.
    I need something simple to test on so I have only one CMP Bean.
    My Album CMP Beans contains following CMP fields albumId, artistId, name, releaseDate, insertionTime.
    I also have a bunch of methods for LocalInterface: getters, setters, finders, and create() method.
    I don't need to add anything or write in the code cause it is generated by the IDE (netBeans 4.1)
    So my Album CMP Bean is written and I deploy project to see if all works fine. It works. My EJB-Module and Web-Module are deployed on the server (Sun Application Server 8).
    Next I create a new SessionBean called AlbumFacade that will access my CMP bean.
    I will have to add a lookupAlbumBean() method that will return a LocalHome interface, I also add a private variable of Type AlbumLocalHome. This variable is intialized in ejbCreate() method using the lookAlbumBean() method.
    Now it's time to add a business method to my SessionBean.
    I create a new buisness method public String getAlbumInfo()
    public String getAlbumInfo(int idAlbum) throws javax.ejb.FinderException {
    ejb.AlbumLocal albumL = albumLH.findByPrimaryKey(new Integer(idAlbum));
    return albumL.getAlbumName();
    so in this method i will get a reference to albumL interface and i will ask it to return the albumName of an album.
    So at this moment i'm done with Beans :)
    I redeply the app and it is redeplyed successfully.
    Now to test my beans i write a client. It'll be a servlet.
    What I need to do next is to create a ServiceLocator in my WebModule. This ServiceLocator will be used in the Servlet to lookup the remote interface of the AlbumFacade SessionBean.
    MyServlet will output a form with a textfield and a submit button where the user (me) types a number.
    If the servlet receives albumId parameter it'll look up the remote AlbumFacadeRemote interface and then i'll call the buisness logic of the SessionBean ( getAlbumInfo())
    and at this moment I should reach what I wanted but....
    The Application deploys and after I enter a number I got a vert nice StackTrace like this
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 9998 Maybe; nested exception is:
         org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x2000 minor code: 1806 completed: Maybe
         com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:207)
         com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Util.java:651)
         javax.rmi.CORBA.Util.wrapException(Util.java:279)
         com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:177)
         com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
         ejb._AlbumFacadeRemote_DynamicStub.getAlbumInfo(_AlbumFacadeRemote_DynamicStub.java)
         web.AlbumServlet.processRequest(AlbumServlet.java:55)
         web.AlbumServlet.doPost(AlbumServlet.java:81)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         java.security.AccessController.doPrivileged(Native Method)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server logs.
    and it happens when the application queries the database.
    And unfortunately I don't see what may be wrong. If I do the same with a pointbasde sample database everything works fine.
    I tried to connect to MySQL via JConnector and also via jdbc:odbc bridge but i got still the same error.
    It drives me really mad 'coz I don't know what I do wrong.
    I can connect to database. But then something goes wrong.
    Can somebody give me an idea of what maybe wrong?
    Thanks :)

    Hail!!
    In fact, the problem IS in your PHP script.
    $senderEmail = $_POST['eMail'];
    $senderEmail = stripslashes($eMail);
    The last one should be:
    $senderEmail = stripslashes($senderEmail);
    PS:
    Next time, put your code inside formating tags...
    It will be easy for people to read your question and will improve the chances that someone answer it.

  • Problem in getting handle to EJB Object

    Hi All,
    I am getting following exception when i try to get handle on my ejb object.
    My Client Program:
    import synch.*;
    import javax.naming.*;
    import java.rmi.*;
    import javax.rmi.*;
    import javax.ejb.*;
    import java.io.*;
    public class SearlizeClient
         public static void main(String[] args) throws Exception
              Context ic = new InitialContext();
                   Object o = ic.lookup("NameBean"); // replace with YOUR JNDI name for the bean
                   NameHome nameHome = (NameHome) PortableRemoteObject.narrow(o, NameHome.class);
                   synch.Name obj1 = nameHome.create();
                   obj1.setName("Balaji");
                   Handle myHandle= obj1.getHandle();// Getting exception at this place
                   FileOutputStream out = new FileOutputStream("MyHandle.txt");
                   ObjectOutputStream s = new ObjectOutputStream(out);
                   s.writeObject(obj1);
                   s.flush();
                   out.close();
    I got following excetion when i try to get handle on EJBObject
    Dec 6, 2005 11:20:19 AM com.sun.corba.se.impl.encoding.CDRInputStream_1_0 read_value
    WARNING: "IOP00810257: (MARSHAL) Could not find class"
    org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemExcep
    tion.java:7756)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
    1_0.java:873)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
    1_0.java:863)
    at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java
    :269)
    at synch._Name_Stub.getHandle(Unknown Source)
    at SearlizeClient.main(SearlizeClient.java:20)
    Caused by: java.lang.ClassNotFoundException
    ... 7 more
    Exception in thread "main" java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested excepti
    on is:
    org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
    at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
    at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
    at synch._Name_Stub.getHandle(Unknown Source)
    at SearlizeClient.main(SearlizeClient.java:20)
    Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemExcep
    tion.java:7756)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
    1_0.java:873)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
    1_0.java:863)
    at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java
    :269)
    at synch._Name_Stub.getHandle(Unknown Source)
    ... 1 more
    Caused by: java.lang.ClassNotFoundException
    ... 7 more
    Enviroment: This bean is hosted on Sun J2ee Appserver 8.0 and normal client prg is working fine .. But it is failing in getting handle
    Please suggest,
    Thanks in advance

    The only way is to create your own equivalent of HttpSessionContext.
    Its simple enough, just create a class that implements HttpSessionListener (responds to session creation, and destruction)
    You can get the sessions as they are created, and keep a global reference to them, and manipulate it as much as you like. In your case you would probably want to index the sessions by userId rather than sessionId for easy access.
    Good luck,
    evnafets

  • Getting data from view object into backing bean

    Hi,
    My requirement is explained below -
         I have a ADF editable table in a jsf page which is connected to backend database table. In the table there are 6 columns and only 2 are editable. So when user inputs a value in first input column an event is triggered such that the data for all the remaining columns should be fetched from another database table.
    Typically if we are not using ADF development environment. We would have had a simple business method which creates the sql query by taking the input from textbox with simple where clause and I would have got the data. I am not getting any idea how to do this in ADF. I have the second table as view object but how to access the view object from backing bean and get data based on the input given.

    Hi,
    step 1) Expose a method on the ViewObject Impl class
    step 2) define arguments for the method as needed to identify the row to read data from
    step 3) retrieve the row from the VO that holds the data you want to add and return a HashMap with this information
    step 4) expose the method on the client interface (Java menu selection on the View Object)
    step 5) In the PageDef file, create a method binding to the method you exposed on the ViewObjectImpl
    step 6) Call the method binding from the managed bean like
    OperationBinding getDataFromVO = (OperationBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("Name of method binding);
    getDataFromVO.getParamsMap().put("name of arguments1", value1);
    getDataFromVO.getParamsMap().put("name of arguments2", value2);
    Object retData = getDataFromVO.execute();
    if(retData != null && getDataFromVO.getErrors().size()==0){
      HashMap retDataMap = (HashMap) retData;
    ... follow the rest of your logic ....
    Frank

  • Getting data from on object!!

    Hello!
    Well I'm having a problem when I try to get the data from a class i my jsp page.
    I have a database conection class and methods to conect to tha database and get the data :
    package teste;
    public class Data {
        Connection con;
        Detalhes detalhes;
        ArrayList list;
        public Data()throws Exception {       
            try {
                Class.forName("org.gjt.mm.mysql.Driver");
                con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/Loja?user=root&password=131283");            
            } catch (Exception ex) {
                throw new Exception(" Database not found!!" +
                    ex.getMessage());
        public void remove() {
            try {
                con.close();
            } catch (SQLException ex) {
                System.out.println(ex.getMessage());
        public Detalhes getDetalhes(int codigo){
            try {
                String selectStatement = "select * from produto where codigo="+codigo;
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                ResultSet rs = prepStmt.executeQuery();
                while(rs.next())
                     detalhes = new Detalhes(rs.getString(1), rs.getString(2), rs.getDouble(3), rs.getInt(4));          
            }catch(Exception e){
                return detalhes;
        public ArrayList getList(){
            try {
                String selectStatement = "select * from produto";
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                ResultSet rs = prepStmt.executeQuery();
                while(rs.next())
                     detalhes = new Detalhes(rs.getString(1), rs.getString(2), rs.getDouble(3), rs.getInt(4));          
                     list.add(detalhes);
            }catch(Exception e){
                return list;
    }    i have too, a context class to put the database conection avalaible:
    package teste;
    public final class ContextPage implements ServletContextListener {
        private ServletContext context = null;
        Data dados;
        public void contextInitialized(ServletContextEvent event) {
            context = event.getServletContext();
            try {
                dados = new Data();
                context.setAttribute("bookDB", dados);
            } catch (Exception ex) {
                System.out.println("Couldn't create bookstore database bean: " +
                    ex.getMessage());
        public void contextDestroyed(ServletContextEvent event) {
            context = event.getServletContext();
            Data dados = (Data) context.getAttribute("bookDB");
            if (dados != null) {
                dados.remove();
            context.removeAttribute("bookDB");              
    }I have too a class with methods to store and show the data that i'd got from the conection class:
    package teste;
    public class Detalhes {
        String titulo, autor;
        Double preco;
        int codigo;
        public Detalhes(String titulo, String autor, Double preco, int codigo) {
            this.titulo = titulo;
            this.autor = autor;
            this.preco = preco;
            this.codigo = codigo;
        public String getTitulo(){
            return titulo;
        public String getAutor(){
            return autor;
        public Double getPreco(){
            return preco;
        public int getCodigo(){
            return codigo;
    }and the last class is to intermediate the data flow between Data.class and Detalhes.class.
    package teste;
    import java.util.ArrayList;
    public class GetData {
         Data db;
         int codigo;
         Detalhes detalhes;
         public GetData() {       
        public void setCodigo(int codigo){
            this.codigo = codigo;
        public void setDb(Data db){
            this.db = db;
        public Detalhes getDetalhes()throws Exception{
            detalhes = (Detalhes)db.getDetalhes(codigo);
            return detalhes;
        public ArrayList getList()throws Exception{
            return db.getList();
        public void remove() {
            db.remove();
    }and the piece of my page with proble is
    <p><b><h1>Resultado:</h1></b></p><br>
    <jsp:useBean id="dados" class="teste.GetData" scope="page">
          <jsp:setProperty name="dados" property="db" value="${dados}"/>
    </jsp:useBean>    
    <jsp:setProperty name="codigo" property="db" value="1"/>So the problem is that when i acess this page i get an error message
    could you geve me some advice with some code?
    the exception is:
    org.apache.jasper.JasperException: Attempt to coerce a value of type "teste.GetData" to type "teste.Data"
         org.apache.jasper.runtime.JspRuntimeLibrary.handleSetPropertyExpression(JspRuntimeLibrary.java:659)
         org.apache.jsp.Resposta_jsp._jspService(Resposta_jsp.java:53)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)I thank you very much for this help!! All the best!!

    Thanks for trying to help me, but I just have done this:
    <jsp:useBean id="gDados" class="teste.GetData" scope="page">
          <jsp:setProperty name="gDados" property="db" value="${dados}"/>
    </jsp:useBean>    
    <jsp:setProperty name="codigo" property="db" value="1"/>
    <p><b><h1>${gDados.detalhes.titulo}</h1></b></p><br>and it brings me the excption :
    org.apache.jasper.JasperException
         org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:365)
         org.apache.jasper.runtime.JspRuntimeLibrary.access$000(JspRuntimeLibrary.java:60)
         org.apache.jasper.runtime.JspRuntimeLibrary$PrivilegedIntrospectHelper.run(JspRuntimeLibrary.java:90)
         java.security.AccessController.doPrivileged(Native Method)
         org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:306)
         org.apache.jsp.Resposta_jsp._jspService(Resposta_jsp.java:60)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)have youany other suggestion?Thanks!!

  • Problem in getting attribute from request.

    HI
    I have a JSR 168 portlet which was earlier running in tomcat 6 and liferay...i'm now migrating that in webcenter portal framework 11g.
    after migration when i run it ... i have set some attribute in actionRequest class of processAction method in my portlet and then i 'm getting it in jsp from request(explicit varriable) varriable....
    this was working earlier in liferay/tomcat but somehow it's not working here ... i didn't change any code here... apart from some lspecific ib/class from liferay to oracle.
    please suggest
    thanks

    I think you are mixing some things...
    First of all, if you are creating basic JSP portlets, you don't need to use the ADFPortletBridge. This is only needed when you develop JSF portlets and are using the ADF technology.
    Second of all, you are switching from JSR 168 to 286. The standard has some changes but i don't really know if these changes affect the lifecycle of the portlets in a way that the setAttribute will be broken...
    There are a lot of changes in the parameters so IPC is made easy with JSR 286.
    Maybe you cna elaborte some more about the specific case and we can provide a valid workaround?

  • Get Value From Combo Object

    when i declare
    ===================================
    Dim vCombo As SAPbouiCOM.ComboBox
    set vCombo = oTmpForm.Items("44").Specific
    sGRSC = vCombo.Selected.Value
    'to get combo current value into variable sGRSC
    ============================================
    i always get this error message
    "Run Time Error 91 Object Variable or With Block Variable not set ".
    Am i wrong using Combo Properties. Any Suggestion ?

    Hamdi,
    U might not have set a value for the combobox.
    Set a value like this:
              oCombo.ValidValues.Add "I", "In process"
              oCombo.ValidValues.Add "H", "On Hold"
              oCombo.ValidValues.Add "C", "Completed"
              oCombo.Select 0, psk_Index
    This will set the first value ( index starts at 0 )
    as Selected.
    Later, when u pull the combobox value into a string , it will have "I".
    ===============================================
    Hope this helps.

  • Getting Namespace From Document Object

    In my JSP I have an Document that contains the contents of an xsl file. I want to search for a specific variable element and then replace its contents with some new value. I think the problem I'm having though relates to namespaces. When calling method selectSingleNode I think I need to pass the namespace node as the 3rd parameter. I'm not sure how to get that though. I know there's a method getNamespaceURI but that returns a string instead of the node. Is there any way to get the namespace node?
    <%
    Document xslDoc = myClass.loadTheXml((new File("test.xsl"))); // assume loadTheXML works correctly
    Node node = XPathAPI.selectSingleNode(xslDoc.getDocumentElement(), "/xsl:stylesheet/xsl:variable[@name='myVariable']");
    %>

    public static Node selectSingleNode(Node contextNode,
                                        java.lang.String str,
                                        Node namespaceNode)The namespaceNode parameter in the selectSingleNode is a Node of the type namespace, for example
    http://exist.sourceforge.net/api/org/exist/memtree/NamespaceNode.html
    http://www.jdocs.org/jaxen/1.0/api/org/jaxen/dom/NamespaceNode.html

  • Problem with get ResultSet from rmi jdbc method. Help.

    Hi,
    I am writing a rmi jdbc server. I got all the rmi methods working, but I am trying to get the data from the ResultSet. After the query, I set the fields in the serialiable class and return it back to the client. However, I noticed that it does called init(), but not the setField calls. When it calls the first setField in the serialiable class, the method is never called. Can anyone give some guidance.
    Thanks,
    Rage
    This method is called from the client to set all the data in the Serialiable class and return it to the client.
    public Collection fetchResultSet() throws RemoteException
    System.out.println("Entering fetchResultSet");
    Collection resultSetColl = new ArrayList();
    QueryResultSet recordset;
    try
    int rowCount = 0;
    ResultSetMetaData rsmd = rs.getMetaData(); // Get data dictionary information
    int columnCount = rsmd.getColumnCount();
    System.out.println("got column count");
    System.out.println("" + rowCount + " rows, " +
    columnCount + " columns");
    if (rs == null) System.out.println("rs is null");
    if (rs.next())
    System.out.println("Parsing RS");
    recordset = new QueryResultSet();
    for (int i = 1; i <= columnCount; i++)
    System.out.println("set Fields = "+ rs.getString(i) );
    //recordset.setField(i,rs.getString(i));
    String strValue = rs.getString(i);
    recordset.setField(i,strValue);
    System.out.println("Added recordset" );
    resultSetColl.add(recordset);
    catch (Exception e)
    System.out.println(e.getMessage());
    closeResultSet();
    return resultSetColl;
    Here is my Serializable Class
    import java.io.*;
    import java.sql.*;
    public class QueryResultSet implements Serializable
    private String Field1;
    private String Field2;
    private String Field3;
    private String Field4;
    private String Field5;
    private String Field6;
    private String Field7;
    private String Field8;
    private String Field9;
    private String Field10;
    private String Field11;
    private String Field12;
    private String Field13;
    /** Creates a new instance of QueryResultSet */
    public QueryResultSet()
    init();
    public void init()
    System.out.println("QueryResultSet INIT()");
    Field1 = "";
    Field2 = "";
    Field3 = "";
    Field4 = "";
    Field5 = "";
    Field6 = "";
    Field7 = "";
    Field8 = "";
    Field9 = "";
    Field10 = "";
    Field11 = "";
    Field12 = "";
    Field13 = "";
    public String getField(int nField)
    System.out.println("QueryResultSet getField()");
    System.out.println("getField 1 = " + Field1);
    if (nField ==1)
    return Field1;
    else if (nField == 2)
    return Field2;
    else if (nField == 3)
    return Field3;
    else if (nField == 4)
    return Field4;
    else if (nField == 5)
    return Field5;
    else if (nField == 6)
    return Field6;
    else if (nField == 7)
    return Field7;
    else if (nField == 8)
    return Field8;
    else if (nField == 9)
    return Field9;
    else if (nField == 10)
    return Field10;
    else if (nField == 11)
    return Field11;
    else if (nField == 12)
    return Field12;
    else if (nField == 13)
    return Field13;
    return null;
    public void setField(int nField, String strField)
    System.out.println("QueryResultSet setField()");
    System.out.println("field #" String.valueOf(nField) " = " + strField);
    if (nField == 1)
    Field1 = strField;
    else if (nField == 2)
    Field2 = strField;
    else if (nField == 3)
    Field3 = strField;
    else if (nField == 4)
    Field4 = strField;
    else if (nField == 5)
    Field5 = strField;
    else if (nField == 6)
    Field6 = strField;
    else if (nField == 7)
    Field7 = strField;
    else if (nField == 8)
    Field8 = strField;
    else if (nField == 9)
    Field9 = strField;
    else if (nField == 10)
    Field10 = strField;
    else if (nField == 11)
    Field11 = strField;
    else if (nField == 12)
    Field12 = strField;
    else if (nField == 13)
    Field13 = strField;
    }

    You need to give us some information more. Like what rdbms are you using, what driver and how are you trying to access the resultset from java.
    I do not know what are you using. One thing I can tell you for sure is that the execute method returns a boolean. If you need a resultset you should run executeQuery.
    Kiros

Maybe you are looking for

  • Tracking of due dates in case of letter of credit and bank guarantee

    Hi In case of letter of credit and bank guarantee can a track be kept in sap for bill negotiated and due (means the vendor has claimed payment but payment from us to our bank is not due) , negotiated and due(means our payment is due) and bills negoti

  • TYPING PROBLEM CURSOR GOING BACKWARDS

    Since I have installed Yosemite, I have a cursor problem when typing e-mails (only e-mails). When I type an ' like in the word L'IMAGE, my cursor goes back automatically to the letter just after the ' when I am at the end of the word this means inste

  • Invoice posting in SRM 5.5 version i.e in Classic scenario.

    Hi Gurus, This is classic scenario and version 5.0 . I have done the invoice and see the status as completed in SRM and it was not updated in the SHC history and neither I can see the follow on document in the R/3 I guess Invoice gets posted thru Ido

  • Weird three white lines on landscape

    So, I just got my Lumia 625 back from display servicing yesterday (some defects from the factory). But, after the servicing, I noticed something weird after I tried to use my phone on landscape mode...There are three lines beside the navigation butto

  • Trouble installing Premiere Elements 12

    Have tried reinstalling Premiere Elements 12 but do not understand error code "1"?