Exception on hashtable ..

i have a problems
this is my exception class:
class InvalidWordException extends Exception
     public InvalidWordException()
          super ("Word name error");
     public InvalidWordException(String message)
          super (message);
i created a hashtable to perform this exceptoin and this is a method for exception in my hash table:
     public void addWord(Word word) throws InvalidWordException
          String name = word.getName(); // name extracted for key
          String definition = word.getDefinition();
          if (words.containsKey(name)) // check name not already in use
               throw new InvalidWordException ("this word is already stored in dictionary");
          words.put(name, word); // add word to list with name as key
and in my interface has an error in when i'm added :
dictionary.addWord(newWord);
the error are : unreported exception InvalidWordException; must be cought or declare to be thrown
can you help me for this prob.. please reply asap

You've declared addWord to throw an exception. Now in any method where addWord is used this exception either must be caught,
try {
   dictionary.addWord(newWord);
catch (InvalidWordException e) {
   // do something upon error
}or the method (where addWord is used) must be declared to throw the exception.

Similar Messages

  • Replace Quotes, Connection Pooling, and Sun Web Server with MySQL, Oracle

    This is code I use to insert data into my MySQL and Oracle databases.
    I takes care of quotes and shows use of context, i.e. when you use Sun Web Server's
    ConnectionPooling. This code works. Feel free to reply if you have questions on how to set up connection pooling using Sun Web Server 6.1SP - it took quite a long time to learn and I couldn't find much information throughout the web, so I hope this helps...
    This is not a question and I am not looking for an answer, but please post comments or suggestions.
    dailysun
    This is in one class where I have a hashtable containing the
    column name / value pairs that I want to enter into my table.
    This class simply creates the SQL string from the values in the
    hashtable. It then passes that hashtable including the database
    name to a class which executes that sql statement (second code
    portion).
    /* Insert data into sf_parts. Create the column strings from
             * the provided hash table. Be sure to parse out hash elements which
             * are used for the createTemplate process
            StringBuffer values = new StringBuffer();
            StringBuffer fields = new StringBuffer();
            Enumeration keys = fieldHash.keys();
            while(keys.hasMoreElements()){
                Object currentKey = keys.nextElement();
                    String fieldValue = (String) fieldHash.get(currentKey);
                    if(values.length() >0){
                        values.append(",");
                    values.append("'"+fieldValue.replaceAll("'","''")+"'"); // Takes care of quotes and various other special characters!
                    if(fields.length() >0){
                        fields.append(",");
                    fields.append(currentKey);
            sql = "INSERT INTO myTable (" + fields.toString() + ") VALUES (" + values.toString() + ");";
            String insertResult = caq.getInsertDelete(sql,"myDatabaseName"); // your database name is defined in web.xml and sun-web.xml when you use Sun Web Server's Connection Pooling.
            returnValue += "<br><br><b>Rows inserted into table(myTable): </b>" + insertResult + "<br>\n";
            And, like I describe above, this method executes the sql statement.
         * Takes care of insert, update and delete requests.
         * Must have set both dbName as well as the sql String.
         * Will return number of rows affected as String.
         * @return String Number of rows affected
         * @exception SQLException
         * @exception Exception
        public String getInsertDelete() {
            checkData(); // this simply checks if the variables dbName and sql are not empty ;-)
            InitialContext initContext = null;
            int rv = 0;
            try{
                // Get connection from configured pool
                initContext = new InitialContext();
                source = (DataSource) initContext.lookup("java:comp/env/jdbc/" + dbName); // I have this set up in web.xml and sun-web.xml (I use Sun Web Server 6.1SP which does connection pooling for me)
                conn = source.getConnection();
                if(conn != null){
                    stmt = conn.createStatement();
                    rv = stmt.executeUpdate(sql);
            }catch (SQLException e){
                // do something
            }catch (Exception e){
                // do something
            }finally{
                try{
                    stmt.close();
                }catch(Exception e){
                    // do something
                try{
                    conn.close();
                }catch(Exception e){
                    // do something
                try{
                    initContext.close();
                }catch(Exception e){
                    // do something
            return rv+"";
        }  

    This is code I use to insert data into my MySQL and
    Oracle databases.
    I takes care of quotes and shows use of context, i.e.
    when you use Sun Web Server's
    ConnectionPooling. This code works. Feel free to
    reply if you have questions on how to set up
    connection pooling using Sun Web Server 6.1SP - it
    took quite a long time to learn and I couldn't find
    much information throughout the web, so I hope this
    helps...
    This is not a question and I am not looking for an
    answer, but please post comments or suggestions.Using prepared statements would mean that you wouldn't have to worry about quotes.
    You should be closing the result set.
    You are handling all fields as strings. That won't work with time fields and might not work for numeric fields.
    Presumably most of your variables are member variables. They should be local variables because that is the scope of the usage.
    You must do something with the exceptions.
    Hashtables although convienent mean that problems with usage can only be resolved at run time rather than compile time.

  • How can I fetch all the PCD roles from EP!

    Hello,
    I need to fetch all the available pcd roles in EP. Right now I am trying to fetch pcd roles under Portal Content directory. I need a clarification whether this is the only place the pcd roles are available or is there any other location where rest of the pcd roles are available?
    Thanks in advance,
    Prashanth V Swamy

    Hi Prasanth,
    See the code below to retrieve all the pcd roles.
    public List getPCDContents(IPortalComponentRequest request) throws Exception{
                   try{
                        Hashtable env = new Hashtable();
                        env.put(IPcdContext.SECURITY_PRINCIPAL, request.getUser());
                        env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
                        env.put(com.sap.portal.directory.Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);
                        InitialContext ctx = null;
                        DirContext dirCtx;
                        List roleList = null;
                        ctx = new InitialContext(env);
                        dirCtx = (DirContext) ctx.lookup("pcd:portal_content/");
                        PcdSearchControls pcdSearchControls = new PcdSearchControls();
                        pcdSearchControls.setReturningObjFlag(false);
                        pcdSearchControls.setSearchScope(
                             PcdSearchControls.SUBTREE_WITH_UNIT_ROOTS_SCOPE);
                        dirCtx.addToEnvironment(
                             Constants.APPLY_ASPECT_TO_CONTEXTS,
                             Constants.APPLY_ASPECT_TO_CONTEXTS);
                        NamingEnumeration ne =
                             dirCtx.search("","(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.role)",
                                  pcdSearchControls);
                        iViewList = new ArrayList();
                        while (ne.hasMoreElements()) {
                             IPcdSearchResult searchResult =
                                  (IPcdSearchResult) ne.nextElement();
                             String location = "pcd:portal_content/" + searchResult.getName();
                             //Get the full pcd path of the iview.
                             roleList.add(location);
                        return iViewList;
                   }catch(Exception e ){
                        throw new Exception(e);
    Hope it helps.
    Regards,
    Karthick

  • Error invoking Web Service from Web application in BEA

    I have a web service wich run fine at bea weblogic.
    If i invoke it from webapp in sunappserver no problem , from plain client no problem , from oc4j no problem, but if a invoke from same webapp from weblogic i get this error:
    <b>java.rmi.RemoteException: Failed to invoke; nested exception is:
    javax.xml.rpc.JAXRPCException: web service invoke failed: javax.xml.soap.SOAPException: failed to ser
    ialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping lookup
    failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://ejb.ds
    ic.pucv.cl/types/']:getMatriculaElement}
    at jrockit.reflect.NativeConstructorInvoker.newInstance([Ljava.lang.Object;)Ljava.lang.Object;(Unknown
    Source)
    at java.lang.reflect.Constructor.newInstance([Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
            at weblogic.webservice.core.rpc.StubImpl.throwRemoteException(StubImpl.java:269)
            at weblogic.webservice.core.rpc.StubImpl.invoke(StubImpl.java:254)
            at $Proxy46.getMatricula(Ljava.lang.String;)Ljava.lang.String;(Unknown Source)
            at cl.pucv.dsic.ws.cliente.ClienteWebService.getMatricula(ClienteWebService.java:100)
            at cl.pucv.dsic.consulta.queryBtn_action(consulta.java:667)
            at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.
    Object;(Unknown Source)
            at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown S
    ource)
            at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
            at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
            at javax.faces.component.UICommand.broadcast(UICommand.java:312)
            at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
    Caused by: javax.xml.rpc.JAXRPCException: web service invoke failed: javax.xml.soap.SOAPException:  failed to
    serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping look
    up failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://ejb
    .dsic.pucv.cl/types/']:getMatriculaElement}
    at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:334)
    at weblogic.webservice.core.rpc.StubImpl.invoke(StubImpl.java:250)
    at $Proxy46.getMatricula(Ljava.lang.String;)Ljava.lang.String;(Unknown Source)
    at cl.pucv.dsic.ws.cliente.ClienteWebService.getMatricula(ClienteWebService.java:100)
    at cl.pucv.dsic.consulta.queryBtn_action(consulta.java:667)
    at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.
    Object;(Unknown Source)
    at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown S
    ource)
            at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
            at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
            at javax.faces.component.UICommand.broadcast(UICommand.java:312)
            at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.jav
    a:3212)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
            at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983)
            at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)</b>
    the WSDL for this ws is:
    <b> <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions name="WSMatricula" targetNamespace="http://ejb.dsic.pucv.cl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:s0="http://ejb.dsic.pucv.cl/types/" xmlns:s1="http://ejb.dsic.pucv.cl/" xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/">
    - <types>
    - <xsd:schema elementFormDefault="qualified" targetNamespace="http://ejb.dsic.pucv.cl/types/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns1="http://ejb.dsic.pucv.cl/types/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://ejb.dsic.pucv.cl/types/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <xsd:element name="getMatriculaElement" nillable="true" type="string" />
      <xsd:element name="getMatriculaResponseElement" nillable="true" type="string" />
      </xsd:schema>
      </types>
    - <message name="EJBConsultaWebService_getMatricula">
      <part element="s0:getMatriculaElement" name="parameters" />
      </message>
    - <message name="EJBConsultaWebService_getMatriculaResponse">
      <part element="s0:getMatriculaResponseElement" name="result" />
      </message>
    - <portType name="WSMatricula">
    - <operation name="getMatricula">
      <input message="s1:EJBConsultaWebService_getMatricula" />
      <output message="s1:EJBConsultaWebService_getMatriculaResponse" />
      </operation>
      </portType>
    - <binding name="WSMatriculaSoapHttp" type="s1:WSMatricula">
      <s2:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="getMatricula">
      <s2:operation soapAction="http://ejb.dsic.pucv.cl//getMatricula" />
    - <input>
      <s2:body parts="parameters" use="literal" />
      </input>
    - <output>
      <s2:body parts="result" use="literal" />
      </output>
      </operation>
      </binding>
    - <service name="WSMatricula">
    - <port binding="s1:WSMatriculaSoapHttp" name="WSMatriculaSoapHttpPort">
      <s2:address location="http://ip:port/EJB-WebServicesDSIC/WSMatriculaSoapHttpPort" />
      </port>
      </service>
      </definitions></b>
    and the client is
    <b>
    package cl.pucv.dsic.ws.cliente;
    import com.ac.util.MyDOMParser;
    import java.util.Hashtable;
    import java.util.ArrayList;
    import com.ac.util.Config;
    import java.net.URL;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.JAXRPCException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.ServiceFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import java.io.*;
    public class ClienteWebService implements Serializable  {
    private String UrlString    = "";
    private String nameSpaceUri = "";
    private String serviceName  = "";
    private String portName     = "";
        public ClienteWebService() {
    public String getMatricula(String servicename, String param) throws Exception
    try
    Hashtable ht = (Hashtable)Config.getInstance().getHashtable("WS","Nombre",servicename);
    setUrlString((String)ht.get("EndPoint"));
    setNameSpaceUri((String)ht.get("URI"));
    setServiceName((String)ht.get("ServiceName"));
    setPortName((String)ht.get("PortName"));
    URL wsdlUrl = new URL(getUrlString() + "?WSDL");
    ServiceFactory serviceFactory = ServiceFactory.newInstance();
    Service helloService =
    serviceFactory.createService(wsdlUrl,
    new QName(getNameSpaceUri(), getServiceName()));
    WebServiceDSICIF myProxy =
    (WebServiceDSICIF) helloService.getPort(new QName(getNameSpaceUri(),
    getPortName()),
    WebServiceDSICIF.class);
    return myProxy.getMatricula(param);
    catch (Exception ex)
    ex.printStackTrace();
    return "<ERROR>"+ ex.getMessage()+"</ERROR>";
    public static void main(String[] args) {
    try {
    ClienteWebService clws = new ClienteWebService();
    ArrayList l = new ArrayList();
    String xml = "";
    if (args.length>0)
    xml = clws.getMatricula("WsSQL",args[0]);
    System.out.println("Rut : " + args[0] + " = " + xml);
    else
    DataInputStream input = new DataInputStream( System.in );
    String bufferIn;
    while((bufferIn = input.readLine()) != null){
    xml = clws.getMatricula("WsSQL",bufferIn);
    System.out.print("Rut : " + bufferIn + " = " + xml);
    } catch (Exception ex) {
    ex.printStackTrace();
    public String getUrlString() {
    return UrlString;
    public void setUrlString(String _UrlString) {
    this.UrlString = _UrlString;
    public String getNameSpaceUri() {
    return nameSpaceUri;
    public void setNameSpaceUri(String _nameSpaceUri) {
    this.nameSpaceUri = _nameSpaceUri;
    public String getServiceName() {
    return serviceName;
    public void setServiceName(String _serviceName) {
    this.serviceName = _serviceName;
    public String getPortName() {
    return portName;
    public void setPortName(String _portName) {
    this.portName = _portName;
    }</b>
    and the external config for this service is:
    <b><Webservices>
    <WS>
         <Nombre>WsSQL</Nombre>     
         <EndPoint>http://ip:port/EJB-WebServicesDSIC/WSMatriculaSoapHttpPort</EndPoint>
         <URI>http://ejb.dsic.pucv.cl/</URI>
         <ServiceName>WSMatricula</ServiceName>
              <PortName>WSMatriculaSoapHttpPort</PortName>
    </WS>
    </Webservices></b>
    please helpme, four days in that :S

    Hi,
    Can you provide the pl/sql function or the web service wsdl generated from it, so that we can try to reproduce it.
    Also, in an earlier post, I saw a workaround of changing it so the function returned defined type as :
    type ListCursor is ref cursor return ListRecord
    You can also see if this works out if possible.
    Regards,
    Sunil..

  • Posting XML to XSQL servlet

    Hi
    I use Java to post an XMLDocument to the XSQL servlet
    my java program :
    public void envoie() throws java.lang.Exception {
    try{
    Hashtable params = new Hashtable(1);
    URL pageUrl = new URL("http://k2sun2/xsql/insert_crpersonnes_cr.xsql");
    // Construct a new XSQL Page request
    XSQLRequest req = new XSQLRequest(pageUrl);
    org.w3c.dom.Document converted= (org.w3c.dom.Document)xmldoc;
    req.setPostedDocument(converted);
    req.process(params, new PrintWriter(System.out), new PrintWriter(System.err));
    }catch(Exception e){
    System.out.println(e);
    the program returns this error :
    <?xml version = '1.0'?><xsql-status action="xsql:insert-request" result="No posted document to process"/>
    null

    The http get is a "red herring". I wanted to see what was being fired at the xsql page and I thing the "get" referred to the retrieval of the xsql page. Anyway, here's exactly what I've got:
    Receiving Table:
    create table newsstory
    (id number
    ,title varchar2(2000)
    ,url varchar2(2000)
    ,source varchar2(2000)
    XSQL Page:
    <?xml version="1.0"?>
    <testpage connection="demo" xmlns:xsql="urn:oracle-xsql">
    <xsql:include-param name="param1"/>
    <xsql:include-param name="param2"/>
    <xsql:insert-request table="newsstory"/>
    </testpage>
    Java Program:
    import oracle.xml.xsql.XSQLRequest;
    import java.util.Hashtable;
    import java.io.*;
    import org.w3c.dom.*;
    import oracle.xml.parser.v2.*;
    import java.net.URL;
    import com.db.atg.util.XMLUtil;
    import org.apache.xerces.parsers.DOMParser;
    public class XSQLRequestSample {
    public static void main( String[] args) throws Exception {
    // Construct the URL of the XSQL Page
    URL pageUrl = new URL("http://cbitwebd1.dev.lon.deuba.com:9091/tramp_dev/jmw1.xsql");
    // Construct a new XSQL Page request
    XSQLRequest req = new XSQLRequest(pageUrl);
    // Setup a Hashtable of named parameters to pass to the request
    Hashtable params = new Hashtable(3);
    params.put("param1","value1");
    params.put("param2","value2");
    // Prepare an XML Document to post
    String xmldocstring = "<ROWSET><ROW><ID>55</ID><TITLE>Test Title</TITLE><URL>Test URL</URL><SOURCE>Test Source</SOURCE></ROW></ROWSET>";
    oracle.xml.parser.v2.DOMParser d = new oracle.xml.parser.v2.DOMParser();
    d.parse(new StringReader(xmldocstring));
    Document doc2Post = d.getDocument();
    // Print out the contents of do2Post to check there is something to post.
    System.out.println("value is " + XMLUtil.dom2XmlString(doc2Post));
    req.setPostedDocument(doc2Post);
    // Process the page, passing the parameters and writing the output
    // to standard out.
    req.process(params,new PrintWriter(System.out)
    ,new PrintWriter(System.err));
    Output:
    value is <ROWSET><ROW><ID>55</ID><TITLE>Test Title</TITLE><URL>Test
    URL</URL><SOURCE>Test Source</SOURCE></ROW></ROWSET>
    <?xml version = '1.0'?>
    <testpage>
    <param1/>
    <param2/>
    <xsql-status action="xsql:insert-request" result="No posted document to process"/>
    </testpage>
    null

  • Getting pcd location of iview dynamically

    Hi,
    I need the pcd loaction of a particular iview so that it can be provided as a reference to a link,since on clicking the link from a different iview that particular iview opens.Can you pls. let me know
    1.How to dynamically fetch the PCD location of an iview in a DynPage.
    2. I have created a seperate project for this purpose in NWDS.Do i need to modify the portalapps.xml

    Hi Ranjan,
         Blocks might be confussing for you but let me make it simple. Definately you can make use of IPcdContext Factory to get the PCD location for a particular iview. I am attaching a simple code which will you clear you how to implement and fetch the PCD.
         public List getPCDContents(IPortalComponentRequest request) throws Exception{
              try {
              Hashtable env = new Hashtable();
              env.put(IPcdContext.SECURITY_PRINCIPAL, request.getUser());
              env.put(
              Context.INITIAL_CONTEXT_FACTORY,
              IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
              env.put(Constants.REQUESTED_ASPECT, "com.sap.portal.pcd.gl.PersistencyAspect");
              InitialContext ctx = null;
              DirContext dirCtx;
              List iViewList = null;
              ctx = new InitialContext(env);
              dirCtx = (DirContext) ctx.lookup("pcd:portal_content/");
              PcdSearchControls pcdSearchControls = new PcdSearchControls();
              pcdSearchControls.setReturningObjFlag(false);
              pcdSearchControls.setSearchScope(
              PcdSearchControls.SUBTREE_WITH_UNIT_ROOTS_SCOPE);
              dirCtx.addToEnvironment(
              Constants.APPLY_ASPECT_TO_CONTEXTS,
              Constants.APPLY_ASPECT_TO_CONTEXTS);
              NamingEnumeration ne =
              dirCtx.search(
              "(com.sap.portal.pcd.gl.ObjectClass=com.sapportals.portal.iview)",
              pcdSearchControls);
              iViewList = new ArrayList();
              int i = 0;
              while (ne.hasMoreElements()) {
              i++;
              IPcdSearchResult searchResult =
              (IPcdSearchResult) ne.nextElement();
              String location =
              "pcd:portal_content/" + searchResult.getName();
              iViewList.add(location);
              response.write("Object is "+location);
              return iViewList
              }catch(Exception e )
                 response.write("Exception Occured due to :" +e.toString());
    Good Luck!
    Nikhil

  • Hashtable Exception

    Hi all,
    I'm in a big trouble.I have this exception and i have not found any solution ,yet.Could anybody help me please...
    Thank you...
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at java.util.Hashtable.get(Unknown Source)
    at java.awt.Component.getFontMetrics(Unknown Source)
    at javax.swing.text.WrappedPlainView.updateMetrics(Unknown Source)
    at javax.swing.text.WrappedPlainView.setSize(Unknown Source)
    at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(Unknown Source)
    at javax.swing.plaf.basic.BasicTextUI.modelToView(Unknown Source)
    at javax.swing.text.DefaultCaret.repaintNewCaret(Unknown Source)
    at javax.swing.text.DefaultCaret$1.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

    First of all, thanks for your answers.
    In fact i don't use the hashtable class object, this exception occured when one of my combo box selected.I used try-catch blocks but i cant catch the exception.Despite teh exception,the appliaciton is running correctly.I hope,i'm not wrong about what you explain.
    Thanks...

  • EM console error java.lang.exception no such target ?

    My database oracle 10g EM console getting error message java.lang.exception no such target.
    How to solve this error ?

    Hi,
    I have the same problem, and when looking for the sysman/log files I found the following erros reported:
    [oracle@dbserver log]$ tail emdb.nohup
    10/09/08 12:59:19 ## 1. newPage = /database/instance/sitemap/sitemap
    10/09/08 12:59:19 ## 2. newPage = /database/instance/sitemap/sitemap
    10/09/08 12:59:23 ## oracle.sysman.db.adm.inst.SitemapController: event="doLoad"
    10/09/08 12:59:23 ## 1. newPage = /database/instance/sitemap/health
    10/09/08 12:59:23 ## oracle.sysman.db.adm.inst.SitemapController: event="doLoad"
    10/09/08 12:59:23 ## 1. newPage = /database/instance/sitemap/health
    10/09/08 12:59:23 ## 2. newPage = /database/instance/sitemap/health
    10/09/08 12:59:28 ## oracle.sysman.db.adm.inst.SitemapController: event="doLoad"
    10/09/08 12:59:28 ## 1. newPage = /database/instance/sitemap/sitemap
    10/09/08 12:59:28 ## 2. newPage = /database/instance/sitemap/sitemap
    [oracle@dbserver log]$
    [oracle@dbserver log]$
    [oracle@dbserver log]$ tail emoms.log
    2010-09-08 12:51:31,094 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.tip.oem.central.instance.ProcessConnectInstanceIntg
    2010-09-08 12:51:31,097 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.webdb.admin.em.PortalIntegration
    2010-09-08 12:51:31,099 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.webdb.admin.em.SSOIntegration
    2010-09-08 12:51:31,101 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.reports.em.RepIntg
    2010-09-08 12:51:31,102 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsEmailIntegration
    2010-09-08 12:51:31,135 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsOidIntegration
    2010-09-08 12:51:31,137 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsOvfIntegration
    2010-09-08 12:51:31,139 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsWebconfIntegration
    2010-09-08 12:51:31,141 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsWirelessIntg
    2010-09-08 12:51:31,143 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsCalGrpIntegration
    [oracle@dbserver log]$
    [oracle@dbserver log]$
    [oracle@dbserver log]$ tail emoms.trc
    2010-09-08 12:51:31,094 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.tip.oem.central.instance.ProcessConnectInstanceIntg
    2010-09-08 12:51:31,097 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.webdb.admin.em.PortalIntegration
    2010-09-08 12:51:31,099 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.webdb.admin.em.SSOIntegration
    2010-09-08 12:51:31,101 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.reports.em.RepIntg
    2010-09-08 12:51:31,102 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsEmailIntegration
    2010-09-08 12:51:31,135 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsOidIntegration
    2010-09-08 12:51:31,137 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsOvfIntegration
    2010-09-08 12:51:31,139 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsWebconfIntegration
    2010-09-08 12:51:31,141 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsWirelessIntg
    2010-09-08 12:51:31,143 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsCalGrpIntegration
    [oracle@dbserver log]$
    [oracle@dbserver log]$
    [oracle@dbserver log]$
    [oracle@dbserver log]$ tail emagent.trc
    2010-09-08 12:49:32 Thread-47082384 ERROR pingManager: nmepm_pingReposURL: Error in request response. code = 400. text =
    2010-09-08 12:49:35 Thread-126417808 ERROR : (nmedmtm.c,626):Memory 0x0 encountered, expect struct_id=10502
    2010-09-08 12:49:35 Thread-126417808 ERROR emSDK.xml: ParseError: File=file:/oracle/product/102/db_1/SERVER_ORACLE_SID/sysman/emd/collection/oracle_database_ORACLE_SID.xml, Line=2, Msg=<CollectionItem> Target NAME=ORACLE_SID does not exist
    2010-09-08 12:49:35 Thread-126417808 WARN collector: putTgtColl aborted - null type or name
    2010-09-08 12:49:35 Thread-126417808 ERROR recvlets: Failed to remove target ORACLE_SID oracle_database (key BA9A34B2AFFFC3FA92AB311F36350213) from hashtable for recvlet tnmevr
    2010-09-08 12:49:35 Thread-126417808 ERROR recvlets: Failed to remove target ORACLE_SID oracle_database (key BA9A34B2AFFFC3FA92AB311F36350213) from hashtable for recvlet AQMetrics
    2010-09-08 12:49:35 Thread-126417808 WARN upload: Upload manager has no Failure script: disabled
    2010-09-08 12:49:35 Thread-40782736 ERROR upload: Error in uploadXMLFiles. Trying again in 123.00 seconds.
    2010-09-08 12:50:32 Thread-40782736 ERROR pingManager: nmepm_pingReposURL: Error in request response. code = 400. text =
    2010-09-08 12:51:02 Thread-40782736 ERROR pingManager: nmepm_pingReposURL: Error in request response. code = 400. text =
    [oracle@dbserver log]$
    [oracle@dbserver log]$
    [oracle@dbserver log]$
    [oracle@dbserver log]$ tail emagent.log
    2010-09-08 11:35:15 Thread-58100624 target {ORACLE_SID, oracle_database} is broken: cannot compute dynamic properties in time. (00155)
    2010-09-08 11:35:15 Thread-58100624 ParseError: File=file:/oracle/product/102/db_1/SERVER_ORACLE_SID/sysman/emd/collection/oracle_database_ORACLE_SID.xml, Line=2, Msg=<CollectionItem> Target NAME=ORACLE_SID does not exist (01006)
    2010-09-08 11:37:57 Thread-46816144 ParseError: File=file:/oracle/product/102/db_1/SERVER_ORACLE_SID/sysman/emd/collection/oracle_database_ORACLE_SID.xml, Line=2, Msg=<CollectionItem> Target NAME=ORACLE_SID does not exist (01006)
    2010-09-08 12:43:52 Thread-3336784 EMAgent normal shutdown (00703)
    2010-09-08 12:45:32 Thread-8911408 Starting Agent 10.1.0.6.0 from /oracle/product/102/db_1 (00701)
    2010-09-08 12:47:02 Thread-8911408 target {ORACLE_SID, oracle_database} is broken: cannot compute dynamic properties in time. (00155)
    2010-09-08 12:47:02 Thread-8911408 ParseError: File=file:/oracle/product/102/db_1/SERVER_ORACLE_SID/sysman/emd/collection/oracle_database_ORACLE_SID.xml, Line=2, Msg=<CollectionItem> Target NAME=ORACLE_SID does not exist (01006)
    2010-09-08 12:47:02 Thread-8911408 fatal error parsing /oracle/product/102/db_1/SERVER_ORACLE_SID/sysman/emd/collection/oracle_database_ORACLE_SID.xml, will be ignored (00405)
    2010-09-08 12:47:02 Thread-8911408 EMAgent started successfully (00702)
    2010-09-08 12:49:35 Thread-126417808 ParseError: File=file:/oracle/product/102/db_1/SERVER_ORACLE_SID/sysman/emd/collection/oracle_database_ORACLE_SID.xml, Line=2, Msg=<CollectionItem> Target NAME=ORACLE_SID does not exist (01006)
    And when looking for this error on ML : "target {ORACLE_SID, oracle_database} is broken: cannot compute dynamic properties in time. (00155)"
    I found this document: "Target {database instance, oracle_database} is broken: cannot compute dynamic properties in time [ID 739993.1]"
    Which said:
    1. Stop the dbconsole
    ./emctl stop dbconsole
    2. Have a back up of the emd.properties file which is in <ORACLE_HOME>/Hostname_SID/sysman/config
    Increase the value of
    dynamicPropsComputeTimeout=60
    to
    dynamicPropsComputeTimeout=120
    3. Start the dbconsole
    ./emctl start dbconsole
    I follow the instructions and the problem was solved.
    post results
    Regards

  • EM Error : java.lang.Exception: No Such Target

    Hi All
    I have 10 databses in the server and getting this error only for the one database " java.lang.Exception: No Such Target "
    When i stop dbconsole and start it again then the problem will solve but the within a day or two again the same message is appearing.
    What would be the best solution for this?

    Hi,
    I have the same problem, and when looking for the sysman/log files I found the following erros reported:
    [oracle@dbserver log]$ tail emdb.nohup
    10/09/08 12:59:19 ## 1. newPage = /database/instance/sitemap/sitemap
    10/09/08 12:59:19 ## 2. newPage = /database/instance/sitemap/sitemap
    10/09/08 12:59:23 ## oracle.sysman.db.adm.inst.SitemapController: event="doLoad"
    10/09/08 12:59:23 ## 1. newPage = /database/instance/sitemap/health
    10/09/08 12:59:23 ## oracle.sysman.db.adm.inst.SitemapController: event="doLoad"
    10/09/08 12:59:23 ## 1. newPage = /database/instance/sitemap/health
    10/09/08 12:59:23 ## 2. newPage = /database/instance/sitemap/health
    10/09/08 12:59:28 ## oracle.sysman.db.adm.inst.SitemapController: event="doLoad"
    10/09/08 12:59:28 ## 1. newPage = /database/instance/sitemap/sitemap
    10/09/08 12:59:28 ## 2. newPage = /database/instance/sitemap/sitemap
    [oracle@dbserver log]$
    [oracle@dbserver log]$
    [oracle@dbserver log]$ tail emoms.log
    2010-09-08 12:51:31,094 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.tip.oem.central.instance.ProcessConnectInstanceIntg
    2010-09-08 12:51:31,097 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.webdb.admin.em.PortalIntegration
    2010-09-08 12:51:31,099 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.webdb.admin.em.SSOIntegration
    2010-09-08 12:51:31,101 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.reports.em.RepIntg
    2010-09-08 12:51:31,102 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsEmailIntegration
    2010-09-08 12:51:31,135 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsOidIntegration
    2010-09-08 12:51:31,137 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsOvfIntegration
    2010-09-08 12:51:31,139 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsWebconfIntegration
    2010-09-08 12:51:31,141 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsWirelessIntg
    2010-09-08 12:51:31,143 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsCalGrpIntegration
    [oracle@dbserver log]$
    [oracle@dbserver log]$
    [oracle@dbserver log]$ tail emoms.trc
    2010-09-08 12:51:31,094 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.tip.oem.central.instance.ProcessConnectInstanceIntg
    2010-09-08 12:51:31,097 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.webdb.admin.em.PortalIntegration
    2010-09-08 12:51:31,099 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.webdb.admin.em.SSOIntegration
    2010-09-08 12:51:31,101 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.reports.em.RepIntg
    2010-09-08 12:51:31,102 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsEmailIntegration
    2010-09-08 12:51:31,135 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsOidIntegration
    2010-09-08 12:51:31,137 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsOvfIntegration
    2010-09-08 12:51:31,139 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsWebconfIntegration
    2010-09-08 12:51:31,141 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsWirelessIntg
    2010-09-08 12:51:31,143 [Orion Launcher] ERROR app.ContextInitializer contextInitialized.272 - Integration Class not found: oracle.sysman.ocs.mntr.target.OcsCalGrpIntegration
    [oracle@dbserver log]$
    [oracle@dbserver log]$
    [oracle@dbserver log]$
    [oracle@dbserver log]$ tail emagent.trc
    2010-09-08 12:49:32 Thread-47082384 ERROR pingManager: nmepm_pingReposURL: Error in request response. code = 400. text =
    2010-09-08 12:49:35 Thread-126417808 ERROR : (nmedmtm.c,626):Memory 0x0 encountered, expect struct_id=10502
    2010-09-08 12:49:35 Thread-126417808 ERROR emSDK.xml: ParseError: File=file:/oracle/product/102/db_1/SERVER_ORACLE_SID/sysman/emd/collection/oracle_database_ORACLE_SID.xml, Line=2, Msg=<CollectionItem> Target NAME=ORACLE_SID does not exist
    2010-09-08 12:49:35 Thread-126417808 WARN collector: putTgtColl aborted - null type or name
    2010-09-08 12:49:35 Thread-126417808 ERROR recvlets: Failed to remove target ORACLE_SID oracle_database (key BA9A34B2AFFFC3FA92AB311F36350213) from hashtable for recvlet tnmevr
    2010-09-08 12:49:35 Thread-126417808 ERROR recvlets: Failed to remove target ORACLE_SID oracle_database (key BA9A34B2AFFFC3FA92AB311F36350213) from hashtable for recvlet AQMetrics
    2010-09-08 12:49:35 Thread-126417808 WARN upload: Upload manager has no Failure script: disabled
    2010-09-08 12:49:35 Thread-40782736 ERROR upload: Error in uploadXMLFiles. Trying again in 123.00 seconds.
    2010-09-08 12:50:32 Thread-40782736 ERROR pingManager: nmepm_pingReposURL: Error in request response. code = 400. text =
    2010-09-08 12:51:02 Thread-40782736 ERROR pingManager: nmepm_pingReposURL: Error in request response. code = 400. text =
    [oracle@dbserver log]$
    [oracle@dbserver log]$
    [oracle@dbserver log]$
    [oracle@dbserver log]$ tail emagent.log
    2010-09-08 11:35:15 Thread-58100624 target {ORACLE_SID, oracle_database} is broken: cannot compute dynamic properties in time. (00155)
    2010-09-08 11:35:15 Thread-58100624 ParseError: File=file:/oracle/product/102/db_1/SERVER_ORACLE_SID/sysman/emd/collection/oracle_database_ORACLE_SID.xml, Line=2, Msg=<CollectionItem> Target NAME=ORACLE_SID does not exist (01006)
    2010-09-08 11:37:57 Thread-46816144 ParseError: File=file:/oracle/product/102/db_1/SERVER_ORACLE_SID/sysman/emd/collection/oracle_database_ORACLE_SID.xml, Line=2, Msg=<CollectionItem> Target NAME=ORACLE_SID does not exist (01006)
    2010-09-08 12:43:52 Thread-3336784 EMAgent normal shutdown (00703)
    2010-09-08 12:45:32 Thread-8911408 Starting Agent 10.1.0.6.0 from /oracle/product/102/db_1 (00701)
    2010-09-08 12:47:02 Thread-8911408 target {ORACLE_SID, oracle_database} is broken: cannot compute dynamic properties in time. (00155)
    2010-09-08 12:47:02 Thread-8911408 ParseError: File=file:/oracle/product/102/db_1/SERVER_ORACLE_SID/sysman/emd/collection/oracle_database_ORACLE_SID.xml, Line=2, Msg=<CollectionItem> Target NAME=ORACLE_SID does not exist (01006)
    2010-09-08 12:47:02 Thread-8911408 fatal error parsing /oracle/product/102/db_1/SERVER_ORACLE_SID/sysman/emd/collection/oracle_database_ORACLE_SID.xml, will be ignored (00405)
    2010-09-08 12:47:02 Thread-8911408 EMAgent started successfully (00702)
    2010-09-08 12:49:35 Thread-126417808 ParseError: File=file:/oracle/product/102/db_1/SERVER_ORACLE_SID/sysman/emd/collection/oracle_database_ORACLE_SID.xml, Line=2, Msg=<CollectionItem> Target NAME=ORACLE_SID does not exist (01006)
    And when looking for this error on ML : "target {ORACLE_SID, oracle_database} is broken: cannot compute dynamic properties in time. (00155)"
    I found this document: "Target {database instance, oracle_database} is broken: cannot compute dynamic properties in time [ID 739993.1]"
    Which said:
    1. Stop the dbconsole
    ./emctl stop dbconsole
    2. Have a back up of the emd.properties file which is in <ORACLE_HOME>/Hostname_SID/sysman/config
    Increase the value of
    dynamicPropsComputeTimeout=60
    to
    dynamicPropsComputeTimeout=120
    3. Start the dbconsole
    ./emctl start dbconsole
    I follow the instructions and the problem was solved.
    post results
    Regards

  • Float value giving exception.

    Hi,
    I am using a bean for a shopping cart. I used this code
    public float getCost()
              Enumeration enum=hashtable.elements();
              String[] tmpItem;
              float totalCost=0.00f;
              while(enum.hasMoreElements())
                   tmpItem=(String[])enum.nextElement();
                   //totalCost += (Integer.parseInt(tmpItem[3]) * Float.parseFloat(tmpItem[2]));
                   totalCost += (Integer.parseInt(tmpItem[3]) * Float.parseFloat(tmpItem[2]));
              return totalCost;
    which is giving me this exception.
    reported this exception: java.lang.Float: method parseFloat(Ljava/lang/String;)F not found. Please report this to the
    administrator of the web server.
    java.lang.NoSuchMethodError: java.lang.Float: method parseFloat(Ljava/lang/String;)F not found at
    ShopBean.getCost(Compiled Code) at Checkout.doGet(Checkout.java:20) at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:715) at
    javax.servlet.http.HttpServlet.service(Compiled Code) at
    com.sun.server.ServletState.callService(Compiled Code) at
    com.sun.server.ServletManager.callServletService(Compiled Code) at
    com.sun.server.http.servlet.InvokerServlet.service(Compiled Code) at
    javax.servlet.http.HttpServlet.service(Compiled Code) at
    com.sun.server.ServletState.callService(Compiled Code) at
    com.sun.server.ServletManager.callServletService(Compiled Code) at
    com.sun.server.ProcessingState.invokeTargetServlet(Compiled Code) at
    com.sun.server.http.HttpProcessingState.execute(Compiled Code) at
    com.sun.server.http.stages.Runner.process(Compiled Code) at
    com.sun.server.ProcessingSupport.process(Compiled Code) at com.sun.server.Service.process(Compiled
    Code) at com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code) at
    com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code) at
    com.sun.server.HandlerThread.run(Compiled Code)
    Can any one correct me please?
    Thanks
    Uma

    Hi
    Here is the code which will be calling the bean
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    public class Checkout extends HttpServlet
         String itemsvalues,itemno;
         String[] tmpItem;
         public void doGet(HttpServletRequest req,HttpServletResponse res)
              try
                   ServletOutputStream sos = res.getOutputStream();
                   ShopBean cart =(ShopBean)req.getSession().getValue("cart");
                   int totalItems = cart.getNumOfItems();
                   System.out.println("totalItems="+totalItems);
                   sos.println("<h4>In Checkout.java</h4>");
                   float totalCost = cart.getCost();
                   sos.println("<h5>Total cost is:"+totalCost+"</h5>");
              catch(Exception e)
                   e.printStackTrace();
    This class is giving me exceptions
    Thanks
    Uma

  • Getting the value from a hashtable

    Hi all,
    Can I get the value from a Hashtable by passing vector.toString() , in the get method?
    I am storing the key value pair using the key as vector.toString() as the key and a string value. When i am using the get method by passing vector.toString() I am getting an exception
    found : Object
    required : String.
    Thanks and regards
    Tanmoy

    Exception? "found: X required: Y" sounds more like a compiler error to me.
    You need to post the lines of code that cause the error so we can see what's going on.

  • NO_PERMISSION Exception when calling secured EJB-methods

    In WL6.1, I have an Ejb with secured methods. The (Swing) client application accesses the Ejb through rmi-iiop using the JDK1.3.1 Orb.
    Unfortunately, it seems that the caller identity (which was supplied in the InitialContext lookup) is not propagated
    to the server: any call to a secured method
    fails with a CORBA NO_PERMISSION Exception.
    Non secured methods work fine.
    Using the t3 protocol the program also works fine, but that would require
    the 25Mb weblogic.jar on all clients,
    which is unattainable for us.
    Any ideas how this situation can be corrected?
    -Allard Siemelink

    I am still getting the NO_PERMISSION Exception when using "weblogic.jndi.WLInitialContextFactory".
    We use Sun's JRE, version 1.3.1_01.
    Am I forgetting something?
    My code is as follows:
    InitialContext context = null;
    try {
    Hashtable ht = new Hashtable();
    ht.put(InitialContext.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    ht.put(InitialContext.PROVIDER_URL, "iiop://localhost:80");
    ht.put(InitialContext.SECURITY_PRINCIPAL, "system");
    ht.put(InitialContext.SECURITY_CREDENTIALS, "system_password");
    context = new InitialContext(ht);
    Object objHome = context.lookup(EJB_NAME);
    MyHome myHome = (MyHome)PortableRemoteObject.narrow(objHome, MyHome.class);
    MyRemote myRemote = myHome.create();
    //NEXT LINE Crashes when method is secured:
    myRemote.securedMethod();
    finally {
    if (context!=null) context.close();
    Andy Piper <[email protected]> wrote:
    Allard Siemelink <[email protected]> writes:
    In WL6.1, I have an Ejb with secured methods. The (Swing) client applicationaccesses the Ejb through rmi-iiop using the JDK1.3.1 Orb.
    Unfortunately, it seems that the caller identity (which was suppliedin the InitialContext lookup) is not propagated
    to the server: any call to a secured method
    fails with a CORBA NO_PERMISSION Exception.Make sure you are using WLInitialContextFactory and not
    CNCtxFactory. Only the former will give you security.
    andy

  • Null pointer exception while running a page

    Hi all,when i am trying to run the employee create page(custom) i am getting the below exception as soon as i run the main page.
    Exception Details. 
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
         at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at _OA._jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    java.lang.NullPointerException
         at java.util.Hashtable.containsKey(Hashtable.java:314)
         at oracle.apps.fnd.framework.webui.OALovManager.getLovRelations(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.getLovRelations(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAMessageLovInputHelper.setAutoClear(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAMessageLovInputHelper.processRequestAfterController(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAMessageLovInputHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.message.OAMessageLovInputBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAMessageComponentLayoutBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHideShowHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAHideShowHeaderHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHideShowHeaderBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at _OA._jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    java.lang.NullPointerException
         at java.util.Hashtable.containsKey(Hashtable.java:314)
         at oracle.apps.fnd.framework.webui.OALovManager.getLovRelations(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.getLovRelations(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAMessageLovInputHelper.setAutoClear(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAMessageLovInputHelper.processRequestAfterController(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAMessageLovInputHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.message.OAMessageLovInputBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAMessageComponentLayoutBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHideShowHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAHideShowHeaderHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHideShowHeaderBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at _OA._jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)How to solve the above error..
    Any help is appreciated.
    Thanks in advance!!

    Check the View Object associated with the LOV item you have on the page.
    Looks like, it is not able to find that.
    Thanks
    Saurabh

  • Invocation Target Exception while Migrating application to weblogic 10.3

    Hi All,
    We are currently migrating our application from weblogic 8.1 to weblogic 10.3.
    The deployment in wls 10.3 is successful, but while performing some operations(User Registration.. etc)
    we are getting SQLIntegrityConstraintViolationException.
    =================================================================================================
    2010-10-27 17:03:50,968 DEBUG com.sns.ana.services.ConnPoolService - Param 0: java.util.Hashtable
    2010-10-27 17:03:50,968 DEBUG com.sns.ana.services.ConnPoolService - Param 1: java.lang.String
    2010-10-27 17:03:50,968 DEBUG com.sns.ana.services.ConnPoolService - Param 2: weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection
    2010-10-27 17:03:50,968 DEBUG com.sns.ana.dbsource.AuthorisationDBSource - [addRolesToDB] rows: 0, sql: delete from tana_role where userid = 'odcwls104'
    2010-10-27 17:03:51,030 ERROR com.sns.ana.services.ConnPoolService - [getRestrictedService] InvocationTargetException:
    java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (ESIUSER.FK_TANAROLE_UID) violated - parent key not found
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:85)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:947)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3462)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1349)
         at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:159)
         at com.sns.ana.dbsource.AuthorisationDBSource.addRolesToDB(AuthorisationDBSource.java:684)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sns.ana.services.ConnPoolService.getRestrictedDataService(ConnPoolService.java:39)
         at com.sns.ana.services.DataServiceProvider.getRestrictedDataService(DataServiceProvider.java:45)
         at com.sns.ana.user.SNSUser.updateRoles(SNSUser.java:303)
         at com.sns.ana.utils.RoleUtility.processNewRequest(RoleUtility.java:114)
         at com.sns.ana.ui.servlet.ManageUserServlet.doPost(ManageUserServlet.java:395)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at com.sns.ana.ui.servlet.AuthorisationBaseServlet.service(AuthorisationBaseServlet.java:86)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:502)
         at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:432)
         at com.sns.ana.ui.servlet.ANAADMMainServlet.doPost(ANAADMMainServlet.java:741)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at com.sns.ana.ui.servlet.AuthorisationBaseServlet.service(AuthorisationBaseServlet.java:86)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    =================================================================================================
    Upon weblogic server shut down below NameNotFoundException is thrown.
    =================================================================================================
    BaseException: ClassName=null,MethodName=null,MajorCode=-1,MajorMsg=Message Not Available,MinorCode=null,ExceptionObjMsg=[DBConnection][getConnec
    tion]Unable to init database connection due to unresolved DataSource Name com.fortressit.ejb.PortableContextException: javax.naming.NameNotFoundE
    xception: While trying to look up comp/env/jdbc/ap2esiDSLocal in /app/webapp/webadminesi/26700672. [Root exception is java.rmi.ConnectIOException
    : Server is being shut down]; remaining name 'comp/env/jdbc/ap2esiDSLocal'
    While trying to look up comp/env/jdbc/ap2esiDSLocal in /app/webapp/webadminesi/26700672.
    at com.sns.base.util.DBConnection.getConnection(Unknown Source)
    at com.sns.ana.services.ConnPoolService.getParamsWithDBConnection(ConnPoolService.java:93)
    at com.sns.ana.services.ConnPoolService.getRestrictedDataService(ConnPoolService.java:35)
    at com.sns.ana.services.DataServiceProvider.getRestrictedDataService(DataServiceProvider.java:45)
    at com.sns.ana.ui.servlet.listener.CleanupAppSessionListener.sessionDestroyed(CleanupAppSessionListener.java:43)
    at weblogic.servlet.internal.EventsManager.notifySessionLifetimeEvent(EventsManager.java:265)
    at weblogic.servlet.internal.session.SessionData.remove(SessionData.java:873)
    at weblogic.servlet.internal.session.MemorySessionContext.invalidateSession(MemorySessionContext.java:69)
    at weblogic.servlet.internal.session.MemorySessionContext$SessionCleanupAction.run(MemorySessionContext.java:114)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.session.MemorySessionContext.destroy(MemorySessionContext.java:90)
    at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:3062)
    at weblogic.servlet.internal.ServletContextManager.destroyContext(ServletContextManager.java:240)
    at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:457)
    at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:1398)
    at weblogic.servlet.internal.WebAppModule.deactivate(WebAppModule.java:492)
    at weblogic.application.internal.flow.ModuleStateDriver$2.previous(ModuleStateDriver.java:188)
    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:148)
    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:138)
    at weblogic.application.internal.flow.ModuleStateDriver.deactivate(ModuleStateDriver.java:71)
    at weblogic.application.internal.flow.ScopedModuleDriver.deactivate(ScopedModuleDriver.java:206)
    at weblogic.application.internal.flow.ModuleListenerInvoker.deactivate(ModuleListenerInvoker.java:124)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$2.previous(DeploymentCallbackFlow.java:417)
    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:148)
    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:138)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:91)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:83)
    at weblogic.application.internal.BaseDeployment$2.previous(BaseDeployment.java:641)
    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:148)
    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:138)
    at weblogic.application.internal.BaseDeployment.deactivate(BaseDeployment.java:234)
    at weblogic.application.internal.EarDeployment.deactivate(EarDeployment.java:16)
    at weblogic.application.internal.DeploymentStateChecker.deactivate(DeploymentStateChecker.java:199)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.deactivate(AppContainerInvoker.java:98)
    at weblogic.deploy.internal.targetserver.BasicDeployment.deactivate(BasicDeployment.java:263)
    at weblogic.deploy.internal.targetserver.BasicDeployment.deactivateFromServerLifecycle(BasicDeployment.java:458)
    at weblogic.management.deploy.internal.DeploymentAdapter$1.doDeactivate(DeploymentAdapter.java:73)
    at weblogic.management.deploy.internal.DeploymentAdapter.deactivate(DeploymentAdapter.java:211)
    at weblogic.management.deploy.internal.AppTransition$6.transitionApp(AppTransition.java:66)
    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
    at weblogic.management.deploy.internal.ConfiguredDeployments.deactivate(ConfiguredDeployments.java:198)
    at weblogic.management.deploy.internal.ConfiguredDeployments.undeploy(ConfiguredDeployments.java:191)
    at weblogic.management.deploy.internal.DeploymentServerService.shutdownApps(DeploymentServerService.java:188)
    at weblogic.management.deploy.internal.DeploymentServerService.shutdownHelper(DeploymentServerService.java:120)
    at weblogic.application.ApplicationShutdownService.halt(ApplicationShutdownService.java:142)
    at weblogic.t3.srvr.ServerServicesManager.haltInternal(ServerServicesManager.java:502)
    at weblogic.t3.srvr.ServerServicesManager.halt(ServerServicesManager.java:334)
    at weblogic.t3.srvr.T3Srvr.shutdown(T3Srvr.java:948)
    at weblogic.t3.srvr.T3Srvr.forceShutdown(T3Srvr.java:854)
    at weblogic.t3.srvr.T3Srvr$2.run(T3Srvr.java:867)
    ##### proxy instance has been created !!!
    =================================================================================================
    From the above exceptions i can infer that, the database connection failed due to unresolved datasource name.
    However we have configured all the Datasources, application seems to be having problem in wls 10.3.
    Waiting in anticipation for replies.
    Regards
    Avinash

    Hi Avinash,
    It seems that the application is not able to get the DataSource JNDI name which you have given that the reason you are getting the NameNotFoundException exception.
    Try to give the same JNDI name in the datasource which your application is trying to lookup, once you have created the datasource make sure you test the connection using Test Connection option by which you can be sure that if the test connection can get a connection from the DB everything is fine also check the JNDI tree if you can see the datasource JNDI name in there.
    Hope this helps you.
    Regards,
    Ravish Mody

  • OIM Installation over Weblogic application server - Login Exception

    Hello there,
    I installed OIM 9.1.0.1 on Weblogic 10.3 with DB 10.2.0.1. I am not able to login into the Administrator web console. And I am getting this following error as stated by the logs below with DEBUG level. I have used sun jdk provided in the weblogic installation itself and in Production mode - Non clustured, non SSO.
    ERROR,14 Jun 2009 23:30:02,906,[XELLERATE.SERVER],Class/Method: QuartzWrapper/ex
    ecute encounter some problems: javax.security.auth.login.LoginException: javax.s
    ecurity.auth.login.LoginException: java.lang.SecurityException: [Security:090304
    ]Authentication Failed: User xelsysadm javax.security.auth.login.FailedLoginExce
    ption: [Security:090302]Authentication Failed: User xelsysadm denied
    Thor.API.Exceptions.tcAPIException: javax.security.auth.login.LoginException: ja
    vax.security.auth.login.LoginException: java.lang.SecurityException: [Security:0
    90304]Authentication Failed: User xelsysadm javax.security.auth.login.FailedLogi
    nException: [Security:090302]Authentication Failed: User xelsysadm denied
    at Thor.API.tcUtilityFactory.<init>(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown S
    ource)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
    ava:477)
    DEBUG,14 Jun 2009 23:30:02,953,[XELLERATE.SCHEDULER],Loading Scheduled task clas
    s com.thortech.xl.scheduler.core.quartz.QuartzWrapperusing ADP classloader
    DEBUG,14 Jun 2009 23:30:02,953,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoad
    er/getClassLoader entered.
    DEBUG,14 Jun 2009 23:30:02,953,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoad
    er/getClassLoader left.
    DEBUG,14 Jun 2009 23:30:02,968,[XELLERATE.SCHEDULER],Loading Scheduled task clas
    s com.thortech.xl.scheduler.core.quartz.QuartzWrapperusing ADP classloader
    DEBUG,14 Jun 2009 23:30:02,968,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoad
    er/getClassLoader entered.
    DEBUG,14 Jun 2009 23:30:02,968,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoad
    er/getClassLoader left.
    DEBUG,14 Jun 2009 23:30:02,968,[XELLERATE.SERVER],Class/Method: QuartzWrapper/ex
    ecute entered.
    INFO,14 Jun 2009 23:30:02,968,[XELLERATE.SERVER],Quartz Executing Scheduled tas
    k : Scheduled Provisioning Task
    DEBUG,14 Jun 2009 23:30:03,015,[XELLERATE.SCHEDULER],Class/Method: SchedulerUtil
    /eventPreInsert entered.
    DEBUG,14 Jun 2009 23:30:03,015,[XELLERATE.SCHEDULER],Class/Method: SchedulerUtil
    /getSchedulerInstanc left.
    ERROR,14 Jun 2009 23:30:03,015,[XELLERATE.ACCOUNTMANAGEMENT],Class/Method: tcUti
    lityFactory/tcUtilityFactory(Hashtable env, tcSignatureMessage poUserIDMessage)
    encounter some problems: javax.security.auth.login.LoginException: java.lang.Sec
    urityException: [Security:090304]Authentication Failed: User xelsysadm javax.sec
    urity.auth.login.FailedLoginException: [Security:090302]Authentication Failed: U
    ser xelsysadm denied
    javax.security.auth.login.LoginException: javax.security.auth.login.LoginExcepti
    on: java.lang.SecurityException: [Security:090304]Authentication Failed: User xe
    lsysadm javax.security.auth.login.FailedLoginException: [Security:090302]Authent
    ication Failed: User xelsysadm denied
    at weblogic.security.auth.login.UsernamePasswordLoginModule.login(Userna
    mePasswordLoginModule.java:199)
    at sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
    at javax.security.auth.login.LoginContext.access$000(LoginContext.java:1
    86)
    at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:6
    80)
    at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
    at Thor.API.Security.LoginHandler.weblogicLoginHandler.login(Unknown Sou
    rce)
    at Thor.API.tcUtilityFactory.<init>(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown S
    ource)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
    ava:477)
    ERROR,14 Jun 2009 23:30:03,015,[XELLERATE.SERVER],Class/Method: QuartzWrapper/ex
    ecute encounter some problems: javax.security.auth.login.LoginException: javax.s
    ecurity.auth.login.LoginException: java.lang.SecurityException: [Security:090304
    ]Authentication Failed: User xelsysadm javax.security.auth.login.FailedLoginExce
    ption: [Security:090302]Authentication Failed: User xelsysadm denied
    Thor.API.Exceptions.tcAPIException: javax.security.auth.login.LoginException: ja
    vax.security.auth.login.LoginException: java.lang.SecurityException: [Security:0
    90304]Authentication Failed: User xelsysadm javax.security.auth.login.FailedLogi
    nException: [Security:090302]Authentication Failed: User xelsysadm denied
    at Thor.API.tcUtilityFactory.<init>(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown S
    ource)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
    ava:477)
    DEBUG,14 Jun 2009 23:30:03,125,[XELLERATE.SCHEDULER],Loading Scheduled task clas
    s com.thortech.xl.scheduler.core.quartz.QuartzWrapperusing ADP classloader
    DEBUG,14 Jun 2009 23:30:03,140,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoad
    er/getClassLoader entered.
    DEBUG,14 Jun 2009 23:30:03,140,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoad
    er/getClassLoader left.
    DEBUG,14 Jun 2009 23:30:03,140,[XELLERATE.SCHEDULER],Loading Scheduled task clas
    s com.thortech.xl.scheduler.core.quartz.QuartzWrapperusing ADP classloader
    DEBUG,14 Jun 2009 23:30:03,140,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoad
    er/getClassLoader entered.
    DEBUG,14 Jun 2009 23:30:03,140,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoad
    er/getClassLoader left.
    DEBUG,14 Jun 2009 23:30:03,156,[XELLERATE.SERVER],Class/Method: QuartzWrapper/ex
    ecute entered.
    INFO,14 Jun 2009 23:30:03,156,[XELLERATE.SERVER],Quartz Executing Scheduled tas
    k : Issue Audit Messages Task
    DEBUG,14 Jun 2009 23:30:03,156,[XELLERATE.SCHEDULER],Class/Method: SchedulerUtil
    /eventPreInsert entered.
    DEBUG,14 Jun 2009 23:30:03,156,[XELLERATE.SCHEDULER],Class/Method: SchedulerUtil
    /getSchedulerInstanc left.
    ERROR,14 Jun 2009 23:30:03,156,[XELLERATE.ACCOUNTMANAGEMENT],Class/Method: tcUti
    lityFactory/tcUtilityFactory(Hashtable env, tcSignatureMessage poUserIDMessage)
    encounter some problems: javax.security.auth.login.LoginException: java.lang.Sec
    urityException: [Security:090304]Authentication Failed: User xelsysadm javax.sec
    urity.auth.login.FailedLoginException: [Security:090302]Authentication Failed: U
    ser xelsysadm denied
    javax.security.auth.login.LoginException: javax.security.auth.login.LoginExcepti
    on: java.lang.SecurityException: [Security:090304]Authentication Failed: User xe
    lsysadm javax.security.auth.login.FailedLoginException: [Security:090302]Authent
    Does anybody have any clues ?
    Thanks in advance.

    I faced similar issue sometime back with Weblogic.
    Here's how I resolved that -
    Using weblogic admin console verify that OIMAuthenticator is present in weblogic Authentication Providers under Security Realms - >myrealms->Providers
    Also check that Control Flag in DefaultAuthenticator is set to "SUFFICIENT". In my case after the installation it was still set to "REQUIRED".

Maybe you are looking for