[SQLJ] Context Problem

Hi all,
I am working on Oracle 9i and I compile with the Oracle Console Entreprise Manager.
From an instance baseA, I am looking for getting values from other instance baseB :
Code :
DefaultContext connB = Oracle.getConnection("jdbc:oracle:thin:@ipServer:1521:baseB","user","pwd");
DefaultContext connA = Oracle.getConnection("jdbc:oracle:thin:@ipServer:1521:baseA","user","pwd");
try {
     String result = "";
     #sql [[connB ]] { SELECT lib INTO :result FROM TAB_MESURE WHERE id = 4 };
     RETURN result;
finally {
     connB.close();
     connA.close();
When compiling, this error is displayed
Warning: Impossible de vérifier la clause WHERE. Erreur renvoyée par la base de données : ORA-00942: Table ou vue inexistante (french)
ORA-00942: Table or view doest not exist
- all tns are corectly set up
- Within the same instance,all requests are OK (without using of context)
- I tried diferent connection method wothout success (Oracle.connect, DefaultContext.setDefaultContext, )
Thanks for your help
Merci pour votre aide
Edited by: user11166064 on 14 mai 2009 02:41
Edited by: user11166064 on 14 mai 2009 02:49

Ok,
So i re-formulate my request, here the acual code executed :
h5. 1- Java code :
import java.sql.*;
import sqlj.runtime.ref.DefaultContext;
import oracle.sqlj.runtime.Oracle;
import sqlj.runtime.ExecutionContext;
#sql iterator MyIter2 (Integer elt_id, String elt_lst_code, String elt_lib, Integer elt_actif);
public class TestInsert {
public static void test() throws Exception {
          DefaultContext connB = Oracle.getConnection("jdbc:oracle:thin:@ipServer:1521:baseB","user","pwd");
          DefaultContext connA = Oracle.getConnection("jdbc:oracle:thin:@ipServer:1521:baseA","user","pwd");
          MyIter2 iter;
          Integer ident;
          String listCode;
          String lib;
          String actif;
          try {
               #sql [[connB]] iter={ select elt_id, elt_lst_code, elt_lib, elt_actif from baseB.<user>.ELT elt_elt_id is NULL };
               while (iter.next()) {
                    ident =      iter.elt_id();
                    listCode =      iter.elt_lst_code();
                    lib =           iter.elt_lib();
                    actif =          String.valueOf(iter.elt_actif());
                    #sql [connA]] { insert into BIBLIO_0 (ID, LIBELLE) values (:ident, :lib) };
               #sql [[connA]] { COMMIT};
          } finally {
               connB.close();
               connA.close();
h5. 2- Loadjava
loadjava -u user/pwd@connA -v -resolve TestInsert.java
it returns a warning :
Impossible to check SQL instruction
+#sql [connB] iter={ select elt_id, elt_lst_code, elt_lib, elt_actif from baseB.<user>.ELT elt_elt_id is NULL };+
h5. 3- Create and execute stored procedure
I connect to baseA through sql*plus and execute the command :
CREATE OR REPLACE PROCEDURE SP_TESTINSERT AS LANGUAGE JAVA  NAME 'TestInsert.test()';
EXECUTE SP_TESTINSERT;
I've got the errors :
ORA-29532: java call terminated by uncaught java exception :
java.sql.SQLException: ORA-00903: invalid table name
ORA-06512: at "BASEB.TESTINSERT", ligne 0
ORA-06512: at ligne 1
I've changed :
+#sql [[connB]] iter={ select elt_id, elt_lst_code, elt_lib, elt_actif from baseB.<user>.ELT elt_elt_id is NULL };+
to
+#sql [[connB]] iter={ select elt_id, elt_lst_code, elt_lib, elt_actif <user>.ELT elt_elt_id is NULL };+
but during the compilation (loadjava) I have :
ORA-29535: source requires recompilation
TestInsert:23: Impossible to check SQL interrogation. ORA-00903: invalid table name
#sql [connGeochim] iter={ select elt_id, elt_lst_code, elt_lib, elt_actif from
<user>.ELT elt_elt_id is NULL };
^
<no file>: Processing source TestInsert encountered sqlj translation failed.
Info: 2 errors
The following operations failed
source TestInsert: resolution
exiting : Failures occurred during processing
thanks

Similar Messages

  • SQLJ Translator problem

    I get the following error message when trying to compile a SQLJ
    applet under Windows 95.
    I've previously managed to compile and run simple SQLJ programs
    successfully.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    unexpected error occurred...
    java.lang.NoClassDefFoundError:
    LDatabase;Lsqlj/runtime/profile/RTResultSet;)V
    at java.lang.Class.getDeclaredConstructors(Compiled Code)
    at
    sqlj.framework.JSClass$ClassWrapper.getDeclaredConstructors
    (Compiled Code)
    at
    sqlj.framework.JSClass.getMaximallySpecificConstructors(Compiled
    Code)
    at sqlj.framework.JSClass.resolveConstructor
    (JSClass.java:1136)
    at sqlj.codegen.IteratorMetaData.getBaseIterator
    (IteratorMetaData.java:75)
    at sqlj.codegen.IteratorMetaData.<init>
    (IteratorMetaData.java:63)
    at sqlj.codegen.ExecCodegen.addResultTypes(Compiled Code)
    at sqlj.codegen.ExecCodegen.getExecStmt
    (ExecCodegen.java:336)
    at sqlj.codegen.ExecCodegen.createExecStmt
    (ExecCodegen.java:128)
    at sqlj.codegen.ExecCodegen.createGenerator
    (ExecCodegen.java:63)
    at sqlj.codegen.ExecCodegen.generate
    (ExecCodegen.java:560)
    at sqlj.codegen.BaseCodegen.generate(BaseCodegen.java:28)
    at sqlj.codegen.ParseletFactory$ParseletImpl.generate
    (ParseletFactory.java:115)
    at sqlj.syntax.SqljParselet.generate
    (SqljParselet.java:128)
    at
    sqlj.javac.JavaParserSubTokenManager$PositionedParselet.generate
    (JavaParserSubTokenManager.java:171)
    at
    sqlj.javac.JavaParserSubTokenManager$TokenManagerParselet.generat
    e(Compiled Code)
    at sqlj.javac.ASTCompilationUnit.generate(Compiled Code)
    at sqlj.translator.Translator.translate(Compiled Code)
    at sqlj.translator.Translator.translate
    (Translator.java:170)
    at sqlj.translator.Main.translate(Compiled Code)
    at sqlj.translator.Main.runTranslation(Main.java:92)
    at sqlj.translator.Main.runTranslation(Main.java:85)
    at sqlj.tools.Sqlj.statusMain(Compiled Code)
    at sqlj.tools.Sqlj.main(Sqlj.java:117)
    Database.sqlj: Error: Exception caught:
    Total 1 error.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>
    The applet code is listed below
    >>>>>>>>>>>>>>>>>>>>>>>>>>>
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.sql.*;
    import sqlj.runtime.*;
    import sqlj.runtime.ref.*;
    import sqlj.runtime.profile.*;
    import oracle.sqlj.runtime.*;
    #sql context MyContext;
    #sql iterator SalesIter( String ITEM_NAME, float COST );
    public class Database extends Applet {
    String buffer = new String ();
    public void init()
    { MyContext mctx = new MyContext
    ("jdbc:oracle:thin@ntastlab:1521:lab8","training","training",fals
    e);
    System.out.println ("Connected to the database");
    public void start()
    SalesIter siter = null;
    #sql siter = {SELECT ITEM_NAME, COST FROM SALES };
    while (siter.next())
    buffer = buffer + siter.ITEM_NAME() + siter.COST ();
    repaint ();
    siter.close ();
    public void stop()
    public void destroy()
    public void paint(Graphics g) {
    g.drawString(buffer, 50, 25);
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Any ideas ??
    null

    The problem occurs when SQLJ tries to determine the type
    of the iterator SalesIter which is in your source.
    But I do not know, what that problem actually is.
    What version of javac? of sqlj? (JDK 1.2 does not work
    before SQLJ 8.1.6 SDK-Beta).
    What is in your PATH/CLASSPATH?
    What happens when you put SalesIter in SalesIter.sqlj:
    #sql public iterator SalesIter (...);
    and add this to your SQLJ command line?
    Dominic Lawson (guest) wrote:
    : I get the following error message when trying to compile a SQLJ
    : applet under Windows 95.
    : I've previously managed to compile and run simple SQLJ programs
    : successfully.
    : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    : unexpected error occurred...
    : java.lang.NoClassDefFoundError:
    : LDatabase;Lsqlj/runtime/profile/RTResultSet;)V
    : at java.lang.Class.getDeclaredConstructors(Compiled Code)
    : at
    : sqlj.framework.JSClass$ClassWrapper.getDeclaredConstructors
    : (Compiled Code)
    : at
    sqlj.framework.JSClass.getMaximallySpecificConstructors(Compiled
    : Code)
    : at sqlj.framework.JSClass.resolveConstructor
    : (JSClass.java:1136)
    : at sqlj.codegen.IteratorMetaData.getBaseIterator
    : (IteratorMetaData.java:75)
    : at sqlj.codegen.IteratorMetaData.<init>
    : (IteratorMetaData.java:63)
    : at sqlj.codegen.ExecCodegen.addResultTypes(Compiled Code)
    : at sqlj.codegen.ExecCodegen.getExecStmt
    : (ExecCodegen.java:336)
    : at sqlj.codegen.ExecCodegen.createExecStmt
    : (ExecCodegen.java:128)
    : at sqlj.codegen.ExecCodegen.createGenerator
    : (ExecCodegen.java:63)
    : at sqlj.codegen.ExecCodegen.generate
    : (ExecCodegen.java:560)
    : at sqlj.codegen.BaseCodegen.generate(BaseCodegen.java:28)
    : at sqlj.codegen.ParseletFactory$ParseletImpl.generate
    : (ParseletFactory.java:115)
    : at sqlj.syntax.SqljParselet.generate
    : (SqljParselet.java:128)
    : at
    sqlj.javac.JavaParserSubTokenManager$PositionedParselet.generate
    : (JavaParserSubTokenManager.java:171)
    : at
    sqlj.javac.JavaParserSubTokenManager$TokenManagerParselet.generat
    : e(Compiled Code)
    : at sqlj.javac.ASTCompilationUnit.generate(Compiled Code)
    : at sqlj.translator.Translator.translate(Compiled Code)
    : at sqlj.translator.Translator.translate
    : (Translator.java:170)
    : at sqlj.translator.Main.translate(Compiled Code)
    : at sqlj.translator.Main.runTranslation(Main.java:92)
    : at sqlj.translator.Main.runTranslation(Main.java:85)
    : at sqlj.tools.Sqlj.statusMain(Compiled Code)
    : at sqlj.tools.Sqlj.main(Sqlj.java:117)
    : Database.sqlj: Error: Exception caught:
    : Total 1 error.
    : >>>>>>>>>>>>>>>>>>>>>>>>>>>
    : The applet code is listed below
    : >>>>>>>>>>>>>>>>>>>>>>>>>>>
    : import java.applet.Applet;
    : import java.awt.Graphics;
    : import java.sql.*;
    : import sqlj.runtime.*;
    : import sqlj.runtime.ref.*;
    : import sqlj.runtime.profile.*;
    : import oracle.sqlj.runtime.*;
    : #sql context MyContext;
    : #sql iterator SalesIter( String ITEM_NAME, float COST );
    : public class Database extends Applet {
    : String buffer = new String ();
    : public void init()
    : { MyContext mctx = new MyContext
    ("jdbc:oracle:thin@ntastlab:1521:lab8","training","training",fals
    : e);
    : System.out.println ("Connected to the database");
    : public void start()
    : SalesIter siter = null;
    : #sql siter = {SELECT ITEM_NAME, COST FROM SALES };
    : while (siter.next())
    : buffer = buffer + siter.ITEM_NAME() + siter.COST ();
    : repaint ();
    : siter.close ();
    : public void stop()
    : public void destroy()
    : public void paint(Graphics g) {
    : g.drawString(buffer, 50, 25);
    : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    : Any ideas ??
    null

  • Context Problem

    Hi ,
    I addEnviornment details to Context object as soon as user logons to the application .
    The user is validated against Weblogic Integration Server
    and then context is made and store in Session.
    I pass this context object to make a lookup on a session bean provided by WLI.However the look is made but any method is called on it gives following error.
    java.rmi.AccessException: Security Violation: User: '' has insufficient permission to access EJB: type=, application=exman, module=wlpi-ejb.jar, ejb=Admin, method=getInstanceTasks, methodInterface=Remote, signature={java.lang.String}.
    Can any one suggest the reason for this asap.
    Thanks
    Ash

    i found the problem,
    the reason being,
    The security context is associated with the current request, not the object obtained from JNDI, so you have to create a new initial context every time you need to access the EJB.
    Even when i was storing the context in session , it was not taking from session object but from the thread.

  • Merge IDocs: Context problem for 2nd IDoc

    Hi,
    I have a req:
    I have to merge 2 IDocs, material master and classification master. I have used multimaping 2:1. Target is a single soap message with only one statement (like: insert table matmaster values (material, maktx, lable1, lable2, lable3)...)
    in SAP, there may not be all classifications maintained for each material. So, the Classification IDoc field E1AUSPM-ATWRT may not be passed to PI.
    This segment E1AUSPM repeats in IDoc depends on classifications associated to material. max E1AUSPM segments are 100.
    So, if the classifications are not present in SAP, PI is not receiving the Field ATWRT in segment E1AUSPM. (there are some other fields in the segment).
    I am passing the MATNR, MAKTX, ATNAM, ATWRT and ATFLV to a UDF(type queue). The MATNR and MAKTX are from MATMAS. The fields ATNAM, ATWRT and ATFLV are from CLFMAS IDoc. These three Fields are from same segment E1AUSPM.
    I am using Context in Segment level E1AUSPM. I used "Exists", "RemContxt", "MapWithDefault"... tried all the Node functions.
    The problem is the contexts are not populating as per the IDoc data. I am getting inconsistent values in target message.
    if I remove context, only first value I am getting to the UDF.
    Can anybody suggest me how to feed blank values to the ATWRT context with regards of ATNAM? then I can reed in UDF.
    Thanks for your time...

    Here is aditional info:
    the IDoc CLFMAS Segment E1AUSPM Field ATWRT is not passing (coming) to PI in some segments. This is valid configuration in ECC. Now I have to fill empty context in the place if missed fields.
    <E1AUSPM SEGMENT="1">
            <MSGFN>004</MSGFN>
         <ATNAM>FLDCDE</ATNAM>
         <ATWRT>17</ATWRT>                     --- ATWRT present in Segment
         <ATFLV>0.000000000000000E+00</ATFLV>
    </E1AUSPM>
    <E1AUSPM SEGMENT="1">
         <MSGFN>004</MSGFN>
         <ATNAM>PALHCM</ATNAM>
         <ATWRT>10</ATWRT>                     --- ATWRT present in Segment               
         <ATFLV>1.800000000000000E+01</ATFLV>
    </E1AUSPM>
    <E1AUSPM SEGMENT="1">
         <MSGFN>004</MSGFN>
         <ATNAM>PALHIN</ATNAM>
         <ATFLV>1.900000000000000E+01</ATFLV>  --- ATWRT NOT present in Segment
    </E1AUSPM>
    <E1AUSPM SEGMENT="1">
         <MSGFN>004</MSGFN>
         <ATNAM>PALLCM</ATNAM>
         <ATFLV>2.000000000000000E+01</ATFLV>  --- ATWRT NOT present in Segment
    </E1AUSPM>
    <E1AUSPM SEGMENT="1">
         <MSGFN>004</MSGFN>
         <ATNAM>ROLHWT</ATNAM>
         <ATWRT>25</ATWRT>                      --- ATWRT present in Segment               
         <ATFLV>1.800000000000000E+01</ATFLV>
    </E1AUSPM>
    Above is the structure coming to PI. I am using the context in E1AUSPM level.
    When I see the context in Mapping:
    ATNAM   | ATWRT | ATFLV
    FLDCDE |  17       |  0
    PALHCM |  10       |  18
    PALHIN   |  25      |  19
    PALLCM  |  -         |  20
    ROLHWT |  -         |  18
    Actually the ATWRT value 25 should come in 5th row. but it moving to 3rd row. I am getting improper order or values into UDF.

  • Context problems after RequestDispatch

    I have the following problem :
    we have two separate war files deployed on our server (on we developped and assembled, the other we get from an external company)
    We need to be able to communicate from a servlet from the first war file to jsp/servlet from the second war file.
    I've managed to do it with the following code
    ServletContext newCtx = ctx.getContext("/ctx2");
    RequestDispatcher dispatch = ctx.getRequestDispatcher("/URLServlet2");
    dispatch.forward(request,response);
    This works fine, until you trigger another request from the second servlet (also deployed in the second war file)
    The server tries to locate it under the first context.
    Anyone has an idea how to solve this ?
    Thanks in advance

    I assume that ctx.getRequestDispatcher("/URLServlet2") is a typo and you meant newCtx.getRequestDispatcher("/URLServlet2").
    What would happen if you did the samething in the second servlet?
    i.e. :
    In second servlet
    ServletContext newCtx = ctx.getContext("/ctx2");
    RequestDispatcher dispatch = newCtx.getRequestDispatcher("/URLServlet2");
    dispatch.forward(request,response);

  • Initial Context Problem

    I have developed local entity bean in weblogic 8.1
    but i wouldnt able to get the Initial Context of the Bean.
    It throws javax.naming.NoInitialContextException
    But in jndi tree it shows the bean..
    the problem is only for Local Bean
    Remote Beans are working fine

    G,
    One thing I would make sure of is that you are not deploying oc4j.jar file as part of you ear. Check the 'exploded' ear file under WEB-INF/lib to ensure that you do not have an oc4j.jar file under it.
    It usually happens that in your Jdev Project, if you had included the oc4j.jar library solely to compile, but when you generated the deployment profile it would by default include all the libraries that are part of the project. You can correct this by right clicking the deployment profile and editing its properties to exclude the libraries that you don't want to deploy.

  • Servlet - EJB, caching home & context problem

    Hello,
    I just run into the following problem:
    I created a thin client which accesses the EJB's via a servlet.
    In this servlet I cached the InitialContext und and the reference
    to the Home interface. While creating the initial context I provided
    login/password to access the EJB so it can't be accessed from the guest
    user.
    The first method call works as expected, any further call results
    in a RemoteException - Insufficent permissions.
    Any hints? I'm using 5.1, SP6.
    Zhanxs in advance
    Marcel

    The security creditials you suppplied to the IntialContext are only applied
    to the thread that created the InitialContext. I have only found one
    work-around - Construct an otherwise useless IntialContext each time a
    thread attempts to use and EJB or its home. This is inefficient and almost
    (not quite) destroys the advantage of caching the stubs.
    Is there any other solution? Any thing coming down the pike?
    Chuck McCorvey
    "Marcel Zielinski" <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    I just run into the following problem:
    I created a thin client which accesses the EJB's via a servlet.
    In this servlet I cached the InitialContext und and the reference
    to the Home interface. While creating the initial context I provided
    login/password to access the EJB so it can't be accessed from the guest
    user.
    The first method call works as expected, any further call results
    in a RemoteException - Insufficent permissions.
    Any hints? I'm using 5.1, SP6.
    Zhanxs in advance
    Marcel

  • WebLogic 10.3, SQLJ, Cache problems

    Plz help.
    How disable caching statement by SQLJ on WebLogic server?
    what the actual problem:
    1. create or replace view vtest as select object_name from dba_objects where rownum<200
    2. test.sqlj
      #sql [dx] testIterator = {
        select object_name from vtest
      int cnt=0;
      while( testIterator.next() ){
        cnt++;
      System.out.println("Count: "+cnt);
    3. Restart WebLogic and deploy project
    4. Run test on server, in log file
      "Count: *199*"
    5. create or replace view vtest as select object_name from dba_objects where rownum<10
    6. Run test on server, in log file
      "Count: *199*"
    7. Restart WebLogic
    8. Run test on server, in log file
      "Count: *9*"

    No.
    I tried it to make some tests with the driver, but then i get:
    "java.sql.SQLException: [BEA][SQLServer JDBC Driver]This driver is locked for use with embedded applications."

  • HELP: Forms and Report Session Context Problem

    Hi:
    I use CONTEXT in our applications. Every time there's a query to
    any of the applications tables it's added a predicate in WHERE
    clause to restrict access to the data that belongs to different
    people!
    The context is set when the user LOGIN into applications (NOT
    DATABASE) using our login system. Each user that login's in
    applications use one user that is always the same (X_USER)
    connecting to database. Each session created after our login
    system validate user creates a CONTEXT in session and that
    context is used to restrict access in tables with the predicate!
    Our problem is... Calling reports form forms on WEB create
    another session with the user X_USER and when create's that
    session the CONTEXT parameters are not SET, so i can SELECT data
    from any table!
    Is there a way to execute in reports our PROCEDURE that set
    context of the session?
    Can the reports use the same session of the forms ?
    Any solution?
    Thankx in advance,
    Ricardo

    No, Forms and Reports use different sessions. What you can do is
    to add a parameter to the report that contains the context. And
    use the Before Parameter Form trigger to set the appropriate
    action.
    I used to set a role to the report user this way, but you can
    adapt it to your particular needs.

  • SQLJ -Context

    This seems a very simple example, but it does not work. I want
    to specify a context with a SQLJ-statement. It keeps telling
    me "Missing equal sign in assignment" at line 23 (#sql
    (testContext) { drop table test };).
    Can anyone tell me what is wrong?? To me it al seems ok.
    Thanks!
    import java.sql.*;
    import sqlj.runtime.ref.*;
    #sql context NewContext;
    public class MyClass{
    public static void main (String args[]) throws SQLException{
    try{
    Class.forName("oracle.jdbc.driver.OracleDriver");
    catch (Exception e){
    System.out.println("driver not loaded");
    NewContext testContext = new NewContext( "jdbc:oracle:thin:@
    (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(COMMUNITY=TCP.world)
    (PROTOCOL=TCP)(Host=atlantis)(Port=1521)))(CONNECT_DATA=
    (SID=AT)))"
    , "acht114", "vh_cu
    rsus", true);
    #sql (testContext) { drop table test };
    testContext.close();
    null

    Thanx, it works.
    It's weird though, in all the books and articles I have it is
    done with normal brackets ().
    Now I can go on, great!!
    Mohan E (guest) wrote:
    : context should be placed in rectangular braces, like:
    : #sql [testContext] { drop table test };
    : All the best
    : Mohan E
    : Els (guest) wrote:
    : : This seems a very simple example, but it does not work. I
    want
    : : to specify a context with a SQLJ-statement. It keeps telling
    : : me "Missing equal sign in assignment" at line 23 (#sql
    : : (testContext) { drop table test };).
    : : Can anyone tell me what is wrong?? To me it al seems ok.
    : : Thanks!
    : : import java.sql.*;
    : : import sqlj.runtime.ref.*;
    : : #sql context NewContext;
    : : public class MyClass{
    : : public static void main (String args[]) throws SQLException{
    : : try{
    : : Class.forName("oracle.jdbc.driver.OracleDriver");
    : : catch (Exception e){
    : : System.out.println("driver not loaded");
    : : NewContext testContext = new NewContext( "jdbc:oracle:thin:@
    : : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(COMMUNITY=TCP.world)
    : : (PROTOCOL=TCP)(Host=atlantis)(Port=1521)))(CONNECT_DATA=
    : : (SID=AT)))"
    : : , "acht114",
    : "vh_cu
    : : rsus", true);
    : : #sql (testContext) { drop table test };
    : : testContext.close();
    null

  • Context problems

    It's me again :-) This time I have a problem that perplexes me.
              <P>
              Below are the logs when I accessed the login page. This works fine. Noticed the POST /myweb/process context is valid and data is returned.
              <P>
              134.120.65.62 - - [16/Oct/2006:17:42:34 -0800] "POST /myweb/process HTTP/1.1" 302 295 <BR>
              134.120.65.62 - - [16/Oct/2006:17:42:34 -0800] "GET /myweb/web/logout.html HTTP/1.1" 200 1087 <BR>
              134.120.65.62 - - [16/Oct/2006:17:42:34 -0800] "GET /myweb/web/index.html HTTP/1.1" 200 9714 <BR>
              134.120.65.62 - - [16/Oct/2006:17:42:34 -0800] "GET /myweb/web/images/buttons/common/login_over.gif HTTP/1.1" 200 1902 <BR>
              134.120.65.62 - - [16/Oct/2006:17:42:34 -0800] "GET /myweb/web/images/static/logo.jpg HTTP/1.1" 200 17500 <BR>
              134.120.65.62 - - [16/Oct/2006:17:42:34 -0800] "GET /myweb/web/images/buttons/common/login_out.gif HTTP/1.1" 200 2059 <BR>
              <P>
              When I entered the correct password, everything is fine. But when I entered an incorrect password, the same servlet is called but this time the server is unable to find it (the 404 page not found error).
              <P>
              134.120.65.62 - - [16/Oct/2006:17:42:40 -0800] "POST /myweb/process HTTP/1.1" 404 1214
              <P>
              I'm not sure why it can't find it a second time. The URL path is exactly the same for both access... /myweb/process (I did a string comparison).
              <P>
              Can anyone tell me what I'm doing wrong or why the same context works differently?
              <P>
              Thanks a lot!
              <P>Warmest regards<BR>-Ben

    Hi, Benjamin
              I think the response 404 does not mean can not find the servlet, but the
              page the servlet forward to when you input incrorrect password. You should
              check your code, when the use inputs an incorrect password, which page your
              servlet forward to.
              Jade
              <Benjamin Le> wrote in message news:[email protected]...
              > It's me again :-) This time I have a problem that perplexes me.
              >
              > <P>
              > Below are the logs when I accessed the login page. This works fine.
              > Noticed the POST /myweb/process context is valid and data is returned.
              >
              > <P>
              > 134.120.65.62 - - [16/Oct/2006:17:42:34 -0800] "POST /myweb/process
              > HTTP/1.1" 302 295 <BR>
              > 134.120.65.62 - - [16/Oct/2006:17:42:34 -0800] "GET /myweb/web/logout.html
              > HTTP/1.1" 200 1087 <BR>
              > 134.120.65.62 - - [16/Oct/2006:17:42:34 -0800] "GET /myweb/web/index.html
              > HTTP/1.1" 200 9714 <BR>
              > 134.120.65.62 - - [16/Oct/2006:17:42:34 -0800] "GET
              > /myweb/web/images/buttons/common/login_over.gif HTTP/1.1" 200 1902 <BR>
              > 134.120.65.62 - - [16/Oct/2006:17:42:34 -0800] "GET
              > /myweb/web/images/static/logo.jpg HTTP/1.1" 200 17500 <BR>
              > 134.120.65.62 - - [16/Oct/2006:17:42:34 -0800] "GET
              > /myweb/web/images/buttons/common/login_out.gif HTTP/1.1" 200 2059 <BR>
              >
              > <P>
              > When I entered the correct password, everything is fine. But when I
              > entered an incorrect password, the same servlet is called but this time
              > the server is unable to find it (the 404 page not found error).
              >
              > <P>
              > 134.120.65.62 - - [16/Oct/2006:17:42:40 -0800] "POST /myweb/process
              > HTTP/1.1" 404 1214
              >
              > <P>
              > I'm not sure why it can't find it a second time. The URL path is exactly
              > the same for both access... /myweb/process (I did a string comparison).
              > <P>
              > Can anyone tell me what I'm doing wrong or why the same context works
              > differently?
              >
              > <P>
              > Thanks a lot!
              >
              > <P>Warmest regards<BR>-Ben

  • Mapping and context problem

    Hi i am not being able to perform this mapping, the scenario is like this:
    i need to create one LINE in the output for each E1PLOGI in the input when FLAG3 = 'S' 
    also as i don't understand  completely the context theory i cant figure out in witch context to set the fields
    My context is set like this
    FLAG3 -> context = E1PLOGI
    My logic is createif( FLAG3 = 'S' ) -> LINE
    My xml test file have:
    one E1PLOGI node without E1P0000
    one E1PLOGI  with E1P0000 node where FLAG3 = 'N'
    one E1PLOGI completely OK
    The result is that not even one LINE its created.
    If only put one line ok it works ok, but if one line doesnt have an  E1P0000 node or if FLAG3='S' then the next OK input lines it wont come out.
    plase heeelp!
    IN STRUCTURE
    <Z_HRMD_A>
         <IDOC BEGIN="1">
                  <EDI_DC40 SEGMENT="1">
                           <CREDAT>20080731</CREDAT>
                   </EDI_DC40>
                   <E1PLOGI SEGMENT="1">
                             <E1PITYP SEGMENT="1">
                                     <E1P0000 SEGMENT="1">
                                            <FLAG3>S</FLAG3>
                                     </E1P0000>
                              </E1PITYP>
                    </E1PLOGI>
         </IDOC>
    </Z_HRMD_A>
    Z_HRMD_A      1..1
    IDOC           1..1
    EDI_DC40     1..1
    CREDAT          0..1
    E1PLOGI          1..UNBOUNDED
    E1PITYP          0..UNBOUNDED
    E1P0000          0..UNBOUNDED
    FLAG3          0..1
    OUT STRUCTURE
    <FILE_X>
         <LINE>
              <FIELD_1>
              <FIELD_2>
              <FIELD_3>
              <FIELD_4>
         </LINE>
    </FILE_X>
    FILE_X          1..1
    LINE          0..UNBOUNDED
    FIELD_X          0..1
    Edited by: Mariano Billinghurst on Aug 4, 2008 6:05 PM
    Edited by: Mariano Billinghurst on Aug 4, 2008 6:12 PM

    Here it is the mapping and the display of the queues in each step.
    Mi test xml has
    1-one E1EPILOGI without EP0000
    2-one E1EPILOGI OK
    3-one E1EPILOGI with FLAG3 = N
    4-one E1EPILOGI OK
    http://img297.imageshack.us/img297/3615/mappingandqueueswi0.jpg
    beena with your solution it was creating two lines , one with 1 and one with 3.
    Kumar i think with your solution i am much closer, but still doesnt work ok. Could you explain me why at the end of the queres everything says "supress"?
    Regards.
    Mariano.

  • Context Problem when using Use One As Many

    Hi SapGuru's.
    i have got a requirement in an IDOC To File Interface where the segments in the IDOC are like E1LFA1M->E1LFM1M->E1WYT3M
    THE Test data is like below
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:IDOC_Test_Mt xmlns:ns0="urn:sap.shoprite.co.za:ecc.md">
       <ZCREMAS>
          <IDOC>
             <E1LFA1M>
                <LIFNR>0000641065</LIFNR>
                <E1LFM1M>
                   <EKORG>1001</EKORG>
                   <E1WYT3M>
                      <PARVW>BA</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>LF</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>RS</PARVW>
                   </E1WYT3M>
                </E1LFM1M>
             </E1LFA1M>
             <E1LFA1M>
                <LIFNR>0000641065</LIFNR>
                <E1LFM1M>
                   <EKORG>1002</EKORG>
                   <E1WYT3M>
                      <PARVW>BA</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>RS</PARVW>
                   </E1WYT3M>
                </E1LFM1M>
             </E1LFA1M>
             <E1LFA1M>
                <LIFNR>0000641065</LIFNR>
                1002
             </E1LFA1M>
             <E1LFA1M>
                <LIFNR>0000641065</LIFNR>
                <E1LFM1M>
                   <EKORG>1004</EKORG>
                   <E1WYT3M>
                      <PARVW>BA</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>LF</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>RS</PARVW>
                   </E1WYT3M>
                </E1LFM1M>
                <E1LFM1M>
                   <EKORG>1005</EKORG>
                   <E1WYT3M>
                      <PARVW>BA</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>LF</PARVW>
                   </E1WYT3M>
                   <E1WYT3M>
                      <PARVW>RS</PARVW>
                   </E1WYT3M>
                </E1LFM1M>
             </E1LFA1M>
          </IDOC>
       </ZCREMAS>
    </ns0:IDOC_Test_Mt>
    the Target xsd is like below :
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="urn:sap.shoprite.co.za:demo.trans" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:sap.shoprite.co.za:demo.trans" xmlns:p1="urn:sap.shoprite.co.za:bluecube">
       <xsd:import namespace="urn:sap.shoprite.co.za:bluecube"/>
       <xsd:element name="Vendor_masterTest1" type="p1:Vendor_masterTest"/>
    </xsd:schema>
    the EKORG Field from source is mapping to Purchase Organisation(field) in target file .
    so here when i use one as many and iam mapping EKORG->MAP WITH DEFAULT ->USE ONE AS MANY and as in the above test data if there are multiple E1LFM1M's the first paramter of Use one as many is getting 2 ekorg's in only one context but here i want them to be created on separate context(please have a look at 4th E1LFA1M in the test data to get clear idea.
    can any of you help me in this.
    regards.
    Varma

    Hi,
    Try this.
    Source Code:
    IDOC
    --->E1LFA1M
                    -->E1LFM1M
                          --> EKORG = 1000
                          --> E1WYT3M
                          --> E1WYT3M
                    -->E1LFM1M
                    -->E1LFM1M
                          --> EKORG = 1001
                          --> E1WYT3M
                          --> E1WYT3M
                    -->E1LFM1M
                          --> EKORG = 1006
                          --> E1WYT3M
                          --> E1WYT3M
    Output:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:target xmlns:ns0="http://test">
    <Data>
       <M>1000</M>
    </Data>
    <Data>
       <M>1000</M>
    </Data>
    <Data>
       <M></M>
    </Data>
    <Data>
       <M>1001</M>
    </Data>
    <Data>
       <M>1001</M>
    </Data>
    <Data>
       <M>1006</M>
    </Data>
    <Data>
       <M>1006</M>
    </Data>
    </ns0:target>
    Use below Mapping:
    Use If then Else Function.
    1. If condition: E1WYT3M Exists
    2. Then pass E1WYT3M
    3. Else Pass E1LFM1M with "Map with Default"
    Lets Consider Output of this step as "A".
    Use One As Many.
    First Input: E1LFM1M to exists to Split By Each Value
    Second and Third Input will be Out Put of "A" (Above Step).
    Lets Consider Out put of this Step as "B"
    Use If without Else.
    If "B" is true then pass "A"  to exists.
    Out put  of this to Remove context to Target Vendor Master Node. In my sample it will be Node "Data"
    Now for Mapping of Field Purch Org/In my case field "M"
    Use If without Else.
    If "B" is true then Pass "C". Output of this to Split by each value to target.
    For C:
    Use if then else
    if E1WYT3M exists then pass EKORG else pass constant blank.
    Hope its clear!!
    -Gouri

  • Context problem during mapping.

    I have to map header details with item details.
    in header one segment has 3 records.
    when i am using splitbyvalue with removecontext, the 3 records are coming only in first item details. other item details are blank.
    How to solve it ? please help.
    Regards,
    Study SAP

    Sender Payload is :
    <?xml version="1.0" encoding="UTF-8" ?>
    <X12>
    <ISA>
      <ISA01>00</ISA01>
      <ISA02 />
      <ISA03>00</ISA03>
      <ISA04 />
      <ISA05>08</ISA05>
      <ISA06>8493</ISA06>
      <ISA07>12</ISA07>
      <ISA08>434343</ISA08>
      <ISA09>071030</ISA09>
      <ISA10>2145</ISA10>
      <ISA11>U</ISA11>
      <ISA12>00400</ISA12>
      <ISA13>100001802</ISA13>
      <ISA14>0</ISA14>
      <ISA15>P</ISA15>
      <ISA16>></ISA16>
      </ISA>
    <GS>
      <GS01>PO</GS01>
      <GS02>4343</GS02>
      <GS03>24343</GS03>
      <GS04>20071030</GS04>
      <GS05>2145</GS05>
      <GS06>243438</GS06>
      <GS07>X</GS07>
      <GS08>004030</GS08>
      </GS>
    <TS_850>
    <ST>
      <ST01>850</ST01>
      <ST02>300091763</ST02>
      </ST>
    <BEG>
      <BEG01>00</BEG01>
      <BEG02>SA</BEG02>
      <BEG03>64821185</BEG03>
      <BEG04 />
      <BEG05>20071030</BEG05>
      <BEG06>100000485002</BEG06>
      </BEG>
    <REF>
      <REF01>DP</REF01>
      <REF02>832</REF02>
      <REF03>W</REF03>
      </REF>
    <REF>
      <REF01>IA</REF01>
      <REF03>119800</REF03>
      </REF>
    <CSH>
      <CSH01>P4</CSH01>
      </CSH>
    <ITD>
      <ITD01>14</ITD01>
      <ITD02 />
      <ITD04 />
      <ITD05>5</ITD05>
      <ITD06 />
      <ITD09 />
      <ITD12>NET 45</ITD12>
      </ITD>
    <DTM>
      <DTM01>010</DTM01>
      <DTM02>20071031</DTM02>
      </DTM>
    <DTM>
      <DTM01>001</DTM01>
      <DTM02>20071107</DTM02>
      </DTM>
    <TD5>
      <TD505>FOLLOW TRAFFIC DIVISION</TD505>
      </TD5>
    <TD5>
      <TD505>SHIPPING INSTRUCTIONS</TD505>
      </TD5>
    <GROUP_6>
    <N1>
      <N101>SF</N101>
      <N102>D</N102>
      </N1>
    <N4>
      <N401>D</N401>
      <N402>J</N402>
      <N403>43</N403>
      </N4>
      </GROUP_6>
    <GROUP_8>
    <GROUP_9>
    <N1>
      <N101>Z7</N101>
      <N102 />
      <N103>92</N103>
      <N104>14811</N104>
      </N1>
      </GROUP_9>
    <GROUP_9>
    <N1>
      <N101>BT</N101>
      <N102 />
      <N103>92</N103>
      <N104>94508</N104>
      </N1>
      </GROUP_9>
    <GROUP_9>
    <N1>
      <N101>ST</N101>
      <N102 />
      <N103>92</N103>
      <N104>94508</N104>
      </N1>
      </GROUP_9>
      </GROUP_8>
      <GROUP_11 />
    <GROUP_12>
    <PO1>
      <PO101 />
      <PO102>2</PO102>
      <PO103>AS</PO103>
      <PO104>103.8</PO104>
      <PO105>WH</PO105>
      <PO106>IN</PO106>
      <PO107>10090110</PO107>
      <PO108>ON</PO108>
      <PO109>F</PO109>
      <PO110>08</PO110>
      <PO111>3434234</PO111>
      </PO1>
    <GROUP_14>
    <PID>
      <PID01>F</PID01>
      <PID02>75</PID02>
      <PID03>VI</PID03>
      <PID04 />
      <PID05>CLWHT</PID05>
      </PID>
      </GROUP_14>
      </GROUP_12>
    <GROUP_12>
    <PO1>
      <PO101 />
      <PO102>2</PO102>
      <PO103>AS</PO103>
      <PO104>103.8</PO104>
      <PO105>WH</PO105>
      <PO106>IN</PO106>
      <PO107>10090219</PO107>
      <PO108>ON</PO108>
      <PO109>F</PO109>
      <PO110>08</PO110>
      <PO111>43423342</PO111>
      </PO1>
    <GROUP_14>
    <PID>
      <PID01>F</PID01>
      <PID02>75</PID02>
      <PID03>VI</PID03>
      <PID04 />
      <PID05>WH*BL</PID05>
      </PID>
      </GROUP_14>
      </GROUP_12>
    <GROUP_12>
    <PO1>
      <PO101 />
      <PO102>1</PO102>
      <PO103>AS</PO103>
      <PO104>103.8</PO104>
      <PO105>WH</PO105>
      <PO106>IN</PO106>
      <PO107>10090318</PO107>
      <PO108>ON</PO108>
      <PO109>F</PO109>
      <PO110>08</PO110>
      <PO111>4342424</PO111>
      </PO1>
    <GROUP_14>
    <PID>
      <PID01>F</PID01>
      <PID02>75</PID02>
      <PID03>VI</PID03>
      <PID04 />
      <PID05>BL*WH</PID05>
      </PID>
      </GROUP_14>
      </GROUP_12>
    <GROUP_31>
    <CTT>
      <CTT01>4</CTT01>
      </CTT>
      </GROUP_31>
    <SE>
      <SE01>29</SE01>
      <SE02>300091763</SE02>
      </SE>
      </TS_850>
      </X12>
    Receiver Payload is :
    <?xml version="1.0" encoding="UTF-8"?>
    <ZZ_-AFS_-ORDERS05><IDOC BEGIN="1"><E1EDK01 SEGMENT="1"><ACTION></ACTION><BSART>SA</BSART>
    <BELNR>64821185</BELNR>
    <ABLAD></ABLAD>
    <VSART_BEZ>20071030</VSART_BEZ>
    <AUGRU_BEZ>100000485002</AUGRU_BEZ>
    <ZJCP_ISA SEGMENT="1">
    <AUTH_INFO_QUALIF>00</AUTH_INFO_QUALIF>
    <AUTHORIZATION_INFORMATION>
    </AUTHORIZATION_INFORMATION>
    <SECU_INFO_QUALIF>00</SECU_INFO_QUALIF>
    <SECURITY_INFORMATION></SECURITY_INFORMATION>
    <INTERCHANGE_ID_QUALIF_DUNS>08</INTERCHANGE_ID_QUALIF_DUNS>
    <INTERCHANGE_SENDER_ID>6111350003</INTERCHANGE_SENDER_ID>
    <INTERCHANGE_ID_QUALIF_UCC>12</INTERCHANGE_ID_QUALIF_UCC>
    <INTERCHANGE_RECEIVER_ID>2126438989</INTERCHANGE_RECEIVER_ID>
    <INTERCHANGE_DATE>071030</INTERCHANGE_DATE>
    <INTERCHANGE_TIME>2145</INTERCHANGE_TIME>
    <REPETITION_SEPARATOR>U</REPETITION_SEPARATOR>
    <INTERCH_CTRL_VER_NO>00400</INTERCH_CTRL_VER_NO>
    <INTERCHANGE_CTRL_NO>100001802</INTERCHANGE_CTRL_NO>
    <ACKNOWLEDGMENT_REQUESTED>0</ACKNOWLEDGMENT_REQUESTED>
    <USAGE_INDICATOR>P</USAGE_INDICATOR>
    <COMPONENT_ELEMENT_SEP>&gt;</COMPONENT_ELEMENT_SEP>
    </ZJCP_ISA><ZJCP_REF SEGMENT="1">
    <REF01>DP</REF01><REF02>832</REF02><REF03>WOMENS APPAREL</REF03></ZJCP_REF><ZJCP_REF SEGMENT="2"><REF01>IA</REF01><REF03>119800</REF03></ZJCP_REF>
    <E1J3P01 SEGMENT="1">
    <E1EDPA1 SEGMENT="1">
    <PARVW>JM</PARVW>
    </E1EDPA1>
    <E1EDPA1 SEGMENT="2">
    <PARVW>RE</PARVW
    ></E1EDPA1>
    <E1EDPA1 SEGMENT="3">
    <PARVW>WE</PARVW>
    </E1EDPA1>
    </E1J3P01><E1J3P01 SEGMENT="2">
    </E1J3P01>
    <E1J3P01 SEGMENT="3">
    </E1J3P01>
    </IDOC></ZZ_-AFS_-ORDERS05>
    we need to map value of N1 (all the 3 values) Segment with E1EDPA1 segment, it should come in all the item segments (E1J3PO1).
    But it is coming only in first item segment (E1J3PO1).
    This is the problem.
    Regards,
    Study SAP

  • Mapping Context Problem

    Hi All,
    I hav a <b>source structure</b> as
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:OB xmlns:ns0="http://cibasc.com/anil">
       <Root>
          <VBELN/>
          <EDL24>  -
    1..Unbounded
             <NTEGW/>
             <MATNR/>
             <ETXTH9>
                <FUNCTION>pck</FUNCTION>
                    <ETXTP9>
                                <TDFORMAT>c</TDFORMAT>
                         <TDLINE>qqq</TDLINE>
                 </ETXTP9>
                 <ETXTP9>
                               <TDFORMAT>c</TDFORMAT>
                        <TDLINE>rrr</TDLINE>
                 </ETXTP9>
                 <ETXTP9>
                        <TDFORMAT>u</TDFORMAT>
                        <TDLINE>mmm</TDLINE>
                 </ETXTP9>
             </ETXTH9>
             <ETXTH9>
                   <FUNCTION>pck</FUNCTION>
                    <ETXTP9>
                               <TDFORMAT>c</TDFORMAT>
                        <TDLINE>qqq</TDLINE>
                 </ETXTP9>
                 <ETXTP9>
                               <TDFORMAT>c</TDFORMAT>
                        <TDLINE>rrr</TDLINE>
                 </ETXTP9>
                 <ETXTP9>
                        <TDFORMAT>u</TDFORMAT>
                        <TDLINE>ppp</TDLINE>
                 </ETXTP9>
             </ETXTH9>
             <ETXTH9>
                   <FUNCTION>pck</FUNCTION>
                    <ETXTP9>
                               <TDFORMAT>c</TDFORMAT>
                        <TDLINE>qqq</TDLINE>
                 </ETXTP9>
                 <ETXTP9>
                               <TDFORMAT>c</TDFORMAT>
                        <TDLINE>rrr</TDLINE>
                 </ETXTP9>
                 <ETXTP9>
                        <TDFORMAT>cu</TDFORMAT>
                        <TDLINE>ttt</TDLINE>
                 </ETXTP9>
               </ETXTH9>
          </EDL24>
       </Root>
    </ns0:OB>
    The Target Structure is :
    <Root>
        <Attrib> -
    0 to Unbounded
           <Element1>
           <Element2>
           <Element3>
           <Element4>
        </Attrib>
    </Root>
    Now i wanna map <VEBLN> which is under Root to Element1
    <VEBLN>   ---   <Element1>
    <NETGW>   <b>if not equal to 0 then</b> -
    <Element2> (If this condition fails, the mapping for this occurence of EDL24 shud b stopped and shud goahead with the next occurence.
    <TDLINE>    -
       <Element4> The condition for this is as follows:
    Check for the element FUNCTION whose value is 'pck' and if it 'pck', then again check for the element TDFORMAT in the segment ETXTP9 for the value 'cu'. if it 'cu', then populate the Element4 with the TDLINE.
    I had tried in most of the ways....but din't get it..
    Any help wud b appreciated.
    Thnx in Advance
    Anil

    Hi,
    Try this...
    Mapping:
    NTEGW(with context as ROOT)>getNTEGW>Attrib
    VBELN(with context as ROOT )--\
    NTEGW(with context as ROOT )|>useOneAsMany-->Element1
    NTEGW(with context as EDL24)--/
    NTEGW(with context as EDL24)-->Element2
    TDLINE(ETXTP9)-----><b>THEN</b>
    FUNCTION(ETXTH9)--\
    TDFORMAT(ETXTH9)--|->useOneAsMany-\
    TDFORMAT(ETXTP9)--/
    |->Equals-\
    CONSTANT("pck")-/
    |->and-><b>IF</b>->formatbyexample->pass->E4
    TDFORMAT(ETXTP9)-\
    |->StringEquals-/
    CONSTANT("pck")-/
    CONSTANT("dontpass")-----><b>ELSE</b>
    <b>UserDefinedFunctions:</b>
    <b>Choose: QUE option:</b>
    public void getNTEGW(String[] NTEGW,ResultList result,Container container){
    for(int i=0;i<NTEGW.length;i++)
    if(NTEGW<i>.equals("0"))
    result.addValue(ResultList.SUPPRESS);
    else
    result.addValue(NTEGW<i>);
    <b>Choose: Context option:</b>
    public void pass(String[] a,ResultList result,Container container){
    for(int i=0;i<a.length;i++)
    if(!a<i>.equals("dontpass"))
    result.addValue(a<i>);
    Regards,
    KNS Kumar.

Maybe you are looking for