Notifications
Clear all

[Solved] Books.xml loading failed

1 Posts
2 Users
2 Likes
1,859 Views
0
Topic starter

[jar] Building jar: C:\OneSDK_NEO3.2\default-instance\platform\datasets\Bookstore_dataset\studio-build\manifest-cp.jar
[junit] Testsuite: com.transcendsys.platform.server.DataLoadTestSuite
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.35 sec
[junit] Testcase: testLoadData took 2.342 sec
[junit] Caused an ERROR
[junit] Unable to parse file: Books.xml. Reason: null
[junit] java.lang.IllegalArgumentException: Unable to parse file: Books.xml. Reason: null
[junit] at com.transcendsys.platform.base.util.LoadDataUnmarshaller.unmarshallModels(LoadDataUnmarshaller.java:70)
[junit] at com.transcendsys.platform.server.DataLoadTestSuite.loadModels(DataLoadTestSuite.java:717)
[junit] at com.transcendsys.platform.server.DataLoadTestSuite.loadIndividualFiles(DataLoadTestSuite.java:579)
[junit] at com.transcendsys.platform.server.DataLoadTestSuite.testLoadData(DataLoadTestSuite.java:117)
[junit] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[junit] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[junit] at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
[junit] at com.transcendsys.platform.server.ServerAbstractTestcase.runBareServer(ServerAbstractTestcase.java:1105)
[junit] at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
[junit] at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
[junit] at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
[junit] at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
[junit] at com.transcendsys.platform.web.servlet.CactusServletTestDirector.runTest(CactusServletTestDirector.java:91)
[junit] at com.transcendsys.platform.web.servlet.CactusServletTestDirector.doPost(CactusServletTestDirector.java:52)
[junit] at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
[junit] at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
[junit] at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
[junit] at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
[junit] at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
[junit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
[junit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[junit] at com.transcendsys.platform.web.filter.NoLogFilter.doFilter(NoLogFilter.java:38)
[junit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
[junit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[junit] at sso.web.filter.csrf.CSRFPreventionFilter.doFilter(CSRFPreventionFilter.java:42)
[junit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
[junit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[junit] at com.transcendsys.platform.web.filter.xss.XSSPreventionFilter.doFilter(XSSPreventionFilter.java:233)
[junit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
[junit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[junit] at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126)
[junit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
[junit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[junit] at com.transcendsys.platform.web.filter.CacheHeaderFilter.doFilter(CacheHeaderFilter.java:68)
[junit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
[junit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[junit] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
[junit] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
[junit] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
[junit] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
[junit] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
[junit] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
[junit] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
[junit] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
[junit] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
[junit] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
[junit] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
[junit] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598)
[junit] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
[junit] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[junit] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[junit] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[junit] at java.base/java.lang.Thread.run(Thread.java:830)
[junit] Caused by: javax.xml.bind.UnmarshalException
[junit] - with linked exception:
[junit] [org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 1; cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.mybooks.com/Bookstore":Publisher}'. One of '{"http://www.mybooks.com/Bookstore":PublishedDate, "http://www.mybooks.com/Bookstore":QuantitySold, "http://www.mybooks.com/Bookstore":PriceAmount, "http://www.mybooks.com/Bookstore":PriceUOM, "http://www.mybooks.com/Bookstore":PromotionalPeriodStartDate, "http://www.mybooks.com/Bookstore":PromotionalPeriodEndDate, "http://www.mybooks.com/Bookstore":PromotionalDiscount, "http://www.mybooks.com/Bookstore":Rating, "http://www.mybooks.com/Bookstore":ReturnPolicy, "http://www.mybooks.com/Bookstore":SalesRepName, "http://www.mybooks.com/Bookstore":SalesRepEnterpriseName, "http://www.mybooks.com/Bookstore":SupplierName, "http://www.mybooks.com/Bookstore":SupplierEnterpriseName, "http://www.mybooks.com/Bookstore":Genre, "http://www.mybooks.com/Bookstore":AvailableOnline, "http://www.mybooks.com/Bookstore":State, "http://www.mybooks.com/Bookstore":Udfs, "http://www.mybooks.com/Bookstore":Issue, "http://www.onenetwork.com/Platform":MDFs, "http://www.mybooks.com/Bookstore":Attribute}' is expected.]
[junit] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:435)
[junit] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:372)
[junit] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:342)
[junit] at com.transcendsys.platform.jaxb.JAXB2.unmarshal(JAXB2.java:140)
[junit] at com.transcendsys.platform.base.util.LoadDataUnmarshaller.unmarshallModels(LoadDataUnmarshaller.java:66)
[junit] Caused by: org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 1; cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.mybooks.com/Bookstore":Publisher}'. One of '{"http://www.mybooks.com/Bookstore":PublishedDate, "http://www.mybooks.com/Bookstore":QuantitySold, "http://www.mybooks.com/Bookstore":PriceAmount, "http://www.mybooks.com/Bookstore":PriceUOM, "http://www.mybooks.com/Bookstore":PromotionalPeriodStartDate, "http://www.mybooks.com/Bookstore":PromotionalPeriodEndDate, "http://www.mybooks.com/Bookstore":PromotionalDiscount, "http://www.mybooks.com/Bookstore":Rating, "http://www.mybooks.com/Bookstore":ReturnPolicy, "http://www.mybooks.com/Bookstore":SalesRepName, "http://www.mybooks.com/Bookstore":SalesRepEnterpriseName, "http://www.mybooks.com/Bookstore":SupplierName, "http://www.mybooks.com/Bookstore":SupplierEnterpriseName, "http://www.mybooks.com/Bookstore":Genre, "http://www.mybooks.com/Bookstore":AvailableOnline, "http://www.mybooks.com/Bookstore":State, "http://www.mybooks.com/Bookstore":Udfs, "http://www.mybooks.com/Bookstore":Issue, "http://www.onenetwork.com/Platform":MDFs, "http://www.mybooks.com/Bookstore":Attribute}' is expected.
[junit] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
[junit] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
[junit] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
[junit] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
[junit] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
[junit] at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
[junit] at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
[junit] at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
[junit] at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
[junit] at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.startElement(Unknown Source)
[junit] at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:101)
[junit] at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:246)
[junit] at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:180)
[junit] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:370)

BUILD FAILED
C:\OneSDK_NEO3.2\studio-3.2-GA\eclipse\plugins\com.onenetwork.platform.sdk_1.0.0\dataset-static\base-build.xml:59: Test com.transcendsys.platform.server.DataLoadTestSuite failed

Total time: 7 seconds

1 Answer
2

The error says "Invalid content was found starting with element '{"http://www.mybooks.com/Bookstore":Publisher}'. One of '{"http://www.mybooks.com/Bookstore":PublishedDate,"

This error comes when the fields provided in XML are not in same order as in the model file. As you can see application is expecting PublishedDate but XML file is having Publisher. So looks like Publisher is not defined in the model or added in some other order.