Home > Thread Safe > Fwk005 Error

Fwk005 Error

Error occurs because you might have

Documentbuilderfactory Thread Safe

SchemaFactory instance , which is shared by multiple threads. Like declaring it at class level , and using it in methods . private SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); The SchemaFactory is not thread safe . It should always be initialized and accessed in local scope. So whenever you need SchemaFactory instance , just create it locally instead of using it at instance level.

Post Comments And Suggestions !!

Posted by abhishek somani at Wednesday, August 20, 2014 Labels: CORE JAVA, JAXB, XML Newer Post Older Post Home media .net RH Google+ Badge Popular Posts How to get Session Object In Spring MVC ClassNotFoundException Vs NoClassDefFoundError Top Five OpenSource E-Commerce Frameworks Java program to convert location in Latitude Longitude How to Upload and Download Images in Amazon S3 Bucket Using Java Understanding Dynamic Proxy : Spring AOP Basics How to use Exdp and Impdp over Network Link : Oracle DB My Custom Thread Pool Executor in Java How to use Custom DAO class in Spring Security for authentication and authorization Configure CAS Server and Client in Java Amazon ShareThis PC media .net Powered by Blogger.

Sign in Pricing Blog Support Search GitHub This repository Watch 139 Star 732 Fork 523 cbeust/testng Code Issues 341 Pull requests 38 Projects 1 Wiki Pulse Graphs New issue FWK005 parse may not be called while parsing #368 Open nicmc opened this Issue Apr 12, 2013 · 10 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 3 participants nicmc commented Apr 12, 2013 I've created a http://www.javaroots.com/2014/08/jaxb-error-fwk005-parse-may-not-be.html service that executes TestNG tests using suite XMLs as input. When 2+ tests are executed near the same time the tests can fail (they aren't executed) with the following error: FWK005 parse may not be called while parsing Here's the trace: Caused by: org.xml.sax.SAXException: FWK005 parse may not be called while parsing. at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1245) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) https://github.com/cbeust/testng/issues/368 at javax.xml.parsers.SAXParser.parse(SAXParser.java:395) at javax.xml.parsers.SAXParser.parse(SAXParser.java:198) at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17) at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10) at org.testng.xml.Parser.parse(Parser.java:172) at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:311) ... 27 more Thanks for looking into it. VladRassokhin commented Apr 12, 2013 Hi, Could you please show sample xml file? What version of testng do you use? nicmc commented Apr 12, 2013 I've seen this with version 6.8 and 6.8.1 Here's a sample xml:

I have many suites xml files, they all execute fine when they are not executed at the same time. VladRassokhin commented Apr 12, 2013 Do you use call TestNG#run() (may be on different objects) from different threads at the same (+-seconds) time? nicmc commented Apr 12, 2013 yes. Each time the service gets a request to run a test, it spawns a new thread and executes a new TestNG#run() VladRassokhin commented Apr 12, 2013 So there problem because org.

the following exception when running aworkflow:ERROR thread safe 2012-01-16 23:43:33,915(net.sf.taverna.t2.activities.externaltool.manager.MechanismCreator:33)- Null invocationorg.jdom.input.JDOMParseException: Error in building: FWK005 parse maynot be called while parsing.: FWK005 parse may not jaxb unmarshaller thread be called while parsing.at org.jdom.input.SAXBuilder.build(SAXBuilder.java:473)at org.jdom.input.SAXBuilder.build(SAXBuilder.java:851)atnet.sf.taverna.t2.activities.externaltool.manager.MechanismCreator.convert(MechanismCreator.java:31)atnet.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean.convertDetailsToMechanism(ExternalToolActivityConfigurationBean.java:143)atnet.sf.taverna.t2.activities.externaltool.ExternalToolActivity.recreateMechanism(ExternalToolActivity.java:207)atnet.sf.taverna.t2.activities.externaltool.ExternalToolActivity$1.run(ExternalToolActivity.java:227)at java.lang.Thread.run(Thread.java:679)Caused by: org.xml.sax.SAXException: FWK005 parse may not be calledwhile parsing.at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(UnknownSource)at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)... 6 moreCaused by: org.xml.sax.SAXException: FWK005 parse may not be calledwhile parsing.at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(UnknownSource)at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)at org.jdom.input.SAXBuilder.build(SAXBuilder.java:851)atnet.sf.taverna.t2.activities.externaltool.manager.MechanismCreator.convert(MechanismCreator.java:31)atnet.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean.convertDetailsToMechanism(ExternalToolActivityConfigurationBean.java:143)atnet.sf.taverna.t2.activities.externaltool.ExternalToolActivity.recreateMechanism(ExternalToolActivity.java:207)atnet.sf.taverna.t2.activities.externaltool.ExternalToolActivity$1.run(ExternalToolActivity.java:227)at java.lang.Thread.run(Thread.java:679)WARN 2012-01-16 23:43:33,915(net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke:234) -Failed (INVOCATION) invoking***@31eded5efor job DispatchJobEventfacade503:Workflow85:Nested_workflow_3:invocation981:facade506:Workflow1:Tool[]:Uncaught exception while invoking***@31eded5ejava.lang.IllegalStateException: Root element not setat org.jdom.Document.getRootElement(Document.java:218)atnet.sf.taverna.t2.activities.externaltool.manager.MechanismCreator.convert(MechanismCreator.java:39)atnet.sf.taverna.t2.activities.externaltool.ExternalToolActivityConfigurationBean.conv

[x] First Last Prev Next This bug is not in your last search results. Bug38840 - FWK005 parse error with Webservice sampler and 10+threads Summary: FWK005 parse error with Webservice sampler and 10+threads Status: RESOLVED FIXED Product: JMeter Classification: Unclassified Component: Main Version: 2.1.1 Hardware: PC Linux Importance: P2 normal (vote) TargetMilestone: --- Assigned To: JMeter issues mailing list URL: Keywords: Depends on: Blocks: Show dependency tree Reported: 2006-03-03 16:17 UTC by Ivan Rancati Modified: 2006-03-12 05:02 UTC (History) CC List: 0 users Attachments Test plan that shows the parsing issue (125.69 KB, application/octet-stream) 2006-03-03 16:17 UTC, Ivan Rancati Details contains jmeter.log with debug settings (76.49 KB, application/zip) 2006-03-03 16:25 UTC, Ivan Rancati Details View All Add an attachment (proposed patch, testcase, etc.) Note You need to log in before you can comment on or make changes to this bug. Description Ivan Rancati 2006-03-03 16:17:05 UTC I have a relatively simple JMeter WebService test plan, where I have the following as listeners: Aggregate Report Assertion Results View Results Tree The The plan runs against a XFire web service (although I have seen exactly the same issue with an Axis server) When I run it with 2 to 5 threads, all tests pass If I use 10 threads, occasionally a test would fail. Inspecting the sampled XML shows no problem, but if I check in the Assertion Results viewer I see this line Error in building: FWK005 parse may not be called while parsing.: FWK005 parse may not be called while parsing. I have run the test requests through a proxy, and the message is definitely not coming from the Web Service, it's from JMeter. From a quick Google search, it might be a problem with the fact that some XML parsing is not thread safe. Comment 1 Ivan Rancati 2006-03-03 16:17:54 UTC Created attachment 17826 [details] Test plan that shows the parsing issue C

No related pages.