# Problem with ADL_parser **Category:** [Technical (archive)](https://discourse.openehr.org/c/technical-archive/156) **Created:** 2005-08-22 07:14 UTC **Views:** 75 **Replies:** 14 **URL:** https://discourse.openehr.org/t/problem-with-adl-parser/14499 --- ## Post #1 by @Javier_Viguera_Munoz Hello\!\! I have been working with the release of pure Java ADL parser, but when I try to parse any adl file \(for instance, adl\-test\-entry\.most\_minimal\.test\.adl, located in the res/test folder of the release\) my IDE \(Eclipse\) throws a ParseException saying that the structure of the file isn't the expected\. I'm using the version 1\.2\.4 of openehr java kernel and windows XP\. I have tried with other adl files with different adl version, but the result is the same\. What can be happening? Thanks and regards Javier Viguera --- ## Post #2 by @rong.chen Javier Viguera Muñoz wrote: > Hello\!\! > > I have been working with the release of pure Java ADL parser, but when I try to parse any adl file \(for instance, adl\-test\-entry\.most\_minimal\.test\.adl, located in the res/test folder of the release\) my IDE \(Eclipse\) throws a ParseException saying that the structure of the file isn't the expected\. The following test case run successfully: public void testParse\(\) throws Exception \{      ADLParser parser = new ADLParser\(new File\(dir,                  "adl\-test\-entry\.most\_minimal\.draft\.adl"\)\);      Archetype archetype = parser\.parse\(\);      assertNotNull\(archetype\); \} And all other adl files under res/test are directly used by unit tests\. Please attach the error message so we can have a close look\. > I'm using the version 1\.2\.4 of openehr java kernel and windows XP\. I openehr\-kernel\-1\.2\.3 should be used instead, although v1\.2\.4 should work as well\. --- ## Post #3 by @thomas.beale In general I would suggest that these kinds of posts be on the openehr\-implementers list rather than the technical one\. This list has hundreds of subscribers who probably don't want to read very detailed posts about programming\. thanks, \- thomas beale Rong Chen wrote: --- ## Post #4 by @Javier_Viguera_Munoz Hello Ron\!\! The error message is the following: Parsing: dl\-test\-entry\.most\_minimal\.draft\.adl log4j:WARN No appenders could be found for logger \(org\.openehr\.am\.archetype\.Archetype\)\. log4j:WARN Please initialize the log4j system properly\. se\.acode\.openehr\.parser\.ParseException: Encountered "<EOF>" at line 16, column 1\. Was expecting:     <SYM\_CONCEPT> \.\.\. If I try to parse other adl file the result is the same\. Any idea? Thanks --- ## Post #5 by @rong.chen How does the unit test run? Can you try "maven clean test" from the console and see if all tests pass? Cheers, Rong Javier Viguera Muñoz wrote: --- ## Post #6 by @rong.chen Javier Viguera Muñoz wrote: > Hello Ron\!\! > > I hadn't read the post of Tom, so following his advice, I send the post again but in the implementers list\. > > The error message is the following: > > Parsing: dl\-test\-entry\.most\_minimal\.draft\.adl > > log4j:WARN No appenders could be found for logger \(org\.openehr\.am\.archetype\.Archetype\)\. > log4j:WARN Please initialize the log4j system properly\. > se\.acode\.openehr\.parser\.ParseException: Encountered "<EOF>" at line 16, column 1\. > Was expecting: > <SYM\_CONCEPT> \.\.\. > > If I try to parse other adl file the result is the same\. Any idea? Not sure\. It seems to be a platform specific issue, but it does work on my Win2K desktop\. Can you please confirm that all unit tests pass on your WinXP? Just cd to the top directory and type "maven clean javacc test"\. You can also try to run the parser from console instead of Eclipse, just include commons\-lang, commons\-collections, log4j, openehr\-kernel in your classpath and type "java se\.acode\.openehr\.parser\.ADLParser \[adl\_file\]"\. If the parsing is successful, you should see a screen dump of the archetype object model\. Let me know how does it go\. Rong --- ## Post #7 by @Javier_Viguera_Munoz Hello Rong, I did that you said and these are the results: The source code of the adl parser\(src,docs and res folders\) is under ADL\_parser folder, so I typed: D:\\Proyecto\_fin\_de\_Carrera\\ADL parser\\Definitivo\\ADL\_parser>maven clear javacc test \_\_ \_\_ > \\/ |\_\_ \_Apache\_\_ \_\_\_ > >\\/| / \_\` \\ V / \-\_\) ' \\ \~ intelligent projects \~ > \_| |\_\\\_\_,\_|\\\_/\\\_\_\_|\_||\_| v\. 1\.1\-beta\-1 Intentando descargar openehr\-kernel\-1\.2\.3\.jar\. íATENCION\!: íImposible descargar openehr\-kernel\-1\.2\.3\.jar\! íEl proceso no puede seguir\! Falta la siguiente dependencia: openehr\-kernel\-1\.2\.3\.jar \(try downloading from http://www.acode.se\) Total time : 3 seconds Finished at : jueves 25 de agosto de 2005 20:21:25 CEST The text is in spanish, but it mean: "it's not possible to download openehr\-kernel\-1\.2\.3\-jar The process cannot continue\. The next dependency is missing: openehr\-kernel\-1\.2\.3\.jar \(try downloading from http://www.acode.se\)" If I try to run the parser from console the error message is the following: D:\\Proyecto\_fin\_de\_Carrera\\ADL parser\\Definitivo>java \-classpath openehr\-kernel\-1\.2\.4\.jar;adl\-parser\-1\.0\.1\.jar;commons\-lang\-2\.1\.jar;log4j\-1\.2\.11\.jar;commons\-c ollections\-3\.0\.jar se\.acode\.openehr\.parser\.ADLParser adl\-test\-entry\.most\_minimal \.draft\.adl Exception in thread "main" java\.lang\.UnsupportedClassVersionError: se/acode/open ehr/parser/ADLParser \(Unsupported major\.minor version 49\.0\)         at java\.lang\.ClassLoader\.defineClass0\(Native Method\)         at java\.lang\.ClassLoader\.defineClass\(Unknown Source\)         at java\.security\.SecureClassLoader\.defineClass\(Unknown Source\)         at java\.net\.URLClassLoader\.defineClass\(Unknown Source\)         at java\.net\.URLClassLoader\.access$100\(Unknown Source\)         at java\.net\.URLClassLoader$1\.run\(Unknown Source\)         at java\.security\.AccessController\.doPrivileged\(Native Method\)         at java\.net\.URLClassLoader\.findClass\(Unknown Source\)         at java\.lang\.ClassLoader\.loadClass\(Unknown Source\)         at sun\.misc\.Launcher$AppClassLoader\.loadClass\(Unknown Source\)         at java\.lang\.ClassLoader\.loadClass\(Unknown Source\)         at java\.lang\.ClassLoader\.loadClassInternal\(Unknown Source\) I have all these libraries in ADL\_parser folder\. Am I doing anything wrong? Thanks and regards --- ## Post #8 by @rong.chen Javier Viguera Muñoz wrote: > Hello Rong, > > I did that you said and these are the results: > > The source code of the adl parser\(src,docs and res folders\) is under ADL\_parser folder, so I typed: > > D:\\Proyecto\_fin\_de\_Carrera\\ADL parser\\Definitivo\\ADL\_parser>maven clear javacc test > \_\_ \_\_ > > \\/ |\_\_ \_Apache\_\_ \_\_\_ > > >\\/| / \_\` \\ V / \-\_\) ' \\ \~ intelligent projects \~ > >\_| |\_\\\_\_,\_|\\\_/\\\_\_\_|\_||\_| v\. 1\.1\-beta\-1 > > Intentando descargar openehr\-kernel\-1\.2\.3\.jar\. > íATENCION\!: íImposible descargar openehr\-kernel\-1\.2\.3\.jar\! > íEl proceso no puede seguir\! Falta la siguiente dependencia: > > openehr\-kernel\-1\.2\.3\.jar \(try downloading from http://www.acode.se\) > > Total time : 3 seconds > Finished at : jueves 25 de agosto de 2005 20:21:25 CEST > > The text is in spanish, but it mean: > "it's not possible to download openehr\-kernel\-1\.2\.3\-jar > The process cannot continue\. The next dependency is missing: > openehr\-kernel\-1\.2\.3\.jar \(try downloading from http://www.acode.se\)" You need to manually put openehr\-kernel\-1\.2\.3\.jar into your local maven repository\. Perhaps in the future all jars could be hosted by openehr site to enable auto\-download by maven\. > If I try to run the parser from console the error message is the following: > > D:\\Proyecto\_fin\_de\_Carrera\\ADL parser\\Definitivo>java \-classpath openehr\-kernel\-1\.2\.4\.jar;adl\-parser\-1\.0\.1\.jar;commons\-lang\-2\.1\.jar;log4j\-1\.2\.11\.jar;commons\-c > > ollections\-3\.0\.jar se\.acode\.openehr\.parser\.ADLParser You need to have commons\-collection\-2\.1\.jar instead of 3\.0, see project\.xml for dependency details\. Cheers, Rong --- ## Post #9 by @thomas.beale Rong Chen wrote: > Javier Viguera Muñoz wrote: > > You need to manually put openehr\-kernel\-1\.2\.3\.jar into your local maven repository\. Perhaps in the future all jars could be hosted by openehr site to enable auto\-download by maven\. Let me know what needs to be hosted where \- we can put it into the oe\_distrib repository \(http://my.openehr.org/wsvn/oe_distrib/). \- thomas --- ## Post #10 by @Javier_Viguera_Munoz Hello Rong\!\! First of all, sorry for my insistence, but I have to finish my project soon\. I am writting to your personal email address because I have problems with the implementers list of openEHR\. Did you receive my last mail with the result of my tests?\. The results were the following: The test of source code works fine \(maven clean javacc test\) Parsing an adl file from the console works too\. However, from Eclipse doesn't work and the error message is the same\. Do you know why? Thanks and regards\. Javier Viguera --- ## Post #11 by @erik.sundvall Hello\! At Linköpings universitet we have now started three student projects related to openEHR\. 1\. EHR\-portal for patients \(web based read\-only access\)     Joakim Fredriksson & Jonas Andersson \(Joint master thesis project, 2x20 weeks\) 2\. Alternative java\-based archetype editor \(inspired by the exisitng two\)     Johan Hjalmarsson & Mattias Forss \(Joint master thesis project, 2x20 weeks\) 3\. Archetype storage/search/retrieval portal     We act as customers in a "Software Engineering Project" course\.     \(A group of seven computer science students, 1300 man hours,      a lot of documentation requirements, an estimated maximum of      1500\-2000 lines of code can be produced\.\) Questions are of course welcome\! We'll probably be sending a lot of questions to this list since this is our first coding\-centered activity related to openEHR, please have patience with us :\-\) Best Regards, Mikael Nyström & Erik Sundvall \(PhD students\) PhD Håkan Petersson & Prof\. Hans Åhlfeldt Medical Informatics group at the Department of Biomedical Engineering Linköpings universitet, Sweden http://www.imt.liu.se/mi/ --- ## Post #12 by @erik.sundvall Re\-posting messages that I sent to the openehr\-implementers list a week ago \(no response\)\. Maybe they fit better on this list\.   \- \- \- Hello\! At Linköpings universitet we have now started three student projects related to openEHR\. 1\. EHR\-portal for patients \(web based read\-only access\)      Joakim Fredriksson & Jonas Andersson      \(Joint master thesis project, 2x20 weeks\) 2\. Alternative java\-based archetype editor \(inspired by the exisitng two\)      Johan Hjalmarsson & Mattias Forss      \(Joint master thesis project, 2x20 weeks\) 3\. Archetype storage/search/retrieval portal      We act as customers in a "Software Engineering Project" course\.      \(A group of seven computer science students, 1300 man hours,       a lot of documentation requirements, an estimated maximum of       1500\-2000 lines of code can be produced\.\) Questions are of course welcome\! We'll probably be sending a lot of questions to this list since this is our first coding\-centered activity related to openEHR, please have patience with us :\-\) Best Regards, Mikael Nyström & Erik Sundvall \(PhD students\) PhD Håkan Petersson & Prof\. Hans Åhlfeldt Medical Informatics group at the Department of Biomedical Engineering Linköpings universitet, Sweden http://www.imt.liu.se/mi/ --- ## Post #13 by @thomas.beale Hi Erik, for the archetype editor, do those students want to work on the existing code or write new code? There is already an effort underway \(see http://svn.openehr.org/knowledge_tools_java/TRUNK/project_page.htm). Let me know if you want to collaborate, and we can arrange it\. There are large areas not done, so I think there is a good opportunity for masters level thinking and development\. The existing editor currently talks to the JNI\-wrapped Eiffel parser, but we are also consindering making it talk to the a\-code java parser\. For the 3rd project, there is also work underway, which your students may like to talk about \- see http://www.dualitysystems.com.au/archetypefinder/archetypefinder. This portal screen is dynamically built from archetype meta\-data\. \- thomas beale Erik Sundvall wrote: --- ## Post #14 by @erik.sundvall Hi\! > for the archetype editor, do those students want to work on the existing code or write new code? There is already an effort underway We are aware of the \.NET version and UCL's corresponding Java project\. Both those projects are used for inspiration and ideas\. The students are allowed to use whatever they find useful in those projects\. In our computer science master projects there must be a substantial design phase, so mainly implementing systems designed by others is not enough, they have to design large parts themselves\. I believe their final product will reuse ideas from the existing editors but it will probably also contain new features and alternative ways of preforming archetype design tasks\. > The existing editor currently talks to the JNI\-wrapped Eiffel parser, but we are also consindering making it talk to the a\-code java parser\. Their plan is to use the Java based parser from the start\. \(That has the additional benefit of avoiding platform dependendency\) By the way, are there any important features missing in the Java based parser that are available in the \.NET version? If so, are they hard to fix? > For the 3rd project, there is also work underway, which your students may like to talk about \- see http://www.dualitysystems.com.au/archetypefinder/archetypefinder. This portal screen is dynamically built from archetype meta\-data\. Great, thanks\! I'm sure they will find it useful\. Is the portal solution Open Source? Best Regards, Erik Sundvall, IMT, LiU, Sweden http://www.imt.liu.se/mi/ --- ## Post #15 by @sebastian.garde Dear Eric, At the moment we started a second development cycle for the Archetypefinder, but once we have a more advanced version out there \(targeted for the end of the year\), it is possible that we decide to make it available as open source\. In the meantime if you'd like to collaborate in any form on this project let us know\. Kind regards, Sebastian Dr Sebastian Garde Faculty of Informatics and Communication Central Queensland University Rockhampton Qld 4702, Australia s\.garde@cqu\.edu\.au Ph \+61 \(0\)7 4930 6542 Fax \+61 \(0\)7 4930 9729 http://infocom.cqu.edu.au/hi > For the 3rd project, there is also work underway, which your students > may like to talk about \- see > http://www.dualitysystems.com.au/archetypefinder/archetypefinder. This > portal screen is dynamically built from archetype meta\-data\. Great, thanks\! I'm sure they will find it useful\. Is the portal solution Open Source? Best Regards, Erik Sundvall, IMT, LiU, Sweden http://www.imt.liu.se/mi/ --- **Canonical:** https://discourse.openehr.org/t/problem-with-adl-parser/14499 **Original content:** https://discourse.openehr.org/t/problem-with-adl-parser/14499