Problem running on demand process as public user

hello
I have an on demand PL-SQL process that returns data to populate a select list on the page with optional values. This process is called with an event call on a date item. When authenticated, it returns properly and when called as a public user it fails with this in the XML return:
XML Parsing Error: no element found Location: moz-nullprincipal:{1edfa653-8146-43f8-8ea9-a26d3e29cf8a} Line Number 1, Column 1:
The call should return this :
<select>
14-JUN-12 DSKYSTH
<option value="Single">Single Rate = $10.00</option>
</select>Using this event on the date item:
onChange="get_AJAX_SELECT_FB(this,'P1_XBASIS');"calling this code:
function get_AJAX_SELECT_FB(pThis,pSelect){   
    var l_Return = null;  
    var l_Select = html_GetElement(pSelect);  
    var ajaxResult = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=SetBasis',0);  
    ajaxResult.add('P1_ID',$v('P1_TOUR_CODE'));  
    ajaxResult.add('P1_XTD',pThis.value);  
    gReturn = ajaxResult.get('XML');  
    if(gReturn && l_Select){
        var options_Contents = gReturn.getElementsByTagName("option");
        l_Count = options_Contents.length;
       l_Select.length = 0;
        for(var i=0; i<l_Count;i++){  
      var l_Opt_Xml = gReturn.getElementsByTagName("option");
appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
get = null;
function appendToSelect(pSelect, pValue, pContent) {  
var l_Opt = document.createElement("option");
l_Opt.value = pValue;
if(document.all){ 
pSelect.options.add(l_Opt);
l_Opt.innerText = pContent;
}else{  
l_Opt.appendChild(document.createTextNode(pContent));
pSelect.appendChild(l_Opt);
} When inspecting with Firebug I can only see a difference in the request headers between the public user and authenticated user where the cookie value is -1 on the public user.
Public User:
*Accept     text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8*
*Accept-Encoding     gzip, deflate*
*Accept-Language     en-us,en;q=0.5*
*Connection     keep-alive*
*Content-Length     181*
*Content-Type     application/x-www-form-urlencoded; charset=UTF-8*
*Cookie     LOGIN_USERNAME_COOKIE=roger; WWV_PUBLIC_SESSION_129=5245818196882971; ORA_WWV_REMEMBER_UN=ROGER:PTX-DEV; ORA_WWV_USER=A29423F6BE2220D0; WWV_CUSTOM-F_969127929331871_129=-1*
*Host     horta.prot.com.au:8080*
*Referer     http://horta.prot.com.au:8080/apex/f?p=129:1:547226222832513*
*User-Agent     Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0*
Authenticated user:
*Accept     text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8*
*Accept-Encoding     gzip, deflate*
*Accept-Language     en-us,en;q=0.5*
*Connection     keep-alive*
*Content-Length     182*
*Content-Type     application/x-www-form-urlencoded; charset=UTF-8*
*Cookie     LOGIN_USERNAME_COOKIE=roger; ORA_WWV_REMEMBER_UN=ROGER:PTX-DEV; ORA_WWV_USER=A29423F6BE2220D0; WWV_CUSTOM-F_969127929331871_129=A29423F6BE2220D0*
*Host     horta.prot.com.au:8080*
*Referer     http://horta.prot.com.au:8080/apex/f?p=129:1:1687129548869672:GET_TYPE:NO::P1_SEARCH_CAT,P1_XTD,P1_ADULT,P1_SEARCH_CODE:CABLE,,,*
*User-Agent     Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0*
I'm it's probably something stupid that I'm doing and hope someone can help
Roger                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

user4101020 wrote:
Thanks, but my browser crashed and I ended with a duplicate ... I see this now but the question remains unanswered.Close this thread and wait for a response on the other one.

Similar Messages

  • When i start firefox double clicking the short cut icon, it runs in the processes but the user interface window does not comes up in the screen,please help.

    in my laptop,i generally use windows xp, due to some problems i repaired the window, after some days without any notice the above problem starts. but internet explorer 8 shows up with a perfect window, but a bit slow in every respect compared to firefox. above all if i start the window in safe mode firefox runs perfectly.please help, i ve tried every possible way(installing different anti-viruses, acessing through set program and defaults).

    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process.
    See:
    * [[Server not found]]
    * [[Firewalls]]
    * http://kb.mozillazine.org/Browser_will_not_start_up

  • Need code -Ondemand process as public user -Page as Public or authenticated

    Hi All,
    I have requirement like have public page
    REGION-select list,COUNTRY-Select list...If Select region ,it should come related country...this should work for both authenticated page or public page ...
    Please give me steps on this...

    done

  • On-Demand Process Running only for authenticated user

    I have noticed that an on-demand process is running only for authenticated users - for example a download of a document. For public users it doesn't. I remember seeing a similar question related to ajax on demand in this forum but couldn't locate the thread. Does anyone knows why the process is not running for not authenticated user? The result of a download for a public user is a blank page where the authenticated user gets the file by clicking on the same link.
    Thanks in advance,
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

    Hello Denes,
    Please check if the following can help you -
    Re: AJAX on public page
    Re: Calling an application level on-demand process from JavaScript
    Regards,
    Arie.

  • I have an iMac 5.1 which is running OSx10.5.8 - it runs very slowly and I can't find if there is a particular problem. In the process, I have tried to install 10.6 [I have a new iMac] and the 5.1 won't accept the install discs.

    I have an iMac 5.1 which is running OSx10.5.8 - it runs very slowly and I can't find if there is a particular problem. In the process, I have tried to install 10.6 [I have a new iMac] and the 5.1 won't accept the install discs.

    As you have discovered... you cannot use the install discs from another Mac...
    Re the iMac running OS X 10 5 8... and for your New Mac...
    See Here for keeping your Mac Happy...
    http://support.apple.com/kb/HT1147
    http://www.thexlab.com/faqs/maintainingmacosx.html
    http://www.thexlab.com/faqs/performance.html

  • How to use process overriden public runtime user?

    Hello,
    While creating a unix/linux dynamic target, I am passing unix/linux hostname and username
    manually.
    I am using the dynamic target in 'Open Terminal Session' and overriding the default username
    with Public authenticated username. Open terminal session is working fine and able to
    ssh the linux host.
    But 'Execute Terminal Commands' process is getting failed while using the same 'Open Terminal
    Session' as target.
    Even though i am passing the sam 'Open Terminal Session' as target; 'Execute Terminal Command' is using the default runtime user rather than using the process overriden public runtime user.
    Please do the needfule for the same. Please let me know if I need to provide more information.
    Thanks,
    Prashant

    Thanks for your reply Chris.
    In Open Terminal Session we have Credentials tab, there we can override process runtime user with public key
    but we dont have anything in execute terminal commands.
    We have credentials tab in 'Execute Unix/linux scripts' also but we cant use Public Authenticated Runtime User.
    I have attached snapshots for ref puposes.

  • Problem when running GPS in Process Chains

    Hi,
    we  have a GPS which has a set of planning functions. we have included this GPS in the Process Chain using "UPC_BUNDLE_EXECUTE". we have a selection of two profit centers. It has taken 18 hrs for the GPS to complete. it was running at its maximum speed on the background server it has run.
    we split the GPS into two for the two profit centers creating the necessary planning package for the two profit centers. we modified the process chain to run the two GPS in parallel(one for each profit center). This is so that each GPS can run on one server. The background user is BWremote.
    when we run the GPS on process chain one of the GPS has failed because of read locks. but the other has completed successfully. this might be because both the GPS were running under the same user id. when we run the same GPS in dialog under two different users at the same time it works fine.
    Can anybody help us with some idea of how to run the GPS in parallel without locks for different selections. Is there anyway we can run them with out creating new users for each background job.
    Thank you very much in advance.
    Ravi.

    Hi Ravi,
       Other than the level/package definition that need to be specific for each one of
       the Profit Centers with no overlap records between the two packages, you can
       also try using UPC_BUNDLE_EXECUTE_STEP program to split them into two
       and potentially run without locks in a sequence.Also make sure that the user
       id that is being used to run these functions has appropriate authorization that
       is hopefully not based on a hierarchy but based on Master data.
       Hope this helps.
    Cheers
    Srini

  • Problem Running Process Flow When Database Objects Deployed Outside of OWB

    Hi
    I am having a few problems running process flows that I'm deploying through OMB.
    My set up is as follows:
    All database updates are done outside of OWB (for version control purposes).
    Each object within OWB is exported to an MDL file, which is then imported into the production repository using an OMB Script.
    Once everything has been imported into my production version, I'm then deploying the process flows from within the OMB script.
    When I then go to run the process flow, I get the following error ...
    RPE-02075: Oracle Workflow failed to process the execution request for Activity LOAD_COUNTRY_PF:LOAD_COUNTRY. This may be because dependent objects have not yet been deployed.
    I can see through the Control Center, that the status of all the objects that the process flow is going to use are set to having a Design Status of 'New'. So obviously OWB doesn't realize that these objects already exist in the database, which is why the process flow errors.
    Is there any way around this? Can I somehow set the Design Status of all the objects to 'Unchanged' through OMB? Is there a way to fool the process flow into thinking that the objects do exist? Can I run the process flow outside of OWB?
    Any help would be appreciated.
    Thanks
    Liffey

    Hi Liffey,
    Is there any way around this?
    Can I somehow set the Design Status of all the objects to 'Unchanged' through OMB?
    Is there a way to fool the process flow into thinking that the objects do exist?of course you must deploy mappings before deploying processflow
    and as I know there is no legal method for avoiding this.
    Regards,
    Oleg
    PS. Look at this thread [Deploying without Deploy|http://forums.oracle.com/forums/thread.jspa?messageID=2655726&#2655726]
    It seems for OWB10gR1 exists method for manual modification OWB runtime repository tables for mark mappings as deployed

  • Processes by ALL users were running today - WHY????

    This morning I noticed that the fans were running on my Macbook Pro, and checked the process status.  I saw several processes (including multiple mdworkers) running under every account on my system, and do not know why these were running, since none of the other users was actually logged in, and none of them know how to submit anything to chron.
    I also received an iMovie update.
    Also, around the same time, SimpleText lost the ability to save files that I created and edited.  Repairing permissions did not fix this.
    I killed the processes from Activity monitor, and saved my text files, by copying their content into blank files created by XCode, then rebooted, and eveything seemed normal.
    Is there a logical explanation for this?????

    Since upgrading to Mountain Lion, I have set of launchd processes for EVERY user account on my machine even tho I'm the only account (jakec) that EVER logs in:
    -+= 00001 root /sbin/launchd
    |
    |-+= 00656 jakec /sbin/launchd
    | |--= 00659 jakec /usr/sbin/distnoted agent
    | |--= 00661 jakec /usr/sbin/cfprefsd agent
    |
    |-+= 00663 _spotlight /sbin/launchd
    | |--= 00666 _spotlight /usr/sbin/distnoted agent
    | +--= 50423 _spotlight /usr/sbin/cfprefsd agent
    |
    |-+= 01163 anybody /sbin/launchd
    | |--= 01173 anybody /usr/sbin/distnoted agent
    | +--= 50421 anybody /usr/sbin/cfprefsd agent
    |
    |--= 50424 root /usr/sbin/cfprefsd daemon
    |
    |-+= 61432 _windowserver /sbin/launchd
    | +--= 61434 _windowserver /usr/sbin/cfprefsd agent
    |
    |-+= 63634 sysadmin /sbin/launchd
    | |--= 63645 sysadmin /usr/sbin/distnoted agent
    | +--= 63651 sysadmin /usr/sbin/cfprefsd agent
    |
    |-+= 63635 art /sbin/launchd
    | |--= 63646 art /usr/sbin/distnoted agent
    | +--= 63650 art /usr/sbin/cfprefsd agent
    |
    |-+= 63636 jakec2 /sbin/launchd
    | |--= 63644 jakec2 /usr/sbin/distnoted agent
    | +--= 63649 jakec2 /usr/sbin/cfprefsd agent
    |
    |-+= 88020 _lp /sbin/launchd
    | +--= 88026 _lp /usr/sbin/cfprefsd agent
    That's nearly 20 processes that do NOT need to be running.
    I've looked thru each account's launch agents/daemons to see if I could disable them, but it looks like they get started by system agents/daemons, and frankly, I'm not that adventurous to see which system launch agents/daemons I can disable without causing system malfunction.
    --Jake Coughlin
    ([email protected])

  • A problem of RnEncoder when I try to run a Rosettanet process

    Hi, all
    I encountered a problem when I try to run a Rosettanet process which will time out. Some exceptions are thrown as follows.
    I designed a participant process which would make no reflection after receiving the message, then waited for the initiator's time-out. I have tracked the process, and I'm sure that the problem occured at the second sending. It worked well in normal condition.
    I have focused on this problem several days, but couldn't get a way to resolve. Pls help! Thank you very much~! :)
    ==========================================
    at com.bea.b2b.protocol.rosettanet.rnif2x.RNEncoder.process(Lcom.bea.b2b.protocol.messaging.MessageEnvelope;)V(RNEncoder.java:140)
    at com.bea.b2b.protocol.ModuleChain.process(Lcom.bea.b2b.protocol.messaging.MessageEnvelope;)V(ModuleChain.java:64)
    at com.bea.b2b.protocol.Protocol.encode(Lcom.bea.b2b.protocol.messaging.
    MessageEnvelope;)V(Protocol.java:632)
    at com.bea.b2b.protocol.rosettanet.RNIBProtocol.send(Lcom.bea.b2b.protocol.messaging.MessageEnvelope;)V(RNIBProtocol.java:68)
    at com.bea.b2b.protocol.rosettanet.rnif2x.messaging.RNMessage.send()V(RNMessage.java:462)
    at com.bea.b2b.protocol.rosettanet.messagesender.RNMessageSenderBean.onMessage(Ljavax.jms.Message;)V(RNMessageSenderBean.java:138)
    at weblogic.ejb20.internal.MDListener.execute(Lweblogic.kernel.ExecuteThread;)V(MDListener.java:370)
    at weblogic.ejb20.internal.MDListener.onMessage(Ljavax.jms.Message;)V(MDListener.java:262)
    at weblogic.jms.client.JMSSession.onMessage(Ljavax.jms.MessageListener;Lweblogic.jms.common.MessageImpl;)V(JMSSession.java:2678)
    at weblogic.jms.client.JMSSession.execute(Lweblogic.kernel.ExecuteThread;)V(JMSSession.java:2598)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
    at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
    <2006-2-27 下午03时26分00秒 GMT+08:00> <Warning> <WLI-B2B Protocol> <BEA-467501>
    <Caught exception during plugin processing:
    location: http://16.157.10.80:7001/RosettaNet2.0/PartnerB
    protocol: RosettaNet
    plugin: RNEncoder
    exception: com.bea.b2b.protocol.rosettanet.RNException: HttpStatus = 400>
    com.bea.b2b.protocol.PlugInException: com.bea.b2b.protocol.rosettanet.RNException: HttpStatus = 400
    at com.bea.b2b.protocol.ModuleChain.process(Lcom.bea.b2b.protocol.messaging.MessageEnvelope;)V(ModuleChain.java:79)
    at com.bea.b2b.protocol.Protocol.encode(Lcom.bea.b2b.protocol.messaging.MessageEnvelope;)V(Protocol.java:632)
    at com.bea.b2b.protocol.rosettanet.RNIBProtocol.send(Lcom.bea.b2b.protocol.messaging.MessageEnvelope;)V(RNIBProtocol.java:68)
    at com.bea.b2b.protocol.rosettanet.rnif2x.messaging.RNMessage.send()V(RNMessage.java:462)
    at com.bea.b2b.protocol.rosettanet.messagesender.RNMessageSenderBean.onMessage(Ljavax.jms.Message;)V(RNMessageSenderBean.java:138)
    at weblogic.ejb20.internal.MDListener.execute(Lweblogic.kernel.ExecuteThread;)V(MDListener.java:370)
    at weblogic.ejb20.internal.MDListener.onMessage(Ljavax.jms.Message;)V(MDListener.java:262)
    at weblogic.jms.client.JMSSession.onMessage(Ljavax.jms.MessageListener;Lweblogic.jms.common.MessageImpl;)V(JMSSession.java:2678)
    at weblogic.jms.client.JMSSession.execute(Lweblogic.kernel.ExecuteThread;)V(JMSSession.java:2598)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
    at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
    Caused by: com.bea.b2b.protocol.rosettanet.RNException: HttpStatus = 400
    at com.bea.b2b.protocol.rosettanet.rnif2x.RNEncoder.process(Lcom.bea.b2b.protocol.messaging.MessageEnvelope;)V(RNEncoder.java:140)
    at com.bea.b2b.protocol.ModuleChain.process(Lcom.bea.b2b.protocol.messaging.MessageEnvelope;)V(ModuleChain.java:64) ... 11 more
    <2006-2-27 下午03时26分01秒 GMT+08:00> <Error> <WLI-B2B RosettaNet Messaging> <BEA-468502> <Received exception com.bea.b2b.protocol.PlugInException: com.bea.b2b.protocol.rosettanet.RNException: HttpStatus = 400 during send.>
    ==================================

    The SUID differences should be take care of if you download and apply the 10.5.6 combo update.
    As for the other permissions, I believe the OS has created a "link" between the new permissions and the old, rather than replacing with the current.
    Neither set of issues is a problem, unless your applications start acting up--which shouldn't happen.
    ~Lyssa

  • On demand process problem

    Hi,
    i wanted to creat in my aplication a process "on demand " to make the download of a file stored in my bd, but when i try to creat process the xe assistent returns this error:
    To create an on-demand page process, at least one application level process must be created with the type 'ON-DEMAND'.
    What does it meen?
    Thank's in advance

    Hi Pepe,
    This is a ordering issue,
    The steps are:
    1. Create the Application Level On-Demand process,
    then
    2. Create the page that will invoke the On-Demand process.
    Check out the APEX User Guide (Chapter 4). This is one area that seems to be well documented.
    Hope this helps
    Patrick

  • Problem with simple on demand process

    hi
    my on demand process
    declare
    art char := 'GT';
    begin date := '01.01.2006';
    end date := '31.01.2006';
    v_count number;
    begin
    select wvfk.fu_working_days(ART,begin,end)
    into v_count
    from dual;
    end;
    and that's the call
    function test()
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=WORKING_DAYS',0);
    gReturn = get.get();
    alert(gReturn);
    but the alert return nothing
    what is wrong

    So what is your on demand process supposed to return? You are returning a value from
    dual into a variable and the process is returning no value. How about having
    HTP.prn (v_count);
    in your on demand process. Debug it using SQL Workshop and see what you get.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Possible to download file using ajax on demand process?

    In the past I've used procedures with the wpg_docload.download_file function to download files by granting public to the procedure and executing the download from a report link (such as http://localhost:8080/apex/schema_name.download_blob?file_in=xxx)
    I'd like to move to the download to a link that's called from an ajax called on demand process. Is this possible? I have got the report link calling a javascript function passing the rowid in and running the same download_blob procedure via the on demand process but, whilst the code runs OK it does not return the prompt box for the user to open/save the file. I guess this might be because it's not returning it to the javascript in the proper way but I'm v flaky wrt to ajax.
    var ajaxRequest = new htmldb_Get( null , &APP_ID. , 'APPLICATION_PROCESS=download_blob' , 0);
    var ajaxResult = ajaxRequest.get();
    Thanks
    Simon

    To be honest, it's not a big deal, I wanted to do it this way as we have data stored as BFILES and some of the downloads are so big they take a while to load into a temp_blob and thus I wanted to call it from java script so I could call a loading "div" 1st, so the user does not see the screen hanging. However I've changed the code to load the BFILE into an actual blob 1st (through an ajax process) and then return a link to the screen pointing to an app process which opens the blob.

  • How do I run a full process from SSIS ???

    Hi all
    I run BPC 5.1 SP3, and I need to automate a series of jobs, but the system is giving me problems and I hope someone can help out.
    I need to automate a full optimize and then a full process of our AppSets.
    I know that in SP3, the Appsets are taken offline for the full optimize and are then left offline, so in-between I run the "SystemAvailableTask" to set the Appsets back online.
    Additionally, all dependencies are removed from the FACT table for the optimized AppSets, which are only rebuilt by performing the full process afterwards.
    Anyway, the problem I have is that the optimize is running quite happily from SSIS, as is the SystemAvailableTask.
    Up to this point in the job, everything works as intended, so I now have a fully optimized Appset, which is available for users to access.
    However, the Full Process job then fails.
    I have run the Full Process as a standalone job from SSIS and it takes 2m36s to run, but fails to rebuild any dependencies.
    When I ran it from the SAP Admin program, it took 9m57s to run and rebuilt everything correctly.
    I am currently only offered 1 option in the SSIS package, which is to run a Full or an Incremental process, so I select Full.
    However, on the right-hand side, there are various other options available (such as bApplicationProcess, PROCESSMODE (set to "3"), PROCESSOPTION (set to "1"))
    Should I be changing any of the settings on the right to make the job run properly, or should I be doing it differently.
    Obviously, I need to make this work from SSIS, as I can't schedule a full process any other way, so I would be extremely grateful for any help that you can offer.
    Thanks
    Craig
    Edited by: Craig Aucott on Aug 25, 2009 10:21 AM

    The easiest way to do this is to write a Tuxedo server (i.e., using only
    ATMI and no CORBA stuff) that does the following:
    1.) In tpsvrinit(), the last thing that it should do is a tpacall to the
    service contained in this server (and nowhere else) with the TPNOREPLY
    flag.
    2.) In the method that implements the service, do your database work, sleep
    for a little while, do another tpacall to itself with the TPNOREPLY flag,
    and return.
    Hope this helps,
    Robert
    Ram Ramesh wrote:
    Hello folks:
    How can I run a background process that runs under WLE's control.
    What I am looking for is a way to have a process that runs in an
    infinite loop and polls the database to see if there is any background
    work that needs to be done. But I still want the process to be managed
    by WLE for fault tolerance.
    Thanks,
    Ram Ramesh
    [email protected]

  • Problems running servlet due to missing classes?

    Hi everyone,
    I am doing a project which requires me to convert a java coding into a servlet. This java coding I am working on is some kind of location based service which tracks people (receiving an argument of a string as IP). It imports an external SDK called Ekahau SDK (some off the shelve product). Now I wish to convert it into a servlet so that the function that the java coding performs can be run from a webpage i created.
    I have previously posted a thread on this forum called "Converting java coding into servlets?" when I had trouble compiling the servlet. Now that I could compile the servlet already, I still have problems running the servlet from my browser.
    The webserver I am using is Apache Tomcat. Previously I was trying Apache HTTP server but since now I need to use servlet, I have shifted to Tomcat instead. I have been getting these "java.lang.NoClassDefFoundError:" when running the servlet from the browser. From the previous thread, I got suggestions from the replies saying that I need to put the jar files I need into my "C:\Tomcat\webapps\try\WEB-INF\lib" directory. I have been looking for the missing jar files from the internet and putting them into my "C:\Tomcat\webapps\try\WEB-INF\lib", but each time after adding a new jar file, I get another new "java.lang.NoClassDefFoundError:". Are the missing jar files really the problems? Cause it seems a bit weird to me that I need some many jar files which I dont even know why I need them for.
    The HTTP status 500 error look like this:
    description
    The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
    root cause
    java.lang.NoClassDefFoundError: org/apache/excalibur/configuration/CascadingConfiguration
    com.ekahau.G.N.A(Unknown Source)
    com.ekahau.G.N.<init>(Unknown Source)
    com.ekahau.sdk.imp.yax.D.<init>(Unknown Source)
    com.ekahau.sdk.imp.yax.E.connect(Unknown Source)
    com.ekahau.sdk.PositioningEngine.connect(Unknown Source)
    coreservlets.testing.find(testing.java:75)
    coreservlets.testing.doGet(testing.java:36)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    Here are the series of jar files I have been looking from the internet to add them into my "C:\Tomcat\webapps\try\WEB-INF\lib" directory:
    1) org/apache/commons/collections/Closure
    2) org/apache/log4j/Logger
    3) org/apache/commons/lang/Validate
    4) org/apache/excalibur/configuration/CascadingConfiguration
    Please help~~ Thanks a lot.
    My servlet coding is like this:
    package coreservlets;
    import java.io.*;
    import java.util.*;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import com.ekahau.sdk.*;
    public class testing extends HttpServlet
         String ipAddress;
         int result;
           public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
                  ipAddress = request.getParameter("deviceIP");
              try
                   result = find();     
              catch (IOException e)
                   System.out.println("Error..." + e.toString());
              catch (EngineException e)
                   System.out.println("Error..." + e.toString());
              response.setContentType("text/html");
                  PrintWriter write = response.getWriter();
              write.println("<HTML>\n" +
    "<HEAD><TITLE>Tryget</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    result +
    "</BODY></HTML>");
           public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
                  doGet(request, response);
         public int find() throws EngineException, IOException
              PositioningEngine.connect();
                  // Find the given device:
                  Device[] devices = PositioningEngine.findDevice("NETWORK.IP-ADDRESS", ipAddress);
                  if (devices.length == 0)
                         System.err.println("Device with IP address " + ipAddress + " not found.");
                   PositioningEngine.disconnect();
                   return 0;
              else
                         TrackedDevice device = new TrackedDevice(devices[0]);
                         // Create a simple handler for locations for one-time usage:
                         LocationEstimateListener estimateListener = new LocationEstimateListener()
                           public void handleLocationEstimate(LocationEstimate locationEstimate, TrackedDevice device)
                                  // Change getLatestLocation to getAccurateLocation if you want
                                  // a bit more accurate but a few seconds delayed location.
                                  Location loc = locationEstimate.getLatestLocation();
                             final double coX = loc.getX();
                             final double coY = loc.getY();
                             try{
                             FileWriter file = new FileWriter ("C:\\Documents and Settings\\xamule\\Desktop\\Testing\\output\\output.txt");
                             String x = Double.toString(coX);
                             String y = Double.toString(coY);
                             String coor = x + "\t" + y;
                             file.write(coor);
                             file.close();
                             catch (IOException e){
                             System.out.println("Error..." + e.toString());
                   StatusListener statusListener = new StatusListener()
                           public void handleStatus(Status status, TrackedDevice device)
                                  System.err.println(new Date()+"\tStatus for device: " + status);
                         // Add listeners and start tracking
                         device.addLocationEstimateListener(estimateListener);
                         device.addStatusListener(statusListener);
                         device.setTrackingParameter("EPE.LOCATION_UPDATE_INTERVAL","6000");
                         device.setTracking(true);
                         // Wait until user inputs something. When he/she does, stop tracking and quit application
                         //BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                         //in.readLine();
                         // Stop tracking and disconnect from the positioning engine:
                         device.setTracking(false);
                         PositioningEngine.disconnect();
                   return 1;
    }

    Well, it's kind of logical that as you put more jar files (classes) in Tomcat, it changes the error to ask for the classes (inside a jar) it cannot find.
    There was a good class->jar finder on the internet some years ago, but i don't remember the address. Try looking for that and search all the missing classes (NotDefined) and their correspondig jar files.
    Good Luck!

Maybe you are looking for