WLS 9.2 using XmlBeans error

Using WLS 9.2 MP1 and attempting to use XmlBean derived classes from a bean called from a JSP.
          Using XmlBeans v2.3.0.
          Server is WebLogic Server 9.2 MP1 Sun Jan 7 00:56:31 EST 2007 883308
          JSP version is 2.0
          Servlet API is 2.4
          An exception is thrown :
                    javax.servlet.jsp.el.ELException
               at javelin.jsp.el.ArrayRefEvaluator.evaluateBeanType(ArrayRefEvaluator.java:252)
               at javelin.jsp.el.ArrayRefEvaluator.evaluate(ArrayRefEvaluator.java:49)
               at javelin.jsp.el.ELNode$RefExpression.evaluate(ELNode.java:492)
               at javelin.jsp.el.ExpressionEvaluatorImpl$ELExpression.evaluate(ExpressionEvaluatorImpl.java:186)
               at javelin.jsp.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:124)
               at javelin.jsp.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:104)
               at jsp_servlet._order.__composeorder3._jsp__tag1(__composeorder3.java:229)
               at jsp_servlet._order.__composeorder3._jspService(__composeorder3.java:205)
               at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
               at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
               at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
               at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
               at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
               at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3245)
               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:2003)
               at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
               at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
               at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
               at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
                    This corresponds to the declaration of the root document within the bean e.g.
          ======== JSP code extract ===========
                    <%@ include file="/html/doctypes/StrictDoctype.html" %>
          <%@ taglib uri="utilTLD" prefix="util" %>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
          <%@ page import="com.web.order.*" %>
          <%@ page language="java" session="false" %>
          <jsp:useBean id="composeXmlBean" scope="request" class="com.web.order.composeXmlBean">
          <jsp:setProperty name="composeXmlBean" property="*"/>
          </jsp:useBean>
          <c:set scope="page" var="xml" value="${composeXmlBean.myXmlString}"/>
                    ============End Jsp code =======
          ========Java code extract =======
                    public class ComposeXmlBean {
               public Document getMyXmlString() {
                         // Use XML Beans to construct the XML String
                     DDServiceDocument rootDoc = DDServiceDocument.Factory.newInstance();
                    ========End Java code ===========
          Anyone have any ideas about what could be causing this error. I have used XmlBeans without problem in WLS 8.1. Is this a WLS9.2 problem caused by Javelin ?
          regards,
          Chris

Chris,
          Firstly, I think your pasted jsp's line below is not correct:
          <jsp:useBean id="composeXmlBean" scope="request"
          class="com.web.order.composeXmlBean">
          Should it be <jsp:useBean id="composeXmlBean" scope="request"
          class="com.web.order.ComposeXmlBean"> ?
          I tried to reprodcue your issues locally, but fails (my testcase works fine)
          since I have not your customerized classes.
          My codes are listed below:
          1) Bean codes:
          package com.web.order;
          public class ComposeXmlBean {
          public String getMyXmlString() {
          return "100";
          public void setMyXmlString(String setV) {
          return;
          2) JSP codes:
          <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
          <%@ page import="com.web.order.*" %>
          <%@ page language="java" session="false" %>
          <jsp:useBean id="composeXmlBean" scope="request"
          class="com.web.order.ComposeXmlBean">
          <jsp:setProperty name="composeXmlBean" property="*"/>
          </jsp:useBean>
          <c:set scope="page" var="xml" value="${composeXmlBean.myXmlString}"/>
          My sugegstions:
          1) is it a XML bean related issue?
          can you remove XML releated logic to verify whether JSP compiler could
          support this kind of EL ( "${composeXmlBean.myXmlString}") correctly?
          2) If possible, can you pasted a reproducer here(a .war)?
          3) As for WLS8.1, which only support JSP1.2 and dose not support JSP2.0's
          EL, while your failed points is at EL: "${composeXmlBean.myXmlString}" in
          fact, I think your testcases are different during these two tests(WLS 8.1
          and WLS 9.2), Or that EL dose not work at all in WLS8.1. Can you help to
          clarify this?
          Regards
          Leon
          <Chris Thorp> wrote in message news:[email protected]...
          Using WLS 9.2 MP1 and attempting to use XmlBean derived classes from a bean
          called from a JSP.
          Using XmlBeans v2.3.0.
          Server is WebLogic Server 9.2 MP1 Sun Jan 7 00:56:31 EST 2007 883308
          JSP version is 2.0
          Servlet API is 2.4
          An exception is thrown :
                    javax.servlet.jsp.el.ELException
          at
          javelin.jsp.el.ArrayRefEvaluator.evaluateBeanType(ArrayRefEvaluator.java:252)
          at javelin.jsp.el.ArrayRefEvaluator.evaluate(ArrayRefEvaluator.java:49)
          at javelin.jsp.el.ELNode$RefExpression.evaluate(ELNode.java:492)
          at
          javelin.jsp.el.ExpressionEvaluatorImpl$ELExpression.evaluate(ExpressionEvaluatorImpl.java:186)
          at
          javelin.jsp.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:124)
          at
          javelin.jsp.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:104)
          at jsp_servlet._order.__composeorder3._jsp__tag1(__composeorder3.java:229)
          at jsp_servlet._order.__composeorder3._jspService(__composeorder3.java:205)
          at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
          at
          weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
          at
          weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
          at
          weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
          at
          weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
          at
          weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3245)
          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:2003)
          at
          weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
          at
          weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
          at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
                    This corresponds to the declaration of the root document within the bean
          e.g.
          ======== JSP code extract ===========
                    <%@ include file="/html/doctypes/StrictDoctype.html" %>
          <%@ taglib uri="utilTLD" prefix="util" %>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
          <%@ page import="com.web.order.*" %>
          <%@ page language="java" session="false" %>
          <jsp:useBean id="composeXmlBean" scope="request"
          class="com.web.order.composeXmlBean">
          <jsp:setProperty name="composeXmlBean" property="*"/>
          </jsp:useBean>
          <c:set scope="page" var="xml" value="${composeXmlBean.myXmlString}"/>
                    ============End Jsp code =======
          ========Java code extract =======
                    public class ComposeXmlBean {
          public Document getMyXmlString() {
                         // Use XML Beans to construct the XML String
                DDServiceDocument rootDoc =
          DDServiceDocument.Factory.newInstance();
                    ========End Java code ===========
          Anyone have any ideas about what could be causing this error. I have used
          XmlBeans without problem in WLS 8.1. Is this a WLS9.2 problem caused by
          Javelin ?
          regards,
          Chris

Similar Messages

  • WLS 9: WebServices using XMLBeans

    I'm attempting to implement a web service on WLS 9 (without workshop) that uses XMLbean types as parameters.
    The docs for jwsc hint that XMLBeans are given special treatment when used as web service arguments, but I have had no luck creating a functional web service this way.
    Does anyone have a functional example for this, or any other tips on how the get started?

    I'm attempting to implement a web service on WLS 9 (without workshop) that uses XMLbean types as parameters.
    The docs for jwsc hint that XMLBeans are given special treatment when used as web service arguments, but I have had no luck creating a functional web service this way.
    Does anyone have a functional example for this, or any other tips on how the get started?

  • Returning Errors from a webservice using XMLBeans

    I have a webservice that accepts XML as input and output parameters, and I'm using XMLBeans to handle this. I'm trying to work out how I can return error information from the webservice, so I created an Exception.xsd schema and 'include' it in the output XML Schema, so an exception xml element is valid in the output schema. The problem is, the XMLBean class generated from the output XML schema has no methods that allow me to create an Exception element. Is there some other way of handling the return of exceptions from webservices using XML?

    The answer is just throw a SoapFaultException and put the exception.xsd XMLBean in the FaultDetail section of the SoapFaultException.

  • Error while using xmlbeans

    I am using xmlbeans2.2 . I passed the wsdl to scomp utility to it,it returned me the jar which include all the classes and interfaces from the wsdl.in short using xmlbeans i converted wsdl type to java type(classes and interface).but when try to instantiate the class from the list i stuck to error " reference to Factory is ambiguous, "
    found : org.apache.xmlbeans.XmlObject
    required: com.pstn.soapapi.v1.AuthElem

    user10310678 wrote:
    I am using beta version. Oracle VM Manager 2.2.0If you have a beta version of 2.2, then you should be an Oracle employee. Please ask this question on an internal mailing list. If you are not an Oracle employee, please ask the employee that gave you this beta. As this is a beta, some functionality may not be operational yet, so I can't answer why this particular feature seems not to work.

  • Xmlbean Error while creating  jar from XSD

    Hi all,
    I am using xmlbean technology while preparing jar from xsd i am getting the following error
    "error: Could not load resource "http://dataservices.citigroup.net:8080/documentEngine/GMA/technology_area/CMM/Commons/1.0/Core-schema.xsd" (network downloads disabled)."
    Please help me

    Hi All,
    I got the solution.
    we have to add -dl in the script as args

  • Use of error page resulting in could not deserialize session data exception

              We have recently converted classes that store objects in the HTTP Session to implement
              serializable.
              Our application uses an error page set up in our web.xml for 500 errors.
              It also uses filters.
              When our application throws an exception and allows the server to handle it
              via the error page setup, we end up with the exception we threw, plus a number
              of
              "Could not deserialize session data" exceptions in the stack trace.
              In general, the exceptions can be traced to lines in code that attempt to reference
              one of our "serializable" session objects to get user info for logging purposes.
              Problem is, other applications that do not use error pages to handle exceptions
              do not throw these types of exceptions in the wl-domain.log and they use the same
              classes.
              Does anyone know why this happens when using error pages and what we need to do
              to correct it?
              We are using Weblogic 8.1sp2.
              Thanks!!
              Example of the stack trace messages:
              ####<May 5, 2004 2:52:17 PM EDT> <Error> <HTTP Session> <machinexyz> <cgServer>
              <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-100028>
              <Could not deserialize session data.
              java.io.NotSerializableException: weblogic.servlet.internal.FilterConfigImpl
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
                   at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
                   at weblogic.servlet.internal.AttributeWrapper.convertObjectToBytes(AttributeWrapper.java:136)
                   at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:112)
                   at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:69)
                   at weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:431)
                   at doh.stuff.OurFilter.doFilter(OurFilter.java:67)
                   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
                   at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:305)
                   at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:523)
                   at weblogic.servlet.internal.WebAppServletContext.handleException(WebAppServletContext.java:3908)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3683)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              >
              ####<May 5, 2004 2:52:17 PM EDT> <Error> <HTTP Session> <machinexyz> <cgServer>
              <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-100028>
              <Could not deserialize session data.
              java.io.NotSerializableException: java.util.Vector$1
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
                   at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
                   at weblogic.servlet.internal.AttributeWrapper.convertObjectToBytes(AttributeWrapper.java:136)
                   at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:112)
                   at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:69)
                   at weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:431)
                   at doh.stuff.OurHTML.<init>(OurHTML.java:57)
                   at doh.stuff.OurFilter.startLog4j(OurFilter.java:513)
                   at doh.stuff.OurFilter.doFilter(OurFilter.java:75)
                   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
                   at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:305)
                   at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:523)
                   at weblogic.servlet.internal.WebAppServletContext.handleException(WebAppServletContext.java:3908)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3683)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              >
              

              We have recently converted classes that store objects in the HTTP Session to implement
              serializable.
              Our application uses an error page set up in our web.xml for 500 errors.
              It also uses filters.
              When our application throws an exception and allows the server to handle it
              via the error page setup, we end up with the exception we threw, plus a number
              of
              "Could not deserialize session data" exceptions in the stack trace.
              In general, the exceptions can be traced to lines in code that attempt to reference
              one of our "serializable" session objects to get user info for logging purposes.
              Problem is, other applications that do not use error pages to handle exceptions
              do not throw these types of exceptions in the wl-domain.log and they use the same
              classes.
              Does anyone know why this happens when using error pages and what we need to do
              to correct it?
              We are using Weblogic 8.1sp2.
              Thanks!!
              Example of the stack trace messages:
              ####<May 5, 2004 2:52:17 PM EDT> <Error> <HTTP Session> <machinexyz> <cgServer>
              <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-100028>
              <Could not deserialize session data.
              java.io.NotSerializableException: weblogic.servlet.internal.FilterConfigImpl
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
                   at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
                   at weblogic.servlet.internal.AttributeWrapper.convertObjectToBytes(AttributeWrapper.java:136)
                   at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:112)
                   at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:69)
                   at weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:431)
                   at doh.stuff.OurFilter.doFilter(OurFilter.java:67)
                   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
                   at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:305)
                   at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:523)
                   at weblogic.servlet.internal.WebAppServletContext.handleException(WebAppServletContext.java:3908)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3683)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              >
              ####<May 5, 2004 2:52:17 PM EDT> <Error> <HTTP Session> <machinexyz> <cgServer>
              <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-100028>
              <Could not deserialize session data.
              java.io.NotSerializableException: java.util.Vector$1
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
                   at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
                   at weblogic.servlet.internal.AttributeWrapper.convertObjectToBytes(AttributeWrapper.java:136)
                   at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:112)
                   at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:69)
                   at weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:431)
                   at doh.stuff.OurHTML.<init>(OurHTML.java:57)
                   at doh.stuff.OurFilter.startLog4j(OurFilter.java:513)
                   at doh.stuff.OurFilter.doFilter(OurFilter.java:75)
                   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
                   at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:305)
                   at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:523)
                   at weblogic.servlet.internal.WebAppServletContext.handleException(WebAppServletContext.java:3908)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3683)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              >
              

  • Parsing my xml using XMLBeans

    I'm trying to use XMLBeans to load my xml file and access different elements of it. Here is my schema:
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema targetNamespace="http://testing.jsm.jtsd.com/testData"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified">
    <xs:element name="Hazard">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Type" type="xs:string"/>
    <xs:element name="Name" type="xs:string"/>
    <xs:element name="LatLonLocation" type="xs:string"/>
    <xs:element name="ZuluTime" type="xs:string"/>
    <xs:element name="Agent" type="xs:string"/>
    <xs:element name="Munition" type="xs:string"/>
    <xs:element name="DeliveryMethod" type="xs:string"/>
    <xs:element name="DispersalDevice" type="xs:int"/>
    <xs:element name="TypeMatl" type="xs:string"/>
    <xs:element name="MatlForm" type="xs:string"/>
    <xs:element name="TypeMatlAmt" type="xs:int"/>
    <xs:element name="MatlMass" type="xs:double"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    Here is my xml file:
    <Hazard xmlns="http://testing.jsm.jtsd.com/testData">
    <Type>TestHazard</Type>
    <Name>Test_default</Name>
    <LatLonLocation>20 N 20 E</LatLonLocation>
    <ZuluTime>180200ZOCT2007</ZuluTime>
    <Agent>GB</Agent>
    <Munition>500 kg Bomb</Munition>
    <DeliveryMethod>4 AC * 8 Bombs</DeliveryMethod>
    </Hazard>
    I can run scomp and generate a xmlbeans jar file.
    When I try to load my xml file, I get this error:
    org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
    Here is my java code that tries to load my xml file and errors out:
    HazardDocument myParsedDoc =
    HazardDocument.Factory.parse(myXmlFile);
    Please let me know what I'm doing wrong.

    Thanks for the reply. And sorry for the confusion. I am passing a File to that method call. I've been working on this for awhile and I'm about to go back to JaxB.
    My xsd snippet looks like this now:
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://testing.jsm.jtsd.com">
    <xs:element name="JSMData">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Hazard" minOccurs="0" maxOccurs="unbounded">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Type" type="xs:string"/>
    <xs:element name="Name" type="xs:string"/>
    I"m able to System out the JSMDataDocument and JSMData after my xml file gets parsed and I can see my xml printed out correctly, but when I do JSMData.sizeOfHazardArray , I get 0 when I should be getting 5 (1 for each Hazard element in my xml file).
    Here is my xml file snippet:
    <JSMData xmlns="http://testing.jsm.jtsd.com">
    <Hazard>
    <Type>RaWnHazard</Type>
    <Name>RW_large_foo</Name>
    Anything wrong here?

  • Failure to generate WSDL from web service when use xmlbean

    Hi, I have a web service that uses xmlbean generated by schema. The schema from 3rd party is in a separate project since it's used by another web app and ejb project. In wlw103 I have included the schema project in this web service project's Java Build Path. The web service compiles, but when I tried to generate WSDL a Error window shows and says "The WSDL cannot be generated from the web service due to unexpected runtime errors".
    The following is the detail. What do I need to do to make the xmlbean available for my web service? Thanks
    com.bea.workshop.webservices.core.gen.WebServicesException: weblogic.wsee.tools.jws.build.CompileException: Error compiling web service: C:\workspace\ws\src\myPackage\testWS.java
         at com.bea.workshop.webservices.core.compiler.WebServiceCompilerImpl$3.invoke(WebServiceCompilerImpl.java:335)
         at com.bea.workshop.webservices.core.compiler.WebServiceCompilerImpl.accessCompiler(WebServiceCompilerImpl.java:390)
         at com.bea.workshop.webservices.core.compiler.WebServiceCompilerImpl.compile0(WebServiceCompilerImpl.java:330)
         at com.bea.workshop.webservices.core.compiler.WebServiceCompilerImpl.compile(WebServiceCompilerImpl.java:275)
         at com.bea.workshop.webservices.ui.actions.GenerateWsdlFromJwsAction.run(GenerateWsdlFromJwsAction.java:169)
         at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)
         at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
    Caused by: weblogic.wsee.tools.jws.build.CompileException: Error compiling web service: C:\workspace\ws\src\myPackage\testWS.java
         at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:526)
         at weblogic.wsee.tools.jws.build.JwsCompiler.compile(JwsCompiler.java:483)
         at com.bea.workshop.webservices.core.compiler.WebServiceCompilerImpl$3.invoke(WebServiceCompilerImpl.java:333)
         ... 46 more
    Caused by: weblogic.wsee.tools.WsBuildException: weblogic.wsee.bind.buildtime.BindingException: ERROR ! could not add Xml Schema Type for XmlBean named '\[com.domain.UserDocument\]'. This is completely unexpected and might be caused by missing *.xsb and *.xsd files in the build environment. The building and running of this Service is likely to FAIL.
         at weblogic.wsee.tools.jws.jaxrpc.JAXRPCWebServiceInfo.createBindings(JAXRPCWebServiceInfo.java:227)
         at weblogic.wsee.tools.jws.wsdl.WsdlBuilder.processImpl(WsdlBuilder.java:43)
         at weblogic.wsee.tools.jws.jaxrpc.JAXRPCProcessor.process(JAXRPCProcessor.java:27)
         at weblogic.wsee.tools.jws.process.CompositeProcessor.process(CompositeProcessor.java:47)
         at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:522)
         ... 48 more
    Caused by: weblogic.wsee.bind.buildtime.BindingException: ERROR ! could not add Xml Schema Type for XmlBean named '\[com.domain.UserDocument\]'. This is completely unexpected and might be caused by missing *.xsb and *.xsd files in the build environment. The building and running of this Service is likely to FAIL.
         at weblogic.wsee.bind.buildtime.internal.SoapAwareJava2Schema.bindAsExplodedTylar(SoapAwareJava2Schema.java:1414)
         at weblogic.wsee.bind.buildtime.internal.TylarJ2SBindingsBuilderImpl.createBuildtimeBindings(TylarJ2SBindingsBuilderImpl.java:216)
         at weblogic.wsee.tools.jws.jaxrpc.JAXRPCWebServiceInfo.createBindings(JAXRPCWebServiceInfo.java:223)
         ... 52 more

    HI,
    I hope this issue can resolved by adding this patch CR349256
    Try to contact weblogic support to get more details about this patch.
    Regards,
    Kal.

  • Deadlock in schema validation using XMLBeans

    Hi,
    I am using WLI8.1 SP2 XMLBeans. I have a schema which has a kind of an infinite
    loop. ie I have a complexType element A which has a complexType child element
    B which inturn has a complexType child element of type A with minoccurs="0".
    When I try to validate the incoming XML using XMLBeans generated from the above
    schema, the thread goes into a deadlock and the transaction rollbacks after the
    given timeout period.
    I checked the workshop_debug.log and found the thread gets struck when it calls
    the validate() function of the XMLObject.
    Has anybody faced this error or is it a bug in BEA XMLBeans validate function
    to handle such schema. I tried to validate the same XML using XML SPY and it worked.
    Here is the sample of my schema.
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
    attributeFormDefault="unqualified">
         <xs:element name="ShippingOrderNotification">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="ShippingContainer" type="ShippingContainerType" minOccurs="0"
    maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="ShippingContainerType">
              <xs:sequence>
                   <xs:element name="SubContainer" minOccurs="0" maxOccurs="unbounded">
                        <xs:complexType>
                             <xs:sequence>
                                  <xs:element name="ShippingContainer" type="ShippingContainerType" minOccurs="0"
    maxOccurs="unbounded"/>
                             </xs:sequence>
                        </xs:complexType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>

    Please make sure that main xsd uses import or include tag to reference both schema1.xsd and schema2.xsd. If the main xsd does not do it, Pi cannot verify it. Since you package all the files as zip file, also make sure the path for the secondary files are in proper location.
    In short, the import element allows you to use schema components from any schema; the include element allows you to add all the components of an included schema to the containing schema. If the target namespace is same for both then include tag should be good enough. If you don't find one, you might have to use include tag element in the main or parent xsd file.
    Edited by: Baskar Gopal on Jan 31, 2012 5:18 PM

  • How to generate class files using XMLBeans

    I had used XMLBeans scomp command to generate document classes from XSD.But problem is i got xsb files and java files, not class files.
    I want to use jar of these generated files in my project , so i need to have class files.
    Can anyone help me in overcoimg this problem...

    well i got it...
    i need to use this cmd.....
    scomp -out sortie.jar -debug -compiler C:\jdk1.5.0_04\bin\javac b.xsd
    as i was getting
    java.io.IOException: CreateProcess: C:\Program @C:\DOCUME~1\CFERNA~1\LOCALS~1\Te
    mp\javac18651 error=2

  • Sessionbeans cannot be used concurrently error? How to solve in EJB1.1?

    When using EJB1.1 with WLS 6.0, is there a way to make the weblogic block a
    concurrent call till the previous call is over? instead of throwing the
    sessionbeans cannot be used concurrently error?
    I found the <allow-concurrent-calls> xml descriptor for EJB2.0 but was
    wondering how to do this with EJB 1.1
    Thanks
    Siva

    i understand and i don't understand.
    lol
    thats possible for someone who is using xemacs but someone who is using Eclipse or JCreator how do i do that?
    if u don't want to answer that question could u put an assertion in this code, for example : asser -> if the num < = 0 !
    here is the code:
    import java.io.*;
    public class Capicua {
         public static void main (String[] args) throws Exception {
              int digit, num;
              int inverted = 0;
              int x;     
                   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                   System.out.print(" Insert number: ");
                   num=Integer.parseInt(br.readLine().trim());
                   Assertion.assert(num <= 0, "Number can't be shorter or equals to zero!"); <--- how do i put an assert here? ( with the "do - while" its easy, but and with the asserts?
                   x=num;
                   while(num > 0) {
                   digit = num % 10;
                   num = num /10;
                   inverted = inverted * 10 + digit;
                   System.out.println("inverted = " + inverted);
                        if(inverted == x) {
                             System.out.println("Capicua");
                        }else{
                             System.out.println("not a capicau");
    }

  • Printing dunning notices using SMARTFORMS,error during parameter transfer

    Hi Friends,
                    I face a error message "Include text ZGA_DUN_HDR does not exist (object TEXT, ID ST)" when i run the dunning run.
                    I had searched every node for text ZGA_DUN_HDR in the smartform,I didnt find the text in it.
    However when I execute the smart form for print preview an error message "Printing dunning notices using SMARTFORMS,error during parameter transfer".This error i believe is due to wrong parameter passing in the fm 'GET_SF_DUNN_DATA'.It raises an error no_parameters_found.All parameters are passed correctly.
                    Can you guys help me out.
    Edited by: RAJIV KAUSHAL on Nov 14, 2008 6:03 PM

    you can create this text ZGA_DUN_HDR  in SO10 tcode and try ...

  • JNI - How to use the error reporting mechanism?

    I've developed a C++ DLL which is loaded from a commercial Win32 application (not written by me) as a plug-in for external calculations. On its initialization the C++ DLL launches the Java VM via the JNI invocation interface. When the DLL functions are called by the application, they forward the calls to Java objects inside the Java VM, again via JNI invocation interface.
    This works well, but I have encountered a weird error.
    From Java I open a JFrame containing a JTextArea as small console for debug output messages. If I turn output to this debug console off (my printToConsole routine checks whether a boolean flag is set), the string concatenation operator may lead to a crash of the Java VM.
    For example, if in one of the Java functions called from the
    DLL via JNI invocation interface the following is the first statement,
    it leads to a crash of the Java VM and the application that loaded the C++ proxy DLL.
    String test=""+Math.random(); // String test not used later
    Interestingly, if I comment this statement out, the Java code works fine WITHOUT any crash. I've already thought about potential races and synchronization issues in my code, but I don't see where this is the case. And the string concatenation error fails as well, if I insert sleep() statements in front of it and at other places in the code. However, if I turn on log messages printed to my JFrame debug console (containing a JTextArea), the String concatenation works without problems.
    So maybe the JNI interface has a bug and affects the Java VM; I don't see where my JNI code is wrong.
    One problem is that I do not get any stdout output, as the C++ proxy DLL is loaded by the Windows application, even if I start the Windows application from the DOS command line (under Windows).
    Does anyone know how to use the error reporting mechanism?
    http://java.sun.com/j2se/1.4.2/docs/guide/vm/error-handling.html
    Is it possible that the JVM, when it crashes, writes debug information about the crash into a file instead of stdout/stderr?
    My C++ proxy DLL was compiled in debug mode, but the commercial application (which loaded the DLL) is very likely not.
    I do not know hot to find the reason why the String concatenation fails inside the Java function called from the C++ DLL via JNI.

    Yes, I've initially thought about errors in the C++ code too. But the C++ code is actually very simple and short. It doesn't allocate anything on the C++ side. It allocates a couple of ByteBuffers inside the Java VM however via JNI invocation interface calls of env->NewDirectByteBuffer(). The native memory regions accessed via the ByteBuffers are allocated not by my own C++ code, but by the program that calls my DLL (the program is Metastock).
    The interesting thing is that everything works fine if output to my debug console is enabled, which means that in the Java print routine getConsoleLoggingState() returns true and text is appended to the jTextArea.
    static synchronized void print(String str)
    { MetaStockMonitor mMon=getInstance();
    if ( mMon.getFileLoggingState() && mMon.logFileWriter!=null) {
    mMon.logFileWriter.print(str);
    mMon.logFileWriter.flush();
    if ( mMon.getConsoleLoggingState() ) {
    mMon.jTextArea1.append(str);
    Only if output to the JTextArea is turned off (ie. getConsoleLoggingState()==false), the crash happens when the FIRST statement in the Java routine called via JNI invocation interface is a (useless) String concatenation operation, as described above.
    String test=""+Math.random(); // String test not used later
    Moreover, the crash happens BEFORE the allocated ByteBuffer objects are accessed in the Java code. But again, if console output is turned on, it works stable. If console output is turned off, it works when the (useless) String concatenation operation is removed in the Java routine called from C++.
    I've already thought about potential races (regarding multiple threads), but this can be ruled out in my case. It almost appears as if the JVM can have problems when called by the invocation interface (I tested it with Java 1.4.2 b28).
    All the calls between C++ and Java go ALWAYS in the direction from C++ code to Java. Unfortunately, there is no special JRE version with extensive logging capabilities to facilitate debugging. And the problem is not easily reproducible either.
    JNIEnv* JNI_GetEnv()
    JNIEnv *env;
    cached_jvm->AttachCurrentThread((void**)&env,NULL);
    fprintf(logfile,"env=%i\n",env);
    fflush(logfile);
    return env;
    // function called by Metastock's MSX plug-in interface
    BOOL __stdcall createIndEngine (const MSXDataRec *a_psDataRec,
    const MSXDataInfoRecArgsArray *a_psDataInfoArgs,
    const MSXNumericArgsArray *a_psNumericArgs,
    const MSXStringArgsArray *a_psStringArgs,
    const MSXCustomArgsArray *a_psCustomArgs,
    MSXResultRec *a_psResultRec)
    a_psResultRec->psResultArray->iFirstValid=0;
    a_psResultRec->psResultArray->iLastValid=-1;
    jthrowable ex;
    jmethodID mid;
    JNIEnv* env=JNI_GetEnv();
    jobject chart=getChart(env, a_psDataRec);
    if ( chart==NULL) {
    return MSX_ERROR;
    jobject getChart (JNIEnv* env, const MSXDataRec *a_psDataRec)
    jthrowable ex;
    jmethodID mid;
    int closeFirstValid, closeLastValid;
    closeFirstValid=a_psDataRec->sClose.iFirstValid;
    closeLastValid=a_psDataRec->sClose.iLastValid;
    long firstDate, firstTime;
    if (closeFirstValid>=1 && closeFirstValid<=closeLastValid) {
    firstDate = a_psDataRec->psDate[closeFirstValid].lDate;
    firstTime = a_psDataRec->psDate[closeFirstValid].lTime;
    } else {
    firstDate=0;
    firstTime=0;
    jclass chartFactoryClass = env->FindClass("wschwendt/metastock/msx/ChartFactory");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find class ChartFactory\n");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetStaticMethodID(chartFactoryClass, "getInstance", "()Lwschwendt/metastock/msx/ChartFactory;");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getInstance()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject chartFactory=env->CallStaticObjectMethod(chartFactoryClass, mid);
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getInstance()");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetMethodID(chartFactoryClass, "getChartID", "(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;IIIIIII)F");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getChartID()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject symbolBuf=env->NewDirectByteBuffer(a_psDataRec->pszSymbol, strlen(a_psDataRec->pszSymbol) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate symbolBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityNameBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityName, strlen(a_psDataRec->pszSecurityName) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityNameBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityPathBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityPath, strlen(a_psDataRec->pszSecurityPath) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityPathBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityOnlineSourceBuf=env->NewDirectByteBuffer(a_psDataRec->pszOnlineSource, strlen(a_psDataRec->pszOnlineSource) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate onlineSourceBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    // Java Function call leads to crash, if console output is turned off and
    // the first statement in the Java routine is a (useless) string concatenation.
    // Otherwise it works stable.
    jfloat chartID=env->CallFloatMethod(chartFactory, mid, securityNameBuf, symbolBuf,
    securityPathBuf, securityOnlineSourceBuf, (jint)(a_psDataRec->iPeriod),
    (jint)(a_psDataRec->iInterval), (jint)(a_psDataRec->iStartTime),
    (jint)(a_psDataRec->iEndTime), (jint)(a_psDataRec->iSymbolType),
    (jint)firstDate, (jint)firstTime );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getChartID()");
    printSBufViaJava(sbuf);
    return NULL;

  • How can I use XMLBeans in a Web Services client?

    How can I use XMLBeans in a standalone Java client with a Web Service?
    I posted the message below earlier in the year, but have not yet been successful
    in my
    attempts.
    regards
    Eddie
    Hi,
    I'm trying to using XMLBeans to send a document to a web service from a standalone
    Java client. I'm using the PurchaseOrder (easypo) example document, and the service
    expects a parameter of type PurchaseOrderDocument. The client proxy class generated
    by WebLogic Workshop, however, expects to send a parameter of type PurchaseOrder.
    In the client, I can instantiate a PurchaseOrderDocument, and then obtain a PurchaseOrder
    (e.g. pod.getPurchaseOrder() ), but the returned class is not compatible with
    the PurchaseOrder type that the client proxy expects.
    In a previous attempt (not using Workshop), the client would not compile because
    it expected to send a non-abstract class with a public default constructor (presumably
    a JAX-RPC requirement), and XMLBeans had generated an interface.
    Any help would be greatly appreciated!
    thanks & regards
    Eddie

    I have been experiencing similar problems with the HTML Editor and have managed to find an answer that should start to answer some of my questions. The Apex HTML Editor Standard is actually an HTML editor called FCKeditor. The FCKeditor has a Javascript API that can be found at http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API. Unfortuately this doesn't seem to give the whole answer and I found more at http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:49607.
    I needed to get the text entered within my html editor standard (e.g. P1_MYTEXT) and use it within my javascript function. I did this by using the following script
    <script language="JavaScript" type="text/javascript">
    function showtext(){
    var oEditor = FCKeditorAPI.GetInstance('P1_MYTEXT');
    var editortext = escape(oEditor.GetXHTML(oEditor.FormatOutput));
    alert(editortext);
    </script>
    Hope this helps.
    Matthew

  • Net Use give error 67 when trying to mount network share in Windows PE

    I am trying to deploy Windows 7 Pro by PXE booting Windows PE5 and applying a WIM file over a network share.  The problem that I am running into is that I get an system error 67.  I can ping the server with the network share with both the IP
    and the FQDN, but whether I use the machine name OR the IP I get a system error 67.  I verified that the account that I am using to connect has permissions, but even excluding the user name and waiting for it to prompt me for a user name gives the same
    error.  Any idea what is going on?

    Check : http://social.technet.microsoft.com/Forums/en-US/9c429bef-edf0-4bad-83a3-644e6ba28ea8/net-use-system-error-67?forum=winservergen
    Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
    the thread.

Maybe you are looking for