Adding first user causes 500: Unexpected server error

Installation Forum (Inactive)
Adding first user causes 500: Unexpected server error Stefan  2019-03-25 11:06
Status: Active
 

Hello All,

I have a new LabKey installation with server 19.1. The installation went smoothly and the admin user has been created. When I add the first user I get the following error:

500: Unexpected server error
javax/activation/DataHandler

Home Back
java.lang.NoClassDefFoundError: javax/activation/DataHandler
at org.labkey.api.util.MailHelper.createMultipartMessage(MailHelper.java:130)
at org.labkey.api.security.SecurityMessage.createMailMessage(SecurityMessage.java:53)
at org.labkey.api.security.SecurityManager.createMessage(SecurityManager.java:1049)
at org.labkey.api.security.SecurityManager.sendEmail(SecurityManager.java:1026)
at org.labkey.api.security.SecurityManager.sendRegistrationEmail(SecurityManager.java:2816)
at org.labkey.api.security.SecurityManager.addUser(SecurityManager.java:2743)
at org.labkey.core.security.SecurityController$AddUsersAction.handlePost(SecurityController.java:1342)
at org.labkey.core.security.SecurityController$AddUsersAction.handlePost(SecurityController.java:1277)
at org.labkey.api.action.FormViewAction.handleRequest(FormViewAction.java:91)
at org.labkey.api.action.FormViewAction.handleRequest(FormViewAction.java:70)
at org.labkey.api.action.BaseViewAction.handleRequest(BaseViewAction.java:176)
at org.labkey.api.action.SpringActionController.handleRequest(SpringActionController.java:487)
at org.labkey.api.module.DefaultModule.dispatch(DefaultModule.java:1265)
at org.labkey.api.view.ViewServlet._service(ViewServlet.java:204)
at org.labkey.api.view.ViewServlet.service(ViewServlet.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.labkey.api.data.TransactionFilter.doFilter(TransactionFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.labkey.api.module.ModuleLoader.doFilter(ModuleLoader.java:1220)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.labkey.api.security.AuthFilter.doFilter(AuthFilter.java:215)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.labkey.core.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:118)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.ClassNotFoundException: javax.activation.DataHandler
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 50 more
request attributes
LABKEY.OriginalURL = http://localhost:8080/labkey/security-addUsers.view?
LABKEY.StartTime = 1553535942494
LABKEY.action = addUsers
org.springframework.web.servlet.DispatcherServlet.CONTEXT = Root WebApplicationContext: startup date [Mon Mar 25 17:40:53 UTC 2019]; parent: Root WebApplicationContext
LABKEY.controller = security
LABKEY.Counter = 0
org.labkey.api.util.ExceptionUtil$exception = java.lang.NoClassDefFoundError: javax/activation/DataHandler
X-LABKEY-CSRF = 69c367027f31cfb429044ddf64416823
LABKEY.container =
LABKEY.RequestURL = /labkey/security-addUsers.view?
LABKEY.OriginalURLHelper = /labkey/security-addUsers.view?

core schema database configuration
Server URL jdbc:postgresql://localhost:5432/labkey
Product Name PostgreSQL
Product Version 9.5.2
Driver Name PostgreSQL JDBC Driver
Driver Version 42.2.5

Any help is greatly appreciated.

Thanks,
Stefan

 
 
Jon (LabKey DevOps) responded:  2019-03-25 11:33
Status: Closed
Hi Stefan,

Based on the error message, it looks like you're missing the activation JAR file that used to come standard in older versions of Java, but was discontinued as of Java 10.

Assuming you're running the Community Edition of LabKey 19.1.0 and OpenJDK 12, we have supplied an activation JAR file called javax.activation.jar within the tomcat-lib directory of our binaries that you should have copied over into your TOMCAT_HOME/lib directory. It is important that when you do an installation or upgrade of LabKey that you copy all of the tomcat-lib JAR files over into the TOMCAT_HOME/lib directory to ensure that you will have proper functionality when trying to run LabKey.

I do see that we had failed to update our docs previously to include that file, so I've revised that.

https://www.labkey.org/Documentation/wiki-page.view?name=configTomcat

Please make sure you copy that file over and restart Tomcat and it should start to work normally.

Regards,

Jon