Searching on the internet the only relevant information found is at https://github.com/sbt/sbt/issues/2156#issuecomment-140359444; however I don't see the solution for this problem.
The project is freshly setup with Java 1.8.0_131-b11 64bits, Scala 2.11.11, sbt 0.13.15. Basically there is no plugins just a standard sbt layout project. Although frequency of such errors is not very high, it's inconvenience as not sure how to fix that.
Is there any solution for this issue? Thanks
/path/to/target/streams/$global/ivySbt/$global/streams/outjava.io.IOException: No such file or directory
at sbt.ErrorHandling$.translate(ErrorHandling.scala:10)
at sbt.IO$.touch(IO.scala:210)
at sbt.std.Streams$$anon$3$$anon$2.make(Streams.scala:129)
at sbt.std.Streams$$anon$3$$anon$2.text(Streams.scala:113)
at sbt.std.Streams$$anon$3$$anon$2.log(Streams.scala:124)
at sbt.std.TaskStreams$class.log(Streams.scala:56)
at sbt.std.Streams$$anon$3$$anon$2.log$lzycompute(Streams.scala:102)
at sbt.std.Streams$$anon$3$$anon$2.log(Streams.scala:102)
at sbt.Classpaths$$anonfun$ivySbt0$1.apply(Defaults.scala:1338)
at sbt.Classpaths$$anonfun$ivySbt0$1.apply(Defaults.scala:1337)
at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:35)
at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:34)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1012)
at sbt.IO$$anonfun$1.apply$mcZ$sp(IO.scala:210)
at sbt.IO$$anonfun$1.apply(IO.scala:210)
at sbt.IO$$anonfun$1.apply(IO.scala:210)
at sbt.ErrorHandling$.translate(ErrorHandling.scala:10)
at sbt.IO$.touch(IO.scala:210)
at sbt.std.Streams$$anon$3$$anon$2.make(Streams.scala:129)
at sbt.std.Streams$$anon$3$$anon$2.text(Streams.scala:113)
at sbt.std.Streams$$anon$3$$anon$2.log(Streams.scala:124)
at sbt.std.TaskStreams$class.log(Streams.scala:56)
at sbt.std.Streams$$anon$3$$anon$2.log$lzycompute(Streams.scala:102)
at sbt.std.Streams$$anon$3$$anon$2.log(Streams.scala:102)
at sbt.Classpaths$$anonfun$ivySbt0$1.apply(Defaults.scala:1338)
at sbt.Classpaths$$anonfun$ivySbt0$1.apply(Defaults.scala:1337)
at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:35)
at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:34)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Related
I have Alfresco Community Edition 5.2.
The project has been cloned from GitHub repository, and after that I cannot run it.
I am getting the following error at catalina.out file:
2023-02-02 13:16:49,623 ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 01020049 Not all patches could be applied
at org.alfresco.repo.admin.patch.PatchExecuter.applyOutstandingPatches(PatchExecuter.java:118)
at org.alfresco.repo.admin.patch.PatchExecuter$1.doWork(PatchExecuter.java:131)
at org.alfresco.repo.admin.patch.PatchExecuter$1.doWork(PatchExecuter.java:1)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at org.alfresco.repo.admin.patch.PatchExecuter.onBootstrap(PatchExecuter.java:135)
at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:214)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:185)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:954)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Feb 02, 2023 1:16:49 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextLoaderListener
org.alfresco.error.AlfrescoRuntimeException: 01020049 Not all patches could be applied
at org.alfresco.repo.admin.patch.PatchExecuter.applyOutstandingPatches(PatchExecuter.java:118)
at org.alfresco.repo.admin.patch.PatchExecuter$1.doWork(PatchExecuter.java:131)
at org.alfresco.repo.admin.patch.PatchExecuter$1.doWork(PatchExecuter.java:1)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at org.alfresco.repo.admin.patch.PatchExecuter.onBootstrap(PatchExecuter.java:135)
at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:214)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:185)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:954)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
and this one also:
2023-02-02 13:16:48,818 ERROR [admin.patch.PatchExecuter] [localhost-startStop-1] 01020048 org.alfresco.error.AlfrescoRuntimeException: 01020047 Bootstrap failed
at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:367)
at com.prodyna.adama.gas.patch.SiteReloadedPatch.applyInternalImpl(SiteReloadedPatch.java:388)
at com.prodyna.adama.gas.patch.SiteReloadedPatch.applyInternal(SiteReloadedPatch.java:269)
at org.alfresco.repo.admin.patch.AbstractPatch$1.execute(AbstractPatch.java:455)
at org.alfresco.repo.admin.patch.AbstractPatch$1.execute(AbstractPatch.java:1)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
at org.alfresco.repo.admin.patch.AbstractPatch.applyWithTxns(AbstractPatch.java:462)
at org.alfresco.repo.admin.patch.AbstractPatch.access$0(AbstractPatch.java:442)
at org.alfresco.repo.admin.patch.AbstractPatch$4.doWork(AbstractPatch.java:620)
at org.alfresco.repo.admin.patch.AbstractPatch$4.doWork(AbstractPatch.java:1)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:624)
at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:586)
at org.alfresco.repo.admin.patch.PatchServiceImpl$PatchWork.applyPatch(PatchServiceImpl.java:564)
at org.alfresco.repo.admin.patch.PatchServiceImpl$PatchWork.execute(PatchServiceImpl.java:477)
at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatch(PatchServiceImpl.java:332)
at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatchAndDependencies(PatchServiceImpl.java:309)
at org.alfresco.repo.admin.patch.PatchServiceImpl.applyOutstandingPatches(PatchServiceImpl.java:198)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy142.applyOutstandingPatches(Unknown Source)
at org.alfresco.repo.admin.patch.PatchExecuter.applyOutstandingPatches(PatchExecuter.java:83)
at org.alfresco.repo.admin.patch.PatchExecuter$1.doWork(PatchExecuter.java:131)
at org.alfresco.repo.admin.patch.PatchExecuter$1.doWork(PatchExecuter.java:1)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at org.alfresco.repo.admin.patch.PatchExecuter.onBootstrap(PatchExecuter.java:135)
at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:214)
at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:185)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:954)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.alfresco.service.cmr.view.ImporterException: Failed to import package at line 487; column 75 due to error: Namespace URI http://www.adama.com/model/adamaStudyNotification/1.0 has not been defined in the Repository dictionary
at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:201)
at org.alfresco.repo.importer.ImporterComponent.parserImport(ImporterComponent.java:430)
at org.alfresco.repo.importer.ImporterComponent.importView(ImporterComponent.java:279)
at org.alfresco.repo.importer.ImporterBootstrap.doImport(ImporterBootstrap.java:485)
at org.alfresco.repo.importer.ImporterBootstrap.access$0(ImporterBootstrap.java:374)
at org.alfresco.repo.importer.ImporterBootstrap$1$1.execute(ImporterBootstrap.java:356)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
at org.alfresco.repo.importer.ImporterBootstrap$1.doWork(ImporterBootstrap.java:360)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:363)
... 54 more
Caused by: org.alfresco.service.cmr.view.ImporterException: Namespace URI http://www.adama.com/model/adamaStudyNotification/1.0 has not been defined in the Repository dictionary
at org.alfresco.repo.importer.view.ViewParser.getName(ViewParser.java:995)
at org.alfresco.repo.importer.view.ViewParser.processStartElement(ViewParser.java:226)
at org.alfresco.repo.importer.view.ViewParser.parse(ViewParser.java:183)
... 63 more
While ago I added new sites to alfresco project, and bootstraped them. But now I do not know what could be the problem.
It looks like you have a problem with customized code:
com.prodyna.adama.gas.patch.SiteReloadedPatch.applyInternalImpl
is not an official Alfresco patch.
Failed to import package at line 487; column 75 due to error: Namespace URI http://www.adama.com/model/adamaStudyNotification/1.0 has not been defined in the Repository dictionary
seems to be at least one of your issues: the referenced model http://www.adama.com/model/adamaStudyNotification/1.0 is not defined. You may have forgotten to deploy a dependent module which contains the model xml?
If your intention is to run Alfresco without that module you would need to deploy at least the document model, otherwise Alfresco will not be able to read the metadata of existing documents having the type or aspects defined in that model.
Works fine in Corda 3.3 but fails in Corda 4.0
Node gets up properly and then when I call first very simple flow - this error happens.
I tried to run node with 2048 heap space but no success.
Stacktrace:
java.lang.RuntimeException: java.util.concurrent.ExecutionException:
Exception while scanning at
io.github.classgraph.ClassGraph.scan(ClassGraph.java:1153)
~[classgraph-4.6.12.jar:4.6.12] at
io.github.classgraph.ClassGraph.scan(ClassGraph.java:1173)
~[classgraph-4.6.12.jar:4.6.12] at
io.github.classgraph.ClassGraph.scan(ClassGraph.java:1185)
~[classgraph-4.6.12.jar:4.6.12] at
net.corda.core.internal.ClassGraphUtilsKt.pooledScan(ClassGraphUtils.kt:18)
~[corda-core-4.0.jar:?] at
net.corda.core.internal.ClassLoadingUtilsKt.createInstancesOfClassesImplementing(ClassLoadingUtils.kt:22)
~[corda-core-4.0.jar:?] at
net.corda.core.serialization.internal.AttachmentsClassLoaderBuilder$withAttachmentsClassloaderContext$serializationContext$1.apply(AttachmentsClassLoader.kt:316)
~[corda-core-4.0.jar:?] at
net.corda.core.serialization.internal.AttachmentsClassLoaderBuilder$withAttachmentsClassloaderContext$serializationContext$1.apply(AttachmentsClassLoader.kt:293)
~[corda-core-4.0.jar:?] at
java.util.HashMap.computeIfAbsent(HashMap.java:1127) ~[?:1.8.0_191]
at
java.util.Collections$SynchronizedMap.computeIfAbsent(Collections.java:2672)
~[?:1.8.0_191] at
net.corda.core.serialization.internal.AttachmentsClassLoaderBuilder.withAttachmentsClassloaderContext(AttachmentsClassLoader.kt:313)
~[corda-core-4.0.jar:?] at
net.corda.core.serialization.internal.AttachmentsClassLoaderBuilder.withAttachmentsClassloaderContext$default(AttachmentsClassLoader.kt:310)
~[corda-core-4.0.jar:?] at
net.corda.core.transactions.LedgerTransaction.internalPrepareVerify$core(LedgerTransaction.kt:135)
~[corda-core-4.0.jar:?] at
net.corda.core.transactions.LedgerTransaction.verify(LedgerTransaction.kt:125)
~[corda-core-4.0.jar:?] at
net.corda.core.transactions.TransactionBuilder.addMissingDependency(TransactionBuilder.kt:173)
~[corda-core-4.0.jar:?] at
net.corda.core.transactions.TransactionBuilder.toWireTransactionWithContext$core(TransactionBuilder.kt:160)
~[corda-core-4.0.jar:?] at
net.corda.core.transactions.TransactionBuilder.toWireTransactionWithContext$core$default(TransactionBuilder.kt:128)
~[corda-core-4.0.jar:?] at
net.corda.core.transactions.TransactionBuilder.toWireTransaction(TransactionBuilder.kt:125)
~[corda-core-4.0.jar:?] at
net.corda.core.transactions.TransactionBuilder.toLedgerTransaction(TransactionBuilder.kt:451)
~[corda-core-4.0.jar:?] at
net.corda.core.transactions.TransactionBuilder.verify(TransactionBuilder.kt:459)
~[corda-core-4.0.jar:?] at
com.insettle.core.corda.flows.abstractions.AbstractInitiatingFlow.call(AbstractInitiatingFlow.kt:60)
~[?:?] at
com.insettle.core.corda.flows.abstractions.AbstractInitiatingFlow.call(AbstractInitiatingFlow.kt:12)
~[?:?] at
net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:228)
~[corda-node-4.0.jar:?] at
net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:45)
~[corda-node-4.0.jar:?] at
co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092)
~[quasar-core-0.7.10-jdk8.jar:0.7.10] at
co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788)
~[quasar-core-0.7.10-jdk8.jar:0.7.10] at
co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100)
~[quasar-core-0.7.10-jdk8.jar:0.7.10] at
co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91)
~[quasar-core-0.7.10-jdk8.jar:0.7.10] at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
~[?:1.8.0_191] at
java.util.concurrent.FutureTask.run(FutureTask.java:266)
~[?:1.8.0_191] at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
~[?:1.8.0_191] at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
~[?:1.8.0_191] at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
~[?:1.8.0_191] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
~[?:1.8.0_191] at
net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:63)
~[corda-node-4.0.jar:?] Caused by:
java.util.concurrent.ExecutionException: Exception while scanning at
io.github.classgraph.Scanner.call(Scanner.java:716)
~[classgraph-4.6.12.jar:4.6.12] at
io.github.classgraph.Scanner.call(Scanner.java:63)
~[classgraph-4.6.12.jar:4.6.12] at
java.util.concurrent.FutureTask.run(FutureTask.java:266)
~[?:1.8.0_191] at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
~[?:1.8.0_191] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
~[?:1.8.0_191] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Caused by: java.lang.OutOfMemoryError: Java heap space at
io.github.classgraph.ClassInfo.(ClassInfo.java:154)
~[classgraph-4.6.12.jar:4.6.12] at
io.github.classgraph.ClassInfo.(ClassInfo.java:169)
~[classgraph-4.6.12.jar:4.6.12] at
io.github.classgraph.ClassInfo.addScannedClass(ClassInfo.java:489)
~[classgraph-4.6.12.jar:4.6.12] at
io.github.classgraph.ClassInfoUnlinked.link(ClassInfoUnlinked.java:168)
~[classgraph-4.6.12.jar:4.6.12] at
io.github.classgraph.Scanner.call(Scanner.java:649)
~[classgraph-4.6.12.jar:4.6.12] at
io.github.classgraph.Scanner.call(Scanner.java:63)
~[classgraph-4.6.12.jar:4.6.12] at
java.util.concurrent.FutureTask.run(FutureTask.java:266)
~[?:1.8.0_191] at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
~[?:1.8.0_191] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
~[?:1.8.0_191] at java.lang.Thread.run(Thread.java:748)
~[?:1.8.0_191]
This issue is probably related to the custom whitelist serialization scanning code.
We need to raise max heap size of nodes to 1GB. See following link for details -
https://r3-cev.atlassian.net/browse/CORDA-2436
Also refer -
https://r3-cev.atlassian.net/browse/CORDA-2437?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
The stack trace shows:
at io.github.classgraph.ClassGraph.scan(ClassGraph.java:1185) ~[classgraph-4.6.12.jar:4.6.12]
at net.corda.core.internal.ClassGraphUtilsKt.pooledScan(ClassGraphUtils.kt:18) ~[corda-core-4.0.jar:?]
at net.corda.core.internal.ClassLoadingUtilsKt.createInstancesOfClassesImplementing(ClassLoadingUtils.kt:22) ~[corda-core-4.0.jar:?]
In other words it looks like every time createInstancesOfClassesImplementing is called, a new ClassGraph scan is initiated. Assuming that this method is called many times, then not only is that extremely inefficient, but scanning the entire classpath for each new scan could result in a huge amount of memory overhead, if a reference to the ScanResult is held for each new scan.
The stacktrace shows two separate scans going on at the same time too, so you are probably initiating the scan from more than one thread at a time.
The right way to solve this is to scan the classpath just once on initialization, then reuse the ScanResult in ClassLoadingUtilsKt, rather than re-scanning to generate a new ScanResult each time.
I'm trying to run for the first time a RAP example app deployed on a tomcat server and I get this error when I call it in the browser:
type Exception report
message Servlet.init() for servlet equinoxbridgeservlet threw exception
description The server encountered an internal error that prevented it from
fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet
equinoxbridgeservlet threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)
root cause
java.lang.RuntimeException: org.eclipse.core.runtime.adaptor.EclipseStarter
org.eclipse.equinox.servletbridge.FrameworkLauncher.start(FrameworkLauncher.java:420)
org.eclipse.equinox.servletbridge.BridgeServlet.init(BridgeServlet.java:97)
javax.servlet.GenericServlet.init(GenericServlet.java:158)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.56 logs.
The web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app id="WebApp">
<servlet id="bridge">
<servlet-name>equinoxbridgeservlet</servlet-name>
<display-name>Equinox Bridge Servlet</display-name>
<description>Equinox Bridge Servlet</description>
<servlet-class>org.eclipse.equinox.servletbridge.BridgeServlet</servlet-class>
<!-- Framework Controls could be useful for testing purpose, but
we disable it per default -->
<init-param>
<param-name>enableFrameworkControls</param-name>
<param-value>false</param-value>
</init-param>
<!-- Enable multi-language support for the extension registry -->
<!-- the OSGi console is useful for trouble shooting but will fill up your
appserver log quickly, so deactivate on production use. Uncomment
the -console parameter to enabled OSGi console access. -->
<init-param>
<param-name>commandline</param-name>
<param-value>-registryMultiLanguage<!-- -console --></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>equinoxbridgeservlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
This is the example app from the bundle org.eclipse.rap.demo.
I followed the instructions to create the WAR file and then i´ve deployed it on a local tomcat (XAMPP). All these programs are up to date and the app compiles and works fine in eclipse.
Please ask me if you need more infos!
EDIT:
hier the full error:
Apr 08, 2016 11:09:28 PM org.apache.catalina.core.ApplicationContext log
SCHWERWIEGEND: Error while starting Framework
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at org.eclipse.equinox.servletbridge.FrameworkLauncher$ChildFirstURLClassLoader.loadClass0(FrameworkLauncher.java:1051)
at org.eclipse.equinox.servletbridge.FrameworkLauncher$ChildFirstURLClassLoader.loadClass(FrameworkLauncher.java:1036)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.equinox.servletbridge.FrameworkLauncher.start(FrameworkLauncher.java:401)
at org.eclipse.equinox.servletbridge.BridgeServlet.init(BridgeServlet.java:97)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Apr 08, 2016 11:09:28 PM org.apache.catalina.core.ApplicationContext log
SCHWERWIEGEND: StandardWrapper.Throwable
java.lang.RuntimeException: org.eclipse.core.runtime.adaptor.EclipseStarter
at org.eclipse.equinox.servletbridge.FrameworkLauncher.start(FrameworkLauncher.java:420)
at org.eclipse.equinox.servletbridge.BridgeServlet.init(BridgeServlet.java:97)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Apr 08, 2016 11:09:28 PM org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Allocate exception for servlet equinoxbridgeservlet
java.lang.RuntimeException: org.eclipse.core.runtime.adaptor.EclipseStarter
at org.eclipse.equinox.servletbridge.FrameworkLauncher.start(FrameworkLauncher.java:420)
at org.eclipse.equinox.servletbridge.BridgeServlet.init(BridgeServlet.java:97)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Add the below lines in your web.xml:
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
currently I have a sbt multi project with one main project.
The other projects are just aggregate's or a scalaJS project so my project definition is somewhat like that:
lazy val auth = project
lazy val utils = project
lazy val client = project
lazy val main = project
.dependsOn(utils).aggregate(utils)
.dependsOn(auth).aggregate(auth)
.aggregate(clients.map(projectToRef): _*)
However on publishing I get that:
java.lang.RuntimeException: Repository for publishing is not specified.
at scala.sys.package$.error(package.scala:27)
at sbt.Classpaths$$anonfun$getPublishTo$1.apply(Defaults.scala:1470)
at sbt.Classpaths$$anonfun$getPublishTo$1.apply(Defaults.scala:1470)
at scala.Option.getOrElse(Option.scala:120)
at sbt.Classpaths$.getPublishTo(Defaults.scala:1470)
at sbt.Classpaths$$anonfun$59.apply(Defaults.scala:1150)
at sbt.Classpaths$$anonfun$59.apply(Defaults.scala:1150)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
java.lang.RuntimeException: Repository for publishing is not specified.
at scala.sys.package$.error(package.scala:27)
at sbt.Classpaths$$anonfun$getPublishTo$1.apply(Defaults.scala:1470)
at sbt.Classpaths$$anonfun$getPublishTo$1.apply(Defaults.scala:1470)
at scala.Option.getOrElse(Option.scala:120)
at sbt.Classpaths$.getPublishTo(Defaults.scala:1470)
at sbt.Classpaths$$anonfun$59.apply(Defaults.scala:1150)
at sbt.Classpaths$$anonfun$59.apply(Defaults.scala:1150)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
java.lang.RuntimeException: Repository for publishing is not specified.
at scala.sys.package$.error(package.scala:27)
at sbt.Classpaths$$anonfun$getPublishTo$1.apply(Defaults.scala:1470)
at sbt.Classpaths$$anonfun$getPublishTo$1.apply(Defaults.scala:1470)
at scala.Option.getOrElse(Option.scala:120)
at sbt.Classpaths$.getPublishTo(Defaults.scala:1470)
at sbt.Classpaths$$anonfun$59.apply(Defaults.scala:1150)
at sbt.Classpaths$$anonfun$59.apply(Defaults.scala:1150)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (client/*:publishConfiguration) Repository for publishing is not specified.
[error] (auth/*:publishConfiguration) Repository for publishing is not specified.
[error] (utils/*:publishConfiguration) Repository for publishing is not specified.
Currently my main project gets uploaded sucessful however I get a exit code 1 which is bad for my CI server.
Is there a way to disable it for these subprojects?
Edit: Also I use sbt-native-packager for publishing i.e.:
makeDeploymentSettings(Universal, packageBin in Universal, "tgz")
And the command I'm using
sbt universal:publish
You have to provide the publishTo setting for all your modules.
This may be achieved by having a common object with all your settings, including publishTo. These settings can then be imported to build.sbt in all your modules.
So you can have a file, say Common.scala, which looks like this:
object Common {
val settings: Seq[Setting[_]] = Seq(
scalaVersion := "Your Scala version",
publishTo <<= Some("your repo" at "http://yourserver.com")
)
val nonPublishSettings = settings ++ Seq(
publish := { }
)
}
Now modify your build.sbt like this:
Common.settings
lazy val auth = project
lazy val utils = project.settings(Common.nonPublishSettings) // This module will not be published. All others will be.
lazy val client = project
lazy val main = project
.dependsOn(utils).aggregate(utils)
.dependsOn(auth).aggregate(auth)
.aggregate(clients.map(projectToRef): _*)
Thus, the solution to your problem is to explicitly tell sbt which modules to publish and where.
This looks like a configuration error. The main project aggregates all other projects, which means every command you execute on the main project will be executed on the projects listed in aggregate function.
I assume that you specified a repository with
publishTo := Some("your repo" at "http://yourcompany.com")
which is only set on your main project. So, when you run universal:publish all sub projects get published as well.
Here is another Stackoverflow question on how to disable publish on single projects.
A little background:
I am trying to use spring-boot-actuator in spring MVC application that we have in production. It is NOT a spring-boot-application.
I have put together a simple spring MVC App with spring-boot-actuator.
The sample code is available here. It is simple app to clone and reproduce the error. I have README with instructions in there.
I have used spring-boot-actuator 1.1.1.RELEASE dependency and it works fine.
However, when I wanted to use 1.2.5.RELEASE and that is where I get errors during container start up.
SEVERE: StandardWrapper.Throwable
java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration$RequestMappingEndpointConfiguration#requestMappingEndpoint due to internal class not found. This can happen if you are #ComponentScanning a springframework package (e.g. if you put a #ComponentScan in the default package by mistake)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:51)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:92)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:174)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:136)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:324)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:530)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1091)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/factory/SmartInitializingSingleton
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2895)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:163)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:152)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:120)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:95)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:45)
... 30 more
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.SmartInitializingSingleton
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
... 42 more
Sep 05, 2015 9:09:42 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /MyController threw load() exception
java.lang.ClassNotFoundException: org.springframework.beans.factory.SmartInitializingSingleton
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2895)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:163)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:152)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:120)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:95)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:45)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:92)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:174)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:136)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:324)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:530)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1091)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
You're using an old and incompatible version of Spring Framework. I'd guess 4.0.x.
SmartInitializingSingleton is new in Spring Framework 4.1. Furthermore, as described in the documentation, Spring Boot 1.2.5 requires Spring Framework 4.1.5.RELEASE or above.