I updated my catalog to use the example one and cleared out the old
checkout directory and now it works. Thanks for the help!

On Tue, 3 Jul 2018 at 17:12, Ralph Goers <[email protected]> wrote:

> I tried with your configuration and after deleting the temp directory I am
> getting a NullPointerException initializing the catalog. Your catalog file
> is empty. You should start with the sample catalog and edit that.
>
> Ralph
>
> > On Jul 3, 2018, at 3:03 PM, Ralph Goers <[email protected]>
> wrote:
> >
> > Do you have a log line like:
> >
> > 2018-07-03 12:36:34,612 [main] DEBUG
> o.s.c.e.PropertySourcesPropertyResolver.logKeyFound:152 - Found key
> 'remoteRepoUrl' in PropertySource 'applicationConfig:
> [file:./application.properties]' with value of type String
> >
> > ?
> >
> > You will need to delete
> /var/folders/3n/k2sxhp290jbbnnds_gbtv17c0000gn/T/audit.
> >
> > Ralph
> >
> >> On Jul 3, 2018, at 2:30 PM, Matt Sicker <[email protected]> wrote:
> >>
> >> I downloaded the same zip from your link (I was using the tar earlier,
> but
> >> it's the same files) and made a fresh directory. I
> >> copied log4j-catalog-editor-1.0.0.jar to that directory and created an
> >> application.properties file in that same directory with the following
> >> contents:
> >>
> >> remoteRepoUrl=https://github.com/jvz/jenkins-auditor-plugin.git <
> https://github.com/jvz/jenkins-auditor-plugin.git>
> >> remoteRepoCatalogPath=src/main/resources/catalog.json
> >> branch=master
> >>
> >> And it fails on startup. Here are the error messages:
> >>
> >> 2018-07-03 16:23:05,242 [main] ERROR
> >> o.a.l.l.c.g.d.GitCatalogDao.updateRepo:225 - Exception
> >> org.eclipse.jgit.api.errors.InvalidRemoteException: Invalid remote:
> origin
> >>       at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:220)
> >> ~[org.eclipse.jgit-4.7.0.201704051617-r.jar!/:4.7.0.201704051617-r]
> >>       at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:287)
> >> ~[org.eclipse.jgit-4.7.0.201704051617-r.jar!/:4.7.0.201704051617-r]
> >>       at
> >>
> org.apache.logging.log4j.catalog.git.dao.GitCatalogDao.updateRepo(GitCatalogDao.java:223)
> >> [log4j-catalog-git-1.0.0.jar!/:1.0.0]
> >>       at
> >>
> org.apache.logging.log4j.catalog.git.dao.GitCatalogDao.read(GitCatalogDao.java:135)
> >> [log4j-catalog-git-1.0.0.jar!/:1.0.0]
> >>       at
> >>
> org.apache.logging.log4j.catalog.service.CatalogInitializer.initialize(CatalogInitializer.java:85)
> >> [classes!/:1.0.0]
> >> ...
> >> Caused by: org.eclipse.jgit.errors.NoRemoteRepositoryException:
> >> ${remoteRepoUrl}: not found.
> >>       at
> >>
> org.eclipse.jgit.transport.TransportLocal$1.open(TransportLocal.java:132)
> >> ~[org.eclipse.jgit-4.7.0.201704051617-r.jar!/:4.7.0.201704051617-r]
> >> ...
> >>
> >> 2018-07-03 16:23:05,248 [main] WARN
> >> o.s.c.s.AbstractApplicationContext.refresh:551 - Exception encountered
> >> during context initialization - cancelling refresh attempt:
> >> org.springframework.beans.factory.BeanCreationException: Error creating
> >> bean with name 'catalogInitializer': Invocation of init method failed;
> >> nested exception is java.lang.IllegalStateException: Catalog
> >>
> /var/folders/3n/k2sxhp290jbbnnds_gbtv17c0000gn/T/audit/catalog/src/main/resources/catalog.json
> >> is not readable.
> >>
> >> On Tue, 3 Jul 2018 at 14:45, Ralph Goers <[email protected]
> <mailto:[email protected]>> wrote:
> >>
> >>> I just followed the instructions and had two problems:
> >>> The wget url is wrong. I should be
> >>>
> https://dist.apache.org/repos/dist/release/logging/log4j-audit/apache-log4j-audit-1.0.0-bin.zip
> <
> https://dist.apache.org/repos/dist/release/logging/log4j-audit/apache-log4j-audit-1.0.0-bin.zip
> >
> >>> <
> >>>
> https://dist.apache.org/repos/dist/release/logging/log4j-audit/apache-log4j-audit-1.0.0-bin.zip
> <
> https://dist.apache.org/repos/dist/release/logging/log4j-audit/apache-log4j-audit-1.0.0-bin.zip
> >
> >>>>
> >>> I copied the application properties from the web site. If there are
> >>> trailing spaces on the values they have to be deleted.
> >>>
> >>> Other than that the editor started fine.
> >>>
> >>> Did you:
> >>> Create a directory for the catalog editor.
> >>> Copy the catalog editor jar into that directory.
> >>> Create a file named application.properties in that directory
> >>> Start the catalog editor in that directory.
> >>>
> >>> Also, the editor creates a clone of the repo in a temp directory. If
> >>> things are misconfigured you will have to delete that directory. In the
> >>> logs you will see something like
> >>>
> >>> java.io.tmpdir=/var/folders/ng/bsg7qt2x5p373mck9gxhyjhr0000gn/T/
> >>>
> >>> There will be an audit directory under that which is what you want to
> >>> delete.
> >>>
> >>> Ralph
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> On Jul 3, 2018, at 11:17 AM, Matt Sicker <[email protected]> wrote:
> >>>>
> >>>> I've been trying to get started using the guide <
> >>>> http://logging.apache.org/log4j-audit/latest/gettingStarted.html>
> and am
> >>>> not able to start up the catalog editor locally. I've configured the
> >>>> application.properties file as specified, but the logs are saying
> that it
> >>>> can't find the URL "${remoteRepoUrl}" instead of the interpolated
> value,
> >>>> and I can't figure out why.
> >>>>
> >>>> There have also been some invalid links and typos I've fixed for the
> site
> >>>> as I'm going through everything in more detail.
> >>>>
> >>>> --
> >>>> Matt Sicker <[email protected]>
> >>>
> >>>
> >>
> >> --
> >> Matt Sicker <[email protected] <mailto:[email protected]>>
> >
>
>
>

-- 
Matt Sicker <[email protected]>

Reply via email to