Wiki source code of Troubleshoots

Last modified by Thomas Mortagne on 2017/11/16 15:20

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
5 = Server startup failing with ##org.xwiki.container.servlet.XWikiServletContextListener## =
6
7 If you follow the exception stack trace you will see: ##Caused by: java.lang.ClassNotFoundException: <class>##
8
9 There are some possibilities:
10
11 * Sometimes WTP "forgets" a dependency for some reason. Most of the time you can fix it easily by cleaning the server:
12 ** Go to ##Servers## view, right click on your server and then click ##Clean...##
13 ** Restart the server
14 * You imported a Maven Project into the workspace and forgot to add it to the Deployment Assembly. See [[Link Jar project to the web project>>Community.DebugXEWithEclipse_ImportJarProjects#HLinkJarprojecttothewebproject]]
15 * The value you defined for the ##XWIKIPLATFORM## (see [[Mirror XWiki war>>MirrorWeb]]) contains spaces or other special characters. Eclipse may handle it well, but you may face problems when deploying it through WTP.
16
17 = I imported a JAR which is already a dependency of ##xwiki## debug project but it's not deployed =
18
19 You may need to do ##right click## -> ##Maven## -> ##Update project...## on the ##xwiki## debug project.
20
21 = Should not reproduce anymore =
22
23 Keeping them here in case of a M2e/Eclipse regression.
24
25 == "Too many open files" on Linux ==
26
27 {{info}}
28 Stopped applying this workaround for years and never noticed any related error.
29 {{/info}}
30
31 Looks like by default (at least on Ubuntu) the limits of files to open is too low for the couple Eclipse3.4/M2Eclipse (I never had this with Eclipse 3.3).
32
33 You add up this limit by editing ##/etc/security/limits.conf## file and by setting:
34
35 {{code language="none"}}
36 * soft nofile 2048
37 * hard nofile 2048
38 {{/code}}
39
40 == I get "Error creating zip file xwiki-core.jar: duplicate entry: META-INF/LICENSE" when starting the server ==
41
42 {{info}}
43 I don't have this problem anymore with M2Eclipse 0.12 on Eclipse 3.6.
44 {{/info}}
45
46 XWiki uses the maven remote resource plugin to add the ##LICENSE## and ##NOTICE## files in all of the XWiki generated jars and it's doing it by copying the files in the output folders: ##classes## and ##test-classes##. The problem is that Eclipse does not make any difference between ##classes## and ##test-classes##, builds everything in the same jar and complains because there are files with the same entry name.
47
48 There are some crappy solutions:
49
50 * remove the ##META-INF## folder from test-classes by hand each time you get the error
51 * remove the test-classes from the output folders in project Properties. This is easier when you are editing a lot the resources files because the ##META-INF## folder is re-generated each time you modify something.
52
53 == When I look in a published jar it seems resources has not been built ==
54
55 {{info}}
56 I don't have this problem anymore with M2Eclipse 0.12 on Eclipse 3.6.
57 {{/info}}
58
59 M2Eclipse build resources only when it's modified and sometimes it comes that it forgot it for a reason I don't know.
60
61 Just modify any resource of the jar project and save it and it should rebuild it correctly.
62
63 Since m2eclipse 0.9.8 it's even worse since the resource are never built:
64 The "safest" solution is to include resource back in the java build process: by default m2eclipse excludes all the resources to handle it itself but we don't really have a use case where it's really needed. To include it back go to project Properties -> Java Build Path and remove the filter (search src/main/resources "Excluded: ~*~*"). Don't remove the filter on test resource unless you want to launch unit tests from Eclipse. Some projects have custom components overwrites for test so if you include it in the runtime you will break things. Until Eclipse itself supports the difference between main and test like maven does we will always have this issue; there is not much M2Eclipse can do here.
65
66 == My Eclipse can't stop crashing ==
67
68 {{info}}
69 I don't have this problem anymore with Eclipse 3.4 on Ubuntu Linux
70 {{/info}}
71
72 Environment: Linux + Eclipse 3.3
73
74 The Eclipse configuration in ##eclipse.ini## seems too fragile in terms of memory at least in the Linux version. You should give a try to the following configuration:
75
76 {{code language="none"}}
77 -showsplash
78 org.eclipse.platform
79 --launcher.XXMaxPermSize
80 512M
81 -vmargs
82 -Xms1024m
83 -Xmx1024m
84 -Dosgi.bundlefile.limit=100
85 -XX:MaxPermSize=512m
86 {{/code}}
87
88 {{velocity}}
89 ##########################################################################
90 ## NAVIGATOR
91 #set($previous_tuto_page = 'WebStart')
92 ##set($next_tuto_page = '')
93 #if($previous_tuto_page) [[previous>>$previous_tuto_page]] ~| #end[[home>>Community.DebugXWikiWithEclipse]]#if($next_tuto_page) ~| [[next>>$next_tuto_page]]#end
94 {{/velocity}}

Get Connected