AQ Servlet Help - AQHttp.java is  missing

Have installed Oracle OAS 10g R2 on SUSE 8.
The aim to to get the Oracle AQ servlet working.
I have been following the Oracle Streams Advanced Queueing Guide:
[http://docs.oracle.com/cd/E11882_01/server.112/e11013.pdf]
Now, to test the AQ servlet it suggests:
cd $ORACLE_HOME/rdbms/demo
javac AQHttp.java
My problem is that this Java source file is missing.
I have checked the RDBMS 10g and 11g installed homes on the DB server as well and again class does not exists.

Answer was to download and install the "Examples CD for 11g R2" (linux_11gR2_examples.zip) on the 11g database server. Includes all the AQ example/demo scripts mentioned in the Application Developers Guide.
Note for versions < 11g , the examples CD was called the "Companion CD", so get that if you are on the older versions.
After installing, the $ORACLE_HOME/rdbms/demo directory went from containing just aqxml.conf to:
aadvdemo.sql cdemdpit.c cdemoplb.c dmxfdemo.java occiuni2_korean.txt sadvuwk.sql
ADDRESS.java cdemdpit.dat cdemoqc2.c Emp.java occiuni2_russian.txt securefile
anydata.sql cdemdplp.c cdemoqc.c epgdemo.sql occiuni2.sql smdim.sql
anydset.sql cdemdplp.dat cdemoqc.sql exfdemo.sql occiuni2.typ smxmv1.sql
anytype.sql cdemdplp.sql cdemorid.c extdemo0.sql occixa.cpp smxmv2.sql
aqbzdemo.tar cdemdpno.c cdemorid.h extdemo1.sql oci02.c smxrw.sql
aqdemo00.sql cdemdpno.dat cdemorid.sql extdemo2.c oci02.sql strmatp.sql
aqdemo01.sql cdemdpro.c cdemort.c extdemo2.h oci03.c strmatREADME.txt
aqdemo02.sql cdemdpro.ctl cdemort.h extdemo2.sql oci03.sql strmats.sql
aqdemo03.sql cdemdpro.dat cdemosc.c extdemo3a.java oci04.c strmatu.sql
aqdemo04.sql cdemdpss.c cdemosc.sql extdemo3.java oci04.sql strmmon.c
aqdemo05.sql cdemdpss.dat cdemoses.c extdemo3.sql oci05.c strmmv1README.txt
aqdemo06.sql cdemo1.c cdemoses.h extdemo4.c oci05.sql strmmv1.sql
aqdemo07.sql cdemo2.c cdemoses.sql extdemo4.h oci06.c strmmv2README.txt
aqdemo08.sql cdemo3.c cdemosp.c extdemo4.sql oci06.sql strmmv2.sql
aqdemo09.sql cdemo4.c cdemosp.h extdemo5.c oci07.c strmmv2s.sql
aqdemo10.sql cdemo5.c cdemostc.c extdemo5.h oci07.sql strmmvp1.sql
aqdemo11.sql cdemo6.cc cdemostc.h extdemo5.sql oci08.c strmmvp2.sql
aqdemo12.sql cdemo6.h cdemosyev.c extdemo6.c oci08.sql strmqp1.sql
AQDemoServlet.java cdemo81.c cdemosyev.sql extdemo6.h oci09.c strmqry1README.txt
AQHttp.java cdemo82.c cdemosyex.sql extdemo6.sql oci09.sql strmqry1.sql
AQHttpRq.java cdemo82.h cdemothr.c fdemo1.for oci10.c summit2.sql
aqjmsdemo01.java cdemo82.sql cdemothr.h fdemo2.for oci10.sql tyevdemo.sql
aqjmsdemo02.java cdemoanydata1.c cdemoucb.c fdemo3.for oci11.c ulcase10.ctl
aqjmsdemo03.java cdemoanydata1.sql cdemoucbl.c fgacdemo.sql oci11.sql ulcase10.sql
aqjmsdemo04.java cdemoanydata2.c cdemoucb.sql giffile.dat oci12.c ulcase11.ctl
aqjmsdemo05.java cdemoanydata2.sql cdemouni.c inhdemo.sql oci12.sql ulcase11.dat
aqjmsdemo06.java cdemobj.c cdemoup1.c keystore oci13.c ulcase11.sql
aqjmsdemo07.java cdemobj.h cdemoup2.c lobs oci13.sql ulcase1.ctl
aqjmsdemo08.java cdemocoll.c cdemoupk.c maporder.sql oci14.c ulcase1.sql
aqjmsdemo09.java cdemocoll.h cdemoupk.sql mddemo2.sql oci14.sql ulcase2.ctl
aqjmsdemo10.java cdemocor1.c cdemoxml.c mddemo.sql oci15.c ulcase2.dat
aqjmsdmo.sql cdemocor.c clobdemo.dat mdemo1.cpp oci15.sql ulcase3.ctl
aqjmsdrp.sql cdemocor.h dattime1.sql mdemo1.h oci16.c ulcase3.sql
aqjmskprb01a.sql cdemocor.sql dattime2.sql mdemo1o.cpp oci16.sql ulcase4.ctl
aqjmskprb01b.sql cdemocp.c dattime3.sql mdemo1.sql oci17.c ulcase4.dat
aqjmskprb01c.sql cdemocpproxy.c dattime4.sql mdemo1.typ oci17.sql ulcase4.sql
aqjmskprb01d.sql cdemocpproxy.sql demo_rdbms32.mk MesgListener.java oci18.c ulcase5.ctl
aqjmskprb01.java cdemocp.sql demo_rdbms64.mk Message.java oci18.sql ulcase5.dat
aqjmsREADME.txt cdemodp0.h demo_rdbms.mk mymdemo1.h oci19.c ulcase5.sql
aqorademo01.java cdemodp.c dmabdemo.java nchdemo1.c oci19.sql ulcase6.ctl
aqorademo02.java cdemodp.h dmabdemo.sql nlsdemo0.sql oci20.c ulcase6.dat
aqoradmo.sql cdemodp_lip.c dmaidemo.java nlsdemo1.sql oci20.sql ulcase6.sql
aqoradrp.sql cdemodr1.c dmaidemo.sql nlsdemo2.sql oci21.c ulcase7.ctl
AQPropServlet.java cdemodr1.h dmapplydemo.java nlsdemo3.sql oci21.sql ulcase7.dat
aqxml01.xml cdemodr1.sql dmardemo.java nlsdemo4.sql oci22.c ulcase7e.sql
aqxml02.xml cdemodr2.c dmardemo.sql nlsdemo5.sql oci22.sql ulcase7s.sql
aqxml03.xml cdemodr2.h dmdtdemo.sql o8demo.sql oci23.c ulcase8.ctl
aqxml04.xml cdemodr2.sql dmdtxvlddemo.sql o8idemo.sql oci23.sql ulcase8.dat
aqxml05.xml cdemodr3.c dmexpimpdemo.java obndra.c oci24.c ulcase8.sql
aqxml06.xml cdemodr3.h dmglcdemo.java occiaqlis.cpp oci24.sql ulcase91.dat
aqxml07.xml cdemodr3.sql dmglcdem.sql occiaqop.cpp oci25.c ulcase92.dat
aqxml08.xml cdemodsa.c dmglrdemo.java occiaqop.typ oci25.sql ulcase93.dat
aqxml09.xml cdemodsa.sql dmglrdem.sql occiblob.cpp ociaqarraydeq.c ulcase94.dat
aqxml10.xml cdemodsc.c dmhpdemo.sql occiclob.cpp ociaqarrayenq.c ulcase95.dat
aqxml.conf cdemodsc.h dmkmdemo.java occicoll.cpp ociaqdemo00.c ulcase96.dat
aqxmldemo.ear cdemodt.c dmkmdemo.sql occidemod.sql ociaqdemo01.c ulcase9.ctl
aqxmldmo.sql cdemoext.c dmnbdemo.java occidemo.sql ociaqdemo02.c ulcase9.sql
aqxmldrp.sql cdemoext.dat dmnbdemo.sql occidesc.cpp oci_f.sed ulcase.sh
aqxmlhtp.sql cdemofil.c dmnmdemo.java occidml.cpp oci_m.sed viewdemo.sql
aqxmloc4j.cert cdemofo.c dmnmdemo.sql occiinh.cpp ociucb32.mk xademo1.sql
aqxmlREADME.txt cdemofor.c dmocdemo.java occiinh.typ ociucb.c xademo2.sql
blobdemo.dat cdemoin1.c dmocdemo.sql occilbar.cpp ociucb.mk xmlgen1.sql
calldemo.sql cdemoin1.h dmpademo.java occimb1.cpp olsdemo.sql xmlgen2.sql
Cars.java cdemoin1.sql dmshgrants.sql occimb1.sql olsdrp.sql xmltype1.sql
case1.rcv cdemoin2.c dmsh.sql occiobj.cpp ori_f.sed xmltype2.sql
case2.rcv cdemoin2.h dmsvcdemo.java occiobj.typ orl_f.sed xmltype3.java
case3.rcv cdemoin2.sql dmsvcdem.sql occipobj.cpp orl_m.sed xmltype3.sql
case4.rcv cdemoin3.c dmsvodemo.java occipobj.typ oro_f.sed xrwutl.sql
cbdem1.cob cdemoin3.h dmsvodem.sql occipool.cpp oro_m.sed xstream
cbdem2.cob cdemoin3.sql dmsvrdemo.java occiproc.cpp ort_f.sed xtdemo01.dat
cbdem3.cob cdemol2l.c dmsvrdem.sql occiscp.cpp PERSON.java xtdemo01.sql
cdcdemo.sql cdemolb2.c dmtreedemo.java occistre.cpp readpipe.c xtdemo02.sql
cdemdp9i.sql cdemolb.c dmtxtfe.sql occiuni1.cpp resultcache.sql xtdemo03.dat
cdemdpco.c cdemolb.dat dmtxtnmfdemo.java occiuni1.sql rman2.sh xtdemo03.sql
cdemdpco.dat cdemolb.h dmtxtnmf.sql occiuni2.cpp ruldemo.sql xtdemo04.dat
cdemdpin.c cdemolbs.c dmtxtsvmdemo.java occiuni2_hindi.txt sadv91.sql xtdemo04.sql
cdemdpin.dat cdemolb.sql dmtxtsvm.sql occiuni2_japanese.txt sadvdemo.sql xtsetup.sql

Similar Messages

  • Please help, jsp page wants missing ";" but not to good with jsp?

    I have a JSP page called ftplogin.jsp
    I want the jsp page to call a ftpbean.
    It will pass server, username and login into the ftpbean.
    It will then set the directory and finaly retrieve a a document from it.
    The ftpbean works but my jsp page doesn't. Please help with compilation problem?????
    Please also tell me if the syntax of accessing the bean is correct?
    <!-- ftplogin.jsp -->
    <html>
    <head>
    <title> FTP Login </title>
    </head>
    <body>
    <%@ page import= "ftp.* " %>
    <jsp:useBean class="ftp.FtpBean" id="ftpbean" scope="session" />
    <%
    try
    String servername = request.getParameter("serverName");
    String username = request.getParameter("username");
    String password = request.getParameter("password");
    ftpbean.ftpConnect(servername, username, password);
    catch(Exception e)
    %>
    Sorry but your must have entered an incorrect login ingotmation.
    You are not allowed to login.
    Please leave the ftp portal.
    <%
    %>
    <h1> Welcome to the FTP Login. </h1>
    <FORM ACTION="ftplogin.jsp" METHOD=post>
    Please login
    Enter name of server:
    <input type="text" name="servername"><br>
    Enter user name?
    <input type="text" name="username"><br>
    Enter password
    <input type="text" name="password"><br>
    <input type="submit" name="Submit info">
    </FROM>
    <%=
    try
    // set the directory
    ftpbean.setDirectory("/home/eland/u6/k3074/w0109699/simple-bean");
    catch(Exception e)
    System.out.println(e);
    %>
    <%=
    try
    // Get the binary file '????' and save it to hard disk
    // the name will be 'local_file_name' .
    ftpbean.getBinaryFile("accessbean.jsp", "local_file_name", this);
    catch(Exception e)
    System.out.println(e);
    %>
    <%=
    try
    ftpbean.close();
    catch(Exception e)
    System.out.println(e);
    %>
    </body>
    </html>
    Location: /myJSPs/jsp/grid-portal-project/ftplogin.jsp
    Internal Servlet Error:
    org.apache.jasper.JasperException: Unable to compile Note: sun.tools.javac.Main has been deprecated.
    C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\ftplogin_1.java:110: Missing term.
    out.print(
    ^
    C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\ftplogin_1.java:110: ')' expected.
    out.print(
    ^
    C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\ftplogin_1.java:120: Missing term.
    ^
    C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\ftplogin_1.java:120: ';' expected.
    ^
    C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\ftplogin_1.java:121: Invalid expression statement.
    ^
    5 errors, 1 warning
         at org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:898)
         at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:733)
         at org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:506)
         at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:875)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
         at java.lang.Thread.run(Thread.java:536)

    Please note I have solved the compilation problem.
    But now getting runtime error. Here is the error:
    Error: 500
    Location: /myJSPs/jsp/grid-portal-project2/ftplogin.jsp
    Internal Servlet Error:
    javax.servlet.ServletException
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
         at jsp.grid_0002dportal_0002dproject2.ftplogin_1._jspService(ftplogin_1.java:128)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
         at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
         at org.apache.tomcat.core.Handler.service(Handler.java:235)
         at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
         at java.lang.Thread.run(Thread.java:536)
    Root cause:
    java.lang.NullPointerException
         at java.net.Socket.(Socket.java:282)
         at java.net.Socket.(Socket.java:118)
         at ftp.FtpBean.ftpConnect(FtpBean.java:323)
         at ftp.FtpBean.ftpConnect(FtpBean.java:293)
         at jsp.grid_0002dportal_0002dproject2.ftplogin_1._jspService(ftplogin_1.java:91)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
         at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
         at org.apache.tomcat.core.Handler.service(Handler.java:235)
         at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
         at java.lang.Thread.run(Thread.java:536)
    Here is my directory structure for ".jsp" and ".html" pages:
    C:\tomcat\jakarta-tomcat-3.3.1\webapps\myJSPs\jsp\grid-portal-project2
    Here is my directory structure for java classes,
    C:\tomcat\jakarta-tomcat-3.3.1\webapps\myJSPs\WEB-INF\classes
    ftp
    ftp\FtpBean.java
    ftp\FtpBean.class
    Here is the modified source code:
    <html>
    <head>
    <title> FTP Login </title>
    </head>
    <body>
    <%@ page import= "ftp.* " %>
    <jsp:useBean class="ftp.FtpBean" id="ftpbean" scope="session" />
    <%
               String servername = request.getParameter("serverName");
               String username   = request.getParameter("username");   
               String password   = request.getParameter("password");
               ftpbean.ftpConnect(servername, username, password);
    %>
    <h1> Welcome to the FTP Login. </h1>
    <FORM ACTION="ftplogin.jsp" METHOD=post>
    Please login
    Enter name of server:
    <input type="text" name="servername"><br>
    Enter user name?
    <input type="text" name="username"><br>
    Enter password
    <input type="text" name="password"><br>
    <input type="submit" name="Submit info">
    </FORM>
      <% 
               ftpbean.setDirectory("/home/eland/u6/k3074/w0109699/simple-bean");
      %>
      <%
               ftpbean.getBinaryFile("accessbean.jsp", "local_file_name");
      %>
      <%
                ftpbean.close();
      %>
    </body>
    </html>

  • Calling servlet from a java program

    Hi
    I need to call a servlet's doPost() method from a java program. I have a specific situation, where I need to call servlet from a java program. DUring this call I need to pass a file and two string to the servlet. Servelt after receiving the file and string uploads the file to the server at a specified location. I am stuck up as how to call servlet from a java program instead of a HTML or JSP.
    Can anyone help me to start with this.
    any suggestion is welcome.

    You have to establish a URLConnection with servlet from your java program.
    URL servletURL = new URL("http://localhost:8080/Myservlet?str1=abc&str2=def");
    URLConnection servletConnection = servletURL.openConnection();you can get the objectOutputStream
    ObjectOutputStream oos = new ObjectOutputStream (servletConnection.getOutputStream());
    oos.writeObject(your file object);-------------------------------------------------
    In the servlet u can get the strings using request.getParameter("str1");
    In the servlet u can get the strings using request.getParameter("str2");
    file = new ObjectInputStream (request.getInputStream()).readObject()a lot of resources are available on this ...
    hope this helps :)

  • Calling a servlet from a Java Stored Procedure

    Hey,
    I'm trying to call a servlet from a Java Stored Procedure and I get an error.
    When I try to call the JSP-class from a main-method, everything works perfectly.
    Java Stored Procedure:
    public static void callServlet() {
    try {
    String servletURL = "http://127.0.0.1:7001/servletname";
    URL url = new URL(servletURL);
    HttpURLConnection conn = (HttpURLConnection)url.openConnection();
    conn.setDoOutput(true);
    conn.setRequestProperty("Pragma", "no-cache");
    conn.connect();
    ObjectInputStream ois = new ObjectInputStream(conn.getInputStream());
    Integer client = (Integer)ois.readObject();
    ois.close();
    System.out.println(client);
    conn.disconnect();
    } catch (Exception e) {
    e.printStackTrace();
    Servlet:
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    Integer id = new Integer(10);
    OutputStream os = response.getOutputStream();
    ObjectOutputStream oos = new ObjectOutputStream(os);
    oos.writeObject(id);
    oos.flush();
    oos.close();
    response.setStatus(0);
    Grant:
    call dbms_java.grant_permission( 'JAVA_USER', 'SYS:java.net.SocketPermission','localhost', 'resolve');
    call dbms_java.grant_permission( 'JAVA_USER','SYS:java.net.SocketPermission', '127.0.0.1:7001', 'connect,resolve');
    Package:
    CREATE OR REPLACE PACKAGE pck_jsp AS
    PROCEDURE callServlet();
    END pck_jsp;
    CREATE OR REPLACE PACKAGE BODY pck_jsp AS
    PROCEDURE callServlet()
    AS LANGUAGE JAVA
    NAME 'JSP.callServlet()';
    END pck_jsp;
    Architecture:
    AS: BEA WebLogic 8.1.2
    DB: Oracle 9i DB 2.0.4
    Exception:
    java.io.StreamCorruptedException: InputStream does not contain a serialized object
    at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java)
    at java.io.ObjectInputStream.<init>(ObjectInputStream.java)
    The Servlet and the class work together perfectly, only when I make the call from
    within the database things go wrong.
    Can anybody help me.
    Thank in advance,
    Bart Laeremans
    ... Desperately seeking knowledge ...

    Look at HttpCallout.java in the following code sample
    http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/jwcache/Readme.html
    Kuassi

  • Is it possible to call a method in a servlet from  a java script ?

    I need to do a dynamic html page . In the page i select some things and then these things must communicate whit a servlet because the servlet will do some DB querys and update the same webpage.
    So is it possible to actually call a method of a servlet from a java script? i want to do something that looks like this page:
    http://www.hebdo.net/v5/search/search.asp?rubno=4000&cregion=1011&sid=69DHOTQ30307151
    So when u select something in the first list the secodn list automaticly updates.
    thank you very much

    You can
    1. load all the options when loading the page and
    set second selection options when user selected
    the first; or
    2. reload the page when user select first selection
    by 'onChange' event; or
    3. using iframe so you only need to reload part of
    the page.

  • My iPod touch is permanently disabled and it says to connect my iPod to my iTunes yet when I do that, it tells me to type in pass code even though it's still disabled. i cant go to DFU mode cause my home button is broken PLEASE HELP ME GOD I MISS MY IPOD

    My iPod touch is permanently disabled and it says to connect my iPod to my iTunes yet when I do that, it tells me to type in pass code even though it's still disabled. i cant go to DFU mode cause my home button is broken PLEASE HELP ME GOD I MISS MY IPOD TOUCH PLEASE :'((

    i cant do that sir ,my ipod touch 4g keeps rebooting and rebooting all over again until the battery is empty HELP GUYS PLEASE

  • XI Mail Adapter: sending emails with attachment with help of java mapping

    Hi ,
    On trying out the scenerio mentioned in the blog, using the java mapping provided
    "XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    The scenerio works just fine.
    But the payload as the content of the attachment is not getting generated in proper XML format.
    I suppose it's because of the replace special characters code part..
    Can anyone help me state the modification required in the code.
    Thanks!
    Regards,
    Faria Mithani

    It might be a codepage issue. Is your original payload UTF-8?

  • Help with java mapping

    PI File adapter has a processing option u2018Empty-Message Handlingu2019 to ignore or Write Empty Files. In case there is no data created after mapping on target side then this option determines whether to write an empty file or not. But there is a catch to this option when it comes to using it with File Content Conversion which is described in SAP Note u2018821267u2019. It states following:
    I configure the receiver channel with File content conversion mode and I set the 'Empty Message Handling' option to ignore. Input payload to the receiver channel is generated out of mapping and it does not have any record sets. However, this payload has a root element. Why does file receiver create empty output file with zero byte size in the target directory?  Example of such a payload generated from mapping is as follows:                                                           
    <?xml version="1.0" encoding="UTF-8"?>                          
    <ns1:test xmlns:ns1="http://abcd.com/ab"></ns1:test>
    solution :
    If the message payload is empty (i.e., zero bytes in size), then File adapter's empty message handling feature does NOT write files into the target directory. On the other hand, if the payload is a valid XML document (as shown in example) that is generated from mapping with just a root element in it, the File Adapter does not treat it as an empty message and accordingly it writes to the target directory. To achieve your objective of not writing files (that have just a single root element) into the target directory, following could be done:
    Using a Java or ABAP Mapping in order to restrict the creation of node itself during mapping. (This cannot be achieved via Message Mapping)
    Using standard adapter modules to do content conversion first and then write file. 
    can someone help with java mapping that can be used in this case?

    Hi,
        You have not mentioned the version of PI you are working in. In case you are working with PI 7.1 or above then here is the java mapping code you need to add after message mapping in the same interface mapping
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class RemoveRootNode extends AbstractTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    public void transform(TransformationInput arg0, TransformationOutput arg1)
              throws StreamTransformationException {
         // TODO Auto-generated method stub
         this.execute(arg0.getInputPayload().getInputStream(), arg1.getOutputPayload().getOutputStream());
    In case you are working in PI 7.0 you can use this code
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class RemoveRootNode implements StreamTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    The code for PI 7.0 should also work for PI 7.1 provided you use the right jar files for compilation, but vice-versa is not true.
    Could you please let us know if this code was useful to you or not?
    Regards
    Anupam
    Edited by: anupamsap on Dec 15, 2011 9:43 AM

  • Where can I get help re: a file missing from Pages in iCloud?

    Where can I get help re: a file missing from Pages in iCloud?

    If the file was also on a mac, then there was a local copy of the file in ~/Library/Mobile Documents.  If you use Time Machine or any other backup program on your computer, then try restoring the file(s).  Similarly the same thing would be done on a PC, but I'm not sure where the icloud local copies are kept.

  • Javax.servlet.jsp.JspException: java.lang.NullPointerException

    hi,
    I try to view my presentation in jsp page.I use oracle jdeveloper 9.2.0.4 and bibeans 9.2.0.4 and once 1 month ago I did this taks (I view a presentation from bibdemo in jsp file)
    now I try to view my own presentation in jsp but I recieve error message in my own schema and bibdemo schema!!
    when I use windows xp I recieve following error :
    500 Internal Server Error
    javax.servlet.jsp.JspException: BIB-10310 An unknown exception occurred.
    BIB-10101 Handler failed to handle UserObject.
    BIB-14067 Persistable object threw exception during lookup on method setXMLAsString; component class oracle.dss.dataSource.client.QueryClient; exception oracle.dss.util.persistence.BIPersistenceException.
    BIB-9509 Oracle OLAP did not create cursor.
    oracle.olapi.data.source.UnmatchedInputsException
    BIB-9509 Oracle OLAP did not create cursor.
    oracle.olapi.data.source.UnmatchedInputsException
    oracle.olapi.data.source.UnmatchedInputsException
         at oracle.dss.addins.jspTags.PresentationTag.doStartTag(PresentationTag.java:194)
         at test.jspService(test.jsp:6)
         [test.jsp]
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:778)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    and when I use windows NT I recieve following error :
    500 Internal Server Error
    javax.servlet.jsp.JspException: java.lang.NullPointerException
         at oracle.dss.addins.jspTags.RenderTag.doEndTag(RenderTag.java:212)
         at kafa_report__7._jspService(kafa_report_7.jsp:18)
         [kafa_report_7.jsp]
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:778)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    I
    what the problem is ????????
    thanks in advance,

    hi,
    here the result :
    <?xml version="1.0" encoding="UTF-8" ?>
    - <BICheckConfig version="1.0.2.0">
    <Check key="JDEV_ORACLE_HOME" value="d:\jdev904" />
    <Check key="JAVA_HOME" value="C:\j2sdk1.4.2_01" />
    <Check key="JDeveloper version" value="9.0.4.0.1419" />
    <Check key="BI Beans release description" value="BI Beans 9.0.4 Production Release" />
    <Check key="BI Beans component number" value="9.0.4.23.0" />
    <Check key="BI Beans internal version" value="2.7.5.32" />
    <Check key="host" value="200.20.20.11" />
    <Check key="port" value="1521" />
    <Check key="sid" value="ora10g" />
    <Check key="user" value="dw_targetschema" />
    <Check key="Connecting to the database" value="Successful" />
    <Check key="JDBC driver version" value="9.2.0.4.0" />
    <Check key="JDBC JAR file location" value="D:\jdev904\jdev\lib\patches" />
    <Check key="Database version" value="10.1.0.2.0" />
    <Check key="OLAP Catalog version" value="10.1.0.2.0" />
    <Check key="OLAP AW Engine version" value="10.1.0.2.0" />
    <Check key="OLAP API Server version" value="10.1.0.2.0" />
    <Check key="BI Beans Catalog version" value="N/A; not installed in dw_targetschema" />
    <Check key="OLAP API JAR file version" value="9.2" />
    <Check key="OLAP API JAR file location" value="d:\jdev904\jdev\lib\ext" />
    <Check key="OLAP API Metadata Load" value="Successful" />
    <Check key="Number of metadata folders" value="2" />
    <Check key="Number of metadata measures" value="1" />
    <Check key="Number of metadata dimensions" value="3" />
    - <Check key="OLAP API Metadata">
    - <![CDATA[
    ==============================================================================
    Type      Name (S=Schema, C=Cube, M=Measure, D=Dimension)         Status   
    ========= ======================================================= ============
    Folder... ROOT
    Folder...   KAFA_COLLECTION
    Folder...   KAFA_COLLECTION2
    Measure..      SALARY                                             Unsuccessful
                   S=DW_TARGETSCHEMA, C=EMPLOYEMENT_CUBE, M=SALARY
                   Connection lost. Reconnect                         Successful
    Dimension      DEP_DIM                                            Successful
                   S=DW_TARGETSCHEMA, D=DEP_DIM
    Dimension      EMP_DIM                                            Successful
                   S=DW_TARGETSCHEMA, D=EMP_DIM
    Dimension      JOB_DIM                                            Successful
                   S=DW_TARGETSCHEMA, D=JOB_DIM
      ]]>
    </Check>
    - <Check key="StackTrace">
    - <![CDATA[
    ============================================================================
    Queries on the following measures or dimensions failed
    (S=Schema, C=Cube, M=Measure, D=Dimension)
    "SALARY" measure query with S=DW_TARGETSCHEMA, C=EMPLOYEMENT_CUBE, M=SALARY
    ============================================================================
    Exception stacktrace for "SALARY" measure query with S=DW_TARGETSCHEMA, C=EMPLOYEMENT_CUBE, M=SALARY
    ============================================================================
    1) BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.idl.util.OlapiException: No more data to read from socket
    2) BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.idl.util.OlapiException: No more data to read from socket
    1) BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.idl.util.OlapiException: No more data to read from socket
    ============================================================================
    oracle.dss.dataSource.common.QueryRuntimeException: BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.idl.util.OlapiException: No more data to read from socket
    java.lang.CloneNotSupportedException: BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.idl.util.OlapiException: No more data to read from socket
         at oracle.dss.dataSource.common.Query.addQueryListener(Query.java:480)
         at BICheckConfig.runDefaultMeasureQuery(BICheckConfig.java:480)
         at BICheckConfig.printFolder(BICheckConfig.java:405)
         at BICheckConfig.printFolder(BICheckConfig.java:464)
         at BICheckConfig.checkConnection(BICheckConfig.java:350)
         at BICheckConfig.main(BICheckConfig.java:1348)
    2) BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.idl.util.OlapiException: No more data to read from socket
    ============================================================================
    java.lang.CloneNotSupportedException: BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.idl.util.OlapiException: No more data to read from socket
         at oracle.dss.dataSource.common.CubeCursor.clone(CubeCursor.java:387)
         at oracle.dss.dataSource.common.Query.addNewCubeCursorCopy(Query.java:2366)
         at oracle.dss.dataSource.common.Query.addQueryListener(Query.java:477)
         at BICheckConfig.runDefaultMeasureQuery(BICheckConfig.java:480)
         at BICheckConfig.printFolder(BICheckConfig.java:405)
         at BICheckConfig.printFolder(BICheckConfig.java:464)
         at BICheckConfig.checkConnection(BICheckConfig.java:350)
         at BICheckConfig.main(BICheckConfig.java:1348)
      ]]>
    </Check>
    </BICheckConfig>
    when I was transfering the collection from warehouse builder to database I recieve some error messages.
    but when I try to connect to database from bibeans every thing was ok so I thougth maybe it is because of that.
    and that about bibdemo why it doesn't work???
    it works before and I check it with bi_checkconfig
    thanks ,
    shima

  • Calling Servlet from a java prog?

    Hi all,
    I am calling servlet from a java prog (Java Agent in Lotus Notes) by using URL and URLConnection object. how can i trigger the Servlet By using doPost method .I have to send some parameter also.
    Thanx
    Muthu

    you need to open a connection to the servlet. Then you must call getInputStream() and getOutputStream() and use them in any way you see fit. I was trying this before and could not get POST to work unless I openned the input stream from the servlet. Strange... but doGet worked without openning the input stream???
    // open a connection....
    // write to the servlet
    servletConnection.getOutputStream().write("whatever");
    servletConnection.getOutputStream().flush();
    servletConnection.getOutputStream().close();
    // grab what the servlet sends back, required to do a post.
    byte [] in = new byte[100];
    servletConnection.getInputStream().read(in);
    servletConnection.getInputStream().close();

  • Call Oracle Help for Java in Oracle forms running in the web

    Hi, everyone,
    We are developing a web-enabled Oracle database application
    system. Oracle suggested us to use Oracle Help for Java(OHJ) to
    create an online help system for the web environment. We
    successfully created a OHJ program which can be independently.
    But we still have no idea how to call this OHJ program from the
    forms running in the web environment.
    Could anyone help us out?
    Thanks.
    null

    I would like to know if anyone has been able to do this too. Could someone respond if they have successfully gotten this to work?
    Thanks!!

  • Need help in Java Script

    i Need some help in Java Script,
    am using the following code :
    <script type="text/javascript">
    var newwindow;
    function poptastic(url)
    newwindow=window.open(url,'name','height=300,width=400,left=100, top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
    if (window.focus) {newwindow.focus()}
    else {newwindow.close()}
    //     if (window.focus) {newwindow.focus()}
    </script>
    In HTML,
    thWorld Environment
    Day, June 5<sup>th</sup>,2005
    Am using onmouseover event, so that when my mouse in on the link, popup is opened....and when my mouse is out of the link, the new window should b closed....
    but according to the above code, the new window is opened but have to close it manually....
    Is there any other way to close the popup when my mouse is out of the link

    Prawn,
    This is not really a good way to make friends. With the cross posting and the posting in a wrong forum anyway thing you have going.
    Please kindly take your question to an appropriate JavaScript forum.
    Have a happy day.
    Cross post from http://forum.java.sun.com/thread.jspa?messageID=3797201

  • Rename exported file in ODI with help of Java

    Hi.
    We have to implement new scenarios into execution repository. I marked scenarios and I exported them with help of procedure:
    OdiExportScen "-SCEN_NAME=#scen_name" "-SCEN_VERSION=-1" "-FILE_NAME=#DEP_EXPORT_DIRECTORY\SCEN_#SCEN_NAME 001.xml" "-FORCE_OVERWRITE=YES" "-RECURSIVE_EXPORT=YES" "-XML_VERSION=1.0" "-XML_CHARSET=windows-1251" "-JAVA_CHARSET=cp1251"
    But I have to put space between variable #SCEN_NAME and another part of file name. After export I want to rename file with help of Java script, but I get an error when I try to read list of files.
    import java.io.*;
    public class RenameFiles
         public static void main(String[] args)
              String dirPath = new String ("D:\\ODI");
              File dir = new File(dirPath);
              String dirList[] = dir.list(); /* I get error there*/
              for(int i=0; i<dirList.length; i++)
                   File oldFileName = new File(dirPath+"\\"+dirList);
                   File newFileName = new File(dirPath+"\\"+dirList[i].replaceAll(" ","_"));
                   oldFileName.renameTo(newFileName);
    Error in ODI Operator looks like:
    org.apache.bsf.BSFException: BeanShell script error: Parse error at line 9, column 31. Encountered: [ BSF info: Rem at line: 0 column: columnNo
         at bsh.util.BeanShellBSFEngine.eval(Unknown Source)
         at bsh.util.BeanShellBSFEngine.exec(Unknown Source)
         at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.A(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:662)

    I fixed it.
    All I need - put slashes at end of directory name. Also I removed implementation of class.
    import java.io.*;
    String dirPath = new String ("D:\\ODI");
    File dir = new File(dirPath+"\\");                // I put \\ at the end of directory name
    String[] dirList = dir.list();
    for(int i=0; i<dirList.length; i++)
         File oldFileName = new File(dirPath+"\\"+dirList);
         File newFileName = new File(dirPath+"\\"+dirList[i].replaceAll(" ","_"));
         oldFileName.renameTo(newFileName);
    Edited by: user12281180 on Apr 14, 2011 7:44 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to activate / disactivate a servlet with a java client ?

    I would like to know how to activate or disactivate a servlet with a java client or an applet ?
    Thanks...

    What does "activate" mean for servlets?

Maybe you are looking for

  • Using SVN under OS X.5 Leopard

    Hi there! We run a Mac Pro with OS X Server for collaboration services. We need to use SVN. As this service is not directly accessible from Server Admin, but is always running because it's used as a backend for Wikis and blogs, *is there any way to u

  • Why is Apple reserving money on my account to take?

    Checking my bank account, I see a company with the name Luxembourg, Musik Butik that has reserved 3 dollars to take off my account. I called my bank who doesn't know this company, and did an internet search and found out that this is actually the iTu

  • Use of Structures

    Hi all, What is the use of structures in query desigining? When we 'll go for structures? Thanks.

  • SQL + connection prob

    Hello, I successfully installed Ora 10G Enterprise, now the problem is i can log in as Scott/tiger, but for some reason i can not log in as sys or system, as a result i cannot add users. please help with this problem. thx sam

  • Boot camp and Vista home basic

    everything seems to be working well with BC and Vista. Vista has this tool that automatically checks for problems, and then tries to find solutions, this is all done in the background. When I check to see if I had any problems, well I do. It states t