Projects tigase _server server-core Issues #611
javax.servlet-api.jar missing from installer (#611)
Daniel Wisnewski opened 9 years ago

Exe and jar installers are missing necessary jar files, even if HTTP component is selected. Dist-max has all necessary files. File list is attached.

2015-12-15 09:57:39.545 [main]             ThreadExceptionHandler.uncaughtException()  SEVERE: Uncaught thread: "main" exception
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
	at java.lang.ClassLoader.defineClass1(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.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.defineClass1(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.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 tigase.http.rest.RestModule.startRestServletForDirectory(RestModule.java:219)
	at tigase.http.rest.RestModule.start(RestModule.java:120)
	at tigase.http.HttpMessageReceiver.reconfigure(HttpMessageReceiver.java:273)
	at tigase.http.HttpMessageReceiver.setProperties(HttpMessageReceiver.java:229)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
	at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
	at tigase.server.MessageRouter.setProperties(MessageRouter.java:698)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
	at tigase.server.MessageRouter.setConfig(MessageRouter.java:597)
	at tigase.server.XMPPServer.start(XMPPServer.java:142)
	at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet
	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.defineClass1(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.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.defineClass1(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.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 tigase.http.rest.RestModule.startRestServletForDirectory(RestModule.java:219)
	at tigase.http.rest.RestModule.start(RestModule.java:120)
	at tigase.http.HttpMessageReceiver.reconfigure(HttpMessageReceiver.java:273)
	at tigase.http.HttpMessageReceiver.setProperties(HttpMessageReceiver.java:229)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
	at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
	at tigase.server.MessageRouter.setProperties(MessageRouter.java:698)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
	at tigase.server.MessageRouter.setConfig(MessageRouter.java:597)
	at tigase.server.XMPPServer.start(XMPPServer.java:142)
	at tigase.server.XMPPServer.main(XMPPServer.java:112)

FileList.jpg

Daniel Wisnewski commented 9 years ago

Issue present in b4112, b4113. b4110 last correct build.

wojciech.kapcia@tigase.net commented 9 years ago

for some reason Jenkins build is failing while we are preparing dependencies:

+ ./scripts/installer-prepare.sh
Error: Could not find or load main class %5$s%6$s%n"

same run on the exact same builds works correctly:

jenkins@build:~/jobs/tigase-server-distribution/workspace$ ./scripts/installer-prepare.sh
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Tigase XMPP Server Distribution builder 7.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy-dependencies (default-cli) @ tigase-server-dist ---

I'm investigating obscure class name in the Error.

wojciech.kapcia@tigase.net commented 9 years ago

Issue with building (above) was caused by an additional entry to MAVEN_OPTS (included in hidden 'advanced options' in the past to fix old jenkins issue for the tigase-server job), and while private-tts jobs did not have it, tigase-server-distribution job carried it from tigase-server because it was created as a copy so when we switched generating distribution building to tigase-server-distribution job it manifested itself.

There were also a couple of issues with scripts responsible for generating the installer. In the end everything is now included:

wojtek@atlantiscity.local ~/dev/tmps/tigase-server-dists $ ls -lah /Applications/Tigase-7.1.0-SNAPSHOT-b4116/jars/ | grep http
-rw-r--r--   1 wojtek  admin   102K Dec 17 10:37 jetty-http.jar
-rw-r--r--   1 wojtek  admin   255K Dec 17 10:35 tigase-http-api.jar
wojtek@atlantiscity.local ~/dev/tmps/tigase-server-dists $ ls -lah /Applications/Tigase-7.1.0-SNAPSHOT-b4116/jars/ | grep javax
-rw-r--r--   1 wojtek  admin    94K Dec 17 10:37 javax.servlet-api.jar
wojtek@atlantiscity.local ~/dev/tmps/tigase-server-dists $ ls -lah /Applications/Tigase-7.1.0-SNAPSHOT-b4116/docs/
total 0
drwxr-xr-x   7 wojtek  admin   238B Dec 17 10:43 .
drwxr-xr-x  16 wojtek  admin   544B Dec 17 10:43 ..
drwxr-xr-x   7 wojtek  admin   238B Dec 17 10:43 Administration_Guide
drwxr-xr-x   7 wojtek  admin   238B Dec 17 10:43 Development_Guide
drwxr-xr-x   7 wojtek  admin   238B Dec 17 10:43 Properties_Guide
drwxr-xr-x   7 wojtek  admin   238B Dec 17 10:43 User_Guide
drwxr-xr-x  18 wojtek  admin   612B Dec 17 10:43 javadoc

There was also issue with docs missing from regular archives (because of name change along the way) so it's also corrected:

wojtek@atlantiscity.local ~/dev/tmps/tigase-server-dists $ ls -lah tigase-issue #7.1.0-SNAPSHOT-b4116/docs/
total 0
drwxr-xr-x   7 wojtek  staff   238B Dec 17 11:14 .
drwxr-xr-x  15 wojtek  staff   510B Dec 17 11:15 ..
drwxr-xr-x   4 wojtek  staff   136B Dec 17 11:15 Administration_Guide
drwxr-xr-x   4 wojtek  staff   136B Dec 17 11:15 Development_Guide
drwxr-xr-x   4 wojtek  staff   136B Dec 17 11:14 Properties_Guide
drwxr-xr-x   4 wojtek  staff   136B Dec 17 11:15 User_Guide
drwxr-xr-x  18 wojtek  staff   612B Dec 17 11:15 javadoc
Daniel Wisnewski commented 9 years ago

Both installer packages install the correct files. The documentation name change was done ages ago, I wonder why it waited until now to have an error? Good catch!

Closing issue.

wojciech.kapcia@tigase.net commented 9 years ago

Daniel Wisnewski wrote:

The documentation name change was done ages ago, I wonder why it waited until now to have an error? Good catch!

It didn't error-out - I noticed that archives were smaller than installation packages and it turned out docs (they are huge) were missing :-)

Referenced from commit 1 year ago
Referenced from commit 1 year ago
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
3764
Spent time
55h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#611
Please wait...
Page is in error, reload to recover