Filter mapping problems

Hi everyone,
I'm writing some servlet filters. I've written a test filter, but am having trouble getting it to map correctly.
I'm using Tomcat 4.0.4 on Windows 2000.
I can get it to map to any JSP file like this (in web.xml):
<filter-mapping>
  <filter-name>testFilter</filter-name>
  <url-pattern>*.jsp</url-pattern>
</filter-mapping>Or to any file like this:
  <url-pattern>/*</url-pattern>However, i'd like to get it to map to any jsp file in a certain directory (the 'auth' directory). I've tried this, but it dosent work (ie The filter is never run):
  <url-pattern>/auth/*.jsp</url-pattern>Interestingly, the following does work, but is not what I need, as I only want it to map only to jsp files:
  <url-pattern>/auth/*</url-pattern>Anyone got any ideas?
Thanks very much,
Mel.

According to the servlet spec, you cannot use URL mapping in the way you describe - it's either a path or a suffix, noth both. Perhaps you could separate the JSPs that require filtering into a particular path and map from that path (e.g. "/auth/*") to the filter.
Good Luck.

Similar Messages

  • Problem with filter mapping

    Hello.
    I am creating a login web application. At the moment I am using tomcat 5.5. I am using the memoryRealm to authenticate the user. This seems to be a very common problem but after a day of searching cannot find why this is not working. Basically I have created my filter like so:
    package com.login;
    import javax.servlet.*;
    public class LoginFilter implements Filter {
         protected FilterConfig filterConfig;
         public void init(FilterConfig filterConfig) throws ServletException {
              this.filterConfig = filterConfig;
         public void destroy() {
              this.filterConfig = null;
         public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
              throws java.io.IOException, ServletException {
              System.out.println("Hello World!");
              System.out.println("I am working!");
              chain.doFilter(request, response);
    }This is then mapped in the web.xml descriptor:
    <filter>
              <filter-name>LoginFilter</filter-name>
              <filter-class>com.login.LoginFilter</filter-class>
              <description>Performs pre-login and post-login operation</description>
         </filter>and the mapping is as follows:
    <filter-mapping>
              <filter-name>LoginFilter</filter-name>
              <url-pattern>/j_security_check</url-pattern>
         </filter-mapping>I then have a JSP form whos action is "j_security_check" when the user clicks submit this should cause the mapping to trigger my servlet. This is not the case and I cannot see why my filter is not being triggered.
    Any ideas?

    Brent,
    Thanks for reporting this. As it turns out, we removed the /* filter-mapping, in the 10.1.2.1 release, and did not add the ordDeliverMedia mapping. I just tested it and yes, with the 10.1.2.1 we now get the same NullPointerException as you got. When creating a non-Jhs ViewController project with drag and drop, there is no longer a /* filter-mapping, and a new ordDeliverMedia mapping, so your fix is as it should be, and we will add this mapping in the next maintenance release.
    Steven Davelaar,
    JHeadstart Team.

  • Problems With url-pattern in a filter-mapping

    Hi!
    I need to make a filter when the clients call a jsf pages in /pages in my web application, but when i make the filter-mapping like this:
         <filter-mapping>
              <filter-name>sessionFilter</filter-name>
              <url-pattern>/pages/*.jsf</url-pattern>
         </filter-mapping>An exception appears:
    SEVERE: Parse error in application web.xml
    java.lang.IllegalArgumentException: Invalid <url-pattern> /pages/*.jsf in filter mapping
         at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
         at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
         at org.apache.commons.digester.Digester.endElement(Digester.java:1061)
         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1548)
         at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:263)
         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:624)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4290)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.core.StandardService.start(StandardService.java:480)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)the <url-pattern>/pages/*</url-pattern> not work to me because process all pages, I nedd only *.jsf
    Please Help me whit this.

    "the <url-pattern>/pages/*</url-pattern> not work to me because process all pages, I nedd only *.jsf"
    Yes but in the filter you can get the url from the request.getUrl() and then only process requests that contain .jsf. Simply just pass all other requests along.
    Some information on url pattern matching:
    http://edocs.bea.com/wls/docs61/webapp/components.html#113049

  • SecurityFilter mapping problem

    Hi, i have setup security in my app by applying the SecurityFilter class but I have a big problem with the SecurityFilter mapping. Apparently there is a bug in jsc as I have the same problem as in thread http://forum.java.sun.com/thread.jspa?forumID=881&threadID=5063740
    I implemented the workaround using <filter-mapping>
        <filter-name>SecurityFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping> as suggested just to make sure my app is configured correctly at and everything worked (each request is routed back to my login page).
    However here is my issue, i have a separate section (sub folder) of my app for admin stuff which requires logging in which is why i need to set the SecurityFilter mapping to the url pattern "/faces/admin/*.jsp" only. This mapping does not invoke the SecurityFilter so every admin page is fully accessible which is obviously incorrect. Using the faces servlet mapping above instead of a url pattern works but unfortunately applies the SecurityFilter to my whole app thus all pages including the main user website pages are now redirected to my login page too which is incorrect.
    So, is there a fix for this bug yet or another workaround that will only apply the SecurityFilter to certain area of a web app?
    Thanks.

    Thanks for responding. Maybe you are on to something. I'm not using any navigation-case(s) because I was using the new JSF 2 ability to call directly to a page/facelet.
    Example:
    In my index.xhtml I have a <h:commandLink action="servers">Servers</h:commandLink> that calls servers.xhtml. When the "Servers" link is selected the SecurityFilter doFilter gets "index.xhtml" as the request.
    Thanks for your help,
    Dave

  • What is Wrong with my filter and filter-mapping in web.xml?

    First, thanks all for your attention.
    I have checked the place where I should place <filter> and <filter-mapping> in web.xm. They should be after the <display-name>, before <servlet> and <servlet-mapping>.
    However, as soon as I insert the <filter> and <filter-mapping> elements in my web.xml, all my struts-bean.tld, struts-html.tld, etc. in the web.xml cannot be found at the runtime.
    Please help in identifying the problem. Thank you.
      <filter>
       <filter-name>trailFilter</filter-name>
       <filter-class>org.osjava.taglib.trail.OriginalRequestFilter</filter-class>
      </filter>
      <filter-mapping>
       <filter-name>trailFilter</filter-name>
       <url-pattern>*.do</url-pattern>
      </filter-mapping>and my web-xml is:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
      "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
      <display-name>Struts Example Application</display-name>
      <!-- Action Servlet Configuration -->
      <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml, /WEB-INF/struts-config-registration.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <!-- Action Servlet Mapping -->
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>
      <!-- The Welcome File List -->
      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
      <!-- The default error page -->
      <error-page>
       <exception-type>java.lang.Exception</exception-type>
       <location>\Error.jsp</location>
      </error-page>
      <!-- Application Tag Library Descriptor -->
      <taglib>
        <taglib-uri>/tags/app</taglib-uri>
        <taglib-location>/WEB-INF/app.tld</taglib-location>
      </taglib>
      <!-- Struts Tag Library Descriptors -->
      <taglib>
        <taglib-uri>/tags/struts-bean</taglib-uri>
        <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>/tags/struts-html</taglib-uri>
        <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>/tags/struts-logic</taglib-uri>
        <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>/tags/struts-nested</taglib-uri>
        <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
      </taglib>
    </web-app>

    Filters were introduced in the servlet 2.3 specification (j2ee 1.3) - http://java.sun.com/products/servlet/Filters.html.
    Your web.xml constraints your web application to adhere to 2.2 standards (according to your DOCTYPE definition in your web.xml). Change it to conform to 2.3 standards
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
            //your definitions
    </web-app>Note : Your container should support the 2.3 spec (Tomcat 4.0 and above does, I guess)
    ram.

  • What is Wrong with filter and filter-mapping in My web.xml?

    First, thanks all for your attention.
    I have checked the place where I should place <filter> and <filter-mapping> in web.xm. They should be after the <display-name>, before <servlet> and <servlet-mapping>.
    However, as soon as I insert the <filter> and <filter-mapping> elements in my web.xml, all my struts-bean.tld, struts-html.tld, etc. in the web.xml cannot be found at the runtime.
    Please help in identifying the problem. Thank you.
      <filter>
       <filter-name>trailFilter</filter-name>
       <filter-class>org.osjava.taglib.trail.OriginalRequestFilter</filter-class>
      </filter>
      <filter-mapping>
       <filter-name>trailFilter</filter-name>
       <url-pattern>*.do</url-pattern>
      </filter-mapping>and my web-xml is:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
      "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
      <display-name>Struts Example Application</display-name>
      <!-- Action Servlet Configuration -->
      <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml, /WEB-INF/struts-config-registration.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <!-- Action Servlet Mapping -->
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>
      <!-- The Welcome File List -->
      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
      <!-- The default error page -->
      <error-page>
       <exception-type>java.lang.Exception</exception-type>
       <location>\Error.jsp</location>
      </error-page>
      <!-- Application Tag Library Descriptor -->
      <taglib>
        <taglib-uri>/tags/app</taglib-uri>
        <taglib-location>/WEB-INF/app.tld</taglib-location>
      </taglib>
      <!-- Struts Tag Library Descriptors -->
      <taglib>
        <taglib-uri>/tags/struts-bean</taglib-uri>
        <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>/tags/struts-html</taglib-uri>
        <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>/tags/struts-logic</taglib-uri>
        <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>/tags/struts-nested</taglib-uri>
        <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
      </taglib>
    </web-app>

    Multiple Post - http://forum.java.sun.com/thread.jspa?threadID=734506

  • Mapping problem with Wireless Keyboard and Japanese iPhone

    Hi everyone:
    This seems to be a slightly obscure question -- at least, I can't find a ready answer for it with the search terms I've tried, possibly because most people don't use this particular accessory with the iPhone.
    I have an iPhone 4 that I bought from and use on Softbank, the carrier in Japan, where I live.  While visiting the United States recently, I bought an Apple Wireless Keyboard from an Apple retailer.   I wanted to carry it with me for use with my iPhone, so I would reliably have a convenient way to access the Internet without being confined to the touchscreen keyboard.  (I live in a rural area where WiFi spots are uncommon, but my iPhone's access to Softbank's data network is fairly good and consistent.)
    However, to my frustration, I can't use the keyboard due to a mapping problem.  The Bluetooth connection is fine -- the iPhone can discover the keyboard.  However, the mapping is off: typing "Q" gets me "A," typing "Z" gets me "W", numbers and punctuation are off, etc.  The key point: This is NOT a problem with the International Keyboard settings (under the Settings -> General -> Keyboard -> International Keyboards menu).  I have the Keyboard setting set to QWERTY, which is the layout of the Apple keyboard; I have tried all the other possibilities, just in case.  None of them work.  Setting the Keyboard setting to QWERTY does not make the external QWERTY keyboard map correctly.
    The rather ironic addendum is this: While on a recent trip to Tokyo, I visited the Apple store in Shibuya and, after concluding the main business of my visit (discussing my MacBook's battery problems with an English-speaking staffer), I took out my iPhone and keyboard and asked him about my mapping problem.  He started with the Keyboard menu, tried the same things I had tried, realized they weren't working, and puzzled over the problem for a while.  Then he did this: He hit a key combination (I believe) that brought up a menu on the iPhone's screen.  "Ah, there's your problem," he said, and selected a new setting.  The problem was instantly fixed.
    To my chagrin, however, I neglected to write down what "Ken" had done to fix the problem.  Argh... I was looking at the iPhone upside-down; I'd already taken up more than half an hour; people were waiting, and I guess, being used to living in the countryside now, that I'm not used to Shibuya crowds any more.  Anyway, I didn't take careful notes or ask him to walk me through it, and now I cannot recall or repeat what he did.  And I still can't use my keyboard!
    Any ideas or advice, anyone?  How did "Ken" fix my problem, and how can I repeat it?  Much, much appreciated, in advance.

    THAT'S IT.  Sir, you have solved my problem.  Thank you!!
    And I feel a little silly; this will doubtless seem to an expert as if it should have been obvious all along.  But isn't that always the way in hindsight?
    Here's what happened: The key combination I was trying to remember was "Apple/command + space on the hardware keyboard," as you just said above.  The "menu" it brings up is, apparently, a list of keyboards.  I take it that this list is the same as the list of the "virtual" keyboards on the iPhone?  I have never had more than one external keyboard -- the Apple Wireless -- but I do have several keyboards active virtually, as the iPhone in Japan seems to come with both the "Nihongo Ten-key" and the "Nihongo Romaji" keyboards active, and I added several other languages as well.
    When I hit "Apple/command + space," this list comes up on the iPhone's touchscreen.  Highlighted and checked at the top is "English," just as if it had been selected all along.  But nonetheless, when I first turn on and pair my keyboard with the iPhone, I need to perform this key-combination action, as if to "reselect" English, and then the keyboard promptly starts working properly as QWERTY.  I can only assume that one of the others had been default-selected before -- presumably one of the Nihongo ones? -- and that this was causing the interference.
    Thank you again!  You have made me and my wireless keyboard very happy.

  • Problems with ViaVoice under Leopard, especially key mapping problems

    ViaVoice's behavior has changed considerably under Leopard. First I will discuss the key mapping problem, since I'm eagerly looking for an answer to this problem. At the end of this post, I will voice some of the other problems I've experienced for those who may be interested. The key mapping problem may be specific to the fact that I use a foreign keyboard with a US version of ViaVoice.
    INTRO:
    I have used ViaVoice on my Mac for years, more or less without problems (ViaVoice's bugginess is notorious).
    Those who know ViaVoice will know that one has two general options for dictation. One can dictate into ViaVoice's so-called SpeakPad, which allows special formatting, editing and dictation error correction within the dictated text, or one can dictate into "external" software such as Microsoft Word, in which case ViaVoice just sends a string of characters to that software. SpeakPad appears to make strong use of the operating system's built-in functionality for character formatting, document formatting, etc.
    *MY PROBLEM*
    I have a German keyboard on my PowerBook, yet dictate in US English. When I dictated into SpeakPad under Tiger, all characters appeared correctly. However, when I dictated into Microsoft Word using Tiger, I had to switch the keyboard mapping from German to US to get all characters (that means including the characters that are located at different positions on a German keyboard than they are on a US keyboard such as y, z, apostrophes and parentheses) to appear correctly.
    Under Leopard, things have changed. Now it doesn't matter whether I dictate into SpeakPad or Word; the results are the same and many characters do not appear correctly.
    If set to a German keyboard, y and z appear as expected. To name a few irregularities:
    "(" appears as ")"
    ")" appears as "="
    apostrophes appear as "#" and
    ";" appears as ","
    If set to a US keyboard, y and z are interchanged. "(" and ")" appear as expected. Apostrophes appear as "\" and ";" appears as ","
    By comparison, if typed (as opposed to dictated, as in the examples above) "correctly" (i.e. based on the letters printed on the keyboard) on a German keyboard set to imitate a US keyboard:
    y and z are interchanged
    apostrophes appear as "|"
    "(" appears as "*"
    ")" appears as "(" and
    ";" appears as the symbol for "less than"
    Since I don't have a US keyboard, I can't say how it would behave if set to imitate a German keyboard, i.e. if there's a correlation to the results I get when I dictate.
    Since I was previously able to dictate correctly into SpeakPad by setting the keyboard to "German" and into Word by setting the keyboard to "US," I presume that this is a problem in Leopard, not ViaVoice.
    *OTHER PROBLEMS WITH VIAVOICE UNDER LEOPARD*
    In addition to the aforementioned key mapping problems (that may be specific to those of us with foreign keyboards), ViaVoice appears to have lost considerable functionality in Leopard. I cannot access SpeakPad's Preferences and the correction window. Moreover, the traffic-light like window buttons have disappeared from the VoiceCenter (although they work if you click where they should be). SetupAssistent appears to function.
    I've written to Nuance about these problems, but have little hope that they will invest the time in producing a patch since they haven't released any updates since 2003.

    Thrums1,
    I've never had to "register" ViaVoice after updating the system. I thus suspect you haven't fully followed my above, three-step advice (particularly step 3).
    1) Reinstall ViaVoice from CD.
    2) Update to the latest version (using the patch downloadable from Nuance's website).
    3) Replace the “temp” and “users” folders (in the "ViaVoice" folder at the upper level of your home directory) by a previous copy thereof. When I say previous copy, I mean a copy from when ViaVoice was still working properly, e.g. a copy from when it was running under Tiger.
    As I said, I've gotten ViaVoice to survive several system updates by following the above steps. To my knowledge, the last step is critical since it saves you from having to reconfigure ViaVoice under the new operating system (in this case Leopard). I suspect that ViaVoice is crashing on your system because it's trying to start some module of the SetUpAssistant that is incompatible with Leopard (as many are). If you instead use old copies of the "temp" and "users" folders (from the previous system), then ViaVoice doesn't have to go through the initial "registration" process; ViaVoice doesn't need the SetUpAssistant; and all is (more or less) fine.
    Good luck!
    BTW, to my knowledge, Dictate only runs on Intel Macs. It thus won't run on a G4 iBook, just as it won't run on my PowerBook G4.

  • Mapping problem with compressed key update record

    Hi, could you please advise?
    I'm getting the following problem:
    About a week ago replicat abened with "Error in mapping" error. I found in discard file some record looking like:
    filed1 = NULL
    field2 =
    field3 =
    field4 =
    field5 =
    datefield = -04-09 00:00:00
    field6 =
    field8 =
    field9 = NULL
    field10 =
    Where filed9 = @GETENV("GGHEADER", "COMMITTIMESTAM"), field10 = = @GETENV("GGHEADER", "COMMITTIMESTAM"), others are table fields mapped by USEDEFAULTS
    So I got Mapping problem with compressed key update record at 2012-06-01 15:44
    I guess I need to mention that extract failed in 5 minuts before it with: VAM function VAMRead returned unexpected result: error 600 - VAM Client Report <[CFileInfo::Read] Timeout expired after 10 retries with 1000 ms delay, waiting to read transaction log or backup files. To increase the number of retries, use SETENV (GGS_CacheRetryCount = n) in Extract parameter file. To control retry delay time, use SETENV (GGS_CacheRetryDelay = n). handle: 0000000000000398 ReadFile GetLastError:997 Wait GetLastError:997>.
    I don't know if it has ther same source as data corruption, could you tell me if it is?
    Well, I created new extract, starting 2012-06-01 15:30 to check if there was something with extract at the time, but got the same error.
    If I run extract beging at 15:52 it starts and works.
    But well, I got another one today. Data didn't look that bad, but yet one column came with null value:( And I'm using it as a key column, so I got Mapping problem with compressed key update record again:(
    I'm replicating from SQL Server 2008 to Oracle 11g.
    I'm actually using NOCOMPRESSUPDATES in Extract.
    CDC is enabled for all tables replicated. The only thing is that it is enabled not by ADD TRANDATA command, but by SQL Server sys.sp_cdc_enable_table, does it matter?
    Could you please advise why does it happen?

    Well, the problem begins somewhere in extract or before extract, may be in transaction log, I don't know:(
    Here are extract parameters:
    EXTRACT ETCHECK
    TRANLOGOPTIONS MANAGESECONDARYTRUNCATIONPOINT
    SOURCEDB TEST, USERID **, PASSWORD *****
    exttrail ./dirdat/ec
    NOCOMPRESSUPDATES
    NOCOMPRESSDELETES
    TABLE tst.table1, COLS (field1, field2, field3, field4, field5, field6, field7, field8 );
    TABLE tst.table2, COLS (field1, field2, field3, field4 );
    Data pump:
    EXTRACT DTCHECK
    SOURCEDB TEST, USERID **, PASSWORD *****
    RMTHOST ***, MGRPORT 7809
    RMTTRAIL ./dirdat/dc
    TABLE tst.table1;
    TABLE tst.table2;
    Replicat:
    REPLICAT rtcheck
    USERID tst, PASSWORD ***
    DISCARDFILE ./dirrpt/rtcheck.txt, PURGE
    SOURCEDEFS ./dirdef/sourcei.def
    HANDLECOLLISIONS
    UPDATEDELETES
    MAP tst.table1, t.table1, COLMAP (USEDEFAULTS , filed9 = @GETENV("GGHEADER", "COMMITTIMESTAMP"), filed10= @CASE(@GETENV("GGHEADER", "OPTYPE"), "SQL COMPUPDATE", "U", "PK UPDATE", "U",@GETENV("GGHEADER", "OPTYPE")) ), KEYCOLS (field3);
    MAP dbo.TPROCPERIODCONFIRMSTAV, TARGET R_019_000001.TPROCPERIODCONFIRMSTAV, COLMAP (USEDEFAULTS , field5 = @GETENV("GGHEADER", "COMMITTIMESTAMP"), filed6= @CASE(@GETENV("GGHEADER", "OPTYPE"), "SQL COMPUPDATE", "U", "PK UPDATE", "U",@GETENV("GGHEADER", "OPTYPE")) ), KEYCOLS (filed1, field2, field3);
    Rpt file for replicat:
    Oracle GoldenGate Delivery for Oracle
    Version 11.1.1.1 OGGCORE_11.1.1_PLATFORMS_110421.2040
    Windows x64 (optimized), Oracle 11g on Apr 22 2011 00:34:07
    Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
    Starting at 2012-06-05 12:49:38
    Operating System Version:
    Microsoft Windows Server 2008 R2 , on x64
    Version 6.1 (Build 7601: Service Pack 1)
    Process id: 2264
    Description:
    ** Running with the following parameters **
    REPLICAT rtcheck
    USERID tst, PASSWORD ***
    DISCARDFILE ./dirrpt/rtcheck.txt, PURGE
    SOURCEDEFS ./dirdef/sourcei.def
    HANDLECOLLISIONS
    UPDATEDELETES
    MAP tst.table1, t.table1, COLMAP (USEDEFAULTS , filed9 = @GETENV("GGHEADER", "COMMITTIMESTAMP"), filed10= @CASE(@GETENV("GGHEADER", "OPTYPE"), "SQL COMPUPDATE", "U", "PK UPDATE", "U",@GETENV("GGHEADER", "OPTYPE")) ), KEYCOLS (field3);
    MAP dbo.TPROCPERIODCONFIRMSTAV, TARGET R_019_000001.TPROCPERIODCONFIRMSTAV, COLMAP (USEDEFAULTS , field5 = @GETENV("GGHEADER", "COMMITTIMESTAMP"), filed6= @CASE(@GETENV("GGHEADER", "OPTYPE"), "SQL COMPUPDATE", "U", "PK UPDATE", "U",@GETENV("GGHEADER", "OPTYPE")) ), KEYCOLS (filed1, field2, field3);
    CACHEMGR virtual memory values (may have been adjusted)
    CACHEBUFFERSIZE: 64K
    CACHESIZE: 512M
    CACHEBUFFERSIZE (soft max): 4M
    CACHEPAGEOUTSIZE (normal): 4M
    PROCESS VM AVAIL FROM OS (min): 1G
    CACHESIZEMAX (strict force to disk): 881M
    Database Version:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Database Language and Character Set:
    NLS_LANG = "AMERICAN_AMERICA.CL8MSWIN1251"
    NLS_LANGUAGE = "AMERICAN"
    NLS_TERRITORY = "AMERICA"
    NLS_CHARACTERSET = "CL8MSWIN1251"
    For further information on character set settings, please refer to user manual.
    ** Run Time Messages **
    Opened trail file ./dirdat/dc000000 at 2012-06-05 12:49:39
    2012-06-05 12:58:14 INFO OGG-01020 Processed extract process RESTART_ABEND record at seq 0, rba 925 (aborted 0 records).
    MAP resolved (entry tst.table1):
    MAP tst.table1, t.table1, COLMAP (USEDEFAULTS , filed9 = @GETENV("GGHEADER", "COMMITTIMESTAMP"), filed10= @CASE(@GETENV("GGHEADER", "OPTYPE"), "SQL COMPUPDATE", "U", "PK UPDATE", "U",@GETENV("GGHEADER", "OPTYPE")) ), KEYCOLS (field3);
    2012-06-05 12:58:14 WARNING OGG-00869 No unique key is defined for table table1. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
    Using the following default columns with matching names:
    field1=field1, field2=field2, field3=field3, field4=field4, field5=field5, field6=field6, field7=field7, field8=field8
    Using the following key columns for target table R_019_000001.TCALCULATE: field3.
    2012-06-05 12:58:14 WARNING OGG-01431 Aborted grouped transaction on 'tst.table1', Mapping error.
    2012-06-05 12:58:14 WARNING OGG-01003 Repositioning to rba 987 in seqno 0.
    2012-06-05 12:58:14 WARNING OGG-01151 Error mapping from tst.table1 to tst.table1.
    2012-06-05 12:58:14 WARNING OGG-01003 Repositioning to rba 987 in seqno 0.
    Source Context :
    SourceModule : [er.main]
    SourceID : [er/rep.c]
    SourceFunction : [take_rep_err_action]
    SourceLine : [16064]
    ThreadBacktrace : [8] elements
    : [C:\App\OGG\replicat.exe(ERCALLBACK+0x143034) [0x00000001402192B4]]
    : [C:\App\OGG\replicat.exe(ERCALLBACK+0x11dd44) [0x00000001401F3FC4]]
    : [C:\App\OGG\replicat.exe(<RCALLBACK+0x11dd44) [0x000000014009F102]]
    : [C:\App\OGG\replicat.exe(<RCALLBACK+0x11dd44) [0x00000001400B29CC]]
    : [C:\App\OGG\replicat.exe(<RCALLBACK+0x11dd44) [0x00000001400B8887]]
    : [C:\App\OGG\replicat.exe(releaseCProcessManagerInstance+0x25250) [0x000000014028F200]]
    : [C:\Windows\system32\kernel32.dll(BaseThreadInitThunk+0xd) [0x000000007720652D]]
    : [C:\Windows\SYSTEM32\ntdll.dll(RtlUserThreadStart+0x21) [0x000000007733C521]]
    2012-06-05 12:58:14 ERROR OGG-01296 Error mapping from tst.table1 to tst.table1.
    * ** Run Time Statistics ** *
    Last record for the last committed transaction is the following:
    Trail name : ./dirdat/dc000000
    Hdr-Ind : E (x45) Partition : . (x04)
    UndoFlag : . (x00) BeforeAfter: A (x41)
    RecLength : 249 (x00f9) IO Time : 2012-06-01 15:48:56.285333
    IOType : 115 (x73) OrigNode : 255 (xff)
    TransInd : . (x03) FormatType : R (x52)
    SyskeyLen : 0 (x00) Incomplete : . (x00)
    AuditRBA : 44 AuditPos : 71176199289771
    Continued : N (x00) RecCount : 1 (x01)
    2012-06-01 15:48:56.285333 GGSKeyFieldComp Len 249 RBA 987
    Name: DBO.TCALCULATE
    Reading ./dirdat/dc000000, current RBA 987, 0 records
    Report at 2012-06-05 12:58:14 (activity since 2012-06-05 12:58:14)
    From Table tst.table1 to tst.table1:
    # inserts: 0
    # updates: 0
    # deletes: 0
    # discards: 1
    Last log location read:
    FILE: ./dirdat/dc000000
    SEQNO: 0
    RBA: 987
    TIMESTAMP: 2012-06-01 15:48:56.285333
    EOF: NO
    READERR: 0
    2012-06-05 12:58:14 ERROR OGG-01668 PROCESS ABENDING.
    Discard file:
    Oracle GoldenGate Delivery for Oracle process started, group RTCHECK discard file opened: 2012-06-05 12:49:39
    Key column filed3 (0) is missing from update on table tst.table1
    Missing 1 key columns in update for table tst.table1.
    Current time: 2012-06-05 12:58:14
    Discarded record from action ABEND on error 0
    Aborting transaction on ./dirdat/dc beginning at seqno 0 rba 987
    error at seqno 0 rba 987
    Problem replicating tst.table1 to tst.table1
    Mapping problem with compressed key update record (target format)...
    filed1 = NULL
    field2 =
    field3 =
    field4 =
    field5 =
    datefield = -04-09 00:00:00
    field6 =
    field8 =
    field9 = NULL
    field10 =
    Process Abending : 2012-06-05 12:58:14

  • Mapping problem with compressed key update record (target format)...

    Hi Guys,
    Getting below error while replication from Source to target. Source table is having NOT NULL Column, but on target replicat process giving error about some NULL value ??
    How to overcome this issue, any idea...
    2011-08-04 10:35:04 INFO OGG-00995 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: REPLICAT RMASTRK starting.
    2011-08-04 10:35:05 INFO OGG-00996 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: REPLICAT RMASTRK started.
    2011-08-04 10:35:06 WARNING OGG-00869 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: OCI Error ORA-01407: cannot update ("INFRA"."CUST"."CODE") to NULL (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"DP_ID" = :a3,"EXCHNG_CODE" = :a4,"ORD_QTY" = :a5,"ORD_PRICE" = :a6,"CODE" = :a7,"MKRT_CODE" = :a8,"CHANN>.
    2011-08-04 10:35:06 WARNING OGG-01004 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Aborted grouped transaction on 'INFRA.CUST', Database error 1407 (ORA-01407: cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL).
    2011-08-04 10:35:06 WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Repositioning to rba 44132192 in seqno 68708.
    2011-08-04 10:35:06 *WARNING OGG-01154 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: SQL error 1407 mapping INFRA.CUST to INFRA.CUST OCI Error ORA-01407:* *cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"DP_ID" = :a3,"EXCHNG_CODE"=:a4,"ORD_QTY"*
    *= :a5,"ORD_PRICE" = :a6,"SCRP_CODE" = :a7,"MKRT_CODE" = :a8,"CHANN>.*
    2011-08-04 10:35:06 WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Repositioning to rba 44132192 in seqno 68708.
    2011-08-04 10:35:06 ERROR OGG-01296 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Error mapping from INFRA.CUST to INFRA.CUST.
    2011-08-04 10:35:06 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: PROCESS ABENDING.
    Oracle GoldenGate Delivery for Oracle process started, group RMASTRK discard file opened: 2011-08-04 10:35:05
    Current time: 2011-08-04 10:35:06
    Discarded record from action ABEND on error 1407
    OCI Error ORA-01407: cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL
    (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"MKRT_CODE" = :a8,"CHANN>
    Aborting transaction on ./dirdat/pm beginning at seqno 68708 rba 44132192
    error at seqno 68708 rba 44132192
    Problem replicating INFRA.CUST to INFRA.CUST
    *Mapping problem with compressed key update record (target format)...*
    ORD_QTY = 500
    ORD_PRICE = 37430
    SCRP_CODE =
    MKRT_CODE = N
    Oracle GoldenGate Delivery for Oracle process started, group RMASTRK discard file opened: 2011-08-
    04 10:35:05
    Current time: 2011-08-04 10:35:06
    Discarded record from action ABEND on error 1407
    OCI Error ORA-01407: cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL
    (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"MKRT_CODE" = :a8,"CHANN>
    Aborting transaction on ./dirdat/pm beginning at seqno 68708 rba 44132192
    error at seqno 68708 rba 44132192
    Problem replicating INFRA.CUST to INFRA.CUST
    Mapping problem with compressed key update record (target format)...
    ORD_QTY = 500
    ORD_PRICE = 37430
    SCRP_CODE =
    MKRT_CODE = N
    Any inputs / help would be appreciated.
    Regards,
    Manish

    The SCRP_CODE column has a NOT NULL constraint. The ORA-01407 error is telling you that you cannot update or set a value for this column to null because of the constraint. This has absolutely nothing to do with an index. You can use a marker/sentinel value in lieu of using NULL. For a numeric field, where everything is positive, a negative value (-1) can be decoded as meaning null. For a character field, a code such as NA can represent NULL.
    This also has nothing to do (directly) with GoldenGate failing because of this error. The underlying SQL statement will fail everywhere, regardless of the tool or application. It is not a case of failing only in GoldenGate.

  • Mapping problem - Shaded areas in the wrong place

    Hey experts,
    I`ve already contacted you on this issue a few days ago. I created a query, which executes a few key figures mapped to the postalcode.
    I tried to let me display this query on the web, using the WAD. The shapefiles were uploaded correctly, for the contours of the country and the postalcode areas are displayed accurately.
    At the first sight, I thought a performance problem could be the challenge. But I did not find any information on that. On my last post, i received one answer, that I had to adjust the sort order. But that did not bring any results either!
    At the moment, it looks more like a mapping problem in the dBase File to me. How can a proper mapping be achieved? I tried to just add a SAPBWKEY column, like it is proposed here: http://help.sap.com/saphelp_nw04/helpdata/en/3b/7c92ec1bed374ee0000800091c1b0e/content.htm.
    An extract of my dBase-File schematically looks like this:
    0country, 0Postalcod, SAPBWKEY
    DE            48900          DE/48900 (for it is a composite attribute)
    The mapping seems to work in a rather random way, because the shaded areas are at least displayed somewhere on the map, but not where they supposed to be, e. g. one district of south Germany in the far north and so on.
    Did you have any similar issues in the past or any tips for a solution?
    Thanks&regards
    Marcus

    Sorry, I guess this is just a bug in some programs including firefox:
    https://bugzilla.mozilla.org/show_bug.cgi?id=314279

  • Mapping Problem ORDERS Idoc to Edifact

    Hi,
    I have a mapping problem with the IDOC ORDERS:
    I get the IDOC with several E1EDP01. Each E1EDP01 has several E1EDPT1, where i want only the first one (which I get over the TDID value). Each E1EDPT1 has min. 1 E1EDPT2.
    Now I have to map each field TDLINE from first two E1EDPT2 of the first E1EDPT1 to the Edifact fields /LIST/S_UNB/S_UNH/G_SSG25/S_LIN/S_IMD[1]/C_C273/D_7008 (from the first E1EDPT2) and, if a second E1EDPT2 exists in /LIST/S_UNB/S_UNH/G_SSG25/S_LIN/S_IMD[1]/C_C273/D_7008_2.
    I use following UDF:
    //a = TDLINE
    //b = Number of entry in the List
    int pos =Integer.parseInt(b[0]);
    if ( pos < a.length )
    result.addValue(a[pos]);
    else
    result.addValue(ResultList.SUPPRESS);
    Unfortunatly, I think becaus of the context problems (not every E1EDPT1 has two E1EDPT2), it's not working. Could somebody help me with this problem?
    Thanks in advance
    Dominic

    Dear Dominic ,
    I had same problem when I was trying to do the same thing for FTX segment.
    Your UDF is fine but you don't need else condition.
    //a = TDLINE
    //b = Number of entry in the List
    int pos =Integer.parseInt(b[0]);
    if ( pos < a.length )
    result.addValue(a[pos]);
    for C_C273 assigned contant value and
    D_7008 assigned TDLINE but change the context to E1EDPT1
    and for D_7008_2
    TDLINE(context to E1EDPT1 )
                                                      ====>UDF====>D_7008_2
    Contant(=1)
    It should work becasue my map is working fine. If not let me know error message.
    Thanks
    Shubhankar

  • Mapping problem:from E1EDK14-ORGID to PORDCR102-PUR_GROUP

    Mapping problem:from E1EDK14-ORGID to PORDCR102-PUR_GROUP
    E1EDK14 occurs 4 times in the source sys:
    1   E1EDK14-QUALF = '014'
         E1EDK14-ORGID = 'YP01'      <=  purchase organization
    2   E1EDK14-QUALF = '009'
         E1EDK14-ORGID = '001'      <=  purchase group
    3   E1EDK14-QUALF = '013'
         E1EDK14-ORGID = 'NB'      <=  document type
    4   E1EDK14-QUALF = '011'
         E1EDK14-ORGID = 'C999'      <=  company code
    I always want to copy "E1EDK14-ORGID = '001'" to PORDCR102-PUR_GROUP.
    I have a solution which works but not perfect:
    E1EDK14-ORGID=>copyvalue[1]=>PORDCR102-PUR_GROUP
    I want to have the perfect mapping as follow:
    IF E1EDK14-QUALF = '009'.
      E1EDK14-ORGID = '001' => PORDCR102-PUR_GROUP
    ENDIF.
    I did it in the data flow editor as follow:
    /PORDCR102/IDOC/E1PORDCR1/E1BPMEPOHEADER/PUR_GROUP=
    ifWithoutElse([keepss=false]stringEquals
    (removeContexts(/ORDERS05/IDOC/E1EDK14/QUALF=),
    const([value=009])), /ORDERS05/IDOC/E1EDK14/ORGID=)
    But the result in the target sys is always 'YP0'(The first E1EDK14-ORGID)
    How to solve this problem?
    Thanks
    ming yu

    Hi,
    Try like this.
    E1EDK14-QUALF   --------
    Constant(009) ----------------   EqualsS --------------- 
                                                                 And(Boolean Function)     ------ IfWithoutElse -- PORDCR102-PUR_GROUP
    E1EDK14-ORGID -------                                                      E1EDK14-ORGID  ----------------
    Constant(001)  --------------   EqualsS ------------------
    Regards,
    P.Venkat

  • Weird dreamweaver keyboard mapping problem

    weird dreamweaver keyboard mapping problem:
    Hope this solution helps someone out. If you have q's, ask
    and I will try to help.
    I was having a weird problem in dreamweaver... Whenever I was
    in code view and typed "shift+i" to make a capital "I", instead it
    would paste from the clipboard.
    I finally figured out what was happening. I compared the
    menu.xml in my app support folder in the user library to the
    original menu.xml file that was in the application folder. I went
    through until I came across the diff:
    menu.xml in my library/app support folder:
    <!-- Windows Navigation Shortcuts -->
    <shortcut key="Cmd+Ins" name="Copy2" platform=""
    command="if (dw.canClipCopy()) { dw.clipCopy() }"
    domRequired="FALSE" id="DWShortcuts_HTMLSource_Copy2" />
    <shortcut key="Shift+Ins" name="Paste2" platform=""
    command="if (dw.canClipPaste()) { dw.clipPaste() }"
    domRequired="FALSE" id="DWShortcuts_HTMLSource_Paste2" />
    <shortcut key="Shift+Del" name="Cut2" platform=""
    command="if (dw.canClipCut()) { dw.clipCut() }" domRequired="FALSE"
    id="DWShortcuts_HTMLSource_Cut2" />
    orig menu.xml file:
    <!-- Windows Navigation Shortcuts -->
    <shortcut key="Cmd+Ins" name="Copy2" platform=""
    command="if (dw.canClipCopy()) { dw.clipCopy() }"
    domRequired="FALSE" id="DWShortcuts_HTMLSource_Copy2" />
    <shortcut key="Shift+Ins" name="Paste2" platform=""
    command="if (dw.canClipPaste()) { dw.clipPaste() }"
    domRequired="FALSE" id="DWShortcuts_HTMLSource_Paste2" />
    <shortcut key="Shift+Del" name="Cut2" platform=""
    command="if (dw.canClipCut()) { dw.clipCut() }" domRequired="FALSE"
    id="DWShortcuts_HTMLSource_Cut2" />
    There was a diff in the "platform=" tags. The orig stated
    [platform="win"], my config stated [platform=""] (nothing in
    between the ""'s). So, I reset the platform tag to be
    [platform="win"] in my settings and then relaunched dreamweaver. It
    fixed the problem.
    Not sure how this occurred, but it works now.

  • JDBC- XI- File Mapping Problem

    Hi everyone,
    I have the mapping problem.  atried a lot of possibilities, but unfortunately nothing helps... JDBC adapter returns (in my case - I'm just selecting SYSDATE from dual) this structure
    <resultset>
    <row>
       <SYSDATE>....</SYSDATE>
    </row>
    </resultset>
    I'm using 2 datatypes:
    a, row (it is called so) which is complextype and consists of subelement SYSDATE, which is string
    Exastly: row->SYSDATE
    b, resultset (it is called so) is complex type which consists of subelement of type row(type a - see above) (and this subelement is also called row) ...and it has of course subelement SYSDATE, which is String (see the data type a above)
    Exactly: resultset->row->SYSDATE
    The data type b is used for the outbound interface in the message coming from the JDBC Adapter, the type a is used for message type sent into the File Adapter
    (exactly: Message1String is the ResutSet Type(b), Message1String2 is the Row(a) type)
    Can somebody help me, what is wrong? I do always get mapping error... :O(
    Thanx, Peter

    So your message type has a different name?
    Take the name of your message type and link this to "document name" of your JDBC adapter configuration.
    Compare the xml output of the JDBC adapter (take this from the SXMB_MONI payload) with the default structure of the mapping (go to the mapping tool, test mode, create a new test and view the xml structure)
    Regards
    Stefan

Maybe you are looking for

  • Bapi Fb70 and f-23

    Hi friends , Is there any bapi to do the process  fb70 customer invoice and f-28 Post incoming Payment . pls give suggestion . Regards Krishnan R.

  • Date related Issue...

    Hi, i have a drop down which shows month and year like Jan07,Feb07,Mar07,Apr07...Dec07. in the backing bean using the item seleted i want to create a date. for example if May07 is selected i want to get it as 1-may-07 in java.util.Date format. Help m

  • Chat window stuck in minimize mode

    I have a chat window that is stuck in minimize mode, unable to exit the window. Red window appears when receiving messages from buddy but cannot maximize the window. I have restarted my computer, force quit my iChat and every time I sign on that wind

  • Can't access to Fat Partition - Mount problem

    Dear all A few months ago I used disk utility and perform a partition. The idea was 3 partitions, 1 for mac (Journaled), 1 for bootcamp (NTFS) and 1 for transfer between the OSs (FAT). And it worked OK, I can use mac when I want and Windows too, I pu

  • Importing XML into Java.  Help needed Please!!!

    Hi, I have downloaded j2sdk1.4.1_05 and want to configure it to import XML files into a DOM in Java. I am having trouble doing this and need help. I read that version 1.4 support JAXP 1.1 but I am having trouble finding the JAXP-api.jar file. It says