Assertion from dbxml 2.3.8

I am getting an assert error from dbxml 2.3.8
example:
[kraney@future control]$ rlwrap dbxml
Joined existing environment
dbxml> open config.dbxml
dbxml> setNamespace testmodel "http://bpointsys.com/schema/testmodel"
Binding testmodel -> http://bpointsys.com/schema/testmodel
dbxml> query "import module namespace model = 'http://bpointsys.com/model' at 'file:///home/kraney/workspace/control/test.dbxml'; model:getModel(collection()/testmodel:cannedmodels,'Fake')"
Assertion failed: qp_->getType() == QueryPlan::PATHS, QueryPlanHolder.cpp:82
The test.dbxml file is the following:
module namespace model = "http://bpointsys.com/model";
declare function model:getModel($root as element()*,$name as xs:string)
as element()?
if ($root/testmodel[@name=$name]) then
else
};

Hi Kris,
I've found the cause of this bug, and we will aim to release a fix for it soon.
John

Similar Messages

  • How to create Assertion from a SSOToken?

    Hi All,
    I am trying to create an Assertion from a valid SSOToken, But I am getting NullPointerException when calling AssertionManager.createAssertion. Any idea of why am I getting this error?
    Environment
    * OS - windows 2000 professional
    * JDK - java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
    Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
    * IS - SunONE Identity Server 6.0
    Thanks,
    Charlie
    * Note* For your ref, I have attached my sample code and the invocation mechanism
    java MySSO AQIC5wM2LY4SfcxqXnasaINIqwS5j/pqJ40XylVe/[email protected]%3A3fb20a19%3A493b71237d2ffdf
    // The argument is the TokenId which I got from the servlet
    http://green.my-domain.com:58080/amserver/SSOTokenSampleServlet
    Sample Code
    import com.sun.identity.sm.*;
    import com.sun.identity.saml.common.*;
    import com.sun.identity.saml.assertion.*;
    import com.sun.identity.saml.protocol.*;
    import com.sun.identity.saml.*;
    import com.iplanet.sso.*;
    import java.util.*;
    import java.net.*;
    public class MySSO {
         public static void main(String [] args) throws Exception{
              SSOTokenManager manager = SSOTokenManager.getInstance();
         SSOToken token = manager.createSSOToken(args[0]);
         if (manager.isValidToken(token)) {
                   AssertionManager am = AssertionManager.getInstance();
    String host = token.getHostName();
    java.security.Principal principal = token.getPrincipal();
    String authType = token.getAuthType();
    int level = token.getAuthLevel();
    InetAddress ipAddress = token.getIPAddress();
    long maxTime = token.getMaxSessionTime();
    long idleTime = token.getIdleTime();
    long maxIdleTime = token.getMaxIdleTime();
    long timeLeft = token.getTimeLeft();
    System.out.println("SSOToken host name: " + host);
    System.out.println("SSOToken Principal name: " + principal.getName());
    System.out.println("Authentication type used: " + authType);
    System.out.println("IPAddress of the host: " +
    ipAddress.getHostAddress());
                   System.out.println("Hi " + am);
                   List attributeList = new ArrayList();
                   List attrValueList = new ArrayList();
              /*Attribute 1: */
                   Attribute attr1 = new Attribute("attName1", "attNamespace1",
    "first Attribute");
                   attributeList.add(attr1);
                   /* Attribute 2: */
                   Attribute attr2 = new Attribute("attName2", "attNamespace2",
    "second Attribute");
                   attributeList.add(attr2);
                   /* create an Assertion */
                   Assertion assertion = null;
                        assertion = am.createAssertion(token, attributeList);
                        //assertion = am.createAssertion(token);
                   /* create an AssertionArtifact associated with the above Assertion*/
                   AssertionArtifact art = null;
                   String destionationID ="4S12tyF0cBkJXumbeG1wmXFA3+M=";
         art = am.createAssertionArtifact(assertion, destionationID);
              String aarti = art.getAssertionArtifact();
              Assertion assertion2 = SAMLClient.getAssertionByArtifact(aarti);
                   System.out.println(assertion2.toString());
    }

    I'm having the same problem.
    Can someone look at line 822 of
    com.sun.identity.saml.common.SAMLServiceManager
    and tell me whats NULL? It seems to be complaining while trying to get information regarding the assertions time skew for building the notbefore/after conditions. I am not sure wahy, as the code in the thread funcitons properly on my server (although I modified it to get the SSO Token from an HTTP header, rather than argument. Also note, I was working on 6.1)
    Perhaps it has to do with how you are generating/passing in he SSO Token. What is the argument you pass in, and how did you create it?
    Is there a way for me to
    look at the source code?
    Get a job at Sun ;-) Sorry - the server is not open source.
    - cmort
    java.lang.NullPointerException
    at
    t
    com.sun.identity.saml.common.SAMLServiceManager.getAtt
    ribute(SAMLServiceManager.java:822)
    at
    t
    com.sun.identity.saml.AssertionManager.createAssertion
    (AssertionManager.java:519)
    at
    t
    com.sun.identity.saml.AssertionManager.createAssertion
    (AssertionManager.java:203)
    at
    t
    com.sun.identity.saml.AssertionManager.createAssertion
    (AssertionManager.java:188)
    at
    t
    AssertionArtifactNSF.doGet(AssertionArtifactNSF.java:1
    20)
    at
    t
    javax.servlet.http.HttpServlet.service(HttpServlet.jav
    a:740)
    at
    t
    javax.servlet.http.HttpServlet.service(HttpServlet.jav
    a:853)
    at
    t
    com.iplanet.server.http.servlet.NSServletRunner.invoke
    ServletService(NSServletRunner.java:919)
    at
    t
    com.iplanet.server.http.servlet.NSServletRunner.Servic
    e(NSServletRunner.java:483)

  • Assert in NsDom.cpp from dbxml 2.3.8

    I was able to temporarily workaround my previous assert problems by including the function declarations inline, rather than in a separate file. That got me a little farther, but I hit another assert.
    Sorry if I just keep finding new ways to harp on the same bug.
    Here is the error:
    Assertion failed: tmp == first, NsDom.cpp:1015
    Here is the query:
    declare namespace model = "http://bpointsys.com/model";
    declare ordering ordered;
    declare function model:getModel($root as element()*,$name as xs:string)
    as element()?
    if ($root/testmodel[@name=$name]) then
    let $dataset := collection()/testdata[string(@modelname)=$name]
    let $max := max($dataset/@iteration)
    let $lastrun := $dataset[@iteration=$max][1]
    for $m in $root/testmodel[@name=$name]
    return element { fn:local-name($m) } {
    $m/../@class,
    $m/@*,
    attribute lastrun {
    string($lastrun/@endtime)
    attribute lastrunby {
    string(collection()/config:config/auth/users/user[string(@id) =
                        string ($lastrun/@user)]/@name)
    attribute result {
    string($lastrun/@result)
    $m/node()
    else
    model:getModel(collection()/(testmodel:testmodels|testmodel:cannedmodels),$name)

    I get a similar assert for this much simpler query when running as a 'removeStep' in an xmodify operation on a document.
    [kraney@future control]$ rlwrap dbxml
    Joined existing environment
    dbxml> open config.dbxml
    dbxml> setNamespace testmodel "http://bpointsys.com/schema/testmodel"
    Binding testmodel -> http://bpointsys.com/schema/testmodel
    dbxml> getDoc testmodels
    1 documents found
    dbxml> contextQuery "//workingCopy[@user='dev' and @instance='']"
    2 objects returned for expression '//workingCopy[@user='dev' and @instance='']'
    dbxml> removeNodes "/testmodel:testmodels/workingCopy[@user='dev' and @instance='']"
    Removing nodes: /testmodel:testmodels/workingCopy[@user='dev' and @instance='']
    Assertion failed: !next || (next->_nsElemPrev == this), NsDom.cpp:1312
    Also,
    dbxml> removeNodes "//workingCopy[@user='dev' and @instance='']"
    Removing nodes: //workingCopy[@user='dev' and @instance='']
    Assertion failed: !next || (next->_nsElemPrev == this), NsDom.cpp:1312                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Debug Assertion from javaw.exe

    I'm getting a Debug Assertion Failed from javaw.exe: (Windows 2000)
    jre1.4.2\bin\javaw.exe
    File: dbgheap.c
    Line 1044
    Expression: _CrtIsValidHeapPointer(pUserData)
    This occurs on one of my native DLL method calls. Here's the scenario:
    I've got a set of supplied DLLs from a manufacturer that are implemented using C++ and STL. I'm working on a wrapper DLL that maps to a Java class in that my Java class invokes the appropriate native methods in my wrapper DLL, which in turn works with the supplied vendor DLL's.
    As part of the initialization, I load up my wrapper DLL, and invoke its initialize() method, which in turn instantiates a C++ object:
    DShowLib::Grabber* m_pGrabber;
    JNIEXPORT void JNICALL Java_biz_femtosoft_rtfrog_data_framegrabber_ImagingSourceFWFrameGrabber_initialize
    (JNIEnv *, jobject)
         if( !DShowLib::InitLibrary( "********" ) )
              fprintf( stderr, "The library could not be initialized ");
              fprintf( stderr, "(invalid license key?).\n");
              exit( 1 );
         m_pGrabber = new DShowLib::Grabber();
         fprintf( stdout, "[DEBUG] The library has been initialized \n");
    Note that this C++ object is referenced by a global variable, m_pGrabber.
    In a subsequent function in my wrapper DLL, I invoke a method on the instantiated C++ object, and that is where the debug assertion happens:
    JNIEXPORT jobjectArray JNICALL Java_biz_femtosoft_rtfrog_data_framegrabber_ImagingSourceFWFrameGrabber_jni_1getVideoCaptureDevices
    (JNIEnv *env, jobject)
         fprintf( stdout, "[JNI FRAMEGRABBER] Entering getVideoCaptureDevices JNI function call\n");
         if (m_pGrabber != 0) {
              // Generate a list of all available video devices
              DShowLib::Grabber::tVidCapDevListPtr pVidCapDevList = m_pGrabber->getAvailableVideoCaptureDevices();
    I've omitted much of the source for brevity.
    Can anyone tell me what I might be doing that's causing this? I'm pretty rusty on my C++ coding, so there's a good chance that I am forgetting something quite fundamental.
    Regards,
    Ron Cordell

    Ok, I've discovered the -Djava.library.path command line switch. That took care of the problem.
    Now I can see where things fail, and it is on the return that the exception occurs. The code that is executing is shown below. Upon execution of the return 0 statement, I get the Debug Assertion Failure. Is it because there is some local storage hanging around?
    JNIEXPORT jobjectArray JNICALL Java_biz_femtosoft_rtfrog_data_framegrabber_ImagingSourceFWFrameGrabber_jni_1getVideoCaptureDevices
    (JNIEnv *env, jobject)
         fprintf( stdout, "[JNI FRAMEGRABBER] Entering getVideoCaptureDevices JNI function call\n");
         if (m_pGrabber != 0) {
              // Generate a list of all available video devices
              DShowLib::Grabber::tVidCapDevListPtr pVidCapDevList = m_pGrabber->getAvailableVideoCaptureDevices();
    return 0;
    }

  • How to get SAMl assertion from SOAP Header and propagate user context to BW

    Hello to all,
    we implemented this scenario:
    3rdparty System to SAP PI 7.11 to SAP BW.
    sync. communication via SOAP Sender adapter and Receiver XI PROXY.
    We get a SAMl assertion in the SOAP Header from the 3rd-Party System.
    The SAP BW System could not read the Header information.
    How can we get the information of the SOAP Header in the PI System and send the usercontext via XI Proxy to the SAP BW system?
    Can we read the Header information in the SOAP adapter and mapping it to another field in the payload or Headerinformation which could read in the backend system in the proxy class?
    Thanks for your help and regards
    Martin

    Dear Fox,
    Thanks for your reply.
    Is it mandatory to have the Header elements and the message defined in the Mediator wsdl?
    At present I have not defined it in the WSDL.
    Thanks,
    Subin

  • Preformance issues when upgrading from dbxml 2.3.8 to 2.4.13

    I have recently upgraded my dbxml distribution from 2.3.8 to 2.4.13 (including the latest patch). I have noticed that many of the queries I issue take longer than they used to. Specifically if the query is complex it takes 10 times as long as it did with 2.3.8. Also I have noted a difference in speed between issuing the query via the dbxml shell (query takes ~45 seconds) vs issuing it through a c++ interface (query takes 4+ minutes). The query am issuing is:
    for $i in collection('projectDatabase.dbxml')/project
    where $i[obsblock/obsblockStatus eq 'INCOMPLETE' and obsblock/receiverBand eq '3MM' and obsblock/remainingTime >= 1.0 and ((obsblock/reqRaCoverage/@low <= 2.61799 and obsblock/reqRaCoverage/@low >= 0.654498) or (obsblock/reqRaCoverage/@high <= 2.61799 and obsblock/reqRaCoverage/@high >= 0.654498) or (0.654498 <= obsblock/reqRaCoverage/@high and 0.654498 >= obsblock/reqRaCoverage/@low) or ((obsblock/reqRaCoverage/@high < obsblock/reqRaCoverage/@low) and ((0.654498 <= obsblock/reqRaCoverage/@high) or (2.61799 <= obsblock/reqRaCoverage/@high) or (0.654498 >= obsblock/reqRaCoverage/@low) or (2.61799 >= obsblock/reqRaCoverage/@low)))) and obsblock/arrayConfiguration eq 'C' and projectID ne'opnt' and projectID ne'rpnt' and projectID ne'tilt' and projectID ne'fringe' and projectID ne'test']
    return $i
    if I simplify the query by removing references to the obsblock/reqRaCoverage/@low and obsblock/reqRaCoverage/@high nodes:
    for $i in collection('projectDatabase.dbxml')/project
    where $i[obsblock/obsblockStatus eq 'INCOMPLETE' and obsblock/receiverBand eq '3MM' and obsblock/remainingTime >= 1.0 and obsblock/arrayConfiguration eq 'C' and projectID ne'opnt' and projectID ne'rpnt' and projectID ne'tilt' and projectID ne'fringe' and projectID ne'test']
    return $i
    it returns much faster. I am wondering if this is an issue with optimization of the complex query?
    The database is fully indexed and was re-indexed when I upgraded to 2.4.13

    Doug,
    I've got your container. It's a wholedoc container with document indexes (a lot of them). Here's what I see for query speeds for your large, slow query using the dbxml shell.
    Query is:
    query "for $i in collection('pdb.dbxml')/project where $i[obsblock/obsblockStatus eq 'INCOMPLETE' and obsblock/receiverBand eq '3MM' and obsblock/remainingTime >= 1.0 and ((obsblock/reqRaCoverage/@low <= 2.61799 and obsblock/reqRaCoverage/@low >= 0.654498) or (obsblock/reqRaCoverage/@high <= 2.61799 and obsblock/reqRaCoverage/@high >= 0.654498) or (0.654498 <= obsblock/reqRaCoverage/@high and 0.654498 >= obsblock/reqRaCoverage/@low) or ((obsblock/reqRaCoverage/@high < obsblock/reqRaCoverage/@low) and ((0.654498 <= obsblock/reqRaCoverage/@high) or (2.61799 <= obsblock/reqRaCoverage/@high) or (0.654498 >= obsblock/reqRaCoverage/@low) or (2.61799 >= obsblock/reqRaCoverage/@low)))) and obsblock/arrayConfiguration eq 'C' and projectID ne'opnt' and projectID ne'rpnt' and projectID ne'tilt' and projectID ne'fringe' and projectID ne'test'] return $i"
    2.3.11 -- 2.4 seconds
    2.4.13 -- 60 seconds
    That is a significant slowdown and it needs further investigation but is almost certainly related to the fact that it is wholedoc storage. The optimizer appears to be choosing unwisely. This will take a few days to work out.
    I also changed the container to be node storage with node indexes and the times went to:
    2.3.11 -- 13 sec (slower than wholedoc)
    2.4.13 -- 40 sec (faster than wholedoc)
    I do know why your application is slower than the dbxml shell. There is a new flag that should almost always be used for wholedoc container queries -- DBXML_DOCUMENT_PROJECTION. Add that to you query excecution.
    Another thing -- query preparation is a bit slower in 2.4 so you should use prepared queries whenever possible to amortize that cost.
    Regards,
    George

  • FAST transform mechanism from .dbxml.XmlDocument to .w3c.dom.Document

    Hi,
    I'm looking for a FAST transform mechanism, converting com.sleepycat.dbxml.XmlDocument (retrieved from container) to org.w3c.dom.Document. Right now, i do that like this:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder;
    try {
    builder = factory.newDocumentBuilder();
    } catch (ParserConfigurationException e1) {
    return null;
    //xc = XmlContainer
    org.w3c.dom.Document doc = builder.parse(xc.getDocument("theDoc.xml").getContentAsInputStream());
    This works just fine. But the code seems to be slow... After only 1200 requests/s on this code, the container crashes. Is there any faster mechanism retrieving and converting whole documents?
    Thanks.
    P.S.
    EnvironmentConfig has set the following options:
    setInitializeLocking(true);
    setInitializeCache(true);
    setAllowCreate(true);

    no one at all?

  • Blank Failed Assertion from Extend Proxy

    About once a month, usually under heavy load, we recieve the following Coherence error (running 3.6.1.6):
    2012.03.19 13:22:53.451 [Logger@1981402139 3.6.1.6] ERROR Coherence - 2012-03-19 13:22:53.380/195174.122 Oracle Coherence GE 3.6.1.6 <Error> (thread=ExtendTcpCacheServiceClient:TcpInitiator, member=n/a): Assertion failed:
            at com.tangosol.coherence.component.net.extend.message.Request$Status.setResponse(Request.CDB:3)
            at com.tangosol.coherence.component.net.extend.Channel.receive(Channel.CDB:95)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.onNotify(Peer.CDB:103)
            at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
            at java.lang.Thread.run(Thread.java:619)There's no corresponding error or message on our application's log layer that would hint at a cause.
    Any idea what could be causing this, and how we can resolve it?
    Thanks,
    JB

    Hi JB,
    This assertion indicates the request is completed or canceled, or already has a response. Since you mentioned that this usually happens under heavy load, it could mean the request is canceled due to wait timeout.
    -Luk

  • Parse a SAML assertion

    I want to parse a SAML assertion from an Identity Provider and use some
    of the data for identity injection. Anyway, the java identity injection
    plug-in can not access the SAML assertion, it can only access the
    username and password using the ExternalDataFillerContext object.
    Is it possible to extend tha authentication class to parse the SAML
    assertion and write out the data to the customisation profile? Which
    method or property returns the SAML assertion?
    Thank you,
    Alessandro
    afolli
    afolli's Profile: http://forums.novell.com/member.php?userid=6964
    View this thread: http://forums.novell.com/showthread.php?t=398904

    Hi. Thanks for the answer.
    I have two federated domains. The user requests a resource on domainA
    and he's redirected to IdpA for authentication. The user authenticate on
    IdpB and returns back. At this point I need to extract some info from
    the SAML assertion returned by IdpB.
    Do you think it's possible?
    Thanks,
    Alessandro
    mumasankar;1926007 Wrote:
    > The assertions are not stored on the session. It is little confusing
    > when you say you want to parse a SAML assertion from authentication
    > class. Usually, after authentication is done (after authentication class
    > finished exectuing), the response will be generated by the IDP and
    > assertion cration is part of the response.
    >
    > Can you please give details of your use case ?
    >
    > Regards,
    > Uma.
    afolli
    afolli's Profile: http://forums.novell.com/member.php?userid=6964
    View this thread: http://forums.novell.com/showthread.php?t=398904

  • Dbxml:lookup-index fails with edge-element-presence

    The custom xquery function dbxml:lookup-index seems broken for edge-element-presence indices when a namespace is specified:
    dbxml> lookupedge edge-element-presence 'http://ceridwen.us/default' node11 'http://ceridwen.us/default' node1
    1 objects returned for eager index lookup 'edge-element-presence'
    dbxml> q "declare default element namespace 'http://ceridwen.us/default'; dbxml:lookup-index('test', 'node11', 'node1')"
    0 objects returned for eager expression 'declare default element namespace 'http://ceridwen.us/default'; dbxml:lookup-index('test', 'node11', 'node1')'
    dbxml> q "declare default element namespace 'http://ceridwen.us/default'; dbxml:lookup-index('test', 'node11')"
    2 objects returned for eager expression 'declare default element namespace 'http://ceridwen.us/default'; dbxml:lookup-index('test', 'node11')'Dbxml-2.5.16, OSX 10.6.4
    Edited by: jralls on Aug 22, 2010 12:22 PM

    Is this what you need?
    dbxml> listin
    Default Index: node-element-presence-none edge-element-presence-none
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/test}:dataType
    Index: node-attribute-equality-string node-attribute-equality-double for node {http://ceridwen.us/test}:elemType
    Index: node-attribute-equality-string node-attribute-equality-double for node {}:first
    Index: node-attribute-equality-string node-attribute-equality-double for node {http://ceridwen.us/test}:first
    Index: edge-attribute-equality-string node-attribute-equality-string node-attribute-equality-double for node {http://www.w3c.org/1999/xlink}:href
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/test}:name
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2002/dbxml}:name
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default}:node11
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default}:node12
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default2}:node2
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default}:node311
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default}:node312
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default}:node321
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default}:node322
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/test}:ref
    Index: edge-attribute-equality-string node-attribute-equality-string node-attribute-equality-double for node {http://www.w3c.org/1999/xlink}:role
    Index: node-attribute-equality-string node-attribute-equality-double for node {http://www.w3c.org/1999/xlink}:second
    Index: node-attribute-equality-string node-attribute-equality-double for node {http://www.w3c.org/1999/xlink}:title
    Index: node-attribute-equality-string node-attribute-equality-double for node {http://www.w3c.org/1999/xlink}:type
    20 indexes found.This comes from
        DbXml::XmlContainer cnt = sto->getContainer();
        DbXml::XmlTransaction txn = m_mgr->createTransaction();
        try {
         DbXml::XmlUpdateContext uc = m_mgr->createUpdateContext();
         std::string xlink_uri("http://www.w3c.org/1999/xlink");
         std::string href("href");
         std::string role("role");
         std::string attr_eq("edge-attribute-equality-string");
         std::string node_pr("edge-element-presence-none");
         cnt.addIndex(txn, xlink_uri, href, attr_eq, uc);
         cnt.addIndex(txn, xlink_uri, role, attr_eq, uc);
         cnt.addDefaultIndex(txn, node_pr, uc);
         txn.commit();
        catch(DbXml::XmlException& e) {
         logError() << "XmlStorage: Opening container  " << name.sstr() << "  threw "
                 << e.what() << endl;
         throw;
        }There are only two documents in the container:
    <t:TestDoc xmlns:t="http://ceridwen.us/test" t:first="an attribute" xmlns:xlink="http://www.w3c.org/1999/xlink" xlink:second="another attribute">
       This is the root node of a test document
       <t:name>The Test Document</t:name>
       <t:dataType>TestDocument</t:dataType>
       <node1 xmlns="http://ceridwen.us/default" first="a node attribute">This element has 2 subnodes
           <node11>This is the first element under node 1</node11>
           <node12>This is the second element under node 1</node12>
       </node1>
       <node2 xmlns="http://ceridwen.us/default2">This element has three text nodes</node2>
       <node2 xmlns="http://ceridwen.us/default2">This is the second text node</node2>
       <node2 xmlns="http://ceridwen.us/default2">This element is the last one</node2>
       <Table xmlns="http://ceridwen.us/default">
          <t:DataRow t:elemType="Instance">
             <node311>First List Element</node311>
             <node312>Second List Element</node312>
          </t:DataRow>
          <t:DataRow t:elemType="Instance">
             <node321>Another First List Element</node321>
             <node322>Another Second List Element</node322>
          </t:DataRow>
       </Table>
       <?XmlStorage-html default-html?>
       <!--This is a gratuitous comment for testing.-->
    </t:TestDoc>
    <t:TestDoc xmlns:t="http://ceridwen.us/test" t:first="an attribute" xmlns:xlink="http://www.w3c.org/1999/xlink" xlink:second="another attribute">
       This is the root node of a test document
       <t:name>The Test Document</t:name>
       <t:dataType>TestDocument</t:dataType>
       <node1 xmlns="http://ceridwen.us/default" first="a node attribute">
          This element has 2 subnodes
          <node11>This is the first element under node 1</node11>
          <node12>This is the second element under node 1</node12>
       </node1>
       <node2 xmlns="http://ceridwen.us/default2">This element has three text nodes</node2>
       <node2 xmlns="http://ceridwen.us/default2">This is the second text node</node2>
       <node2 xmlns="http://ceridwen.us/default2">This element is the last one</node2>
       <Table xmlns="http://ceridwen.us/default">
          <t:DataRow t:elemType="Instance">
             <node311>First List Element</node311>
             <node312>Second List Element</node312>
          </t:DataRow>
          <t:DataRow t:elemType="Instance">
             <node321>Another First List Element</node321>
             <node322>Another Second List Element</node322>
          </t:DataRow>
       </Table>
       <?XmlStorage-html default-html?>
       <!--This is a gratuitous comment for testing.-->
       <t:ref xlink:href="dbxml:/test/The%20Test%20Document00000001" xlink:role="data:text/plain,reference" xlink:title="The Test Document"xlink:type="simple"/>
    </t:TestDoc>(Aside: It would be really nice if the dbxml shell's print command had a "pretty" option!)

  • JDK 1.5 Serialization Compatibility with assert()

    I have the following class:
    class xyz implements java.io.Serializable {
       void doNothing() {
          int x = 0;
          assert x < 5;
    }If I compile it on both JDK 1.4 (with -source=1.4) and 1.5 (with -source=1.5) platforms, the serialVersion IDs are different. If I comment out the assert statement, the serialVersion on 1.5 platform changes to be the same as the 1.4. If I rebuild the 1.4 with the assert commented out, the serialVersionID does not change.
    Am I missing something here? I have code that needs to be compatible between these versions, but it now seems that the use of assert (other than the statment "assert true") built with 1.5 effects the serialization ID.

    Sure, I can define my own version, but the point is that I've got many fielded classes that have not changed, but now will fail serialization when comunicating with the new system simply because of the use of assertions with 1.5.
    It looks like I will be forced to either go back to 1.4, test all classes for serialization compatibility with 1.4, or remove the asserts from the code.
    In any case, it does not make sence to me why adding an assertion should change the serialVersionUID of a class in the first place when compiling under 1.5 and not under 1.4.

  • Using assert or exception?

    I have been struggling with the methodology of using assertions for some time
    now and would like to have an objective viewpoint. It primarily has to
    do with the use of assertions for pre-conditions.
    Let's say we have some class, for demonstration purpose only, as this one:
    public class MyClass {
        private final String str;
        public MyClass(String str)
            this.str = str;
        private int getLength(String x, String y)
            return x.length() + y.length();
        public int getTotalLength(String x)
            return  getLength(str, x);
    }Let's say I want to make sure that the classes methods and constructor is not
    called with any null parameter. Of course I will get a NullPointerException
    eventually automatically anyway, but let's say I want to know as soon
    as possible to something is wrong. Or maybe I am dealing with a complicated
    class in which it is not so clear yet.
    Anyway the Sun Java documentation says the following:
    http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html#preconditions
    "Do not use assertions to check the parameters of a public method."
    Instead it should throw some particular exception. In this case a
    NullPointerException in the MyClass constructor if the str parameter is
    null. Conventation say that assertion can be used for private methods
    however, such as the getLength method.
    I always try to keep my classes relatively small. So often I feel no desire
    to include assertions in private methods to check parameters if I can
    already see that the parameters are checked in the public methods.
    So in this case why add assertions in getLength if I can already clearly
    see that the parameters have been checked in the MyClass constructor and
    the getTotalLength method?
    Maybe I am wrong, but I am afraid that using such rigurous parameter testing
    in every public method might influence performance too much, because in
    contrary of assertions these normal checks are done always. I cannot
    remove these normal checks, because that would mean it could trigger
    an assertion in one of the private methods, and I could as well move
    the assertions from the private to the public methods.
    What I don't feel comfortable about is this big distinction between
    assertions and run-time exceptions. Why not use assertions in
    public methods for parameter testing? They are just exceptions
    too anyway. And they have the benefit of not impacting performance
    for production environments.
    There is an article about challenging the Sun Assert convention here.
    http://www.javaworld.com/javaworld/jw-12-2001/jw-1214-assert-p2.html
    I would like you to read it and give your objective opinion. Weighing
    the positive and negative implications of it and tell me what you
    think and why.

    I don't have the time to read that article. IMO
    assertions are to be used to validate the state of
    your instance and its internal works.So you do not think that assertions should be used for any pre-conditions of parameters?
    They are not
    exceptions, by the way. Failure will result in an
    AssertionError.Yes, I should have said errors or throwables.
    It's quite overkill IMO to use those for the
    validation of parameters provided by someone else.Why? Isn't it overkill to impact the performance by
    using run-time exceptions instead of assertions?
    If
    your API declares the legit value range of an
    argument, a NullPointerException for null and an
    IllegalArgumentException for values outside bounds,
    that gives me more flexibility to react and handle
    error states (it could be user input - null would
    mean there's a bug, out of bounds would mean I have
    to ask the user again) than merely firing of a "big"
    assertion error.But the whole idea of pre-conditions is that the method never must be called with invalid values. Your example might make sense for some class close to the front-end, but most classes are deep inside everything and have no idea what to do with a NullPointerException or IllegalArgumentException at that point. I would let a facade near the front-end deal with invalid user input and explicitly prevent the invalid input progress deeper inside my code.
    The article I linked goed deeper in about why it is a good idea to give a "big" assertion error at that point.
    There's probably no hard or objective rule when you
    should use what anyway, otherwise, there wouldn't be
    different opinions in this matter. If you're looking
    for one, you'll most likely not find it.I have certain ideas about assertions and I would like to know if these ideas are reasonable. Especially because they go against the Sun convention and I usually am a follower of standards.

  • Is there any solution for dbxml cluster?

    Dbxml is an embedded xml database.
    If I have several web servers (cluster) and each of them use dbxml to store data, How can I sync the stored data?
    Can dbxml's container store dbxml file in one remote filesystem (not locally)?

    Thanks for your reply!
    After I read the replication strategy, I find there can only be one master existed in replication group. That is only one application can write data to dbxml. Others can only read data from dbxml.
    So this scenario can't be suitable for our web server (cluster). We need all web server application can write data to it's local dbxml. And all the dbxml should be sync.
    How can I do this using dbxml?

  • Error trying to import python dbxml package

    Hi,
    I can see a similar thread fro windows (see: Python API setup problem on Windows but I'm having this problem with fedora15 (64bit) / Python2.7 / BDB XML 2.5.16:
    I can build and install BDB XML without any problems following the standard documentation. I'm then trying to get the Python API to work.
    I followed the instructions and the bsddb3.db library works fine:
    #$ python
    #>>> from bsddb3.db import *
    #>>> print version()
    (4, 8, 26)
    #>>> exit()
    the problem is trying to import dbxml:
    #$ python
    #>>> from bsddb3.db import *
    #>>> from dbxml import *
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib64/python2.7/site-packages/dbxml.py", line 25, in <module>
    dbxml = swigimport_helper()
    File "/usr/lib64/python2.7/site-packages/dbxml.py", line 24, in swig_import_helper
    return _mod
    UnboundLocalError: local variable '_mod' referenced before assignment
    #>>>
    And if I then try to reimport:
    (following directly on from the above snippet)
    #>>> from dbxml import *
    Segmentation fault
    ... and python closes.
    Any thoughts?
    Thanks!
    Edited by: 898830 on 23-Nov-2011 11:11
    Edited by: 898830 on 23-Nov-2011 11:13

    Hi,
    After an interesting few days I think it is now working! complete reinstall seemed to do it.
    Thanks!

  • Retreiving asserted identity is slow

    Hi All,
    We are using SAML assertion from many different applications (each hosted on a different domain - e.g foo.com, bar.com etc). All apps are protected by SSO.We use Hub and Spoke model as documeneted here :
    http://download.oracle.com/docs/cd/B28196_01/idmanage.1014/b25355/deployinstall.htm#CHDJGEEE
    Each app goes thru OIF and retrieving asserted identity during each access to a resource is causing huge load and killing us in performance. We have OIF configured with OID. We are using Oracle 10.2 stack.
    Any suggestions to optimize this is highly appreciated.
    Thanks
    Vissu

    Metalink Note - 435023.1: Optimizing Search Operations in OID 10.1.4 With Parameter orclinmemfiltprocess to Avoid Matching Many Entries in the Database
    http://www.oracle.com/technology/products/oid/pdf/oid_tuning_configuration_quickreference_01.pdf
    Pay special attention to the following section:
    Tuning OID in OAM (COREid) and OIF deployments
    -shetty2k

Maybe you are looking for

  • How to suppress duplicate records in rtf templates

    Hi All, I am facing issue with payment reason comments in check template. we are displaying payment reason comments. Now the issue is while making batch payment we are getting multiple payment reason comments from multiple invoices with the same name

  • How to change the default element tag using dbms_xmlgen

    here is my code that generate output for purchase order data. I followed the syntax shown in xml db developer guide. I am getting the results but element tags are CAPS letters( As the coloumn names in the type defenitions are stored in CAPS in Oracle

  • Postgres/mysql PreparedStatement not working

    Hi All, I am encountering errors when using a "?" in PrepareStatement. like PrepareStatment pstmt = conn.prepareStatement(update table set col1 = ?") this only occurs for posrgresql and mysql. is there a fix for this? Thanks

  • Links do not get highlighted in email messages

    Hi! I upgraded to version 4.5 on my blackberry 8310 and now the links that I recieve in my emails do not get highlighted and i cant click on them to view the website. Is there anyway to change this? Solved! Go to Solution.

  • What is the best way to move iTunes library to a different hard drive?

    I have a MacBook Pro and recently removed my optical drive and replaced it with an internal hard drive so that I can have more storage. My iTunes library is on the original hard drive. I am getting close to running out of space on the original hard d