Problem with upgrade to 9.2

Installation Forum (Inactive)
Problem with upgrade to 9.2 tlynch  2009-08-17 09:49
Status: Closed
 
I followed the steps for a unix upgrade. After restarting tomcat, the /labkey page displays a "welcome" page but with boxed "?" marks where graphic elements should be. If I click "Sign In" I get a 500 error message:

500: Unexpected server error

A failure occurred during LabKey Server startup.
java.lang.NoClassDefFoundError: javax/script/ScriptEngineFactory
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
       at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1301)
       at org.labkey.bootstrap.LabkeyServerBootstrapClassLoader.loadClass(LabkeyServerBootstrapClassLoader.java:61)
       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:242)
       at sun.misc.Service$LazyIterator.next(Service.java:271)
       at javax.script.ScriptEngineManager.initEngines(ScriptEngineManager.java:109)
       at javax.script.ScriptEngineManager.access$000(ScriptEngineManager.java:37)
       at javax.script.ScriptEngineManager$1.run(ScriptEngineManager.java:80)
       at java.security.AccessController.doPrivileged(Native Method)
       at javax.script.ScriptEngineManager.init(ScriptEngineManager.java:78)
       at javax.script.ScriptEngineManager.<init>(ScriptEngineManager.java:51)
       at org.labkey.api.reports.LabkeyScriptEngineManager.<init>(LabkeyScriptEngineManager.java:34)
       at org.labkey.query.QueryModule.startup(QueryModule.java:124)
       at org.labkey.api.module.ModuleLoader.ensureStartupComplete(ModuleLoader.java:723)
       at org.labkey.api.module.ModuleLoader.doFilter(ModuleLoader.java:648)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.labkey.api.security.AuthFilter.doFilter(AuthFilter.java:101)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
       at java.lang.Thread.run(Thread.java:613)
 
 
Brian Connolly responded:  2009-08-17 11:16
Can you send us your log files. They should be in <CATALINA_HOME>/logs If we could get the following logs it would really help us:
- labkey.log
- labkey-errors.log
- catalina.out

Thank you,

Brian Connolly
 
tlynch responded:  2009-08-17 11:40
I've attached the log files
 
Brian Connolly responded:  2009-08-17 15:08
It looks like you are running the LabKey Server on MacOSX. There is a known problem with running LabKey Server on MacOSX with Java 5.

In order to get the LabKey server up and running, you will need to use the JDK 6.

If you have installed "Java for Mac OS X v10.5 Update 4" (http://support.apple.com/downloads/Java_for_Mac_OS_X_10_5_Update_4 ) JAVA 6 should be available to you. You can check if it is installed by running

ls /System/Library/Frameworks/JavaVM.framework/Versions/

If you see a directory named 1.6.0 then you the "Java for Mac OS X v10.5 Update 4" has been installed.

Once this update is installed, you will need to make a configuration change to start using it (as Apple has set the JDK 5 as the default version of JAVA). You can do this in 2 ways

1) This method is a system-wide change.
  a) open a terminal window
  b) cd /System/Library/Frameworks/JavaVM.framework/Versions/
  c) sudo rm Current
  d) sudo rm CurrentJDK
  e) sudo ln -s 1.6 Current
  f) sudo ln -s 1.6 CurrentJDK

2) Change your environment variables to use JDK6.
  a) Set your JAVA_HOME variable to be /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
  b) Prepend /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin to your PATH variable (this must be before the /usr/bin directory in your PATH variable)


Either way, you can verify your configuration changes are working correctly by running

 java -version

You want to see

 brian$ java -version
 java version "1.6.0_13"
 Java(TM) SE Runtime Environment (build 1.6.0_13-b03-211)
 Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02-83, mixed mode)


My recommendation is to use method #1
 
tlynch responded:  2009-08-18 07:28
OK, that fixed it. However, the server appears to be a new installation instead of an upgrade. How do I get my previous settings / projects back?
 
adam responded:  2009-08-18 09:52
The labkeyDataSource defined in labkey.xml needs to be pointed at the correct database. Most installations are configured to connect to the "labkey" database on localhost; if that's the case for you, the URL would be "jdbc:jtds:sqlserver://localhost/labkey". If you've configured a separate database server or an alternate database name, change the URL accordingly.

The standard upgrade steps shouldn't touch labkey.xml or the database, so I don't know you how this happened.

Adam
 
tlynch responded:  2009-08-19 10:57
Thanks, I hadn't noticed that the URL had changed from the default name. It was labkey2 in the backup configuration.

I had LDAP configured on the previous installation and now it doesn't show up on the authentication configuration page. Any clues on how to add ldap back in?

Tom
 
adam responded:  2009-08-19 11:40
LDAP support requires the "authentication" module. You should find it in the enterprise binaries on the download page. Just add that file to the modules in your installation and restart.

Adam
 
tlynch responded:  2009-08-19 12:02
I don't see the authentication module. I don't see the enterprise binaries on the download page. I tried using the module from my old installation but that didn't help.
 
adam responded:  2009-08-19 13:05
I've changed your settings so you should see the enterprise binaries now... you may need to shut down your browser (or explicitly clear the labkey.com cookies) before the page will update.

You'll need to upgrade the authentication module every time you upgrade the core product. The enterprise binary should have everything you need, so just be sure you're downloading that at every upgrade.

Adam
 
tlynch responded:  2009-08-19 14:11
Adam,

Thanks for your help. I'm all set now.

I recall some step by step documentation for my first install back in november. There was also a Mac specific page on the wiki that I couldn't find either.

Tom
 
eknelson responded:  2009-08-19 17:32
Hi Tom,

Perhaps this Mac-specific page what what you remembered?

"Notes on Setting up a Mac for LabKey Development"
https://www.labkey.org/wiki/home/Documentation/page.view?name=devmac

Here's the starting place for general installation instructions:
https://www.labkey.org/wiki/home/Documentation/page.view?name=config

I just updated this second page with a section of "Additional links." Hopefully this will make it easier to find the Mac development setup documentation in the future.

Please let me know if you need pointers to any additional documentation.

Thanks,

Elizabeth