Bug in iisproxy.ini handling ? (PathPrepend)

We have no problem proxiing IIS to WebLogic in general case, but now we have to
make a more specified proxiing.
Our configuration for the project is:
IIS 5.0
WebLogic Server 6.0sp1
proxiing by path
We have an application hiddenname.war - so which URI is /hiddenname - but we don't
want users to see this URI.
We want that, if a user requests:
http://[iisServer]/shownname/default.jsp
he obtains:
http://[weblogicServer]/hiddenname/default.jsp
So we set those properties in the iisproxy.ini:
PathTrim=shownname
PathPrepend=hiddenname
WlForwardPath=/shownname
But it doesn't work, and we can see in the wlproxy.log:
Wed Nov 07 11:05:41 2001 wlforward: /hiddenname/default.jsp.wlforward
Wed Nov 07 11:05:41 2001 URI = [hiddenname/hiddenname/default.jsp?]
It seems that the "PathPrepend" action is done twice ?!
Has someone got info or solutions on this problem ?
Regards.

Is this problem solved?
I want this exact problem to be resolved. I am using BEA WLS 7 with SP1. and
IIS5 SP3 on Windows 2000 Server.
Satya
"Jimmy Lopez" <[email protected]> wrote:
>
We have no problem proxiing IIS to WebLogic in general case, but now
we have to
make a more specified proxiing.
Our configuration for the project is:
IIS 5.0
WebLogic Server 6.0sp1
proxiing by path
We have an application hiddenname.war - so which URI is /hiddenname -
but we don't
want users to see this URI.
We want that, if a user requests:
http://[iisServer]/shownname/default.jsp
he obtains:
http://[weblogicServer]/hiddenname/default.jsp
So we set those properties in the iisproxy.ini:
PathTrim=shownname
PathPrepend=hiddenname
WlForwardPath=/shownname
But it doesn't work, and we can see in the wlproxy.log:
Wed Nov 07 11:05:41 2001 wlforward: /hiddenname/default.jsp.wlforward
Wed Nov 07 11:05:41 2001 URI = [hiddenname/hiddenname/default.jsp?]
It seems that the "PathPrepend" action is done twice ?!
Has someone got info or solutions on this problem ?
Regards.

Similar Messages

  • IISProxying with multiple pathprepend : is it possible ?

    I need to forward from IIS
    WlForwardPath=*Servlet* with PathPrepend=/servlets
    and on the same we site, WlForwardPath=*Soap* without PathPrepend
    but in the iisproxy.ini file, it seems that there is no possibility to do this.
    Anybody has an idea on how to setup multiple PathPrepend in iisproxy.ini ?

    Hello Alberto,
    When restricting variables to multiple values you need to use a range. The variable restriction in BPS supports two operators EQ - equals and BT - between.
    In your example below however you could use a user exit to support this. The years you have typed in below are sequential and therefore would fit into a range.
    Cheers,
    Scott

  • How do you configure multiple appservers in iisproxy.ini?

    I am coming from the WebSphere world, and trying to figure out this whole WebLogic
    thing. The problem I am having is for the weblogic plugin for IIS. In WebSphere,
    the plugin was proxied by path and port #. I setup an iisproxy.ini and got it
    working for one appserver, but when I went to add another one of our appservers,
    I couldn't get it to work.
    What I have is:
    # EAR 1
    WebLogicHost=10.10.xxx.xxx WlForwardPath=/useradmin,/abc/def,/ghi/ttk
    WebLogicPort=8031
    ConnectTimeoutSecs=20
    ConnectRetrySecs=2
    How do I add another WlForwardPath= line with different paths on a different port?
    I am lost.
    Thanks for any help!!

    Hi,
    So it sounds like you have two PXI systems that are not connected or related to each other, is that right? Since your PXI chassis connected via MXI-3 is working fine, we�ll take that out of the equation.
    It sounds like you are trying to configure your PXI-8176 system as a Remote System through an Ethernet connection. Is your PXI-8176 running Windows (if so which version) or Real-Time (RT) operating system?
    If you are running Windows XP on the PXI-8176 and also on your computer you can use XP Remote Desktop to control your PXI-8176 system through Ethernet (see the following link for information on that):
    http://digital.ni.com/public.nsf/websearch/C074C33​F4DE3FA5186256D3D007788DA?OpenDocument
    Another option is to use Remote Device Access (RDA) to cont
    rol your SCXI modules and DAQ board (6052E). RDA will only work with Traditional NI-DAQ, it is not supported in NI-DAQmx. I�ve included a couple of links for KB�s that have more information on RDA for you.
    http://digital.ni.com/public.nsf/websearch/3a4d2f5​f4354e53a862568c0006a8bc0?OpenDocument
    http://digital.ni.com/public.nsf/websearch/5CC9792​C6CD4A34C862565BC0072D5DF?OpenDocument
    If you ordered your controller only with Real-Time on it you can use the following document to configure and troubleshoot your PXI-8176 RT system.
    http://www.ni.com/support/install/install_configur​e_6.htm
    I hope this helps you.
    Regards,
    Doug K.
    National Instruments

  • Using CookieName in the iisproxy.ini file

    Hello All,
              According to the Weblogic 451 docs, In the IISProxy.ini file, you should
              set the "CookieName= "
              property to whatever value you have specified for the
              "weblogic.httpd.session.cookie.name="
              property in your weblogic.properties file. (If it is anything other than the
              default name which is "WeblogicSession").
              We have an IIS proxy fronting 2 Weblogic App Servers which run in a
              clustered mode. Also the
              cookie name is specified in the properties file to something different than
              the default WeblogicSession
              (lets say it is "mySession").
              When we do this we see the strange behavior of the application routing us
              back to our Login page in the middle
              of a session. We assume this is happening because when our request is
              switched to a different App Server it
              cannot be associated with any session. And so we are asked to login and
              create a new session.
              This started happening only when we switched to using IIS Proxy and have the
              CookieName
              set to "mySession". This problem goes away if we change the cookieName to be
              the default and remove
              the entry from the IISProxy.ini file.
              Our App Servers are running Weblogic 4.5.1 with sp8.
              Any ideas ??
              Thanks
              Ketan.
              

    The cookie name in your ISAPI plugin and weblogic.properties should be the
              same in all your plugins and weblogic servers. This is required. Plugin and
              WLAS share the same cookie. However, plugin and WLAS are in different
              processes. In order for plugin and WLAS to locate the same cookie, same
              cookie name in the configuration is required.
              Cheers - Wei
              Ketan Bhukhanwala <[email protected]> wrote in message
              news:[email protected]...
              > Hello All,
              >
              > According to the Weblogic 451 docs, In the IISProxy.ini file, you should
              > set the "CookieName= "
              > property to whatever value you have specified for the
              > "weblogic.httpd.session.cookie.name="
              > property in your weblogic.properties file. (If it is anything other than
              the
              > default name which is "WeblogicSession").
              >
              > We have an IIS proxy fronting 2 Weblogic App Servers which run in a
              > clustered mode. Also the
              > cookie name is specified in the properties file to something different
              than
              > the default WeblogicSession
              > (lets say it is "mySession").
              >
              > When we do this we see the strange behavior of the application routing us
              > back to our Login page in the middle
              > of a session. We assume this is happening because when our request is
              > switched to a different App Server it
              > cannot be associated with any session. And so we are asked to login and
              > create a new session.
              >
              > This started happening only when we switched to using IIS Proxy and have
              the
              > CookieName
              > set to "mySession". This problem goes away if we change the cookieName to
              be
              > the default and remove
              > the entry from the IISProxy.ini file.
              >
              > Our App Servers are running Weblogic 4.5.1 with sp8.
              >
              > Any ideas ??
              >
              > Thanks
              > Ketan.
              >
              >
              

  • SETTING OF IISPROXY.INI FILE

    Well we are trying that whenever we shutdown the weblogic server at ourpoduction site,(our login page is with jsp extention) it shouldautomaticallygive the user a message "site under......".I checked in the documentationthatfor such a thing we can set a property in iisproxy.ini file as ErrorPage=url(in case iis is not able to get a response from weblogic it will go to thecustomized error page we define).MY first question is can we set thispropertyin the weblogic 4.5.1 version in the ini file.If yes i tried it but doesn'twork what are the steps to be followed?else can you suggest some solution.
              

    The error page URL needs to be an HTML file located on the web server. It
              cannot be a JSP. Since the IISPROXY.INI file is shared regardless of how
              many virtual servers you may have, I would refer a fully qualified URL
              instead of relative.
              "AMIT SOOD" <[email protected]> wrote in message
              news:3b009b6e$[email protected]..
              > Well we are trying that whenever we shutdown the weblogic server at
              ourpoduction site,(our login page is with jsp extention) it
              shouldautomaticallygive the user a message "site under......".I checked in
              the documentationthatfor such a thing we can set a property in iisproxy.ini
              file as ErrorPage=url(in case iis is not able to get a response from
              weblogic it will go to thecustomized error page we define).MY first question
              is can we set thispropertyin the weblogic 4.5.1 version in the ini file.If
              yes i tried it but doesn'twork what are the steps to be followed?else can
              you suggest some solution.
              

  • Flex bug in global error handling

    My application's global error handler (uncaught error handler) works mostly, but I found a case where it doesn't work, but should.  Before I filed an official bug report I wanted to post the issue here.
    Here is the issue: in a module, ErrorEvents that are not listened for  and are dispatched by a Flex component are never caught in the application's uncaught error handler. 
    I have a sample project that demonstrates this.  Here is the module in my test case:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
                 xmlns:s="library://ns.adobe.com/flex/spark"
                 xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Script>
        <![CDATA[
            private function onClickSparkDispatch():void {
                dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "test" ) );   // this isn't caught in the uncaught error handler
            private function onClickNonSparkDispatch():void {
                var nonSparkDispatcher:EventDispatcher = new EventDispatcher();
                nonSparkDispatcher.dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "test" ) );  // this is caught in the uncaught error handler
        ]]>
    </fx:Script>   
        <s:HGroup>
            <s:Button label="Module Spark Dispatch (broken)" click="onClickSparkDispatch()" />
            <s:Button label="Module Non-Spark Dispatch" click="onClickNonSparkDispatch()" />
        </s:HGroup>
    </s:Module>
    Using Flex 4.6
    My application statically links in the Flex SDK ("merged into code" in Flash Builder).
    My applications works around these two exsiting bugs:
         https://bugs.adobe.com/jira/browse/SDK-28018
         http://blogs.adobe.com/aharui/2011/04/catching-uncaughterror-in-flex-modules.html
    Is this a bug?
    Thanks,
    Rick

    It’s been reported.  Here is more information and a workaround. http://blogs.adobe.com/aharui/2011/04/catching-uncaughterror-in-flex-modules.html

  • IE / Spry Bug with custom error handler

    Ok, as I was looking through SpryData.js I noticed these
    wonderful lines:
    Spry.Utils.loadURL.callback = function(req)
    if (!req || req.xhRequest.readyState != 4)
    return;
    if (req.successCallback && (req.xhRequest.status ==
    200 || req.xhRequest.status == 0))
    req.successCallback(req);
    else if (req.errorCallback)
    req.errorCallback(req);
    In particular the "errorCallback()" method interested me as I
    wanted to introduce my own error handler. As I went about testing
    this I came up with a quick try of:
    var url = "/cfcs/mycfc.cfc?method=IsValidPath&path=" +
    encodeURIComponent(sl.value + sd.value);
    var optionsObj = new Object();
    optionsObj.errorCallback = ShowError;
    Spry.Utils.loadURL("GET", url, false, ValidateForm,
    optionsObj);
    And this works great in FF, but not IE. When I cause an error
    to occur from ColdFusion I pass a status code of "500". In FF the
    error code causes my "ShowError" function to fire, but not in IE. I
    tracked it to this bit of code in SpryData.js:
    Spry.Utils.loadURL = function(method, url, async, callback,
    opts)
    var req = new Spry.Utils.loadURL.Request();
    req.method = method;
    req.url = url;
    req.async = async;
    req.successCallback = callback;
    Spry.Utils.setOptions(req, opts);
    try
    req.xhRequest = Spry.Utils.createXMLHttpRequest();
    if (!req.xhRequest)
    return null;
    if (req.async)
    req.xhRequest.onreadystatechange = function() {
    Spry.Utils.loadURL.callback(req); };
    req.xhRequest.open(req.method, req.url, req.async,
    req.username, req.password);
    if (req.headers)
    for (var name in req.headers)
    req.xhRequest.setRequestHeader(name, req.headers[name]);
    req.xhRequest.send(req.postData);
    if (!req.async)
    Spry.Utils.loadURL.callback(req);
    catch(e) { req = null; Spry.Debug.reportError("Exception
    caught while loading " + url + ": " + e.message); }
    return req;
    Apparently running (req.xhRequest.send(req.postData);) in IE
    will throw an error if the requested page throws an error status
    code. This causes the try/catch in the Spry function to catch the
    IE error and never allows my own error handler to run. Hopefully a
    fix for this will be in the works because I really like the idea of
    being able to use my own error handler.
    --------Edited after initial post.--------
    Ok, I figured out another item of interest. My requests
    earlier were set to "async = false". If I set "async = true" then
    it does work. I realized that because I was using sychronous mode
    and IE was throwing the error, it was preventing the call to the
    "Spry.Utils.loadURL.callback" method from occuring, while asynch
    mode uses the onreadystatechange to call the function and thus
    causes my own error handler to function. I am still interested to
    know if there is a bug here somewhere and if it is just IE or Spry
    or both. Looking forward to reading any posts.

    Hi WraithBudde,
    Thanks for all the details. In my opinion this is indeed a
    bug in Spry for the synchronous case. I'll file a bug and fix it.
    > You know you love me.
    Heh, yeah, I love anybody who takes the time to report bugs
    ... especially when they've narrowed it down to the exact set of
    lines in the source.
    Once again ... THANKS!
    --== Kin ==--

  • Bug in Excel's handling of metadata? Or at least a deviation from the Open Office XML specification?

    I've discovered some very strange behaviour in Excel which seems to be contrary to that documented in the Open Office XML specification (OOXML). I couldn't find a way to report bugs against Excel, so I thought I'd try to explain the issue here.
    In short it seems that Excel is removing, and incorrectly re-indexing the metadata I programatically associate with cells.
    First, a summary of the relevant parts of the specification:
    From OOXML 18.9: There are two types of metadata: "cell metadata" and "value metadata".
    Cell metadata follows the cell as it moves. Value metadata follows the value through formulae etc.
    From OOXML 18.3.1.4: The c (cell) element has cm and vm attributes which are both documented as "The zero-based index of the [cell|value] metadata...in the Metadata Part"
    From OOXML 18.9.17: The valueMetadata is "a collection of block element that each define the value metadata for a particular cell". "Cells in the workbook index into this collection".
    The valueMetadata contains bk elements which in turn contain rc (metadata record) elements
    From OOXML 18.9.15: rc elements have t (type index) and v (value index) attributes. t is a 1-based index into metadataTypes and v is a 0-based index into the futureMetadata element which matches the name of the metadata type.
    Here's an example of what this might look like:
    <c vm="0"> <!-- vm points to the first bk inside valueMetadata below -->
    <x:valueMetadata>
    <x:bk>
    <x:rc t="1" v="0" /> <!-- t points to the first metadataType below. v points to the first bk in the futureMetadata below (whose name matches the metadataType to which t points) -->
    </x:bk>
    </x:valueMetadata>
    <x:metadataTypes>
    <x:metadataType name="MyMetaType" ... /> <!-- name dictates which futureMetadata valueMetadata's v attribute indexes into -->
    </x:metadataTypes>
    <x:futureMetadata name="MyMetaType" ...>
    <x:bk>
    <x:extLst>
    <x:ext xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main" uri="http://example.com/extension" p5:value="test value" xmlns:p5="http://example.com/extension" />
    </x:extLst>
    </x:bk>
    </x:futureMetadata>
    The Problem
    From what I can tell, for values of n > 2, if you associate n cells with metadata, Excel will drop the last piece of metadata, and the one at index 1, and it will do so silently. The indices are then 0..n-3, and the association for all but the first (0
    index) will be wrong. This renders the future metadata totally useless.
    For n == 1, Excel just removes the last piece of metadata (index 1). If we try 1-based indexes for the vm attribute on the c element, we get different behaviour. This may not be relevant as it is contrary to the specification, but the slightly better behaviour
    might indicate an off-by-one error:
    n
    Deleted Indices (0-based) when using 0-based indices
    Deleted Indices (0-based) when using 1-based indices
    1
    0
    None
    2
    1
    1
    3
    1,2
    1
    4
    1,3
    1
    5
    1,4
    1
    6
    1,5
    1
    Demonstrating the Problem
    I have some example code[1] that demonstrates the problem. You will need a file called test.xlsx with cells A1..C2 populated.
    Compile the source as AddMetadata.exe then run with the test file as the only parameter:
    > AddMetadata.exe test.xlsx
    You can look at test.xlsx in Excel, Visual Studio (with the Open XML Package Editor Power Tool for Visual Studio 2010) or the Open XML SDK 2.0 Productivity Tool for Microsoft Office. Looking at the file before and after running AddMetadata.exe you should
    be able to reproduce the behaviour documented above.
    Summary
    It would be good to know if this is really an Excel bug or whether we're doing something wrong / unsupported. Any insight would be very much appreciated.
    [1] The Example code:
    namespace AddMetadata
    using System;
    using System.Linq;
    using DocumentFormat.OpenXml;
    using DocumentFormat.OpenXml.Packaging;
    using DocumentFormat.OpenXml.Spreadsheet;
    public class Program
    // The cells to associate with metadata
    private readonly static CellSpec[] CellSpecs = new[]
    new CellSpec{ Sheet = "Sheet1", Column = "A", Row = 1 },
    new CellSpec{ Sheet = "Sheet1", Column = "B", Row = 1 },
    new CellSpec{ Sheet = "Sheet1", Column = "C", Row = 1 },
    new CellSpec{ Sheet = "Sheet1", Column = "A", Row = 2 },
    new CellSpec{ Sheet = "Sheet1", Column = "B", Row = 2 },
    new CellSpec{ Sheet = "Sheet1", Column = "C", Row = 2 },
    private static readonly uint NumCells = (uint)CellSpecs.Length;
    private const string SPREADSHEET_ML_NS = "http://schemas.openxmlformats.org/spreadsheetml/2006/main";
    private const string METADATA_TYPE_NAME = "MyMetaType";
    private const string EXTENSION_URI = "http://example.com/extension";
    public static void Main(string[] args)
    if (args.Length != 1)
    Console.Out.WriteLine("AddMetadata <doc.xslx>");
    Console.Out.WriteLine(" Adds metadata to the specified document to demonstate some strange Excel behaviour");
    Environment.Exit(1);
    try
    var doc = SpreadsheetDocument.Open(args[0], true);
    StripMetadata(doc);
    AddMetadata(doc);
    AddMetadataType(doc);
    AddFutureMetadata(doc);
    AddMetadataRecords(doc);
    AssociateCellsWithMetadata(doc);
    doc.WorkbookPart.Workbook.Save();
    doc.Close();
    catch(Exception e)
    Console.Out.WriteLine(e);
    /// <summary>
    /// Strip any existing metadata.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void StripMetadata(SpreadsheetDocument doc)
    var wbPart = doc.WorkbookPart;
    var cellMetadataPart = wbPart.GetPartsOfType<CellMetadataPart>().FirstOrDefault();
    wbPart.DeletePart(cellMetadataPart);
    /// <summary>
    /// Add basic metadata part structure.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void AddMetadata(SpreadsheetDocument doc)
    doc.WorkbookPart.AddNewPart<CellMetadataPart>();
    doc.WorkbookPart.CellMetadataPart.Metadata = new Metadata { MetadataTypes = new MetadataTypes() };
    /// <summary>
    /// Add the metadata type used by all the metadata we're adding
    /// </summary>
    /// <param name="doc"></param>
    private static void AddMetadataType(SpreadsheetDocument doc)
    var metadata = doc.WorkbookPart.CellMetadataPart.Metadata;
    var metadataType = new MetadataType
    Name = METADATA_TYPE_NAME,
    Assign = false,
    CellMeta = false,
    ClearContents = false,
    ClearAll = false,
    ClearComments = true,
    ClearFormats = true,
    Coerce = false,
    Copy = true,
    Delete = false,
    Edit = true,
    Merge = true,
    MinSupportedVersion = 0U,
    PasteAll = true,
    PasteBorders = false,
    PasteColWidths = false,
    PasteComments = false,
    PasteDataValidation = false,
    PasteFormats = false,
    PasteFormulas = false,
    PasteNumberFormats = false,
    PasteValues = true,
    RowColumnShift = true,
    SplitAll = false,
    SplitFirst = false
    metadata.MetadataTypes.AppendChild(metadataType);
    /// <summary>
    /// Add future metadata blocks which contain the actual metadata for each cell.
    /// They are referenced by the metadata records.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void AddFutureMetadata(SpreadsheetDocument doc)
    var metadata = doc.WorkbookPart.CellMetadataPart.Metadata;
    var futureMetadata = metadata.AppendChild(new FutureMetadata());
    futureMetadata.Name = METADATA_TYPE_NAME;
    futureMetadata.Count = NumCells;
    // Future metadata area
    for (var i = 0; i < NumCells; i++)
    // The metadata for each cell will be single FutureMetadataBlock containing an extension list with a single extension.
    FutureMetadataBlock futureMetadataBlock = futureMetadata.AppendChild(new FutureMetadataBlock());
    ExtensionList extLst = futureMetadataBlock.AppendChild(new ExtensionList());
    Extension ext = extLst.AppendChild(new Extension());
    ext.Uri = EXTENSION_URI;
    ext.AddNamespaceDeclaration("x", SPREADSHEET_ML_NS);
    ext.SetAttribute(new OpenXmlAttribute("value", ext.Uri, string.Format("test value {0}", i)));
    /// <summary>
    /// Add metadata records which point to each future metadata block.
    /// They are in turn referenced by the cells.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void AddMetadataRecords(SpreadsheetDocument doc)
    var metadata = doc.WorkbookPart.CellMetadataPart.Metadata;
    // Value metadata area
    ValueMetadata valueMetadata = metadata.AppendChild(new ValueMetadata());
    for (uint i = 0; i < NumCells; i++)
    // Type is 1-indexed, index into future metadata is 0-indexed
    var metadataBlock = valueMetadata.AppendChild(new MetadataBlock());
    var metadataRecord = metadataBlock.AppendChild(new MetadataRecord());
    metadataRecord.Val = i;
    metadataRecord.TypeIndex = (uint)1;
    /// <summary>
    /// Associate existing cells with existing metadata.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void AssociateCellsWithMetadata(SpreadsheetDocument doc)
    for (uint i = 0; i < CellSpecs.Length; i++)
    var cellSpec = CellSpecs[i];
    var cell = GetCell(doc, cellSpec.Sheet, cellSpec.Column, cellSpec.Row);
    if (cell == null)
    throw new ArgumentException(string.Format("Cell {0} not found in row {1} of sheet {2}", cellSpec.Column, cellSpec.Row, cellSpec.Sheet));
    cell.ValueMetaIndex = i;
    /// <summary>
    /// Get a cell given the document, sheet name, column name and row index.
    /// </summary>
    /// <param name="doc">The document</param>
    /// <param name="sheetName">The sheet name</param>
    /// <param name="columnName">The column name</param>
    /// <param name="rowIndex">The row index</param>
    /// <returns>The cell</returns>
    private static Cell GetCell(SpreadsheetDocument doc, String sheetName, String columnName, uint rowIndex)
    var row = GetRow(doc, sheetName, rowIndex);
    if (row == null)
    throw new ArgumentException(string.Format("Row '{0}' not found", rowIndex));
    return row.Elements<Cell>().Where(c => c.CellReference.Value.StartsWith(columnName)).FirstOrDefault();
    /// <summary>
    /// Get a worksheet part by sheet name.
    /// </summary>
    /// <param name="document">The document</param>
    /// <param name="name">The sheet name</param>
    /// <returns>The worksheet part</returns>
    private static WorksheetPart GetWorksheetPartByName(SpreadsheetDocument document, string name)
    // Get Sheet by name from Sheets in Workbook
    var sheet = document.WorkbookPart.Workbook.GetFirstChild<Sheets>().Elements<Sheet>().Where(x => x.Name == name).FirstOrDefault();
    // Lookup WorksheetPart by Id
    return sheet == null ? null : (WorksheetPart)document.WorkbookPart.GetPartById(sheet.Id.Value);
    /// <summary>
    /// Get a row given the document, sheet name and row index.
    /// </summary>
    /// <param name="doc">The document</param>
    /// <param name="sheetName">The sheet name</param>
    /// <param name="rowIndex">The row index</param>
    /// <returns>The row</returns>
    private static Row GetRow(SpreadsheetDocument doc, String sheetName, uint rowIndex)
    var worksheetPart = GetWorksheetPartByName(doc, sheetName);
    if (worksheetPart == null)
    throw new ArgumentException(string.Format("Sheet '{0}' not found", sheetName));
    return worksheetPart.Worksheet.GetFirstChild<SheetData>().Elements<Row>().Where(r => r.RowIndex == rowIndex).First();
    struct CellSpec
    public string Sheet;
    public string Column;
    public uint Row;

    If you create a metadatatype with a single metdata block, and you reference that in your vm/cm cell attribute using a *one* based index, Excel seems to see the link and it honors it when saving the spreadsheet.
    So, I ended up with something like:
    <c ... cm="1"/> (I'm dealing with cell metadata, but the concept is equivalente to value metadata)
    <metadataTypes count="1">
      <metadataType name="MyMetaType" .../>
    </metadataTypes>
    <futureMetadata count="1" name="MyMetaType">
      <bk>
        <extLst><ext
    uri="http://example" xmlns:x="http://example"><x:val>87</x:val></ext></extLst>
      </bk>
    </futureMetadata>
    <cellMetadata count="1">
      <bk><rc
    t="1" v="0"/></bk> <!-- this is what gets referenced as cm=1 on the cell -->
    </cellMetadata>
    Hope this helps. 

  • Bug in Oracle's handling of transaction isolation levels?

    Hello,
    I think there is a bug in Oracle 9i database related to serializable transaction isolation level.
    Here is the information about the server:
    Operating System:     Microsoft Windows 2000 Server Version 5.0.2195 Service Pack 2 Build 2195
    System type:          Single CPU x86 Family 6 Model 8 Stepping 10 GenuineIntel ~866 MHz
    BIOS-Version:          Award Medallion BIOS v6.0
    Locale:               German
    Here is my information about the client computer:
    Operaing system:     Microsoft Windows XP
    System type:          IBM ThinkPad
    Language for DB access: Java
    Database information:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    The database has been set up using the default settings and nothing has been changed.
    To reproduce the bug, follow these steps:
    1. Create a user in 9i database called 'kaon' with password 'kaon'
    2. Using SQL Worksheet create the following table:
    CREATE TABLE OIModel (
    modelID int NOT NULL,
    logicalURI varchar (255) NOT NULL,
    CONSTRAINT pk_OIModel PRIMARY KEY (modelID),
    CONSTRAINT logicalURI_OIModel UNIQUE (logicalURI)
    3. Run the following program:
    package test;
    import java.sql.*;
    public class Test {
    public static void main(String[] args) throws Exception {
    java.util.Locale.setDefault(java.util.Locale.US);
    Class.forName("oracle.jdbc.OracleDriver");
    Connection connection=DriverManager.getConnection("jdbc:oracle:thin:@schlange:1521:ORCL","kaon","kaon");
    DatabaseMetaData dmd=connection.getMetaData();
    System.out.println("Product version:");
    System.out.println(dmd.getDatabaseProductVersion());
    System.out.println();
    connection.setAutoCommit(false);
    connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
    int batches=0;
    int counter=2000;
    for (int outer=0;outer<50;outer++) {
    for (int i=0;i<200;i++) {
    executeUpdate(connection,"INSERT INTO OIModel (modelID,logicalURI) VALUES ("+counter+",'start"+counter+"')");
    executeUpdate(connection,"UPDATE OIModel SET logicalURI='next"+counter+"' WHERE modelID="+counter);
    counter++;
    connection.commit();
    System.out.println("Batch "+batches+" done");
    batches++;
    protected static void executeUpdate(Connection conn,String sql) throws Exception {
    Statement s=conn.createStatement();
    try {
    int result=s.executeUpdate(sql);
    if (result!=1)
    throw new Exception("Should update one row, but updated "+result+" rows, query is "+sql);
    finally {
    s.close();
    The program prints the following output:
    Product version:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Batch 0 done
    Batch 1 done
    java.lang.Exception: Should update one row, but updated 0 rows, query is UPDATE OIModel SET logicalURI='next2571' WHERE modelID=2571
         at test.Test.executeUpdate(Test.java:35)
         at test.Test.main(Test.java:22)
    That is, after several iterations, the executeUpdate() method returns 0, rather than 1. This is clearly an error.
    4. Leave the database as is. Replace the line
    int counter=2000;
    with line
    int counter=4000;
    and restart the program. The following output is generated:
    Product version:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Batch 0 done
    Batch 1 done
    java.sql.SQLException: ORA-08177: can't serialize access for this transaction
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:796)
         at test.Test.executeUpdate(Test.java:33)
         at test.Test.main(Test.java:22)
    This is clearly an error - only one transaction is being active at the time, so there is no need for serialization of transactions.
    5. You can restart the program as many times you wish (by chaging the initial counter value first). The same error (can't serialize access for this transaction) will be generated.
    6. The error doesn't occur if the transaction isolation level isn't changed.
    7. The error doesn't occur if the UPDATE statement is commented out.
    Sincerely yours
         Boris Motik

    I have a similar problem
    I'm using Oracle and serializable isolation level.
    Transaction inserts 4000 objects and then updates about 1000 of these objects.
    Transactions sees inserted objects but cant update them (row not found or can't serialize access for this transaction are thrown).
    On 3 tries for this transaction 1 succeds and 2 fails with one of above errors.
    No other transactions run concurently.
    In read commited isolation error doesn't arise.
    I'm using plain JDBC.
    Similar or even much bigger serializable transaction works perfectly on the same database as plsql procedure.
    I've tried oci and thin (Oracle) drivers and oranxo demo (i-net) driver.
    And this problems arises on all of this drivers.
    This problem confused me so much :(.
    Maby one of Oracle users, developers nows cause of this strange behaviour.
    Thanx for all answers.

  • BUG: ojc compiler doesnt handle @Override on anonymous inner class methods

    Hi,
    jdev 10.1.3.3.0.4157, XP SP2, jdk 5 u13:
    for the following code sample:
    Object o = new Object()
        @Override
        public String toString2()
            return "some string";
    };With ojc set as a compiler (the default), ojc doesnt catch the error about overriding toString with toString2, changing the compiler to javac achieves the required and correct behavior.

    Thanks Frank, I logged a couple more not so serious issues a while back but didnt get any feedback on them. The subject of the posts didn't have a 'BUG' prefix though. Should I edit them so to give them some attention, or were they silently logged :) ?

  • Probable bug in Kodo class handling code (Beta 2.2)

    I have a test class "Widget" that has two attributes, name and
    mark. I am encountering a curious error in the no-args
    constructor under some circumstances that looks like a bug.
    public class Widget
    private static Random random = new Random();
    private String name;
    private int mark;
    private Widget()
    public Widget(String name)
    this.name = name;
    mark = random.nextInt(1000);
    Typically, the test application constructs Widgets with a name.
    But since I believe that it is good practice for the application
    to define the no-args constructor even when it is only for the
    use of JDO, I have a private no-args constructor. As the class
    stands above, it compiles, enhances, and runs just fine.
    But if I copy the line "mark = random.nextInt(1000);" into the
    no-args constructor, the code compiles and enhances just fine,
    but bombs on running with the following error:
    javax.jdo.JDOFatalDataStoreException:
    The registered class "com.ysoft.jdo.book.widget.Widget"
    is not compiled or not longer exists. If the class has been deleted,
    unregister it before proceeding.
    NestedThrowables:
    java.lang.ExceptionInInitializerError
         at
    com.solarmetric.kodo.impl.jdbc.schema.DB.getPersistentTypes(DB.java:270)
         at com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.setup
    (JDBCPersistenceManagerFactory.java:170)
         at
    com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.privateSetup
    (PersistenceManagerFactoryImpl.java:501)
         at
    com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceManager
    (PersistenceManagerFactoryImpl.java:61)
         at
    com.solarmetric.kodo.runtime.PersistenceManagerFactoryImpl.getPersistenceManager
    (PersistenceManagerFactoryImpl.java:50)
         at
    com.ysoft.jdo.book.widget.WidgetHandler.<init>(WidgetHandler.java:43)
         at com.ysoft.jdo.book.test.widget.TestWidget.main(TestWidget.java:18)
    Exception in thread "main"
    Using the schematool for -action refresh will yield a null pointer
    exception at the no-args constructor line that is setting the
    value of mark.
    After initially having the mark initialization code in the
    no-args constructor and puzzling over the error, I realized that
    it didn't make sense to set the value of mark in the no-args
    constructor, since JDO would later set it to whatever the value
    in the database was. But it seems to me that there should be no
    great harm in it, either. If mark is initialized with the value
    "42" instead of "random.nextInt(1000)", there are no problems.
    Any insights?
    David Ezzio
    Yankee Software

    David,
    I'm not quite sure what to do about this. I'll have to dig into the spec
    and get back to you.
    Here's what's happening:
    Upon compilation, your initialization of the static field 'random' is
    inserted into a 'static' block.
    Upon bytecode enhancement, a good deal of code is added to the 'static'
    block. This code is responsible for registering the class with the JDO
    system.
    One step of this registration process involves instantiating an object
    of type 'Widget' and passing it to JDOImplHelper.registerClass().
    This step is inserted into the static block before the initialization
    of 'random'.
    So, when the no-args constructor is invoked in preparation for the call
    to registerClass(), 'random' is still null. Hence the null pointer
    instruction.
    As a temporary workaround, move the 'random' initialization code into an
    init () method that is invoked from the constructors, and which
    initializes 'random' if it is null. Or just don't perform the
    initialization in the no-args constructor.
    -Patrick Linskey

  • Bug in Mail's handling of missing font for creating a "Note"

    I try to keep my font library trimmed down to a minimum, since i don't use many fonts, and don't like to see cluttered font menus.
    However I apparently disabled one too many fonts, and now Mail refuses to create "notes". When I go to create a new note, nothing happens at all... no error message, nothing (and this strikes me as a problem with Mail. I didn't go in and make any deep system level modifications, i simply used the Fontbook app that is available to all users, and switched off a few fonts, and now Mail is malfunctioning. It should at least give me a warning message).
    My system console reports as follows:
    11/12/07 8:37:11 AM Mail[152] * Assertion failure in +[NoteView updateFontAndRule:], /SourceCache/Mail/Mail-912.1/MessageViewer.subproj/NoteView.m:149
    11/12/07 8:37:11 AM Mail[152] * WebKit discarded an uncaught exception in the webView:didFinishLoadForFrame: delegate: <NSInternalInconsistencyException> font-family cannot be nil
    So,
    1. Does anybody know which fonts Mail needs for Notes?
    2. Is there a way I can/should report this bug to Apple?

    If you create a metadatatype with a single metdata block, and you reference that in your vm/cm cell attribute using a *one* based index, Excel seems to see the link and it honors it when saving the spreadsheet.
    So, I ended up with something like:
    <c ... cm="1"/> (I'm dealing with cell metadata, but the concept is equivalente to value metadata)
    <metadataTypes count="1">
      <metadataType name="MyMetaType" .../>
    </metadataTypes>
    <futureMetadata count="1" name="MyMetaType">
      <bk>
        <extLst><ext
    uri="http://example" xmlns:x="http://example"><x:val>87</x:val></ext></extLst>
      </bk>
    </futureMetadata>
    <cellMetadata count="1">
      <bk><rc
    t="1" v="0"/></bk> <!-- this is what gets referenced as cm=1 on the cell -->
    </cellMetadata>
    Hope this helps. 

  • BUG?? Exeption handling brakes a Loop?! (PL/SQL executed by C) Anybody know this ????

    (OS - SCO, Oracle 817, Pro*C/C++: Release 2.2.4.0.0)
    In C program I have a PL/SQL block with WHILE LOOP. Inside the loop I have SELECT statement with a begin..end arroung it and with EXCEPTION WHEN NO_DATA_FOUND for internal block. In this exception I have no RAISE statement. So, I expect the loop will be not broken by NO_DATA_FOUND error.
    After control comes to the EXCEPTION NO_DATA_FOUND the loop is not continue anymore (but error is not populated out of this begin..end.) If EXCEPTION NO_DATA_FOUND is commented by -- the loop runs completely.
    Is it known bug? Does anybody get something like this?
    To be more specific, my EXEC SQL EXECUTE .. END EXECUTE block looks like this:
    DECLARE
    BEGIN
    WHILE .. LOOP
    begin SELECT ...
    exception when NO_DATA_FOUND then NULL;
    when others then ... RAISE;
    end;
    END LOOP;
    END;
    Would appreciate any response on this matter.
    Thanks!
    Alex.

    Call the procedure from another "wrapper" procedure. In the wrapper, place the call within to your existing procedure in a
    for i in 1..3 loop
      call procedure;
      if <successful condition> then
        exit loop;
      end if;
    end loop;I think that'd be easier than trying to work on controlling everything from within a single procedure. You could even set up a PACKAGE where the wrapper was the only public procedure, where your current procedure is private, and thus, can't be called outside of the wrapper, by accident. --=cf

  • BUG: ColdFusion does not handle conflicting cookies correctly

    (I have reported this as a bug - I'm posting it here to hopefully save people from having to go through the same process)
    If I've got a CF instance on test1.k9.edu, and my cookie jar has CFID/CFToken cookies for both 'test1.k9.edu' and '.k9.edu', CF behaves badly in two ways:
    1) A CFDump of COOKIE shows two entries for each of the CFID and CFToken cookies
    2) the values are identical, and match the first one set - NOT the most specific - 'test1.k9.edu' should always take precedence, but the CF behavior is that it only takes precedence if the browser got it before the '.k9.edu' value (browser in this case is FireFox 20.0.1)
    The net result is... that if I browse to foo.k9.edu and it sets CFID/CFToken cookies at the domain level... and then go to 'test1.k9.edu' which does not set domain cookies... I will not be able to maintain a session (assuming that 'test1' has the latest security fixes) at test1.k9.edu until I scrub my cookies - each request will take the '.k9.edu' values, reject them because they didn't originate locally... and issue new cookies (which will be ignored by the next request... and so on)
    This problem is not limited to CFID/CFToken cookies, although this is where the problem is most urgent, as it could be exploited to create a domain-wide denial of service (by effectively blocking session use for all CF instances in the domain)
    The test case is very simple  (change the domain in this example as appropriate for your installation)
    [for this example, all requests go to test1.k9.edu - adjust to match your domain]
    first request - run this:
    <cfcookie name="test1a" value="domain(domain cookie sent first first)" domain=".k9.edu">
    <cfcookie name="test1b" value="no-domain(non-domain cookie sent first)">
    second request - run this:
    <cfcookie name="test1a" value="no-domain(domain cookie sent first first)">
    <cfcookie name="test1b" value="domain(non-domain cookie sent first)" domain=".k9.edu">
    third request - run this:
    <cfdump var=#cookie#>
    ===============
    My tests were all done with FireFox 20.0.1 with ColdFusion 10 (stand-alone), updater 10 applied.  My web server is Apache 2.2.  The same problem is seen with CF9.0.2.
    The same tests run with Railo 3.3.4 (Tomcat 7) produced correct results (value seen in CFDump results is reliably from the most-specific cookie)

    I feel your pain, more so as you are trying to assist in making a product better. I would fire off an email to the top dog, Steve Jobs. As well, Apple should make a habit of trolling the forums here as they are where the real work of fixing and educating Apple customers takes place. I am amazed by the assistance I have had here and try to assist where I can while avoiding anything to make matters worse. Those Top Users just to my right deserve praise and an Apple goodie every now and then. There ought to be a hall of fame too.
    < Edited by Host >

  • After editing the iisproxy.ini with a differnet IP address do I need to do anything else?

    I changed the iispoxy.ini file on MS ISS server to point to a new
    weblogig server ip address but I get a timeout error when trying
    to proxey to the new server.
    Do i need to do anything else to the server to make this connection
    work.

    Hi Joe,
    The encoded assets are imbedded inside your iDVD project package. When you updated your footage, did iDVD detect the asset change and ask you to update the project? If it didn't, it might not have re-encoded some of your DVD footage. You should preview your disk image with Apple DVD Player to be sure. The encoded assets can be deleted with the Advanced > Delete Encoded Assets menu command and save your project.

Maybe you are looking for