camel : Cannot acquire read lock - Hebrew name - apache-camel

when trying to read a file using camel file (consumer) with Hebrew (Windows-1255) name , with readLock=changed I'm getting error :
org.apache.camel.component.file.strategy.FileChangedExclusiveReadLockStrategy - Cannot acquire read lock within 2000 millis. Will skip the file
How can I solve this ?
here is the error :
> 2017-10-10 11:03:00.882 [Camel (incomingFileHandlerCamelContext)
> thread #1 -
> file:///inbal/Vaults/Swiftnesstest/Distribution/Pension_Gemel/Interfaces/In]
> ERROR org.apache.camel.processor.DefaultErrorHandler - Failed delivery
> for (MessageId: a409d31f-9c38-40a0-8874-578e29de46c5 on ExchangeId:
> dfe13fc7-750f-4295-9a3a-57d31e9f198f). Exhausted after delivery
> attempt: 1 caught: org.apache.camel.InvalidPayloadException: No body
> available of type: java.lang.String but has value:
> GenericFile[/inbal/Vaults/Swiftnesstest/Distribution/Pension_Gemel/Interfaces/In/���.txt]
> of type: org.apache.camel.component.file.GenericFile on: ���.txt.
> Caused by: Error during type conversion from type: java.lang.String to
> the required type: byte[] with value [Body is file based:
> GenericFile[/inbal/Vaults/Swiftnesstest/Distribution/Pension_Gemel/Interfaces/In/���.txt]]
> due java.io.FileNotFoundException:
> /inbal/Vaults/Swiftnesstest/Distribution/Pension_Gemel/Interfaces/In/���.txt
> (No such file or directory).
> Exchange[dfe13fc7-750f-4295-9a3a-57d31e9f198f]. Caused by:
> [org.apache.camel.TypeConversionException - Error during type
> conversion from type: java.lang.String to the required type: byte[]
> with value [Body is file based:
> GenericFile[/inbal/Vaults/Swiftnesstest/Distribution/Pension_Gemel/Interfaces/In/���.txt]]
> due java.io.FileNotFoundException:
> /inbal/Vaults/Swiftnesstest/Distribution/Pension_Gemel/Interfaces/In/���.txt
> (No such file or directory)]

Related

I have issue JSONDecodeError at /profile

JSONDecodeError at /profile
Expecting value: line 1 column 1 (char 0)
Request Method: POST
Request URL: http://127.0.0.1:8000/profile
Django Version: 3.2.6
Exception Type: JSONDecodeError
Exception Value:
Expecting value: line 1 column 1 (char 0)
Exception Location: C:\Users\bismi\AppData\Local\Programs\Python\Python310\lib\json\decoder.py, line 355, in raw_decode
Python Executable: C:\Users\bismi\AppData\Local\Programs\Python\Python310\python.exe
Python Version: 3.10.6
Python Path:
['C:\Users\bismi\OneDrive\Desktop\connectyfi modftn\connectyfi',
'C:\Users\bismi\AppData\Local\Programs\Python\Python310\python310.zip',
'C:\Users\bismi\AppData\Local\Programs\Python\Python310\DLLs',
'C:\Users\bismi\AppData\Local\Programs\Python\Python310\lib',
'C:\Users\bismi\AppData\Local\Programs\Python\Python310',
'C:\Users\bismi\AppData\Local\Programs\Python\Python310\lib\site-packages']

Rest API throws JSON parsing error: Exception during JSON parsing at row: 1 column: 1 buffer

I am using Rest API and when I use Rest.put(), it throws an error. It does not even reach the server at all. I don't know where I am going wrong.
Here is my code:
Response<String> res = Rest.put(URLLinks.getMainBackend() + "items")
.body(reqJson.toString())
.jsonContent()
.bearer(initForm.data.getString("jwt"))
.header("token", initForm.data.getString("token"))
.pathParam("id", item.getId())
.onErrorCodeJSON((errorData) -> {
if (errorData.getResponseCode() == 404) {
Dialog dlg = rich.Dialog("Not found!");
Button yes = new Button("Close");
yes.addActionListener(ev -> {
dlg.dispose();
});
dlg.add(new SpanLabel("//////!"));
dlg.add(FlowLayout.encloseRight(yes));
dlg.showPacked(BorderLayout.CENTER, true);
}else if (errorData.getResponseCode() == 402){
}
})
.getAsString();
It throws an error:
java.io.IOException: Stream closed
[Network Thread] 0:0:12,855 - Codename One revisions: 4afb54f6a5cecd2b6fbee170262d5c3c8d9431f9
[Network Thread] 0:0:12,855 - Exception: java.io.IOException - Stream closed
[Network Thread] 0:0:12,858 - Exception during JSON parsing at row: 1 column: 1 buffer:
[EDT] 0:0:12,874 - Exception: java.lang.NullPointerException - null
at com.codename1.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:140)
at com.codename1.io.BufferedInputStream.read1(BufferedInputStream.java:338)
at com.codename1.io.BufferedInputStream.read(BufferedInputStream.java:445)
at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:185)
at com.codename1.io.JSONParser$ReaderClass.read(JSONParser.java:124)
at com.codename1.io.JSONParser.parse(JSONParser.java:188)
at com.codename1.io.JSONParser.parseJSON(JSONParser.java:475)
at com.codename1.io.rest.RequestBuilder$Connection.readUnzipedResponse(RequestBuilder.java:683)
at com.codename1.io.gzip.GZConnectionRequest.readResponse(GZConnectionRequest.java:67)
at com.codename1.io.ConnectionRequest.performOperation(ConnectionRequest.java:809)
at com.codename1.io.NetworkManager$NetworkThread.run(NetworkManager.java:282)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
java.lang.NullPointerException
at java.base/java.lang.String.<init>(String.java:537)
at com.codename1.io.rest.RequestBuilder.getAsString(RequestBuilder.java:361)
at com.falcontechnology.items.NewItem.backendItem(NewItem.java:425)
at com.falcontechnology.items.NewItem.lambda$itemFields$7(NewItem.java:296)
at com.codename1.ui.util.EventDispatcher.fireActionEvent(EventDispatcher.java:349)
at com.codename1.ui.Button.fireActionEvent(Button.java:570)
at com.codename1.ui.Button.released(Button.java:604)
at com.codename1.ui.Button.pointerReleased(Button.java:708)
at com.codename1.ui.Form.pointerReleased(Form.java:3356)
at com.codename1.ui.Component.pointerReleased(Component.java:4552)
at com.codename1.ui.Display.handleEvent(Display.java:2080)
at com.codename1.ui.Display.edtLoopImpl(Display.java:1052)
at com.codename1.ui.Display.mainEDTLoop(Display.java:970)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
The null pointer on line NewItem.java:425 points at the line where there is .getAsString().
What could i be doing wrong?
EDIT
I have updated my project libraries which solved the null pointer exception on .getAsString() but it still leaves another error which is:
java.io.IOException: Stream closed
[Network Thread] 0:0:54,316 - Exception: java.io.IOException - Stream closed
[Network Thread] 0:0:54,344 - Exception during JSON parsing at row: 1 column: 1 buffer:
at com.codename1.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:140)
at com.codename1.io.BufferedInputStream.read1(BufferedInputStream.java:338)
at com.codename1.io.BufferedInputStream.read(BufferedInputStream.java:445)
at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:185)
at com.codename1.io.JSONParser$ReaderClass.read(JSONParser.java:191)
at com.codename1.io.JSONParser.parse(JSONParser.java:278)
at com.codename1.io.JSONParser.parseJSON(JSONParser.java:568)
at com.codename1.io.rest.RequestBuilder$Connection.readUnzipedResponse(RequestBuilder.java:785)
at com.codename1.io.gzip.GZConnectionRequest.readResponse(GZConnectionRequest.java:67)
at com.codename1.io.ConnectionRequest.performOperationComplete(ConnectionRequest.java:1002)
at com.codename1.io.NetworkManager$NetworkThread.run(NetworkManager.java:340)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
Apparently when you use .pathparam(), you also have to add the parameter in the url. Hence I adjusted my code to:
Response<String> res = Rest.put(URLLinks.getMainBackend() + "items"+item.getId())
.body(reqJson.toString())
.jsonContent()
.bearer(initForm.data.getString("jwt"))
.header("token", initForm.data.getString("token"))
.pathParam("id", item.getId())
.onErrorCodeJSON((errorData) -> {
if (errorData.getResponseCode() == 404) {
Dialog dlg = rich.Dialog("Not found!");
Button yes = new Button("Close");
yes.addActionListener(ev -> {
dlg.dispose();
});
dlg.add(new SpanLabel("//////!"));
dlg.add(FlowLayout.encloseRight(yes));
dlg.showPacked(BorderLayout.CENTER, true);
}else if (errorData.getResponseCode() == 402){
}
})
.getAsString();

Spark throws serialization exception when reading from MS SQL source using predicates for partitioning

I have written a Scala program for reading data from large tables in MS SQL Server and writing them to BigQuery. I have issues getting partitioning to work using the "partitionColumn" option in the JDBC driver (see my other post here: a link), and have therefore tried switching to using predicates instead. This throws an exception though, which I can't figure out.
This is the code:
val predicates = Array[String]("entityid < 20000"
, "entityid >= 20000 && entityid < 40000"
, "entityid >= 40000 && entityid < 60000"
, "entityid >= 60000 && entityid < 80000"
, "entityid >= 80000 && entityid < 100000"
, "entityid >= 100000 && entityid < 120000"
, "entityid >= 120000 && entityid < 140000"
, "entityid >= 140000 && entityid < 160000"
, "entityid >= 160000 && entityid < 180000"
, "entityid >= 180000")
val result = ss.read.jdbc(
getJdbcUrl(hostName, port, databaseName)
, tablename
, predicates
, getConnection(user, password))
This is how I run the job:
gcloud dataproc jobs submit spark \
--cluster my-cluster \
--region europe-north1 \
--jars gs://mybucket/mycode.jar,gs://hadoop-lib/bigquery/bigquery-connector-hadoop3-latest.jar \
--class Main \
--properties \
spark.executor.memory=19g,\
spark.executor.cores=4,\
spark.executor.instances=11 \
-- yarn
And this is the exception I get (a lot of):
19/07/31 07:49:18 WARN org.apache.spark.scheduler.TaskSetManager: Lost task 5.0 in stage 7.0 (TID 12, odsengine-cluster-w-0.europe-north1-b.c.velliv-dwh-development.internal, executor 4): UnknownReason
19/07/31 07:49:18 WARN org.apache.spark.ThrowableSerializationWrapper: Task exception could not be deserialized
java.io.InvalidClassException: com.microsoft.sqlserver.jdbc.SQLServerException; local class incompatible: stream classdesc serialVersionUID = 6734015607512574479, local class serialVersionUID = -2195310557661496761
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:699)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1885)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1751)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2042)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
at org.apache.spark.ThrowableSerializationWrapper.readObject(TaskEndReason.scala:193)
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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1170)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2178)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2287)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2211)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2069)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
at org.apache.spark.serializer.JavaDeserializationStream.readObject(JavaSerializer.scala:75)
at org.apache.spark.serializer.JavaSerializerInstance.deserialize(JavaSerializer.scala:114)
at org.apache.spark.scheduler.TaskResultGetter$$anon$4$$anonfun$run$2.apply$mcV$sp(TaskResultGetter.scala:136)
at org.apache.spark.scheduler.TaskResultGetter$$anon$4$$anonfun$run$2.apply(TaskResultGetter.scala:132)
at org.apache.spark.scheduler.TaskResultGetter$$anon$4$$anonfun$run$2.apply(TaskResultGetter.scala:132)
at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1945)
at org.apache.spark.scheduler.TaskResultGetter$$anon$4.run(TaskResultGetter.scala:132)
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)
Any suggestions as to what the problem could be?
This could be a shading problem. Are you marking bigquery-connector jar as provided while building mycode.jar? You can refer to this for some examples.

Camel 2.21.0 - how to process on exception with streaming

I would like to log an error on exception and continue on next record/split, but it does not work.
I tired OnExcepiton(), doTry() DSL but it does not work and goes to ErrorHandler.
onException(IOException.class)
.handled(true).process(exchange -> log.error("error!!"));
from("file:" + rootDir + "/" + account + "/inbox/?move=.done")
.unmarshal(csvDataFormat)
.split(body()).shareUnitOfWork().parallelProcessing().streaming()
.process(fileService)
.end()
Logs:
2018-07-18 14:01:59.883 DEBUG 45137 --- [/test1/request/] o.a.camel.processor.MulticastProcessor : Parallel processing failed due IOException reading next record: java.io.IOException: (line 4) invalid char between encapsulated token and delimiter
2018-07-18 14:01:59.885 ERROR 45137 --- [/test1/request/] o.a.camel.processor.DeadLetterChannel : Failed delivery for (MessageId: ID-**********-local-1531936914834-0-3 on ExchangeId: ID-*********-local-1531936914834-0-4). On delivery attempt: 0 caught: java.lang.IllegalStateException: IOException reading next record: java.io.IOException: (line 4) invalid char between encapsulated token and delimiter
#Bedla, Thank you for your input, I found this working for my UseCase,
Using onException() was still sending exchange to
DeadLetterChannel, so had to use doTry()
CasvFormat with using
maps - I couldn't modify csvFormat in process, so had to
read header from file and append csv header in body on each split using setBody
Full Route Definition:
CsvDataFormat csvDataFormat = new CsvDataFormat().setUseMaps(true);
from("file:" + rootDir + "/test/")
.log(LoggingLevel.INFO,"Start processing ${file:name}")
.unmarshal().pgp(pgpFileName,pgpUserId,pgpPassword)
.process(exchange -> { /* just to get csv header */
InputStream inputStream = exchange.getIn().getBody(InputStream.class);
try(BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream))){
String header = bufferedReader.readLine();
exchange.getIn().setHeader("CSV_HEADER",header);
csvDataFormat.setHeader(header.split(",")); //<- this does not work, so had to add in body below!
System.out.println("csvHeader is : " + header);// + " ? " + Arrays.asList(csvDataFormat.getHeader()));
}
})
.split(body().tokenize("\n")).shareUnitOfWork()
.parallelProcessing().streaming()
.setBody(exchange -> exchange.getIn().getHeader("CSV_HEADER") + "\n" + exchange.getIn().getBody())
.doTry()
.unmarshal(csvDataFormat)
.process(requestFileService)
.doCatch(IOException.class)
//TODO: custom processing here...
.process(exchange -> log.error("caught in dotry: " + exchange.getIn().getBody())).stop()
.end()//end try/catch
.choice()
.when(simple("${property." + Exchange.SPLIT_COMPLETE + "} == true"))
.log(LoggingLevel.INFO, "Finished processing ${file:name}")
.end();

Hybris - I can't start the server due to some unknown error

I tried doing ant build, ant clean all, SVN checkout a clean one and redownload a copy on my work's file server. It works fine on other machines (my workmates) but to me it can't seem to start after hybrisserver.bat and I can't find the problem.
I think this might be related to the Solr server.
This is some of the console messages that appears:
> at de.hybris.platform.core.Registry.startup(Registry.java:422)
> at de.hybris.platform.spring.HybrisContextLoaderListener.startRegistry(H
> ybrisContextLoaderListener.java:237)
> at de.hybris.platform.spring.HybrisContextLoaderListener.doInitWebApplic
> ationContext(HybrisContextLoaderListener.java:135)
> at de.hybris.platform.spring.HybrisContextLoaderListener.initWebApplicat
> ionContext(HybrisContextLoaderListener.java:125)
> at org.springframework.web.context.ContextLoaderListener.contextInitiali
> zed(ContextLoaderListener.java:106)
> at de.hybris.platform.spring.HybrisContextLoaderListener.contextInitiali
> zed(HybrisContextLoaderListener.java:80)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
> t.java:5016)
> at org.apache.catalina.core.StandardContext.startInternal(StandardContex
> t.java:5524)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
> java:1575)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
> java:1565)
> 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) INFO [localhost-startStop-1] [HybrisContextFactory] Initializing <<global>>
> Spr ing ApplicationContext took: (22.52 I¼s)
> de.hybris.platform.core.UninstantiableCoreApplicationContextException:
> Error cre ating Spring application context.
> at de.hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.j
> ava:728)
> at de.hybris.platform.core.AbstractTenant.doStartUp(AbstractTenant.java:
> 658)
> at de.hybris.platform.core.Registry.assureTenantStarted(Registry.java:63
> 9)
> at de.hybris.platform.core.Registry.activateTenant(Registry.java:700)
> at de.hybris.platform.core.Registry.setCurrentTenant(Registry.java:544)
> at de.hybris.platform.core.Registry.activateMasterTenant(Registry.java:6
> 07)
> at de.hybris.platform.core.Registry.startup(Registry.java:422)
> at de.hybris.platform.spring.HybrisContextLoaderListener.startRegistry(H
> ybrisContextLoaderListener.java:237)
> at de.hybris.platform.spring.HybrisContextLoaderListener.doInitWebApplic
> ationContext(HybrisContextLoaderListener.java:135)
> at de.hybris.platform.spring.HybrisContextLoaderListener.initWebApplicat
> ionContext(HybrisContextLoaderListener.java:125)
> at org.springframework.web.context.ContextLoaderListener.contextInitiali
> zed(ContextLoaderListener.java:106)
> at de.hybris.platform.spring.HybrisContextLoaderListener.contextInitiali
> zed(HybrisContextLoaderListener.java:80)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
> t.java:5016)
> at org.apache.catalina.core.StandardContext.startInternal(StandardContex
> t.java:5524)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
> java:1575)
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
> java:1565)
> 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: org.springframework.beans.FatalBeanException: Context hybris Global C
> ontext Factory couldn't be created correctly due to, Error creating
> bean with name 'defaultSolrServerService' defined in class path
> resource [global-solrserve r-spring.xml]: Invocation of init method
> failed; nested exception is de.hybris.p
> latform.solrserver.SolrServerException: Error while executing Solr
> start command for instance: [name: default, port: 8983]
> at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFacto
> ry.java:317)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ldSelf(HybrisContextFactory.java:189)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ld(HybrisContextFactory.java:175)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(H
> ybrisContextHolder.java:134)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisC
> ontextHolder.java:113)
> at de.hybris.platform.core.HybrisContextHolder.getAppCtxFactory(HybrisCo
> ntextHolder.java:164)
> at de.hybris.platform.core.HybrisContextHolder.getApplicationInstance(Hy
> brisContextHolder.java:90)
> at de.hybris.platform.core.AbstractTenant.createCoreApplicationContext(A
> bstractTenant.java:686)
> at de.hybris.platform.core.AbstractTenant.doStartupSafe(AbstractTenant.j
> ava:724)
> ... 20 more Error creating Spring application context. Shutting down hybris platform since t he system cannot be used without
> working Spring context... shutting down hybris registry.. INFO
> [Thread-1] [HybrisContextFactory] Initializing <<global>> Spring
> Applicati onContext took: (16.99 I¼s) ERROR [Thread-1] [JMXBeanLoader]
> Can't unregister jmxbeans on shutdown of the te nant <<master>>
> org.springframework.beans.FatalBeanException: Context hybris Global
> Context Fact ory couldn't be created correctly due to, Error
> creating bean with name 'defau ltSolrServerService' defined in class
> path resource [global-solrserver-spring.xm l]: Invocation of init
> method failed; nested exception is de.hybris.platform.sol
> rserver.SolrServerException: Error while executing Solr start command
> for instan ce: [name: default, port: 8983]
> at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFacto
> ry.java:317)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ldSelf(HybrisContextFactory.java:189)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ld(HybrisContextFactory.java:175)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(H
> ybrisContextHolder.java:134)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisC
> ontextHolder.java:113)
> at de.hybris.platform.core.Registry.getSingletonGlobalApplicationContext
> (Registry.java:1059)
> at de.hybris.platform.core.JMXBeanLoader.getMBeanRegistry(JMXBeanLoader.
> java:155)
> at de.hybris.platform.core.JMXBeanLoader.beforeTenantShutDown(JMXBeanLoa
> der.java:116)
> at de.hybris.platform.core.AbstractTenant.notifyTenantListenersBeforeShu
> tdown(AbstractTenant.java:1236)
> at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java
> :987)
> at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java
> :948)
> at de.hybris.platform.core.Registry.destroy(Registry.java:309)
> at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.
> java:74)
> at de.hybris.platform.util.RedeployUtilities$1.run(RedeployUtilities.jav
> a:38) error notifying tenant listener : null
> java.lang.NullPointerException
> at de.hybris.platform.jalo.JaloConnection$AbstractSynchronizedPropertyGe
> tter.get(JaloConnection.java:1142)
> at de.hybris.platform.jalo.JaloConnection.getExtensionManager(JaloConnec
> tion.java:1084)
> at de.hybris.platform.mobileservices.jalo.MobileManager.getInstance(Mobi
> leManager.java:130)
> at de.hybris.platform.mobileservices.jalo.MobileManager$1.beforeTenantSh
> utDown(MobileManager.java:92)
> at de.hybris.platform.core.AbstractTenant.notifyTenantListenersBeforeShu
> tdown(AbstractTenant.java:1236)
> at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java
> :987)
> at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java
> :948)
> at de.hybris.platform.core.Registry.destroy(Registry.java:309)
> at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.
> java:74)
> at de.hybris.platform.util.RedeployUtilities$1.run(RedeployUtilities.jav
> a:38) INFO [Thread-1] [HybrisContextFactory] Initializing <<global>>
> Spring Applicati onContext took: (22.52 I¼s) ERROR [Thread-1]
> [RegionCacheAdapter] Unable to clear cache. Failed on region nu ll.
> Last key null null org.springframework.beans.FatalBeanException:
> Context hybris Global Context Fact ory couldn't be created correctly
> due to, Error creating bean with name 'defau ltSolrServerService'
> defined in class path resource [global-solrserver-spring.xm l]:
> Invocation of init method failed; nested exception is
> de.hybris.platform.sol rserver.SolrServerException: Error while
> executing Solr start command for instan ce: [name: default, port:
> 8983]
> at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFacto
> ry.java:317)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ldSelf(HybrisContextFactory.java:189)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ld(HybrisContextFactory.java:175)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(H
> ybrisContextHolder.java:134)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisC
> ontextHolder.java:113)
> at de.hybris.platform.core.Registry.getSingletonGlobalApplicationContext
> (Registry.java:1059)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.getController(Region
> CacheAdapter.java:76)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.clear(RegionCacheAda
> pter.java:288)
> at de.hybris.platform.core.AbstractTenant.shutdownCache(AbstractTenant.j
> ava:1061)
> at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java
> :1003)
> at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java
> :948)
> at de.hybris.platform.core.Registry.destroy(Registry.java:309)
> at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.
> java:74)
> at de.hybris.platform.util.RedeployUtilities$1.run(RedeployUtilities.jav
> a:38) org.springframework.beans.FatalBeanException: Context hybris
> Global Context Fact ory couldn't be created correctly due to, Error
> creating bean with name 'defau ltSolrServerService' defined in class
> path resource [global-solrserver-spring.xm l]: Invocation of init
> method failed; nested exception is de.hybris.platform.sol
> rserver.SolrServerException: Error while executing Solr start command
> for instan ce: [name: default, port: 8983]
> at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFacto
> ry.java:317)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ldSelf(HybrisContextFactory.java:189)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ld(HybrisContextFactory.java:175)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(H
> ybrisContextHolder.java:134)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisC
> ontextHolder.java:113)
> at de.hybris.platform.core.Registry.getSingletonGlobalApplicationContext
> (Registry.java:1059)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.getController(Region
> CacheAdapter.java:76)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.clear(RegionCacheAda
> pter.java:288)
> at de.hybris.platform.core.AbstractTenant.shutdownCache(AbstractTenant.j
> ava:1061)
> at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java
> :1003)
> at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java
> :948)
> at de.hybris.platform.core.Registry.destroy(Registry.java:309)
> at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.
> java:74)
> at de.hybris.platform.util.RedeployUtilities$1.run(RedeployUtilities.jav
> a:38) INFO [Thread-1] [HybrisContextFactory] Initializing <<global>>
> Spring Applicati onContext took: (10.27 I¼s) ERROR [Thread-1]
> [RegionCacheAdapter] Unable to clear cache. Failed on region nu ll.
> Last key null null org.springframework.beans.FatalBeanException:
> Context hybris Global Context Fact ory couldn't be created correctly
> due to, Error creating bean with name 'defau ltSolrServerService'
> defined in class path resource [global-solrserver-spring.xm l]:
> Invocation of init method failed; nested exception is
> de.hybris.platform.sol rserver.SolrServerException: Error while
> executing Solr start command for instan ce: [name: default, port:
> 8983]
> at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFacto
> ry.java:317)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ldSelf(HybrisContextFactory.java:189)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ld(HybrisContextFactory.java:175)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(H
> ybrisContextHolder.java:134)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisC
> ontextHolder.java:113)
> at de.hybris.platform.core.Registry.getSingletonGlobalApplicationContext
> (Registry.java:1059)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.getController(Region
> CacheAdapter.java:76)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.clear(RegionCacheAda
> pter.java:288)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.destroy(RegionCacheA
> dapter.java:521)
> at de.hybris.platform.core.AbstractTenant.shutdownCache(AbstractTenant.j
> ava:1071)
> at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java
> :1003)
> at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java
> :948)
> at de.hybris.platform.core.Registry.destroy(Registry.java:309)
> at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.
> java:74)
> at de.hybris.platform.util.RedeployUtilities$1.run(RedeployUtilities.jav
> a:38) org.springframework.beans.FatalBeanException: Context hybris
> Global Context Fact ory couldn't be created correctly due to, Error
> creating bean with name 'defau ltSolrServerService' defined in class
> path resource [global-solrserver-spring.xm l]: Invocation of init
> method failed; nested exception is de.hybris.platform.sol
> rserver.SolrServerException: Error while executing Solr start command
> for instan ce: [name: default, port: 8983]
> at de.hybris.platform.core.HybrisContextFactory.build(HybrisContextFacto
> ry.java:317)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ldSelf(HybrisContextFactory.java:189)
> at de.hybris.platform.core.HybrisContextFactory$GlobalContextFactory.bui
> ld(HybrisContextFactory.java:175)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstanceCached(H
> ybrisContextHolder.java:134)
> at de.hybris.platform.core.HybrisContextHolder.getGlobalInstance(HybrisC
> ontextHolder.java:113)
> at de.hybris.platform.core.Registry.getSingletonGlobalApplicationContext
> (Registry.java:1059)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.getController(Region
> CacheAdapter.java:76)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.clear(RegionCacheAda
> pter.java:288)
> at de.hybris.platform.cache.impl.RegionCacheAdapter.destroy(RegionCacheA
> dapter.java:521)
> at de.hybris.platform.core.AbstractTenant.shutdownCache(AbstractTenant.j
> ava:1071)
> at de.hybris.platform.core.AbstractTenant.doShutdown(AbstractTenant.java
> :1003)
> at de.hybris.platform.core.AbstractTenant.doShutDown(AbstractTenant.java
> :948)
> at de.hybris.platform.core.Registry.destroy(Registry.java:309)
> at de.hybris.platform.util.RedeployUtilities.shutdown(RedeployUtilities.
> java:74)
> at de.hybris.platform.util.RedeployUtilities$1.run(RedeployUtilities.jav
> a:38) INFO [Thread-1] [DefaultClusterNodeManagementService]
> Unregistering assigned cl uster node id 0... <-- Wrapper Stopped
UPDATE / SOLUTION: The problem is SOLR Server does not allow spaces in directories.
first of all, check all your environment variables if they are correct. Especially JAVA_HOME if it has the correct path. If you still have problems, try stopping the SOLR server: ant stopSolrServer . You can also stop solr from auto-start by adding this in your .properties file.
solrserver.instances.default.autostart=false
You can also try changing the default port
solrserver.instances.default.port=8984
Same issue occure in my case, And i checked, due to some wrong pull or during checkout to different branch, i lost my solr.xml file.
Try to add it back, it will work
I have faced this issue in my 6.2 setup , finally able to resolve this.
This happens due to specifically two JAR that are 'Jackson-core and Jackson-annotations ' ,these jar need to update with their latest versions ( i replaced with the versions 2.9.2)
This resolved the issue for me !
Same error occurred for me due to previous solr server was still occupying the port 8983. I tried stopping solrserver but it did not help then I used the following command to list all the open ports:
lsof -PiTCP -sTCP:LISTEN
and then killed the java pid which was listening on 8983.
kill <pid>
Yes. I did. Added solrserver.instances.default.autostart=false under my config folder in file local.properties. It worked for me.

Resources