Trying to customize 404 error page from Camel Jetty - apache-camel

I'm working on an osgi package with Apache Camel and Jetty and trying to customize the 404 error page but can't find a way
Reading on the internet indicates that it has to be done using an Error Handler.
I am trying to add the errorHandler as follows:
JettyHttpComponent9 jetty = getContext().getComponent("jetty", JettyHttpComponent9.class);
ErrorPageErrorHandler errorPageErrorHandler = new ErrorPageErrorHandler();
errorPageErrorHandler.addErrorPage(404,"http://localhost:8081/getActualDate");
jetty.setErrorHandler(errorPageErrorHandler);
But when I load the bundle in Karaf it shows me the following error:
java.lang.IllegalStateException: STARTED
at org.eclipse.jetty.server.handler.AbstractHandler.setServer(AbstractHandler.java:126) ~[?:?]
at org.eclipse.jetty.server.Server.doStart(Server.java:342) ~[?:?]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~[?:?]
at org.apache.camel.component.jetty.JettyHttpComponent.connect(JettyHttpComponent.java:337) ~[?:?]
at org.apache.camel.http.common.HttpCommonEndpoint.connect(HttpCommonEndpoint.java:186) ~[?:?]
at org.apache.camel.http.common.HttpConsumer.doStart(HttpConsumer.java:58) ~[?:?]
at org.apache.camel.component.jetty.JettyHttpConsumer.doStart(JettyHttpConsumer.java:31) ~[?:?]
at org.apache.camel.support.service.BaseService.start(BaseService.java:119) ~[!/:3.14.3]
at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113) ~[!/:3.14.3]
at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3598) ~[!/:3.14.3]
at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRouteConsumers(InternalRouteStartupManager.java:401) ~[!/:3.14.3]
at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartRouteConsumers(InternalRouteStartupManager.java:319) ~[!/:3.14.3]
at org.apache.camel.impl.engine.InternalRouteStartupManager.safelyStartRouteServices(InternalRouteStartupManager.java:213) ~[!/:3.14.3]
at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRoutes(InternalRouteStartupManager.java:147) ~[!/:3.14.3]
at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:3300) ~[!/:3.14.3]
at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2952) ~[!/:3.14.3]
at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2903) ~[!/:3.14.3]
at org.apache.camel.support.service.BaseService.start(BaseService.java:119) ~[!/:3.14.3]
at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2587) ~[!/:3.14.3]
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:253) ~[!/:3.14.3]
at org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:241) ~[!/:3.14.3]
at org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:283) ~[!/:3.14.3]
at org.apache.camel.blueprint.BlueprintCamelContext.blueprintEvent(BlueprintCamelContext.java:188) [!/:3.14.3]
at org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:190) [!/:1.10.2]
at org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:188) [!/:1.10.2]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_302]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_302]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_302]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_302]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_302]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_302]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_302]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_302]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_302]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_302]
From what I understand the error says that since the component is already started it could not load the handler, but I don't know how to load it before it starts.
I am currently using Camel 3.14.3 with Karaf 4.2.8
Any help is appreciated
Edit:
Currently I load the data to build the routes from the database as follows:
configManager.getRoutes().forEach((apiBasePath, route) -> {
Predicate requiresAudit = PredicateBuilder.constant(route.getRequiresAudit());
Predicate requiresAuthorization = PredicateBuilder.constant(route.getRequiresAuthorization());
from(createInternalEndPoint(route)).routeId(route.getApiBasePath())
.setHeader(Exchange.HTTP_PATH,simple(route.getApiBasePath()))
.bean(gateway, "checkRoute")
.setHeader(Exchange.HTTP_PATH,simple("")) //Esto se hace para que no de error la ruta en TO
.choice()
...
.end()
.choice()
..
.end()
.circuitBreaker().resilience4jConfiguration(Resilience4JConfig.getConfig())
.to(createExternalEndPoint(route))
.onFallback()
.process(getShortCircuitedProcess())
.end()
.end()
});
In pom.xml I only have this dependency related to jetty:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jetty</artifactId>
</dependency>
I try to set the error handler before creating the routes (All in the same class that extends RouteBuilder).

Related

Exception while deploying ADF1.2.2.1.4 in Glassfish server 5.0

I am using glassfish server 5.0 to make Fusion web application ADF using J developer 1.2.2.1.4 in windows server. I am getting this exception while deploying my web app.
Error occurred during deployment: Exception while loading the app :
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException:
java.lang.IllegalArgumentException: java.lang.ClassNotFoundException:
oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBack. Please see
server.log for more details.
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: oracle/adf/share/logging/ADFLogger
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:136)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:540)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:536)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:535)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:566)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:558)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:557)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1465)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:110)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1847)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1723)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:254)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:232)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:276)
at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:200)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
at org.glassfish.jersey.internal.Errors.process(Errors.java:268)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:377)
at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:463)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:168)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:242)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)
at java.lang.Thread.run(Unknown Source)
]]
From https://www.oracle.com/technologies/developer-tools/jdeveloper/12214certification.html I get that Glassfish 5.0 is not supported.

Apache Zeppelin error local jar not exist

java.lang.RuntimeException: Warning: Local jar
C:\Zeppelin\zeppelin-0.8.0-bin-all\bin\54480 does not exist, skipping.
Warning: Local jar C:\Zeppelin\zeppelin-0.8.0-bin-all\bin\10.10.10.122
does not exist, skipping. java.lang.ClassNotFoundException:
org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer at
java.net.URLClassLoader.findClass(URLClassLoader.java:381) at
java.lang.ClassLoader.loadClass(ClassLoader.java:424) at
java.lang.ClassLoader.loadClass(ClassLoader.java:357) at
java.lang.Class.forName0(Native Method) at
java.lang.Class.forName(Class.java:348) at
org.apache.spark.util.Utils$.classForName(Utils.scala:235) at
org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:836)
at
org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:197)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:227)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:136) at
org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) 2018-09-18
10:33:29 INFO ShutdownHookManager:54 - Shutdown hook called 2018-09-18
10:33:29 INFO ShutdownHookManager:54 - Deleting directory
C:\Users\Polichetti\AppData\Local\Temp\spark-e1cca18a-e05a-4539-b1b6-2f56a8ab27aa
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreterManagedProcess.start(RemoteInterpreterManagedProcess.java:205)
at
org.apache.zeppelin.interpreter.ManagedInterpreterGroup.getOrCreateInterpreterProcess(ManagedInterpreterGroup.java:64)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getOrCreateInterpreterProcess(RemoteInterpreter.java:111)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.internal_create(RemoteInterpreter.java:164)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.open(RemoteInterpreter.java:132)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getFormType(RemoteInterpreter.java:299)
at org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:407)
at org.apache.zeppelin.scheduler.Job.run(Job.java:188) at
org.apache.zeppelin.scheduler.RemoteScheduler$JobRunner.run(RemoteScheduler.java:307)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
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)
Please James, this is not the way that Stackoverflow works... Do some research If you have an error log, and don't throw to here like trash.

java.util.concurrent.ExecutionException: org.apache.solr.common.SolrException ,on sor5.5.3

2017-09-18 11:26:05.661 ERROR (coreContainerWorkExecutor-2-thread-1-processing-n:172.16.4.32:8983_solr) [ ] o.a.s.c.CoreContainer Error waiting for SolrCore to be created
java.util.concurrent.ExecutionException: org.apache.solr.common.SolrException: Unable to create core [wyCluster_shard5_replica2]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.solr.core.CoreContainer$2.run(CoreContainer.java:472)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:210)
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: org.apache.solr.common.SolrException: Unable to create core
There take some ERROR in it .
When I start the Solr slave, it being down soon.
It uses zookeeper.

Apache Camel throws Permission Denied for SFTP connection

I have to read a file from SFTP server. But while reading it camel throws com.jcraft.jsch.SftpException: Permission denied. But i have read and write permission for the folder and files in it. I tried moving the file to .done folder with filezilla and it works.
Route:
sftp://USERNAME#IP_ADDRESS:PORT/path?password=MY_PASSWORD&move=.done&binary=true&disconnect=true&include=FILENAME_(2\\d{3})(\\d{2})(\\d{2}).txt
Stacktrace
o.a.c.c.file.remote.SftpConsumer : Error processing file RemoteFile[FILENAME_20170802.txt] due to Cannot retrieve file: path/FILENAME_20170802.txt. Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Cannot retrieve file: path/FILENAME_20170802.txt]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot retrieve file: path/FILENAME_20170802.txt
at org.apache.camel.component.file.remote.SftpOperations.retrieveFileToStreamInBody(SftpOperations.java:704) ~[camel-ftp-2.19.1.jar:2.19.1]
at org.apache.camel.component.file.remote.SftpOperations.retrieveFile(SftpOperations.java:648) ~[camel-ftp-2.19.1.jar:2.19.1]
at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:408) [camel-core-2.19.1.jar:2.19.1]
at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:137) [camel-ftp-2.19.1.jar:2.19.1]
at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:218) [camel-core-2.19.1.jar:2.19.1]
at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:182) [camel-core-2.19.1.jar:2.19.1]
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174) [camel-core-2.19.1.jar:2.19.1]
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101) [camel-core-2.19.1.jar:2.19.1]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_131]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
Caused by: com.jcraft.jsch.SftpException: Permission denied
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873) ~[jsch-0.1.54.jar:na]
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225) ~[jsch-0.1.54.jar:na]
at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1318) ~[jsch-0.1.54.jar:na]
at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1290) ~[jsch-0.1.54.jar:na]
at org.apache.camel.component.file.remote.SftpOperations.retrieveFileToStreamInBody(SftpOperations.java:689) ~[camel-ftp-2.19.1.jar:2.19.1]
... 14 common frames omitted
The directory path that you have provided is relative, not absolute.
Just confirming if that's the issue.
By default, Camel will go to /home/{username}/ directory. Not the "\" root directory.
Hope it helps.

upgrade to solr 6.1, exception ClassNotFoundException: solr.admin.AdminHandlers

I notice that after changing from solr 5.3 to 6.1, my code that creates an EmbeddedSolrServer (see below) will cause the following exception:
String solrHome = prop.getProperty(PROPERTY_FIELD_SOLR_HOME);
String solrCore = "anotherCore";
CoreContainer solrCores = new EmbeddedSolrServer(
Paths.get(solrHome), solrCore
).getCoreContainer();
EmbeddedSolrServer mycore=
new EmbeddedSolrServer(solrCores.getCore("mycore"));
The last line works ok with solr 5.3, but with 6.1, the following exception is generated. Any ideas please?
Exception in thread "main" org.apache.solr.common.SolrException: SolrCore 'mycore' is not available due to init failure: Error loading class 'solr.admin.AdminHandlers'
at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1066)
at uk.ac.ntu.sac.sense.SenseProperty.getClassIndex(SenseProperty.java:91)
at uk.ac.ntu.sac.sense.kb.indexer.IndexMaster.<init>(IndexMaster.java:31)
at uk.ac.ntu.sac.sense.test.TestIndexer.main(TestIndexer.java:14)
Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.admin.AdminHandlers'
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:773)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:647)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:812)
at org.apache.solr.core.CoreContainer.lambda$load$0(CoreContainer.java:466)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$22(ExecutorUtil.java:229)
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: org.apache.solr.common.SolrException: Error loading class 'solr.admin.AdminHandlers'
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:536)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:467)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:570)
at org.apache.solr.core.PluginBag.createPlugin(PluginBag.java:125)
at org.apache.solr.core.PluginBag.init(PluginBag.java:225)
at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:130)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:732)
... 8 more
Caused by: java.lang.ClassNotFoundException: solr.admin.AdminHandlers
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:520)
... 14 more
I'm having the same issue, but I imagine its because they removed that class from 6.1 (or sometime after 5.3). Removing the element from solrconfig.xml in the problematic core worked for me and should hopefully do the trick for you as well.
<!-- find this line in your solrconfig.xml and comment/remove it -->
<requestHandler name="/admin/"
class="solr.admin.AdminHandlers"/>

Resources