This is in response to
http://groups.google.com/group/repo-discuss/browse_thread/thread/f03b79b352012142#,
but I can't reply there for some reason. Does reply only work on more
recent posts?
With current code, if I run 'java -jar gerrit.war daemon', it
complains about not finding javax.servlet.http.HttpServletRequest. I
can work on adding this class to my classpath... but should it be
needed? This sounds like a bug to me - I don't think the daemon
should need HTTP servlet request support.
Full error:
$ sudo -u gerrit java -jar gerrit.war daemon
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at ExecutableWarMain.runMain(ExecutableWarMain.java:167)
at ExecutableWarMain.main(ExecutableWarMain.java:66)
Caused by: com.google.inject.internal.ComputationException:
com.google.inject.internal.ComputationException:
java.lang.TypeNotPresentException: Type
javax.servlet.http.HttpServletRequest not present
at com.google.inject.internal.MapMaker$StrategyImpl.compute
(MapMaker.java:553)
at com.google.inject.internal.MapMaker$StrategyImpl.compute
(MapMaker.java:419)
at com.google.inject.internal.CustomConcurrentHashMap
$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at com.google.inject.internal.FailableCache.get(FailableCache.java:
46)
at com.google.inject.ConstructorInjectorStore.get
(ConstructorInjectorStore.java:52)
at com.google.inject.ConstructorBindingImpl.initialize
(ConstructorBindingImpl.java:57)
at com.google.inject.InjectorImpl.initializeBinding(InjectorImpl.java:
377)
at com.google.inject.BindingProcessor$1$1.run(BindingProcessor.java:
169)
at com.google.inject.BindingProcessor.initializeBindings
(BindingProcessor.java:224)
at com.google.inject.InjectorBuilder.initializeStatically
(InjectorBuilder.java:120)
at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at com.google.inject.InjectorImpl.createChildInjector
(InjectorImpl.java:144)
at com.google.gerrit.server.config.GerritGlobalModule.createInjector
(GerritGlobalModule.java:87)
at com.google.gerrit.server.config.GerritGlobalModule.createInjector
(GerritGlobalModule.java:79)
at com.google.gerrit.pgm.Daemon.run(Daemon.java:33)
at com.google.gerrit.pgm.AbstractProgram.main(AbstractProgram.java:
70)
... 6 more
Caused by: com.google.inject.internal.ComputationException:
java.lang.TypeNotPresentException: Type
javax.servlet.http.HttpServletRequest not present
at com.google.inject.internal.MapMaker$StrategyImpl.compute
(MapMaker.java:553)
at com.google.inject.internal.MapMaker$StrategyImpl.compute
(MapMaker.java:419)
at com.google.inject.internal.CustomConcurrentHashMap
$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at com.google.inject.internal.FailableCache.get(FailableCache.java:
46)
at com.google.inject.MembersInjectorStore.get
(MembersInjectorStore.java:66)
at com.google.inject.ConstructorInjectorStore.createConstructor
(ConstructorInjectorStore.java:69)
at com.google.inject.ConstructorInjectorStore.access$000
(ConstructorInjectorStore.java:31)
at com.google.inject.ConstructorInjectorStore$1.create
(ConstructorInjectorStore.java:39)
at com.google.inject.ConstructorInjectorStore$1.create
(ConstructorInjectorStore.java:35)
at com.google.inject.internal.FailableCache$1.apply
(FailableCache.java:35)
at com.google.inject.internal.MapMaker$StrategyImpl.compute
(MapMaker.java:549)
... 21 more
Caused by: java.lang.TypeNotPresentException: Type
javax.servlet.http.HttpServletRequest not present
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType
(CoreReflectionFactory.java:98)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature
(Reifier.java:107)
at sun.reflect.generics.tree.ClassTypeSignature.accept
(ClassTypeSignature.java:31)
at sun.reflect.generics.visitor.Reifier.reifyTypeArguments
(Reifier.java:50)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature
(Reifier.java:120)
at sun.reflect.generics.tree.ClassTypeSignature.accept
(ClassTypeSignature.java:31)
at
sun.reflect.generics.repository.ConstructorRepository.getParameterTypes
(ConstructorRepository.java:76)
at java.lang.reflect.Method.getGenericParameterTypes(Method.java:282)
at com.google.inject.TypeLiteral.getParameterTypes(TypeLiteral.java:
291)
at com.google.inject.spi.InjectionPoint.forMember(InjectionPoint.java:
110)
at com.google.inject.spi.InjectionPoint.<init>(InjectionPoint.java:
72)
at com.google.inject.spi.InjectionPoint$Factory$2.create
(InjectionPoint.java:399)
at com.google.inject.spi.InjectionPoint$Factory$2.create
(InjectionPoint.java:393)
at com.google.inject.spi.InjectionPoint.addInjectorsForMembers
(InjectionPoint.java:370)
at com.google.inject.spi.InjectionPoint.addInjectionPoints
(InjectionPoint.java:353)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields
(InjectionPoint.java:296)
at com.google.inject.MembersInjectorStore.createWithListeners
(MembersInjectorStore.java:78)
at com.google.inject.MembersInjectorStore.access$000
(MembersInjectorStore.java:35)
at com.google.inject.MembersInjectorStore$1.create
(MembersInjectorStore.java:43)
at com.google.inject.MembersInjectorStore$1.create
(MembersInjectorStore.java:40)
at com.google.inject.internal.FailableCache$1.apply
(FailableCache.java:35)
at com.google.inject.internal.MapMaker$StrategyImpl.compute
(MapMaker.java:549)
... 31 more
Caused by: java.lang.ClassNotFoundException:
javax.servlet.http.HttpServletRequest
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType
(CoreReflectionFactory.java:95)
... 52 more