From: Tripp, B. <Bry...@uh...> - 2004-03-02 15:31:14
|
Thanks for pointing this out. This had actually been reported before, and I have a note that I had fixed it, but it wasn't fixed. I'm not sure what happened there ... possibly I made some CVS-related mistake. Bryan > -----Original Message----- > From: Pier Francesco Sormani [mailto:p.s...@we...] > Sent: March 2, 2004 5:47 AM > To: hl7...@li... > Subject: [HAPI-devel] SystemClassLoader and Tomcat Enviroment > > > Hello > > I tried to run the HAPI under Tomcat enviroment (tomcat > 4.1.27) but I found > the following problem: > > ca.uhn.hl7v2.HL7Exception: Couldn't create Message object of > type ADT_A08 > at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:222) > at ca.uhn.hl7v2.app.Responder.processMessage(Responder.java:139) > at ca.uhn.hl7v2.app.Receiver$Grunt.run(Receiver.java:115) > Caused by: ca.uhn.hl7v2.HL7Exception: No map found for version 2.3.1 > at > ca.uhn.hl7v2.parser.Parser.getMessageStructureForEvent(Parser. > java:390) > at ca.uhn.hl7v2.parser.Parser.findMessageClass(Parser.java:263) > at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:209) > ... 2 more > > The problem was about the SystemClassLoader. Tomcat, such as > many server > applications, > installs a variety of class loaders. > When you deploy a resource (like properties files) under a > WebApp, you must > use the > getResourceAsStream() instead of getSystemResourceAsStream() > to retrieve > this rosource. > > So I have changed: > InputStream in = > Parser.class.getClassLoader().getSystemResourceAsStream(resource); > in > InputStream in = > Parser.class.getClassLoader().getResourceAsStream(resource); > > in the loadMessageStructures() method of Parser class and all > seems to be > ok. > > Is it a bug? this is a valid solution? > > More information can be found at: > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-h owto.html Hi, Piero. -------------------------------------- Dott. Pier Francesco Sormani Synapsis S.r.l. in Computer Science P.zza Dante, 19/20 57121 Livorno Phone: +39 0586 426790 fax: +39 0586 443954 www.websynapsis.com -------------------------------------- ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization. |