Skip to content

Some installation problems and solutions #2

@nadezdaalexandrovna

Description

@nadezdaalexandrovna

To install the system on your own server, you would need to compile the project with Maven. I would say the easiest way to do it is to install both GWT and Maven in Eclipse. Import the project into your Eclipse workspace. Then try to run the project in GWT's super dev mode. If it runs successfully, then you can be sure that the project would build correctly in your system. Then you can run GWT's compile command to build the project. Make a JAR archive out of the whole src/main/webapp folder. You are then good to go with any web container you have installed on your server. This is the general process.

About the database setup, the current code uses PostgreSQL. If you also have PostgreSQL installed on the server, you can create a user and database and enter the database information in the properties file (com.ctapweb.web.server.ServerProperties.java). Also setup your database initialization password and administrator email in this file. Then go to http://yourserver.com:8080/ctapweb/#initdb and use the password to initialize your database, which basically creates all the tables needed for the system. If everything works correctly, you will then be able to signup new users and log into the system. If you don't use PostgreSQL, you can modify the file DBConnectionManager.java to load your own database driver. But the other settings are the same.

I would suggest you first try to run it locally in your Eclipse environment to figure out how the system works before you actually deploy it onto a production server.

Besides, we are working on a new (simplified) version of the system and may have it available in one or two months. The new version uses simple REST service API so would be much easier to use with any client technology that supports HTTP protocol. So no GWT setup will be necessary.

The ctap features are in a sibling project to the ctap-web project. If you have both projects downloaded, all you need to do is to login the system installed locally with the admin account that you set up in the configuration file. Then you will see the "Admin" menu once you login. Go to "Analysis Engine" and click on "Import AE". The system will automatically import all analysis engines from the ctap-feature project.

  • Could you please tell me where the configuration file is? Where do I have to set up the admin account?

It's in the java file src/main/java/com/ctapweb/web/server/ServerProperties.java, in which you can set the ADMINEMAIL to an email that you want to specify as the administrator. Then register a new user with that email address. After logging in with this user, you will see the admin menu items.

  • I succeeded in logging in as admin, but I can't import AE. When I press the "Import AE" button, an error 500 message appears.

Could you check the web container logs and see what exceptions are actually thrown by the 500 errors?
I am wondering how you build the java projects. Did you try to run the project in Eclipse or in a deployed web container? I would suggest first making sure it runs in the Eclipse environment before deploying the WAR file to any web container because it would be easier for you to see where the problems are. If you run the ctap-web in Eclipse, it would look for the ctap-feature project automatically and build the ctap-feature project and include the built jar file in the webapp/lib folder. If you don't see the ctap-feature.jar in the lib folder, it means that it has been built and added as a dependent library properly. In such cases, you might get a 500 error when you try to import the analysis engines and if you check the web container log, you would see something like "File not found or could not be located".

  • We deployed CTAP in Tomcat in a docker. We did not run it in Eclipse.
    I checked the WEB-INF/lib folder and found the ctap-feature-1.0.0-SNAPSHOT.jar that weighs 43M.
    In the Tomcat logs I found the following error:

Caused by: java.lang.IllegalArgumentException: Parameter 'directory' is not a directory: file:/usr/local/tomcat/webapps/ctapWebApp/WEB-INF/lib/ctap-feature-1$
at org.apache.commons.io.FileUtils.validateListFilesParameters(FileUtils.java:536)
at org.apache.commons.io.FileUtils.listFiles(FileUtils.java:512)
at org.apache.commons.io.FileUtils.iterateFiles(FileUtils.java:620)
at com.ctapweb.web.server.admin.ImportAE.importAEDescriptorFolder(ImportAE.java:169)
at com.ctapweb.web.server.admin.ImportAE.importFeatureUIMADescriptors(ImportAE.java:62)
at com.ctapweb.web.server.admin.AdminServiceImpl.importAE(AdminServiceImpl.java:933)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587)
... 31 more

I am not really sure what is going on with this exception. It seems like that ImportAE.java could not find the analysis engine descriptors (the xml files) that are supposed to be in the classpath. Could you please check if the ctap-feature-1.0.0-SNAPSHOT.jar contains folders called descriptor/annotator and descriptor/featureAE. If not, maybe you need to add them as source folders in the ctap-web project or the ctap-feature project so that when you build the projects, the descriptor folder is included in the library and final jar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions