I have spent way too much time trying to do a "standard" deploy of JSWPWiki
on a "Standard" deploy of Tomcat 7 and linux. (Tried Debian and Ubuntu) .

A big issue is the attempt to write the jspwiki.log to the location that it
should not be trying to write to the CATALINA_HOME for Tomcat instead of
the CATALINA_BASE.

The desire to incorporate the jspwiki.properties within a jar file so as to
make it easier to perform upgrades then causes the customization of the
CATALINA_HOME directories which then prevents easy upgrades AND portability
of jspwiki across various versions of Tomcat and implementation within many
hosted environments.

I am trying to move multiple Jspwiki's from a self hosted (not standard
install of Tomcat) to a hosted environment and have spent WAY too many
hours without ever getting Jspwiki to even start with a clean downloaded
tomcat7 and Jspwiki jar.

There must be a better method or am I missing something?

-jim





ᐧ

--
-jim
Jim Willeke


On Sun, May 4, 2014 at 5:30 PM, Juan Pablo Santos Rodríguez <
juanpablo.san...@gmail.com> wrote:

> Hi Jim,
>
> from your log, and looking at the code, it seems that the application is
> trying to find your policy file (by default, jspwiki.policy, inside the
> war's WEB-INF folder), but it's unable to. Have you overriden the
> jspwiki.policy.file attribute on your jspwiki-custom.properties file? It's
> first searched inside the war's WEB-INF folder, and if not found, then it's
> searched on classpath.
>
> In your case, both searches fail to find the security policy file. I'm
> adding some log messages and handling this error-case so it outputs a
> meaningful message instead a NPE in a minute
>
>
> br,
> juan pablo
>
>
> On Sun, May 4, 2014 at 11:17 AM, Jim Willeke <j...@willeke.com> wrote:
>
> > Thanks for the continued help.
> >
> >
> > In catalina.out we see:
> > INFO: Deploying configuration descriptor
> > /etc/tomcat7/Catalina/localhost/docs.xml
> > May 03, 2014 8:34:32 PM org.apache.catalina.startup.HostConfig
> > deployDescriptor
> > INFO: Deploying configuration descriptor
> > /etc/tomcat7/Catalina/localhost/manager.xml
> > May 03, 2014 8:34:32 PM org.apache.catalina.startup.HostConfig deployWAR
> > INFO: Deploying web application archive
> > /var/lib/tomcat7/webapps/ldapwiki.war
> > log4j:WARN No appenders could be found for logger
> > (org.apache.wiki.util.PropertyReader).
> > log4j:WARN Please initialize the log4j system properly.
> > log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
> > more info.
> > May 03, 2014 8:34:33 PM org.apache.catalina.core.StandardContext
> > startInternal
> > SEVERE: Error filterStart
> > May 03, 2014 8:34:33 PM org.apache.catalina.core.StandardContext
> > startInternal
> > SEVERE: Context [/ldapwiki] startup failed due to previous errors
> > May 03, 2014 8:34:33 PM org.apache.catalina.loader.WebappClassLoader
> > clearReferencesThreads
> > SEVERE: The web application [/ldapwiki] appears to have started a thread
> > named [net.sf.ehcache.CacheManager@6043a24d] but has failed to stop it.
> > This is very likely to create a memory leak.
> > May 03, 2014 8:34:33 PM org.apache.catalina.loader.WebappClassLoader
> > clearReferencesThreads
> > SEVERE: The web application [/ldapwiki] appears to have started a thread
> > named [JSPWiki Lucene Indexer] but has failed to stop it. This is very
> > likely to create a memory leak.
> > May 03, 2014 8:34:33 PM org.apache.catalina.loader.WebappClassLoader
> > clearReferencesThreads
> > SEVERE: The web application [/ldapwiki] appears to have started a thread
> > named [WatchDog for 'Ldapwiki'] but has failed to stop it. This is very
> > likely to create a memory leak.
> > May 03, 2014 8:34:33 PM org.apache.catalina.loader.WebappClassLoader
> > loadClass
> > INFO: Illegal access: this web application instance has been stopped
> > already.  Could not load
> > org.apache.lucene.index.DocumentsWriterPerThreadPool$ThreadState.  The
> > eventual following stack trace is caused by an error thrown for debugging
> > purposes as well as to attempt to terminate the thread which caused the
> > illegal access, and has no functional impact.
> > java.lang.IllegalStateException
> >         at
> >
> >
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1597)
> >         at
> >
> >
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
> >         at
> >
> >
> org.apache.lucene.index.DocumentsWriterPerThreadPool.<init>(DocumentsWriterPerThreadPool.java:141)
> >         at
> >
> >
> org.apache.lucene.index.ThreadAffinityDocumentsWriterThreadPool.<init>(ThreadAffinityDocumentsWriterThreadPool.java:40)
> >         at
> >
> >
> org.apache.lucene.index.LiveIndexWriterConfig.<init>(LiveIndexWriterConfig.java:130)
> >         at
> >
> >
> org.apache.lucene.index.IndexWriterConfig.<init>(IndexWriterConfig.java:165)
> >         at
> >
> >
> org.apache.wiki.search.LuceneSearchProvider.getIndexWriter(LuceneSearchProvider.java:532)
> >         at
> >
> >
> org.apache.wiki.search.LuceneSearchProvider.doFullLuceneReindex(LuceneSearchProvider.java:225)
> >         at
> >
> >
> org.apache.wiki.search.LuceneSearchProvider$LuceneUpdater.startupTask(LuceneSearchProvider.java:768)
> >         at
> > org.apache.wiki.WikiBackgroundThread.run(WikiBackgroundThread.java:111)
> >
> > In jspwiki.log:
> > 2014-05-03 20:34:32,795 INFO wiki.WikiEngine -
> > *******************************************
> > 2014-05-03 20:34:32,796 INFO wiki.WikiEngine - JSPWiki 2.10.0 starting.
> > Whee!
> > 2014-05-03 20:34:32,798 INFO wiki.WikiEngine - Servlet container: Apache
> > Tomcat/7.0.28
> > 2014-05-03 20:34:32,807 INFO wiki.WikiEngine - JSPWiki working directory
> is
> > '/tmp/tomcat7-tomcat7-tmp/JSPWiki-108143313'
> > 2014-05-03 20:34:33,333 INFO providers.AbstractFileProvider - Wikipages
> are
> > read from '/home/tomcat/tcdocs/ldapwiki'
> > 2014-05-03 20:34:33,333 INFO providers.VersioningFileProvider - Using
> > directory /home/tomcat/tcdocs/ldapwiki/OLD for storing old versions of
> > pages
> > 2014-05-03 20:34:33,344 INFO plugin.DefaultPluginManager - Registering
> > plugins
> > 2014-05-03 20:34:33,390 INFO diff.DifferenceManager - Using difference
> > provider: TraditionalDiffProvider
> > 2014-05-03 20:34:33,393 INFO providers.CachingAttachmentProvider -
> Initing
> > CachingAttachmentProvider
> > 2014-05-03 20:34:33,418 INFO search.LuceneSearchProvider - Lucene
> enabled,
> > cache will be in: /tmp/tomcat7-tomcat7-tmp/JSPWiki-108143313/lucene
> > 2014-05-03 20:34:33,420 WARN wiki.WikiBackgroundThread - Starting up
> > background thread: JSPWiki Lucene Indexer.
> > 2014-05-03 20:34:33,426 WARN wiki.WikiBackgroundThread - Starting up
> > background thread: WatchDog for 'Ldapwiki'.
> > 2014-05-03 20:34:33,427 INFO search.LuceneSearchProvider - Starting
> Lucene
> > reindexing, this can take a couple of minutes...
> > 2014-05-03 20:34:33,450 INFO ui.EditorManager - Registering editor
> modules
> > 2014-05-03 20:34:33,465 INFO authorize.WebContainerAuthorizer - Examining
> > jndi:/localhost/ldapwiki/WEB-INF/web.xml
> > 2014-05-03 20:34:33,533 INFO authorize.WebContainerAuthorizer - JSPWiki
> is
> > using custom authentication.
> > 2014-05-03 20:34:33,533 INFO authorize.WebContainerAuthorizer -
> Authorizer
> > WebContainerAuthorizer initialized successfully.
> > 2014-05-03 20:34:33,543 FATAL wiki.WikiEngine - Failed to start managers.
> > java.lang.NullPointerException
> >         at
> >
> >
> org.apache.wiki.auth.AuthenticationManager.findConfigFile(AuthenticationManager.java:649)
> >         at
> >
> >
> org.apache.wiki.auth.AuthorizationManager.initialize(AuthorizationManager.java:495)
> >         at org.apache.wiki.WikiEngine.initialize(WikiEngine.java:586)
> >         at org.apache.wiki.WikiEngine.<init>(WikiEngine.java:430)
> >
> > ᐧ
> >
> > --
> > -jim
> > Jim Willeke
> >
> >
> > On Sun, May 4, 2014 at 2:51 AM, Harry Metske <harry.met...@gmail.com>
> > wrote:
> >
> > > Jim,
> > >
> > > I dont know what causes the NPE, but there should be a stacktrace in
> > > tomcat's SystemOut, can you check that?
> > >
> > > Regards,
> > > Harry
> > >  Op 4 mei 2014 02:37 schreef "Jim Willeke" <j...@willeke.com>:
> > >
> > > > After doing that, I still only get a little further:
> > > >
> > > > 2014-05-03 20:08:24,390 INFO search.LuceneSearchProvider - Lucene
> > > libraries
> > > > do not exist - not using Lucene.
> > > > 2014-05-03 20:34:32,795 INFO wiki.WikiEngine -
> > > > *******************************************
> > > > 2014-05-03 20:34:32,796 INFO wiki.WikiEngine - JSPWiki 2.10.0
> starting.
> > > > Whee!
> > > > 2014-05-03 20:34:32,798 INFO wiki.WikiEngine - Servlet container:
> > Apache
> > > > Tomcat/7.0.28
> > > > 2014-05-03 20:34:32,807 INFO wiki.WikiEngine - JSPWiki working
> > directory
> > > is
> > > > '/tmp/tomcat7-tomcat7-tmp/JSPWiki-108143313'
> > > > 2014-05-03 20:34:33,333 INFO providers.AbstractFileProvider -
> Wikipages
> > > are
> > > > read from '/home/tomcat/tcdocs/ldapwiki'
> > > > 2014-05-03 20:34:33,333 INFO providers.VersioningFileProvider - Using
> > > > directory /home/tomcat/tcdocs/ldapwiki/OLD for storing old versions
> of
> > > > pages
> > > > 2014-05-03 20:34:33,344 INFO plugin.DefaultPluginManager -
> Registering
> > > > plugins
> > > > 2014-05-03 20:34:33,390 INFO diff.DifferenceManager - Using
> difference
> > > > provider: TraditionalDiffProvider
> > > > 2014-05-03 20:34:33,393 INFO providers.CachingAttachmentProvider -
> > > Initing
> > > > CachingAttachmentProvider
> > > > 2014-05-03 20:34:33,418 INFO search.LuceneSearchProvider - Lucene
> > > enabled,
> > > > cache will be in: /tmp/tomcat7-tomcat7-tmp/JSPWiki-108143313/lucene
> > > > 2014-05-03 20:34:33,420 WARN wiki.WikiBackgroundThread - Starting up
> > > > background thread: JSPWiki Lucene Indexer.
> > > > 2014-05-03 20:34:33,426 WARN wiki.WikiBackgroundThread - Starting up
> > > > background thread: WatchDog for 'Ldapwiki'.
> > > > 2014-05-03 20:34:33,427 INFO search.LuceneSearchProvider - Starting
> > > Lucene
> > > > reindexing, this can take a couple of minutes...
> > > > 2014-05-03 20:34:33,450 INFO ui.EditorManager - Registering editor
> > > modules
> > > > 2014-05-03 20:34:33,465 INFO authorize.WebContainerAuthorizer -
> > Examining
> > > > jndi:/localhost/ldapwiki/WEB-INF/web.xml
> > > > 2014-05-03 20:34:33,533 INFO authorize.WebContainerAuthorizer -
> JSPWiki
> > > is
> > > > using custom authentication.
> > > > 2014-05-03 20:34:33,533 INFO authorize.WebContainerAuthorizer -
> > > Authorizer
> > > > WebContainerAuthorizer initialized successfully.
> > > > 2014-05-03 20:34:33,543 FATAL wiki.WikiEngine - Failed to start
> > managers.
> > > > java.lang.NullPointerException
> > > >
> > > >
> > > > Any ideas?
> > > >
> > > > Thanks
> > > > -jim
> > > >
> > > > ᐧ
> > > >
> > > > --
> > > > -jim
> > > > Jim Willeke
> > > >
> > > >
> > > > On Sat, May 3, 2014 at 11:16 AM, Jim Willeke <j...@willeke.com>
> wrote:
> > > >
> > > > > I really appreciate the help, but, this then effects all apps
> running
> > > on
> > > > > tomcat.
> > > > >
> > > > > There must be a better way.
> > > > >
> > > > > I currently running older versions but have 5 wikis running as
> > Virtual
> > > > > hosts and all their configs are within the context of each host.
> > > > > But, I wanted to do a clean install of one wiki to see how the
> newer
> > > > > install works and run the ../Install.jsp to see how things should
> be
> > > > done.
> > > > >
> > > > >
> > > > > ᐧ
> > > > >
> > > > > --
> > > > > -jim
> > > > > Jim Willeke
> > > > >
> > > > >
> > > > > On Sat, May 3, 2014 at 8:34 AM, Harry Metske <
> harry.met...@gmail.com
> > > > >wrote:
> > > > >
> > > > >> Jim,
> > > > >>
> > > > >> you should put these files in tomcat7/lib, not in
> > > > >> tomcat7/webapps/ldapwiki/WEB-INF/lib.
> > > > >>
> > > > >> regards,
> > > > >> Harry
> > > > >>
> > > > >>
> > > > >>
> > > > >> On 3 May 2014 13:25, Jim Willeke <j...@willeke.com> wrote:
> > > > >>
> > > > >> > Creating a creating a log4j.properties in
> > > > >> > tomcat7/webapps/ldapwiki/WEB-INF/lib
> > > > >> > does not work.
> > > > >> > log4j:WARN No appenders could be found for logger
> > > > >> > (org.apache.wiki.util.PropertyReader).
> > > > >> > log4j:WARN Please initialize the log4j system properly.
> > > > >> > log4j:WARN See
> > > > http://logging.apache.org/log4j/1.2/faq.html#noconfigfor
> > > > >> > more info.
> > > > >> > log4j:ERROR setFile(null,true) call failed.
> > > > >> > java.io.FileNotFoundException: jspwiki.log (Permission denied)
> > > > >> >
> > > > >> > or creating jspwiki-custom.properties file
> > > > >> >
> > > > >> >
> > > > >> > ᐧ
> > > > >> >
> > > > >> > --
> > > > >> > -jim
> > > > >> > Jim Willeke
> > > > >> >
> > > > >> >
> > > > >> > On Sat, May 3, 2014 at 5:22 AM, Harry Metske <
> > > harry.met...@gmail.com>
> > > > >> > wrote:
> > > > >> >
> > > > >> > > Jim,
> > > > >> > >
> > > > >> > > a vanilla JSPWiki will use the log4j settings from
> > > > >> > ini/jspwiki.properties,
> > > > >> > > this file is "hidden" inside the WEB-INF/lib/jspwiki.jar file.
> > > > >> > > The default location for the logfile is jspwiki.log, which
> means
> > > the
> > > > >> > > current directory.
> > > > >> > > What the current directory is, depends on how you startup your
> > > > tomcat.
> > > > >> > > For example, if you start tomcat from a shell, it will try to
> > log
> > > to
> > > > >> the
> > > > >> > > current directory (of your shell).
> > > > >> > > If you start it from the init.d script, it depends on how the
> > > init.d
> > > > >> > script
> > > > >> > > handles it.
> > > > >> > > In any case, in your situation, the current directory cannot
> be
> > > > >> written
> > > > >> > to.
> > > > >> > > You can also solve the logging issue by creating a
> > > log4j.properties
> > > > >> file
> > > > >> > in
> > > > >> > > the tomcat lib directory, see #1 for an example.
> > > > >> > >
> > > > >> > > regards,
> > > > >> > > Harry
> > > > >> > > #1 -
> > > > >> > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> https://jspwiki-wiki.apache.org/Wiki.jsp?page=Documentation#section-Documentation-ConfigurationAndAdministration
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> > > On 3 May 2014 10:01, Jim Willeke <j...@willeke.com> wrote:
> > > > >> > >
> > > > >> > > > New server on "Debian GNU/Linux 7 (wheezy)"
> > > > >> > > > Apache Tomcat/7.0.28 JDK 1.7.0_25-b30
> > > > >> > > > Deployed JSPWiki.jar from Tomcat Manager.
> > > > >> > > >
> > > > >> > > >
> > > > >> > > > May 02, 2014 2:13:28 PM
> org.apache.catalina.startup.HostConfig
> > > > >> > deployWAR
> > > > >> > > > INFO: Deploying web application archive
> > > > >> > > /var/lib/tomcat7/webapps/mywiki.war
> > > > >> > > > log4j:WARN No appenders could be found for logger
> > > > >> > > > (org.apache.wiki.util.PropertyReader).
> > > > >> > > > log4j:WARN Please initialize the log4j system properly.
> > > > >> > > > log4j:WARN See
> > > > >> http://logging.apache.org/log4j/1.2/faq.html#noconfigfor
> > > > >> > > > more info.
> > > > >> > > > log4j:ERROR setFile(null,true) call failed.
> > > > >> > > > java.io.FileNotFoundException: jspwiki.log (Permission
> denied)
> > > > >> > > >
> > > > >> > > > Not sure where it might be trying to write the file to but
> > even
> > > > did
> > > > >> a
> > > > >> > > touch
> > > > >> > > > and set to user running tomcat for
> > > > >> > > > /var/lib/tomcat7/logs
> > > > >> > > > With the same results.
> > > > >> > > >
> > > > >> > > > Which contained all the other log files.
> > > > >> > > >
> > > > >> > > > Any ideas what to look into?
> > > > >> > > >
> > > > >> > > > Thanks
> > > > >> > > >
> > > > >> > > > --
> > > > >> > > > -jim
> > > > >> > > > Jim Willeke
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > > >
> > > > >
> > > >
> > >
> >
>

Reply via email to