Security Exception thrown using xerces.jar (XML parser)

Hi All,
My standalone version of a swing application works fine, however when runnning through webstart, I get the following security exception thrown (this is the debug output from web start console):
Permission requested for: file:/C:/Program Files/Java Web Start/.javaws/cache/http/Dmis-dt-04501/P7001/DMDimsPriceWebApp/RMxerces.jar
FileToEntry: C:\Program Files\Java Web Start\.javaws\cache\http\Dmis-dt-04501\P7001\DMDimsPriceWebApp\RMxerces.jar
Returning: DisckCacheEntry[R;http://mis-dt-04501:7001/DimsPriceWebApp/xerces.jar;null;Wed Dec 31 19:00:00 EST 1969;C:\Program Files\Java Web Start\.javaws\cache\http\Dmis-dt-04501\P7001\DMDimsPriceWebApp\RMxerces.jar;null]
Returning cache input stream for: C:\Program Files\Java Web Start\.javaws\cache\http\Dmis-dt-04501\P7001\\DMDimsPriceWebApp\RTxerces.jar
No certificates in codesource
No certificates in cache
Add sandbox permissions
java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
     at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
     at java.security.AccessController.checkPermission(AccessController.java:399)
     at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
     at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1278)
     at java.lang.System.getProperty(System.java:560)
     at org.apache.xml.utils.TreeWalker.<init>(TreeWalker.java:149)
     at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.<init>(DOM2DTM.java:1602)
     at org.apache.xml.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.java:188)
     at org.apache.xml.dtm.ref.DTMManagerDefault.getDTMHandleFromNode(DTMManagerDefault.java:437)
     at org.apache.xpath.XPathContext.getDTMHandleFromNode(XPathContext.java:194)
     at org.apache.xpath.XPathAPI.eval(XPathAPI.java:274)
     at org.apache.xpath.XPathAPI.selectNodeList(XPathAPI.java:202)
     at org.apache.xpath.XPathAPI.selectNodeList(XPathAPI.java:182)
Is this because the jar is not signed?
Thanks!
-Travis

In case anyone is interested, I've solved my own problem. I had to sign the jars and then also add the: <security>
<all-permissions/>
</security>
tag to the jnlp file.

Similar Messages

  • Exception thrown while reading an XML file using Properties

    Exception thrown while reading an XML file using Properties.
    Exception in thread "main" java.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException:
    The processing instruction target matching "[xX][mM][lL]" is not allowed.
    at java.util.XMLUtils.load(Unknown Source)
    <?xml version="1.0"?>
    <Config>
         <Database>
              <Product>FX.O</Product>
              <URL>jdbc:oracle:thin:@0.0.0.0:ABC</URL>
         </Database>
    </Config>Am I missing anything?

    Thanks a lot for all yr help.I have got the basics of
    the DTD
    However,when I say thus
    <!DOCTYPE Config SYSTEM "c:/PartyConfig">
    ?xml version="1.0"?>
    <Config>
         <Database>
              <Product>FX</Product>
              <URL>jdbc:oracle:thin:@0.0.0.0:ABC</URL>
         </Database>
    </Config>I get the error
    Invalid system identifier: file:///c:/ParyConfig.dtd
    Please advise?for goodness sake, how many times do I have to tell you that you can't just expect the Properties class to accept arbitrary XML in any format? it reads XML in the format I linked to, and nothing else. Properties is not a general purpose XML binding. you can't do what you're trying to do with it. read this and in particular pay attention to the following
    The XML document must have the following DOCTYPE declaration:
    <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
    Furthermore, the document must satisfy the properties DTD described above.
    you are not reading my answers properly, are you? kindly do so

  • Null Pointer Exception in orion-ejb-jar.xml GUI editor

    Hi,
    I am getting a NPE when attempting to configure CMR mappings orion-ejb-jar.xml with the GUI/Properties Editor.
    Using 9.0.5.2 on Windows XP professional SP2
    Have defined the necessary <relationships> descriptors for this relation.
    1:M unidirectional from entity X to Entity Y
    1)Over orion-ejb-jar.xml right click and select 'Properties...'
    2) Highlight Entity X in properties gui and open the tree. Select 'CMP Field Mappings'.
    3)On the right pane there are two tabs 'CMP Field Mappings' and 'Relationship Mappings'. Select Relationship Mappings.
    4) Relationship Mappings tab now displayed with the above relationship displayed in drop down 'Relationship' tab.
    5) Regardless of whether I select any extra properties on the CMP Mapping, If I hit ok button I get the NPE shown below (n.b. All details filled in except the FK field on the many side of the relation - this is the only field I can enter on this window in this case.).
    java.lang.NullPointerException
         at oracle.jdevimpl.ejb.mapper.RelationshipsPanel.saveCollectionMapping(RelationshipsPanel.java:1195)
         at oracle.jdevimpl.ejb.mapper.RelationshipsPanel.saveOneToManyRelationship(RelationshipsPanel.java:748)
         at oracle.jdevimpl.ejb.mapper.RelationshipsPanel.saveRelationship(RelationshipsPanel.java:528)
         at oracle.jdevimpl.ejb.mapper.RelationshipsPanel.onExit(RelationshipsPanel.java:394)
         at oracle.ide.panels.TabbedPanel.exitCurrentTraversable(TabbedPanel.java:219)
         at oracle.ide.panels.TabbedPanel.onExit(TabbedPanel.java:106)
         at oracle.jdevimpl.deploy.ejb.oc4j.CmpFieldMappingsPanel.onExit(CmpFieldMappingsPanel.java:134)
         at oracle.ide.panels.MDDPanel.exitTraversable(MDDPanel.java:850)
         at oracle.ide.panels.MDDPanel.onExit(MDDPanel.java:290)
         at oracle.ide.panels.TDialog$L.vetoableChange(TDialog.java:72)
         at java.beans.VetoableChangeSupport.fireVetoableChange(VetoableChangeSupport.java:300)
         at java.beans.VetoableChangeSupport.fireVetoableChange(VetoableChangeSupport.java:217)
         at oracle.bali.ewt.dialog.JEWTDialog.fireVetoableChange(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog.dismissDialog(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog$UIListener.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
         at java.awt.Component.processMouseEvent(Component.java:5100)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
    <snip ....>
    Very good chance I am doing something wrong ! However, would be interested in getting a reason (or any lead for that matter) why JDev is throwing NPE in this case.
    Cheers
    Ben

    Hi,
    I am getting a NPE when attempting to configure CMR mappings orion-ejb-jar.xml with the GUI/Properties Editor.
    Using 9.0.5.2 on Windows XP professional SP2
    Have defined the necessary <relationships> descriptors for this relation.
    1:M unidirectional from entity X to Entity Y
    1)Over orion-ejb-jar.xml right click and select 'Properties...'
    2) Highlight Entity X in properties gui and open the tree. Select 'CMP Field Mappings'.
    3)On the right pane there are two tabs 'CMP Field Mappings' and 'Relationship Mappings'. Select Relationship Mappings.
    4) Relationship Mappings tab now displayed with the above relationship displayed in drop down 'Relationship' tab.
    5) Regardless of whether I select any extra properties on the CMP Mapping, If I hit ok button I get the NPE shown below (n.b. All details filled in except the FK field on the many side of the relation - this is the only field I can enter on this window in this case.).
    java.lang.NullPointerException
         at oracle.jdevimpl.ejb.mapper.RelationshipsPanel.saveCollectionMapping(RelationshipsPanel.java:1195)
         at oracle.jdevimpl.ejb.mapper.RelationshipsPanel.saveOneToManyRelationship(RelationshipsPanel.java:748)
         at oracle.jdevimpl.ejb.mapper.RelationshipsPanel.saveRelationship(RelationshipsPanel.java:528)
         at oracle.jdevimpl.ejb.mapper.RelationshipsPanel.onExit(RelationshipsPanel.java:394)
         at oracle.ide.panels.TabbedPanel.exitCurrentTraversable(TabbedPanel.java:219)
         at oracle.ide.panels.TabbedPanel.onExit(TabbedPanel.java:106)
         at oracle.jdevimpl.deploy.ejb.oc4j.CmpFieldMappingsPanel.onExit(CmpFieldMappingsPanel.java:134)
         at oracle.ide.panels.MDDPanel.exitTraversable(MDDPanel.java:850)
         at oracle.ide.panels.MDDPanel.onExit(MDDPanel.java:290)
         at oracle.ide.panels.TDialog$L.vetoableChange(TDialog.java:72)
         at java.beans.VetoableChangeSupport.fireVetoableChange(VetoableChangeSupport.java:300)
         at java.beans.VetoableChangeSupport.fireVetoableChange(VetoableChangeSupport.java:217)
         at oracle.bali.ewt.dialog.JEWTDialog.fireVetoableChange(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog.dismissDialog(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog$UIListener.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
         at java.awt.Component.processMouseEvent(Component.java:5100)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
    <snip ....>
    Very good chance I am doing something wrong ! However, would be interested in getting a reason (or any lead for that matter) why JDev is throwing NPE in this case.
    Cheers
    Ben

  • Ejb-jar.xml parse excpetion...

    Could someone please take a look at my ejb-jar.xml code and try to see the error in it?
    I am trying to load this jar into WebLogic 6.1 and when i try and deploy the bean i get the following exception:
    Unable to deploy EJB: RequestBean.jar from RequestBean.jar:
    The XML parser encountered an error in your deployment descriptor. Please ensure that your deployment descriptor corresponds to the format in the DTD. The error was:
    org.xml.sax.SAXParseException: The content of element type "ejb-jar" must match "(description?,display-name?,small-icon?,large-icon?,enterprise-beans,relationships?,assembly-descriptor?,ejb-client-jar?)".
    Here is the xml behind my ejb-jar.xml file:
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
      <enterprise-beans>
        <session>
          <ejb-name>RequestResearch</ejb-name>
          <home>com.weblogic.RequestResearchHome</home>
          <remote>com.weblogic.RequestResearchRemote</remote>
          <ejb-class>com.weblogic.RequestResearchBean</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Bean</transaction-type>
        </session>
      </enterprise-beans>
      <enterprise-beans>
        <session>
          <ejb-name>RequestDataManager</ejb-name>
          <local>com.weblogic.RequestDataManagerLocal</local>
          <local-home>com.weblogic.RequestDataManagerLocalHome</local-home>
          <ejb-class>com.weblogic.RequestDataManagerBean</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Bean</transaction-type>
        </session>
      </enterprise-beans>
    </ejb-jar>Thanks for your time,
    Nate

    I also get the following exception right below the exception posted in the first post:
    org.xml.sax.SAXParseException: The content of element type "ejb-jar" must match "(description?,display-name?,small-icon?,large-icon?,enterprise-beans,relationships?,assembly-descriptor?,ejb-client-jar?)".]
    File: ejb-jar.xml Line: 14 Column: 21
    The nice thing about this exception is it shows the row and column. However, I can't figure out where this is in the ejb-jar.xml file? Does the parser smoosh everthing together and count from there? Or does the parser count from my formatting?
    Thanks again for your time,
    Nathan

  • Weblogic 10.3.0 Deployment error when using ejb-jar.xml

    Hi,
    I am getting the following error while deploying my EJB3 application on Weblogic 10.3.0. This is happening only if I include ejb-jar.xml.
    As per the EJB3 descriptor spec, Remote Home or Local home are not exists.
    Is this a issue in Weblogic 10.3.0 or am I missing any special setup ?
    Please help.
    weblogic.application.ModuleException: Exception preparing module: EJBModule(egm-poc.jar)
    Unable to deploy EJB: C:\appsrv\domains\WeblogicRS1.1-domain\servers\admin\tmp\_WL_user\_appsdir_egmear_ear\ot2591\egm-poc.
    jar from egm-poc.jar:
    In EJB JPATestBean, both the remote home and remote component interface must be specified. Currently, only one of them is spec
    ified.
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
    My ejb-jar.xml is
    - <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
    <description>JPA Test Application</description>
    <display-name>JPATest</display-name>
    - <enterprise-beans>
    - <session>
    <ejb-name>JPATestBean</ejb-name>
    <remote>egm.poc.jpa.JPATestBeanRemote</remote>
    <local>egm.poc.jpa.JPATestBeanLocal</local>
    <ejb-class>egm.poc.jpa.JPATestBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    - <session>
    <ejb-name>AuditInfoDAOH</ejb-name>
    <local>egm.poc.jpa.Audit</local>
    <ejb-class>egm.poc.jpa.AuditInfoDAOH</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    - <assembly-descriptor>
    - <container-transaction>
    - <method>
    <ejb-name>JPATestBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>RequiresNew</trans-attribute>
    </container-transaction>
    - <container-transaction>
    - <method>
    <ejb-name>AuditInfoDAOH</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Regards
    Saji

    Hi,
    Seems the issue is not common. Can anyone throw some light on this ?
    Regards
    Saji

  • URGENT! SEGV-errors when using Oracle C XML Parser for Solaris

    I often (not always) got SEGV-error with core dump when I use Oracle Oracle C XML Parser for Solaris. This Error is always got in the call of the the function xmlinit(...) with all params as NULL but the first required for the error code and the second which i assign a macro that evaluates to "US-ASCII". Does anyone knows about this problem?
    I am using a very short, wellformed and validated XML document.
    I would be very glad for some help about this!
    null

    Please provide a sample program along with the version number of the XML parser.

  • Can I don't use sapxmltoolkit for xml parsing?

    Hi SDN,
    I have a J2EE application with Struts frontend. I
    I have successfully deployed and run without problem on SAP WebAS 6.40 (Slim Edition). However, when I tried to deploy and run the same application on the Java Edition that comes with EP, there is a "Provider com.sap.engine.lib.jaxp.DocumentBuilderFactoryImpl not found" error due to missing reference to the sapxmltoolkit library. I added the reference to the sapxmltoolkit library in my application and that resolves the error but my frontend still does not display correctly.
    My application EAR already contains the Xerces parser library and I would like to stick to that but I saw that
    system properties for javax.xml.parsers.DocumentBuilderFactory has been set to com.sap.engine.lib.jaxp.DocumentBuilderFactoryImpl.
    How can I make my application use the xerces parser without hardcoding the use of xerces parser implementation in my code?
    Thanks!

    Hello,
    I performed some tests on my system but unfortunately I was not able to find an appropriate solution if some other application had already set JAXP system property. I noticed that I had given you a wrong note number - the notes that I've meant are 881597 and 609804. Note 881597 contains a jar file, which will identify the thread, which sets the JAXP system property. You said that you are able to run your application on NetWeaver slim edition so I am quite sure that one of the deployed applications (on the other J2EE Engine) sets the property.
    I am sorry that I cannot help much.
    Regards
    Vyara

  • Exception thrown using Admin Console to view policies

    I am trying to set up an LDAP Security Realm. The DD for a particular web application specifies the role required for the URI as below:
    <security-constraint>
    <display-name>Shop application security</display-name>
    <web-resource-collection>
    <web-resource-name>Protected Area</web-resource-name>
    <url-pattern>/beach/*</url-pattern>
    <url-pattern>/cruise/*</url-pattern>
    <url-pattern>/common/include/*</url-pattern>
    <url-pattern>/common/popups/*</url-pattern>
    <url-pattern>/common/book/*</url-pattern>
    <url-pattern>/common/tracking/*</url-pattern>
    <http-method>DELETE</http-method>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    <http-method>PUT</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>rapid_users</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    but when attempt to view or create policies, the following exception is thrown:
    An unexpected exception has occurred processing your request
    Message: null
    Stack Trace: java.lang.NullPointerException at com.bea.console.actions.security.policies.PolicyEditorPageFlow.getPolicyTreeMap(PolicyEditorPageFlow.java:994) at com.bea.console.actions.security.policies.PolicyEditorPageFlow.begin(PolicyEditorPageFlow.java:247) at com.bea.console.actions.webapp.policies.edit.module.EditWebAppModulePolicies.begin(EditWebAppModulePolicies.java:122) 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:585) at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:812) at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:751) at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:434) at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:245) at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:316) at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:48) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:1948) at com.bea.console.internal.ConsolePageFlowRequestProcessor.processActionPerform(ConsolePageFlowRequestProcessor.java:188) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:590) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:840) at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:607) at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:135) at com.bea.console.internal.ConsoleActionServlet.process(ConsoleActionServlet.java:241) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at com.bea.console.internal.ConsoleActionServlet.doGet(ConsoleActionServlet.java:130) at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:927) at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:571) at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.renderInternal(ScopedContentCommonSupport.java:222) at com.bea.portlet.adapter.scopedcontent.PageFlowStubImpl.render(PageFlowStubImpl.java:127) at com.bea.netuix.servlets.controls.content.NetuiContent.preRender(NetuiContent.java:338) at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:401) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:665) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:151) at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:206) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:146) at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:327) at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:190) at com.bea.netuix.servlets.manager.UIServlet.doGet(UIServlet.java:156) at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:141) at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:206) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:124) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3151) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    I am using Weblogic Server 9.1 and the jdk 150_04 that comes as installed.
    Is this a bug? Am I missing something? Any help in resolving this is appreciated as its proving very tedious
    Regards
    Andrew

    I am trying to set up an LDAP Security Realm. The DD for a particular web application specifies the role required for the URI as below:
    <security-constraint>
    <display-name>Shop application security</display-name>
    <web-resource-collection>
    <web-resource-name>Protected Area</web-resource-name>
    <url-pattern>/beach/*</url-pattern>
    <url-pattern>/cruise/*</url-pattern>
    <url-pattern>/common/include/*</url-pattern>
    <url-pattern>/common/popups/*</url-pattern>
    <url-pattern>/common/book/*</url-pattern>
    <url-pattern>/common/tracking/*</url-pattern>
    <http-method>DELETE</http-method>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    <http-method>PUT</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>rapid_users</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    but when attempt to view or create policies, the following exception is thrown:
    An unexpected exception has occurred processing your request
    Message: null
    Stack Trace: java.lang.NullPointerException at com.bea.console.actions.security.policies.PolicyEditorPageFlow.getPolicyTreeMap(PolicyEditorPageFlow.java:994) at com.bea.console.actions.security.policies.PolicyEditorPageFlow.begin(PolicyEditorPageFlow.java:247) at com.bea.console.actions.webapp.policies.edit.module.EditWebAppModulePolicies.begin(EditWebAppModulePolicies.java:122) 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:585) at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:812) at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:751) at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:434) at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:245) at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:316) at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:48) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:1948) at com.bea.console.internal.ConsolePageFlowRequestProcessor.processActionPerform(ConsolePageFlowRequestProcessor.java:188) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:590) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:840) at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:607) at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:135) at com.bea.console.internal.ConsoleActionServlet.process(ConsoleActionServlet.java:241) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at com.bea.console.internal.ConsoleActionServlet.doGet(ConsoleActionServlet.java:130) at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:927) at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:571) at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.renderInternal(ScopedContentCommonSupport.java:222) at com.bea.portlet.adapter.scopedcontent.PageFlowStubImpl.render(PageFlowStubImpl.java:127) at com.bea.netuix.servlets.controls.content.NetuiContent.preRender(NetuiContent.java:338) at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:401) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:665) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:677) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:151) at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:206) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:146) at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:327) at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:190) at com.bea.netuix.servlets.manager.UIServlet.doGet(UIServlet.java:156) at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:141) at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:206) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:124) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3151) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    I am using Weblogic Server 9.1 and the jdk 150_04 that comes as installed.
    Is this a bug? Am I missing something? Any help in resolving this is appreciated as its proving very tedious
    Regards
    Andrew

  • Security Exception while using OIM client API with Webcenter

    Hi,
    We are using OIM 11g Client api for creating user from our WebCenter portal application. But we are getting security as well as no such service exception while calling login from the OIM client.
    Exception::
    oracle.iam.platform.utils.NoSuchServiceException: java.lang.reflect.InvocationTargetException
         at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:197)
         at oracle.iam.platform.OIMClient.getService(OIMClient.java:174)
         at oracle.iam.platform.OIMClient.loginSessionCreated(OIMClient.java:209)
         at oracle.iam.platform.OIMClient.login(OIMClient.java:136)
         at oracle.iam.platform.OIMClient.login(OIMClient.java:114)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at oracle.iam.platform.OIMClient.getServiceDelegate(OIMClient.java:193)
    Caused by: java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[weblogic, Administrators]
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
    oracle.iam.platform.utils.NoSuchServiceException: java.lang.reflect.InvocationTargetException
    Client Code::
    System.setProperty("java.security.auth.login.config", "Path to authwl.conf");
    System.setProperty("OIM.AppServerType", "weblogic");
    env = new Hashtable();
    env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL,"weblogic.jndi.WLInitialContextFactory");
    env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, "t3://host:14000/oim");
    client = new OIMClient(env);
    try {
    client.login(OIMUserName, OIMPassword);
    } catch (LoginException e) {
    e.printStackTrace();
    The exception is coming after executing the login code (not login exception).We logged into our application using weblogic user(even for any other user in OID,shared by OIM, is having same behaviour). The code is being executed from integrated webogic server and oim_server is running on a different server under a separate domain.
    Please suggest.
    Thanks

    There are files needed in your project.
    from the <OIMHOME>/config folder_
    xl.policy
    authwl.conf
    log.properties
    from the <OIMHOME>/ext folder_
    commons-logging.jar
    jakarta-oro-2.0.8.jar
    javagroups-all.jar
    jhall.jar
    log4j-1.2.8.jar
    mail.jar
    oscache.jar
    spring.jar
    wlfullclient.jar
    from the <OIMHOME>/lib folder_
    iam-platform-auth-client.jar
    iam-platform-context.jar
    iam-platform-pluginframework.jar
    iam-platform-utils.jar
    oimclient.jar
    XellerateClient.jar
    xlAPI.jar
    xlDataObjectBeans.jar
    xlUtils.jar
    xlVO.jar

  • Security Exception while using Custom Entity Property Manager

    Hi,
    I am using Portal 7.0 UUP example (specified in dev2dev.com site) to implement
    custom entity property manager.
    It all works fine using Portal 7.0 admin tool.
    Now I am proving the same concept by writing java code to insert record in UUP_Example
    table.
    This is the code I am writing in my class
    UserManager userManager = getUserManager(); (calling method to get Remote Interface
    of UserManager).
    ProfileWrapper pw = userManager.createUser(identifier,password,"User");
    MyEntityPropertyManager myEntityPropertyManager=getMyEntityPropertyManager();(calling
    method to get remote interface of MyEntityPropertyManager)
    long num=myEntityPropertyManager.createUniqueId(null,identifier);
    pw.setProperty("UUPExample","word1","mike_headen");
    Code gets compiled successfully but when I execute these statements, following
    run time exception occurs:
    EJB Exception: ; nested exception is: java.lang.SecurityException: Users can only
    be modified by themselves, or by a member of the role DelegatedAdminRole||SystemAdminRole.
    This problem comes while executing last statement i.e
    pw.setProperty("UUPExample","word1","ajay_dogra");
    I know I am missing something here. Any guidance will be highly appreciated.
    Thanks
    Mike

    Mike,
    You approach is wrong and you have to code your program in a different way to
    get rid of this problem.
    Here, you are trying to update User property using pw.setProperty() even before
    authenticating and logging in the user.
    Why you are getting this error becuase user is not logged in and u are trying
    to update the user property.
    These are the steps you need to perform to update/insert user properties at the
    time of login.
    1. createUser(using usermanager.createUser).
    2. Authenticate user(Authentication.login(identifier, password, req);
    3. Initialse the profile in session
    ProfileWrapper profile =
    ProfileFactory.getProfile(identifier, null);
    4. Fire UserRegistrationEvent and Session Login event.
    5. Update user property using profilewrapper.setProperty.
    Hope this helps,
    You can either perform these steps in java or can use the usemanager custom tag
    in ur JSP.
    Thanks
    Sanjay
    Thanks
    Sanjay
    "Mike" <[email protected]> wrote:
    >
    Hi,
    I am using Portal 7.0 UUP example (specified in dev2dev.com site) to
    implement
    custom entity property manager.
    It all works fine using Portal 7.0 admin tool.
    Now I am proving the same concept by writing java code to insert record
    in UUP_Example
    table.
    This is the code I am writing in my class
    UserManager userManager = getUserManager(); (calling method to get Remote
    Interface
    of UserManager).
    ProfileWrapper pw = userManager.createUser(identifier,password,"User");
    MyEntityPropertyManager myEntityPropertyManager=getMyEntityPropertyManager();(calling
    method to get remote interface of MyEntityPropertyManager)
    long num=myEntityPropertyManager.createUniqueId(null,identifier);
    pw.setProperty("UUPExample","word1","mike_headen");
    Code gets compiled successfully but when I execute these statements,
    following
    run time exception occurs:
    EJB Exception: ; nested exception is: java.lang.SecurityException: Users
    can only
    be modified by themselves, or by a member of the role DelegatedAdminRole||SystemAdminRole.
    This problem comes while executing last statement i.e
    pw.setProperty("UUPExample","word1","ajay_dogra");
    I know I am missing something here. Any guidance will be highly appreciated.
    Thanks
    Mike

  • Is there a way to use a progress bar with Xerces XML Parser?

    My program is parsing very long XML files that take several minutes to parse. I am using Xerces as the parser. I would like to use a progress bar to show the progress, but I haven't found any way to get Xerces to give progress updates. Is this possible?

    Use teh SAX parser and listen to SAX events. Example:
    import java.io.*;
    import java.util.*;
    //jaxp-api.jar:
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    //sax.jar:
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.XMLReader;
    import org.xml.sax.helpers.DefaultHandler;
    import mine.IOUtils;
    * Handler to read content from (large) XML sources and send events to registered XMLListeners. Use this class to read
    * big (multiple megabytes) XML files via SAX and listen to XML events to process XML elements.
    * For small (less than a megabyte) XML files, it's more convenient to use the DOM API
    * to read the XML into a DOM document and perform XPath commands. DOM is easier to handle but has
    * the drawback that the complete XML content is stored in one big DOM document object in memory.
    public final class XMLHandler extends DefaultHandler {
        /** (Reusable) XMLReader to parse an XML document. */
        private XMLReader xmlReader = null;
        /** Registered XMLEventListeners. */
        private List<XMLListener> listeners = new ArrayList<XMLListener>();
        /** Value of current element. */
        private StringBuilder elementValue = null;
        /** Stack of current element and all of its parent elements. */
        private Stack<String> elementStack = new Stack<String>();
         * Constructor.
         * @throws Exception
        public XMLHandler() throws Exception {
            super();
            // Create a JAXP SAXParserFactory and configure it
            final SAXParserFactory spf = SAXParserFactory.newInstance(); //Use the default (non-validating) parser
            spf.setValidating(true);
            // Create a JAXP SAXParser
            final SAXParser saxParser = spf.newSAXParser();
            // Get the encapsulated SAX XMLReader
            xmlReader = saxParser.getXMLReader();
            xmlReader.setContentHandler(this);
            xmlReader.setDTDHandler(this);
            xmlReader.setEntityResolver(this);
            xmlReader.setErrorHandler(this);
        }//XMLHandler()
          * Add XMLListener to receive XML events from the current XML document.
         *  If <i>listener</i> is null, no exception is thrown and no action is performed.
          * @param listener XMLListener to add.
         public void addXMLEventListener(final XMLListener listener) {
            if (listener != null) {
                listeners.add(listener);
        }//addXMLEventListener()
         * Parse current XML document. Registered XMLEventListeners will receive events during parsing.
         * @param fileName Name of file to read XML content from.
         * @throws Exception
        public void parse(final String fileName) throws Exception {
            if (fileName != null) {
                parse(IOUtils.openInputStream(fileName));
        }//readXML()
          * Parse current XML document. Registered XMLEventListeners will receive events during parsing.
         * @param inputStream InputStream to read XML content from.
          * @throws Exception
         public void parse(final InputStream inputStream) throws Exception {
            if (inputStream != null) {
                xmlReader.parse(new InputSource(inputStream));
        }//readXML()
         * Overwrite super.
         * Receive notification of the beginning of the document.
        @Override
        public void startDocument() {
            for (XMLListener l : listeners) {
                l.documentStarted();
        }//startDocument()
         * Overwrites super.
         * Receive notification of the start of an element.
        @Override
        public void startElement(final String uri, final String localName, final String qName, final Attributes atts) {
            elementStack.push(qName);
            for (XMLListener l : listeners) {
                l.elementStarted(qName, elementStack);
            elementValue = new StringBuilder(); //element value
            //element attributes:
            if (atts.getLength() > 0) {
                String attName = null;
                for (int i = 0; i < atts.getLength(); i++) {
                    attName = atts.getQName(i);
                    final String attValue = atts.getValue(i);
                    for (XMLListener l : listeners) {
                        l.attributeRead(qName, attName, attValue);
                }//next attribute
            }//else: no attributes
        }//startElement()
         * Overwrites super.
         * Receive notification of character data inside an element. This method can be called multiple times
         * from SAX, so we need to append all results of all calls to the final element value.
        @Override
        public void characters(final char ch[], final int start, final int length) {
            String s = new String(ch, start, length);
            elementValue.append(s);
        }//characters()
         * Overwrites super.
         * Receive notification of the end of an element.
        @Override
        public void endElement(final String uri, final String localName, final String qName) {
            for (XMLListener l : listeners) {
                l.elementEnded(qName, elementValue.toString());
            elementStack.pop();
        }//endElement()
         * Overwrite super.
         * Receive notification of the end of the document.
        @Override
        public void endDocument() {
            for (XMLListener l : listeners) {
                l.documentEnded();
        }//endDocument()
    }//XMLHandler

  • How can I use a 3rd party XML parser such as xerces with OC4J ?

    Hi all tech experts,
    I am using Oracle Application Server 10g Release 2 (10.1.2) and i have
    installed Portal and Wireless and OracleAS Infrastructure on the same
    computer.
    i tried all the solutions on this thread
    Use of Xerces Parser in out application with Oracle App Server 9.0.4
    but still fighting.
    I have also posted this query on OTN on following thread
    How can I use a 3rd party XML parser such as xerces with OC4J?
    but no reply....
    Please help me on this issue.
    Since OC4J is preconfigured to use the Oracle XML parser which is xmlparserv2.jar.
    i have read the following article which states that
    OC4J is preconfigured to use the Oracle XML parser. The Oracle XML parser is fully JAXP 1.1 compatible and will serve the needs of applications which require JAXP functionality. This approach does not require the download, installation, and configuration of additional XML parsers.
    The Oracle XML parser (xmlparserv2.jar) is configured to load as a system level library of OC4J through it's inclusion as an entry in the Class-Path entry of the oc4j.jar Manifest.mf file. This results in the Oracle XML parser being used for all common deployment and packaging situations. You are not permitted to modify the Manifest.mf file of oc4j.jar.
    It must be noted that configuring OC4J to run with any additional XML parser or JDBC library is not a supported configuration. We do know customers who have managed to successfully replace the system level XML parser and the Oracle JDBC drivers that ship with the product, but we do not support this type of configuration due to the possibility of unexpected system behavior and system errors that might occur from replacing the tested and certified libraries.
    If you absolutely must use an additional XML parser such as xerces, then you have to start OC4J such that the xerces.jar file is loaded at a level above the OC4J system classpath. This can be accomplished using the -Xbootclasspath flag of the JRE.
    i have also run the following command
    java -Xbootclasspath/a:d:\xerces\xerces.jar -jar oc4j.jar
    but no success.
    How could i utilize my jar's like xerces.jar and xalan.jar for parsing instead of OC4J in-built parser ?
    All reply will be highly appreciated.
    Thnx in advance to all.
    Neeraj Sidhaye
    try_catch_finally @ Y !

    Hi Neeraj Sidhaye,
    I am trying to deploy a sample xform application to the Oracle Application Server (10.1.3). However, I encountered the class loader issue that is similar to your stuation. I tried all the three solutions but the application is still use the Oracle xml paser class. I am wondering if you have any insight about this?
    Thanks for your help.
    Xingsheng Qian
    iPass Inc.
    Here is the error message I got.
    Message:
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
    Stack Trace:
    org.chiba.xml.xforms.exception.XFormsException: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
         at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
         at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
         at org.chiba.xml.xforms.Container.initModels(Unknown Source)
         at org.chiba.xml.xforms.Container.init(Unknown Source)
         at org.chiba.xml.xforms.ChibaBean.init(Unknown Source)
         at org.chiba.adapter.servlet.ServletAdapter.init(ServletAdapter.java:153)
         at org.chiba.adapter.servlet.ChibaServlet.doGet(ChibaServlet.java:303)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
         at org.chiba.xml.xforms.Instance.iterateModelItems(Unknown Source)
         at org.chiba.xml.xforms.Bind.initializeModelItems(Unknown Source)
         at org.chiba.xml.xforms.Bind.init(Unknown Source)
         at org.chiba.xml.xforms.Initializer.initializeBindElements(Unknown Source)
         at org.chiba.xml.xforms.Model.modelConstruct(Unknown Source)
         at org.chiba.xml.xforms.Model.performDefault(Unknown Source)
         at org.chiba.xml.xforms.XFormsDocument.performDefault(Unknown Source)
         at org.chiba.xml.xforms.XFormsDocument.dispatchEvent(Unknown Source)
         at org.apache.xerces.dom.NodeImpl.dispatchEvent(Unknown Source)
         ... 18 more

  • XML Parse issues when using Network Data Model LOD with Springframework 3

    Hello,
    I am having issues with using using NDM in conjuction with Spring 3. The problem is that there is a dependency on the ConfigManager class in that it has to use Oracle's xml parser from xmlparserv2.jar, and this parser seems to have a history of problems with parsing Spring schemas.
    My setup is as follows:
    Spring Version: 3.0.1
    Oracle: 11GR2 and corresponding spatial libraries
    Note that when using the xerces parser, there is no issue here. It only while using Oracle's specific parser which appears to be hard-coded into the ConfigManager. Spring fortunately offers a workaround, where I can force it to use a specific parser when loading the spring configuration as follows:
    -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl But this is an extra deployment task we'd rather not have. Note that this issue has been brought up before in relation to OC4J. See the following link:
    How to change the defaut xmlparser on OC4J Standalone 10.1.3.4 for Spring 3
    My question is, is there any other way to configure LOD where it won't have the dependency on the oracle parser?
    Also, fyi, here is the exception that is occurring as well as the header for my spring file.
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
    Line 11 in XML document from URL [file:/C:/projects/lrs_network_domain/service/target/classes/META-INF/spring.xml] is invalid;
    nested exception is oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
         [snip]
         ... 31 more
    Caused by: oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'
         at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:425)
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:331)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:222)
         at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:155)
         at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)Here is my the header for my spring configuration file:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:aop="http://www.springframework.org/schema/aop"
           xmlns:tx="http://www.springframework.org/schema/tx"
           xmlns:context="http://www.springframework.org/schema/context"
           xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">Thanks, Tom

    I ran into this exact issue while trying to get hibernate and spring working with an oracle XMLType column, and found a better solution than to use JVM arguments as you mentioned.
    Why is it happening?
    The xmlparserv2.jar uses the JAR Services API (Service Provider Mechanism) to change the default javax.xml classes used for the SAXParserFactory, DocumentBuilderFactory and TransformerFactory.
    How did it happen?
    The javax.xml.parsers.FactoryFinder looks for custom implementations by checking for, in this order, environment variables, %JAVA_HOME%/lib/jaxp.properties, then for config files under META-INF/services on the classpath, before using the default implementations included with the JDK (com.sun.org.*).
    Inside xmlparserv2.jar exists a META-INF/services directory, which the javax.xml.parsers.FactoryFinder class picks up and uses:
    META-INF/services/javax.xml.parsers.DocumentBuilderFactory (which defines oracle.xml.jaxp.JXDocumentBuilderFactory as the default)
    META-INF/services/javax.xml.parsers.SAXParserFactory (which defines oracle.xml.jaxp.JXSAXParserFactory as the default)
    META-INF/services/javax.xml.transform.TransformerFactory (which defines oracle.xml.jaxp.JXSAXTransformerFactory as the default)
    Solution?
    Switch all 3 back, otherwise you'll see weird errors.  javax.xml.parsers.* fix the visible errors, while the javax.xml.transform.* fixes more subtle XML parsing (in my case, with apache commons configuration reading/writing).
    QUICK SOLUTION to solve the application server startup errors:
    JVM Arguments (not great)
    To override the changes made by xmlparserv2.jar, add the following JVM properties to your application server startup arguments.  The java.xml.parsers.FactoryFinder logic will check environment variables first.
    -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
    However, if you run test cases using @RunWith(SpringJUnit4ClassRunner.class) or similar, you will still experience the error.
    BETTER SOLUTION to the application server startup errors AND test case errors:
    Option 1: Use JVM arguments for the app server and @BeforeClass statements for your test cases.
    System.setProperty("javax.xml.parsers.DocumentBuilderFactory","com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
    System.setProperty("javax.xml.parsers.SAXParserFactory","com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl");
    System.setProperty("javax.xml.transform.TransformerFactory","com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
    If you have a lot of test cases, this becomes painful.
    Option 2: Create your own Service Provider definition files in the compile/runtime classpath for your project, which will override those included in xmlparserv2.jar.
    In a maven spring project, override the xmlparserv2.jar settings by creating the following files in the %PROJECT_HOME%/src/main/resources directory:
    %PROJECT_HOME%/src/main/resources/META-INF/services/javax.xml.parsers.DocumentBuilderFactory (which defines com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl as the default)
    %PROJECT_HOME%/src/main/resources/META-INF/services/javax.xml.parsers.SAXParserFactory (which defines com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl as the default)
    %PROJECT_HOME%/src/main/resources/META-INF/services/javax.xml.transform.TransformerFactory (which defines com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl as the default)
    These files are referenced by both the application server (no JVM arguments required), and solves any unit test issues without requiring any code changes.
    This is a snippet of my longer solution for how to get hibernate and spring to work with an oracle XMLType column, found on stackoverflow.

  • Why can't Oracle XML parser import a Xerces node?

    I have been using XSU to obtain query results in XML as a DOM. Recently I tried to use the Document.importNode method on the generated DOM where the node to be imported was generated using the Xerces parser. The Oracle XML parser gave the following error:
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredElementImpl
         org.w3c.dom.Node oracle.xml.parser.v2.XMLDocument.importNode(org.w3c.dom.Node, boolean)
              XMLDocument.java:1247
    I can get around the problem by parsing the XML I want to combine with the XSU generated XML with the Oracle parser, however, I would be happier if I could configure XSU to use Xerces (or another parser) via JAXP.
    Will XSU have JAXP support? What is the cause of the exception above?
    Gary Brown
    Analyst/Developer
    University of Bristol

    I have been using XSU to obtain query results in XML as a DOM. Recently I tried to use the Document.importNode method on the generated DOM where the node to be imported was generated using the Xerces parser. The Oracle XML parser gave the following error:
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredElementImpl
         org.w3c.dom.Node oracle.xml.parser.v2.XMLDocument.importNode(org.w3c.dom.Node, boolean)
              XMLDocument.java:1247
    I can get around the problem by parsing the XML I want to combine with the XSU generated XML with the Oracle parser, however, I would be happier if I could configure XSU to use Xerces (or another parser) via JAXP.Different implementation have different internal representation of DOMNode. That is why you can't import.
    Will XSU have JAXP support? What is the cause of the exception above?Why you need this? Any requirement from your application?
    Gary Brown
    Analyst/Developer
    University of Bristol

  • Exception in XML Parser

    Hi all,
    I have a file-XI-file scenario.
    In this scenario the Transport Protocol used is FTP.
    The remote sender and the receiver system have Golden FTP server installed.
    The xml file is getting properly picked from the sender system. The format of this file is:
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns:file_mt xmlns:ns="http://namespace4BPM1">
      <file_type>binary</file_type>
      <file_name>input</file_name>
      <file_ext>txt</file_ext>
      <content_dt>
      <firstname>neetu</firstname>
      <middlename>k</middlename>
      <lastname>gupta</lastname>
      </content_dt>
    </ns:file_mt>
    But the reciever file adapter is giving the following error:
    Receiver Adapter v1027 for Party '', Service 'Receiver_Service':
    Configured at 10:21:05 2006-06-05
    Last message processing started 10:21:35 2006-06-05, Error: Message processing failed with java.lang.Throwable: ftp access error: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns:file_mt' found in document', probably configuration error in file adapter (XML parser error)'
    The parameters specified in the receiver adapter are:
    Connect mode: per file transfer
    Transfer mode: Binary
    put file: directly
    file type : binary
    I also tried sending the file after removing the structure 'ns:file_mt', but it gave the structure missing error message.
    Pls if anybody could guide me as to what should be done.
    Thanks in advance.
    Regards
    Neetu

    check the document name in file adapter configuration channel and message type name of the interface and name space..both should have same name...
    check thz blog for more inputs
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    Go through them and cross check ur config..

Maybe you are looking for