I switched to maven and spring boot with new versions of libraries. There are still some jars that aren't in a maven repo so I added a script install-lib-mvn.sh that uses mvn install:install-file to install echopm.jar, echopointng-2.2.0rc2.jar, Echo2_FileTransfer_WebContainer.jar, and Echo2_FileTransfer_App.jar from lib/echo folder into local maven repo.
I had to modify some classes due to api changes. some tests were changed to compile, but may not run.
some things aren't working like Stanford parser and ner.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had to switch to using Echo2_Extras_WebContainer.jar from the lib folder as there is bug in the maven version. I hit this issue back in 2009 and updated the DND.js file (in src/main/resource/echo). I forked https://github.com/echo3/echo2extras and submitted a pull request with the fix. lets see what happens.
In AbstractProjectOrDomainEntity I updated the @JoinColumn(name="projectordomain_id") annotation on getProjectOrDomain() to remove "insertable = false, updatable = false" as I was getting an exception trying to save a project that projectordomain_id had no default value.
After these fixes I was able to create all the different project elements.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I deleted a bunch of the files in conf that were part of the ant build configuration.
In JpaDictionaryRepository I switched from using URI based resource access to stream/reader based, as the file is now being access from inside the jar vs. on the file system and the URI constructor was throwing an IllegalArgumentException: URI is not hierarchical.
I @Deprecated DatabaseCreationListener and use createDatabaseIfNotExist=true on the jdbc url. the db properties are no longer in use.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had to switch to using local lib Echo2 files I forked https://github.com/echo3/echo2. I changed the mime type returned by the javascript service to "application/javascript" as spring boot security uses X-Content-Type-Options: nosniff so that returning the javascript files with type "plain/text" causing the error "Refused to execute script from serviceId=Echo.ClientEngine because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled."
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I added a README.md file for the file upload page on sourceforge.
I added a Dockerfile, I was trying to integrate it with the build in the pom.xml see dockerfile-maven-plugin. The plug-in wasn't able to connect to the boot2docker vm for the build using docker toolbox.
I was able to manually build the Docker image and push to the repository see the rreganjr/requel repo
Last edit: R Regan 2018-02-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I fixed the integration with Stanford parser and NER, now using version 3.8. I had to rebuild the GrammaticalRelationType enum as Stanford switched to using the Universal Dependencies http://universaldependencies.org/ for grammatical annotation. The code doesn't reference that many so it wasn't that hard to convert. I added a utility class GrammaticalRelationTypeBuilder that generated the enum entries based on the Stanford entries in the class UniversalEnglishGrammaticalRelations.
In my StanfordLexicalizedParser wrapper class I had to change parse() to handle a fake ROOT node referenced by a root dependency, the index() of the dependencies starts with the first word as 1 so I normally subtract 1 to get the list index of the word, but the ROOT has index of 0 so I handle it specially. It doesn't reference a word in the sentence.
I was able to include the nlp models via a maven dependency. I need to remove the old ones.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To get the file upload UI to appear I had to set the X-Frame-Options to samedomain in the Application inner class WebSecurityConfig by adding .and().headers().frameOptions().sameOrigin() to the HttpSecurity passed into configure(). I could then upload an xslt in the document tab. Project import is failing with a NoSuchClassException()
I change the xml name space from "http://www.people.fas.harvard.edu/~rregan/requel" to "http://www.rreganjr.com/requel" and I fixed the classes to be under com.rreganjr.requel for the entityType attribute in the projectPermission element in Requel.xml. That didn't fix the import
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The ClassNotFoundException: com.sun.xml.bind.v2.model.annotation.AnnotationReader was caused by a change in the structure of the jaxb source code structure. I added a dependency for jaxb-core and project import worked! I also removed activation as it isn't needed anymore.
I switched to maven and spring boot with new versions of libraries. There are still some jars that aren't in a maven repo so I added a script install-lib-mvn.sh that uses mvn install:install-file to install echopm.jar, echopointng-2.2.0rc2.jar, Echo2_FileTransfer_WebContainer.jar, and Echo2_FileTransfer_App.jar from lib/echo folder into local maven repo.
I had to modify some classes due to api changes. some tests were changed to compile, but may not run.
some things aren't working like Stanford parser and ner.
I had to switch to using Echo2_Extras_WebContainer.jar from the lib folder as there is bug in the maven version. I hit this issue back in 2009 and updated the DND.js file (in src/main/resource/echo). I forked https://github.com/echo3/echo2extras and submitted a pull request with the fix. lets see what happens.
In AbstractProjectOrDomainEntity I updated the @JoinColumn(name="projectordomain_id") annotation on getProjectOrDomain() to remove "insertable = false, updatable = false" as I was getting an exception trying to save a project that projectordomain_id had no default value.
After these fixes I was able to create all the different project elements.
I deleted a bunch of the files in conf that were part of the ant build configuration.
In JpaDictionaryRepository I switched from using URI based resource access to stream/reader based, as the file is now being access from inside the jar vs. on the file system and the URI constructor was throwing an IllegalArgumentException: URI is not hierarchical.
I @Deprecated DatabaseCreationListener and use createDatabaseIfNotExist=true on the jdbc url. the db properties are no longer in use.
I had to switch to using local lib Echo2 files I forked https://github.com/echo3/echo2. I changed the mime type returned by the javascript service to "application/javascript" as spring boot security uses X-Content-Type-Options: nosniff so that returning the javascript files with type "plain/text" causing the error "Refused to execute script from serviceId=Echo.ClientEngine because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled."
Now I can start the app and pass args on the command line for the database:
java -jar Requel-1.0.1.jar --spring.datasource.url=jdbc:mysql://localhost:3306/requeldb?createDatabaseIfNotExist=true --spring.datasource.username=root --spring.datasource.password=password
I added a README.md file for the file upload page on sourceforge.
I added a Dockerfile, I was trying to integrate it with the build in the pom.xml see dockerfile-maven-plugin. The plug-in wasn't able to connect to the boot2docker vm for the build using docker toolbox.
I was able to manually build the Docker image and push to the repository see the rreganjr/requel repo
Last edit: R Regan 2018-02-03
I fixed the integration with Stanford parser and NER, now using version 3.8. I had to rebuild the GrammaticalRelationType enum as Stanford switched to using the Universal Dependencies http://universaldependencies.org/ for grammatical annotation. The code doesn't reference that many so it wasn't that hard to convert. I added a utility class GrammaticalRelationTypeBuilder that generated the enum entries based on the Stanford entries in the class UniversalEnglishGrammaticalRelations.
In my StanfordLexicalizedParser wrapper class I had to change parse() to handle a fake ROOT node referenced by a root dependency, the index() of the dependencies starts with the first word as 1 so I normally subtract 1 to get the list index of the word, but the ROOT has index of 0 so I handle it specially. It doesn't reference a word in the sentence.
I was able to include the nlp models via a maven dependency. I need to remove the old ones.
I removed a lot of old jar resources.
I switched the parser to use typedDependenciesEnhancedPlusPlus() for more grammatical relationship info from the parser in the Dependencies output.
To get the file upload UI to appear I had to set the X-Frame-Options to samedomain in the Application inner class WebSecurityConfig by adding .and().headers().frameOptions().sameOrigin() to the HttpSecurity passed into configure(). I could then upload an xslt in the document tab. Project import is failing with a NoSuchClassException()
I change the xml name space from "http://www.people.fas.harvard.edu/~rregan/requel" to "http://www.rreganjr.com/requel" and I fixed the classes to be under com.rreganjr.requel for the entityType attribute in the projectPermission element in Requel.xml. That didn't fix the import
Stack trace for project import:
The ClassNotFoundException: com.sun.xml.bind.v2.model.annotation.AnnotationReader was caused by a change in the structure of the jaxb source code structure. I added a dependency for jaxb-core and project import worked! I also removed activation as it isn't needed anymore.
Thanks to https://stackoverflow.com/questions/36557308/caused-by-java-lang-classnotfoundexception-com-sun-xml-bind-v2-model-annotatio
After this fix I was able to import the Requel.xml sample file.
All of the original functionality is now working.