Jservlet Deployment in OAS

Hi,
When we deploy a HTTPServlet to OAS, we can deploy it only as JServlet and after registering the servlet, if we look into the wrb.app, it says that the Execution string is wrks -s.
Because of this, when my applet communicates with the servlet and when the applet expects an object to be sent by the servlet, the applet gives a java.io.EOFException and in the web server I am able to see a new blank window popping up with the title 'wrks'.
What should the Exec String be set to in OAS for servlets?
Has anybody come across this problem? If so, can you pls tell me how to solve this?
Thx
SUdha

Hello ,
You do not explicitly need to set the Execution string for the jservlet cartride.
First ensure that the servlet by itself executes fine & is accessible from a browser.
Once this works, then you could access the servlet from a applet, using the java URL class.
Attaching a doc below which explains how to access Cartridges from a Java program
You are invoking a Oracle Application Server Cartridge to access the database
using a Java program.
From a Java program (Applet/Application), you could access database using JDBC
drivers. Invoking cartridges(PL/SQL, JAVA) to access the database from a Java
program, makes sense if,
a. The code required to access the database has already been written using
a cartridge.
b. The majority of the job done by the Java application is non-database.
c. You need to access database without a JDBC Driver and without using
Sql*Net(If you are using OCI Based JDBC drivers)
The major advantage of the above is code reusablity.
This is acheived by using the URLConnection class defined in the java.net
package, which allows the opening of a URL, and reading in the contents of the
URL. Accessing cartridges from a Java program is similar to accessing CGI
scripts from a Java program. Parameters can be passed to a CGI script using
the GET or the POST method. In the GET method, parameters are passed along with
the URL.
Example: http://oraclebl.oracle.com/cgi-bin/get_data?deptno=10
In the POST method, the parameters are passed to the Standard input of the CGI
script, which points to the data sent from the browser. The POST METHOD is
quickly making the GET METHOD obsolete because it's more versatile and has no
limitations on the amount of data that can be sent through the connection.
Given below is a example of a Applet accessing the PL/SQL cartridge to retreive
data from the database. The same concept could be used to access any other
cartridge(such as a Java cartridge) working on the HTTP protocol.
PL/SQL procedure accessed:
create or replace procedure get_emp_data(deptno in number) as
cursor c1(dept in number) is select empno, ename from scott.emp where deptno=dept;
begin
owa_util.mime_header('text/plain');
for i in c1(deptno) loop
htp.p(to_char(i.empno)| |' '| |i.ename);
end loop;
end;
Applet code accessing the above procedure using the PL/SQL cartridge.
package package4;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.net.*;
import java.io.*;
public class Applet1 extends Applet {
Button button1 = new Button("Query Details"); /* Button to Query emp details */
TextField deptno = new TextField("",10); /* TextField to get the deptno */
FlowLayout flowLayout1 = new FlowLayout(); /* Initialize a Flowlayout class */
TextArea empDetails = new TextArea("",10,40); /* TextArea to display emp details queried */
public void init() {
setLayout(flowLayout1);
setSize(new Dimension(400, 329));
add(deptno);
add(button1);
button1.addActionListener(new button_listener(this));
add(empDetails);
void button1_actionPerformed(ActionEvent e) {
String t1 = empDetails.getText() ;
empDetails.replaceRange("",0,t1.length()); /* Initialize empdetails to "" */
try
URL url = new URL("http://winnt-nsc.in.oracle.com:8888/web_apps/plsql/get_emp_data");
/* Initialize the URL pointing to a PL/SQL cartridge */
URLConnection connection = url.openConnection();
connection.setDoOutput(true); /* Enable Output to the above URL Connection stream */
PrintWriter out = new PrintWriter(connection.getOutputStream());
out.print("deptno="+deptno.getText());
/* Send the deptno value to the output stream. This would be read by the cartridge
Using the POST method */
out.close();
String inputLine;
BufferedReader in = new BufferedReader( new InputStreamReader( connection.getInputStream()));
while ((inputLine = in.readLine()) != null) /* Retreive the URL content & initialize empDetails */
empDetails.append(inputLine+"\n");
in.close();
catch(Exception e1)
empDetails.append(e1.getMessage());
/* Listener to handle the Actions for the Query button */
class button_listener implements ActionListener {
Applet1 applet1;
button_listener(Applet1 applet1)
this.applet1=applet1;
public void actionPerformed(ActionEvent e) {
applet1.button1_actionPerformed(e);
Explaination:
a. Create the URL with the following.
URL url = new URL("http://winnt-nsc.in.oracle.com:8888/web_apps/plsql/
get_emp_data");
b. Call the URL object's openConnection method to connect to it. This
initializes a communication link between your Java program and the URL
over the network URLConnection connection = url.openConnection();
c. After the URL is opened, it creates two streams, one input stream to
read from the open connection, and one output stream to write to the open
connection. An input stream needs to be used to retreive the contents
of the URL. An output stream can be used to pass data to the URL
(such as Posting paraemeter values to the URL).getInputStream () and
getOutputStream methods of the URLConnection object could be used to get
the input & output streams respectively.
By default the input stream is enabled & the output stream is disabled.
You need to explicitly enable the output stream if reqiured by using the
setDoOutput method of the URLConnection object connection.setDoOutput
(true);
d. In the example the deptno is the parameter name, and the value is
retreived using deptno.getText().
Example uses the POST method to pass the parameters.
The parameter needs to be passed using the format
parameter_name=parameter_value, which is done by
out.print("deptno="+deptno.getText());
Paraemeters could be passed using the GET method, by just appending the
parameters in the above format to the URL. In this case, you do not need to use
the OutputStream of the URLConnection.
Example : http://winnt-nsc.in.oracle.com:8888/web_apps/plsql/
get_emp_data?deptno=10
Unless the URL length limitation is reached, try to use GET because of its
simplicity.
Oracle Support Services
null

Similar Messages

  • EJB Deployment on OAS

    when I run the snippet generated client for the EJB deployed on OAS, I have this error:
    java.lang.NoClassDefFoundError: EJBPack.AppEJBHomeHelper
    at oracle.oas.container.corba.RemoteObject.narrow(Compiled Code)
    at oracle.oas.container.corba.RemoteObject.narrow(Compiled Code)
    at javax.rmi.PortableRemoteObject.narrow(Compiled Code)
    at EJBPack.AppEJBClient.main(Compiled Code)
    Any help well be appreciated???
    Many thanks.
    Xtophe
    null

    Hi Mak_GK,
    Sorry for the late answer.
    Make sure that your client project has the following libraries:
    JDeveloper runtime
    Oracle 8.1.5 JDBC
    Connection Manager
    <your generated jar file from the EJB>
    JBO Runtime
    OAS Runtime
    JBO OAS Runtime
    Also, sometimes it helps to stop and re-start OAS after deploying your EJB.
    Xtophe

  • Project Deployment in OAS 4.0.8.1

    Hi folks, i4ve tried to deploy a project containing three applets to OAS and it gave me this message :
    Downloading client stubs for "IpirangaAppletsOAS1" to "C:\Program Files\Oracle\JDeveloper 3.1\myprojects\IpirangaAppletsOAS1Cl.jar"...
    OASDeploy: java.net.SocketException: socket was closed
    OASDeploy: Error occured in downloading client stubs
    OASDeploy: Application Deployment Failed
    *** OAS EJB Application deployment completed ***
    *** Deployment completed ***
    What4s up ?

    I am looking for the same answer. If you find it, please send it to me at [email protected]
    Thanx
    --Michael                                                                                                                                                                                                                                   

  • Critical ADF application error after deploy to OAS

    <p>
    Hi,
    </p>
    <p>
    I have a problem with ADF application (10.1.3). It works in JDev but after deploy to OAS 10.1.3 when I try to go to page contains a lot of input texts and 2 tables , I get server error  - see it on this image .  It is very strange because this application worked earlier - where OAS uses JDK 1.5.0_08. Now JDK was changed for 1.6.0_01 version. J2EE container has allocate 512 RAM memory Is JDK version may be reason of this error ?
    </p>
    <p>
    Kuba
    </p>

    Hi Kuba,
    Do you mean that you changed OAS to use JDK 1.6? I'm pretty sure this wouldn't be supported. If you mean that you used JDK 1.6 to compile the project and then deploy to OAS, I'm pretty sure this wouldn't be supported, either. If you just changed JDeveloper to use JDK 1.6 to run JDev (although for sure this isn't supported), and the project still is targetted to JDK 1.5, this should work. I've had a few sporadic problems in this configuration, though, so I cannot recommend it.
    John

  • Error Deploying to OAS 10.1.3... pls help

    HI All,
    I am using JDev 10.1.3.1 with ADF Faces + BC, I try to deploy to OAS 10.1.3 from the AS Console :
    I get this error :
    [Nov 23, 2006 10:16:30 PM] Exception: NoClassDefFoundError: Missing class: org.apache.commons.collections.ArrayStack Dependent class: org.apache.commons.digester.Digester Loader: ITTSalesApp.web.ITTSalesViewArchive:0.0.0 Code-Source: /opt/oracle/OraHome_oc4j/j2ee/home/applications/ITTSalesApp/ITTSalesViewArchive/WEB-INF/lib/commons-digester.jar Configuration: WEB-INF/lib/ directory in /opt/oracle/OraHome_oc4j/j2ee/home/applications/ITTSalesApp/ITTSalesViewArchive/WEB-INF/lib The missing class is not available from any code-source or loader in the system.
    [Nov 23, 2006 10:16:30 PM] Operation failed with error: Missing class: org.apache.commons.collections.ArrayStack Dependent class: org.apache.commons.digester.Digester Loader: ITTSalesApp.web.ITTSalesViewArchive:0.0.0 Code-Source: /opt/oracle/OraHome_oc4j/j2ee/home/applications/ITTSalesApp/ITTSalesViewArchive/WEB-INF/lib/commons-digester.jar Configuration: WEB-INF/lib/ directory in /opt/oracle/OraHome_oc4j/j2ee/home/applications/ITTSalesApp/ITTSalesViewArchive/WEB-INF/lib The missing class is not available from any code-source or loader in the system.
    How to solve this problem ?
    Pls help...help..
    Thank you,
    xtanto

    "For ADF applications developed in JDeveloper 10.1.3.1 and deployed to Oracle Application Server 10.1.3.0, you need to install the ADF runtime libraries in your application server, using the ADF Installer."
    http://www.oracle.com/technology/products/jdev/collateral/papers/10g/as_supportmatrix.html

  • Is periodic maintenance required for app deployed on OAS on Windows?

    Hi,
    We have an application that uses 7 BPEL processes and one web service deployed on OAS. Application is into production from the last 4 months.
    We are bringing down the App server once in a while due to applying break fixes, etc.
    But, now, considering the App is quite stable, we won't be planning to bring down the app server for few months. My question is, do we need to schedule planned downtime and restart the application server once in a while in view of memory leaks etc as the App is deployed on Windows Operating System?
    It would be a great if I get some info/links that will give me the exact information.
    Thanks,
    Sasi Bhushan.

    Hi Chris,
    Thanks for the reply.
    Yes. Infact we have taken care of log files. But wondering if memory leaks etc could cause total memory consumption and making the app server hung etc.
    So, I am looking for some suggestion on whether we need the app server restart periodically or it's not required at all.
    Thanks,
    Sasi Bhushan.

  • JDEV 1013 and deployment to OAS 10g (9.0.4)

    Hi,
    I have read that OAS 10g (9.0.4) is not supported by Jdeveloper 1013.
    Is that mean that I can't deploy an ADF/JSF application to the OAS 10g (9.0.4)?
    Regards,
    Cezary

    Hi,
    yes and no. What it means is that you can't directly deploy from JDeveloper to this Application Server. Building J2EE 1.3 compliant applications and deploy the EAR file to OracleAs 9.0.4 should work. Note that if using ADF I am not so sure if there are issues when deploying the ADF runtime libraries.
    Frank

  • JCA Resource Adapter Deployment in OAS 10.1.2

    Hi,
    I have installed the Oracle Application Server 10g Release 2 (10.1.2) (j2ee & web cache) and I want to know how I can deploy a JCA Resource Adapter. Until now I have work with Oracle Application Server 10g Release 3 (10.1.3.1.0) and this version has a section in the administration web (applications->Standalone Resource Adapters) where I can deploy the RA.
    But now, I have to deploy a Resource adapter in OAS 10.1.2 and I don't know how to do it. Any help?
    Thanks,
    Miquel

    Is there any error or warning message in WLS server log related to your adapter? WLS may ignore some properties if found non-fundamental error.

  • PL/Sql Web Services - Deploy to OAS 10.1.2.3.0 - Help?

    Morning All,
    I hope that someone out there can give me some advice on how I can successfully create and deploy Web Services wrapping PL/Sql packaged functions / procedures onto our test application servers.
    I've seen that the PL/Sql Web Services creation didn't make it into the current release of 11g, so I've downloaded 10g (10.1.3.4). Our Oracle AS's are version 10.1.2.3.0 running Java 1.4.2.
    I've successfully deployed a pl/sql web service to the OC4J container that comes with Jdev 10g, but from what I've seen so far there seems to be some incompatibility with jdev 10g deploying into our OAS servers OC4J instance running 1.4.2. I've followed a few guides to get round this, but none of them seem to fully cover all the issues.
    The current state of play is that I have been able to get it to deploy, but it returns a null point exception when it defo shouldn't be, and so I'm now here asking for your help and advice to start from scratch again to make sure that i cover every single step in order to get this working - if at all possible ;-)
    So, please, can anyone either give me a link to a doc which takes me through this issue to a resolution, or give me any hints and tips to get this working?
    Thanks in Advance,
    -Roamer.
    Edited by: Roamer on Feb 19, 2009 10:31 AM (Version mistake in the title - it is 10.1.2.3.0 and not 10.1.2.2.0 :-)

    Trying a J2EE 1.4 sample for a J2EE 1.3 environment is quite difficult, J2EE 1.3 doesn't support WebServices out of the box.
    On the other hand it is not quite easy to find the 10.1.2.x samples... Either upgrade your OC4J to 10.1.3 or try these samples: http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/index.html
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Fusion 11 Deployment on OAS

    Hello All,
    My company is looking at upgrading to Oracle EPM Fusion 11 version using OAS as the app server. We are currently on 9.3.0.1 with Web-Sphere as the application server.
    When trying to install in a test environment, our installation is going on fine. I cannot deploy my Shared services to OAS though (neither automatic nor manual). I have tried deploying using the embedded java container and the deployment is successful without any issues. The error it keeps showing when trying to deploy using the OAS with manual deployment as an option is that Shared Services is not started. This is immaterial to whether I start the deployment with OpenLDAP service started or not.
    Any idea as to where I am going wrong or if there is some step any one think that I am missing?
    Thanks in advance,
    Jas.

    Did you run the EPM System Diagnostic utility to check the status of the services?
    This might give you a clue, if there're issues with the very services.

  • Deployment wizard (OAS EJB)

    Why do I get
    There is nothing to process in jar file I:\\ows_4082\\ows\\upload\\691MyOASAppSource.jar.
    Compilation of idl interfaces for I:\\ows_4082\\ows\\upload\\691MyOASAppSource.jar failed!
    if I try to deploy my bc4j appmodule to an oas 4.0.8.2 as EJB?
    thx,
    Tib

    Hi
    edit the file svwww.cfg file in
    ORAWEB_HOME/admin/websitename/httpd_machinename/www.
    In the [Server] portion of parameters change the 'FileCaching'
    parameter to "OFF".
    regards
    raghu
    Albert (guest) wrote:
    : Trying to deploy an EJB into OAS 4.0.8.1 using
    : JD3 deployment wizard.
    : If the EJB already exists there, then an exception arises
    : in the wizard:
    : Creating client jar...
    : java.io.FileNotFoundException: E:\dev32\ows\4.0
    : \..\apps\ejb\MyAccount\_client.jar
    : at java.lang.Throwable.<init>(Compiled Code)
    : at java.io.FileNotFoundException.<init>(Compiled Code)
    : at java.io.FileOutputStream.<init>
    : (FileOutputStream.java:69)
    : at sun.tools.jar.Main.run(Main.java:76)
    : at sun.tools.jar.Main.main(Main.java:524)
    : at oracle.oas.tools.util.JarGenerator.createJar(Compiled
    : Code)
    : at oracle.oas.tools.util.CreateJars.main(Compiled Code)
    : Creation of client jar for E:\\dev32
    : \\ows\\upload\\194MyAccountSource.jar failed!
    : As I've found, the _client.jar is actually present there,
    : but it is locked by someone, so the wizard cannot overwrite it.
    : If I stop the OAS Node Manager, then the file is released.
    : After deleting the _client.jar and starting OAS Node Manager
    : again, the wizard works.
    : What Oracle has to comment on that ?
    null

  • Oracle Maps (11gP1) deployed to OAS grid  FOIs don't display

    We have a four server OAS grid (10.1.3.1) with a dedicated Mapview node distributed across all four. The machines are all running Linux. We've set up a shared NFS drive for the cache and created soft links in each of the web folders to common images and tilecache folders.
    Everything appears to work EXCEPT that we are not seeing our theme FOI symbols. When we first turn on the FOI there is a wink where the icons would display but no actual icon is visible. We can hover over where the icon should be and we get the fly-over label. We click at the location and we get our popups.
    I can see lots of PNG files in my /nfs01/images/foi/ folder and I've verified that each server is seeing this as web/images/foi.
    HELP; has anyone out there successfully deployed to a grid? Which version? Is there something we need to do that we haven't done yet?
    Thanks, Mark

    We set the logging to FINEST but did find any "FOI response" messages in the log. We did a trace back using Firefox and determined that the PNG was not being found. With further testing we were able to determine that MapViewer was not displaying the contents of the images folder either.
    404 Not Found</H1>Resource /mapviewer/images/foi/t0_0S1_AAAT18AABAAAVw9AAB_663_908.pngThe images folder (like the tilecache folder) is a soft link from each of the four instances to a common shared NFS mount.
    cd $ORACLE_HOME/j2ee/mapviewer11g/applications/mapviewer/web
    mv images images.see-nfs01
    mv tilecache images.see-nfs01
    ln -s /nfs01/images images
    ln -s /nfs01/tilecache tilecache
    ls -l
    -rw-rw-r--   1 oracle oracle  5583 Apr 10 15:14 home.jspx
    lrwxrwxrwx   1 oracle oracle    13 Apr 16 08:50 images -> /nfs01/images
    drwxrwxr-x   4 oracle oracle  4096 Apr 10 15:14 images.see-nfs0The files are getting written to the images and the images/foi folders but they do not appear to be found. What makes this doubly confusing is that the files in the tilecache folder ARE being found.
    We are going to deploy the new mapviewer release from last week to see if the same problem occurs.
    Mark

  • Errors after EJP Deployment on OAS 4.0.8.2

    Hi, I have successfully deployed EJB on OAS 4.0.8.2. However, when I tried to test it, it fails with the following error..
    =========================================void oracle.jbo.jbotester.MainFrame.main(java.lang.String[])
    java.rmi.ServerException: CORBA: org.omg.CORBA.BAD_OPERATION: minor code: 0 completed: No; nested exception is:
    org.omg.CORBA.BAD_OPERATION: minor code: 0 completed: No
    org.omg.CORBA.BAD_OPERATION: minor code: 0 completed: No
    =================================
    Is there any idea about what was caused by ?
    Thanks..
    Cemal Doganay
    null

    Hi ,
    As u had said in the previous mail... I also have lot of basic doubts. Let us share them..
    What do u mean by a JSP cartridge... Should i download it or something...
    Regards,
    Ganesh R

  • Creating worker threads in J2EE application deployed in OAS...

    Will OAS allow for the creation of worker threads in a J2EE application? I can create a worker thread in my J2EE application that is deployed in OC4J Standalone, I need to verify if the same capabilities exist in OAS.
    Thank you,
    Jason

    Hi Ritushree,
    Yor approach is not correct. You need to do a JNDI lookup for the service.
    Refer
    http://help.sap.com/saphelp_nw04/helpdata/en/42/9ddd0cbb211d72e10000000a1553f6/frameset.htm
    Thanks
    Prashant

  • JServlet / DBServlet in OAS 4081

    I created a Servlet according to the steps given in the OTN website.
    It access tables EMP and DEPT from the database.
    When I tested it from JDeveloper, it worked perfectly well.
    When I tried to access it through Browser / OAS 4081, it didn't work.
    It is looking for DBServletImpl.class
    Can anybody help me to find out where this class exists and how to include it.

    JDeveloper 3.0 release notes has detailed steps to deploy DBservlets on OAS. Check it out.
    raghu

Maybe you are looking for

  • I have been trying for 4 weeks to get my iPod to connect

    Hi, I have been trying for the last 4 weeks to get my iPod to work with my computer. I am computer literate, i built my own computer, i make games, etc. so i know what im doing when i use my computer. That being said, here is my problem. When i conne

  • Sudden increase in usage

    After nearly 3 years with BT my monthly usage allowance has suddenly started being exceeded even though I am not using the internet any differently. The alert emails were being sent to the wrong email so I only found out when my paper bill finally ar

  • Function Module to Compare Date within date Range

    Hi All,         Does anyone know Function Module to Compare Date within date Range...For example i need to find whether 08/02/2006 falls in between 07/15/2006 and 09/15/2006......

  • Please help stuck in recovery mode

    Hi can someone at apple please help me. I was updating my ipod to ios 8.3 when it was half way done i accidentally shut it of. Now my ipod is stuck in recovery mode. When i try updating it via itunes i tried to update it however it keeps saying that

  • BW 3.5 / GUI 7.20 / Excel 2010 : RRMX not working properly

    Hi, We are here working on BW 3.5 with GUI 7.20 FEP 2. BEx 3.5 is being used on Office 2010. When we run a workbook from SAP GUI (user menu), then Excel 2010 is opening but: - Thereu2019s no automatic connection to BW as it should. - The workbook doe