We are currently working on a test script in which my colleague encounters an error when she tries to open my .jmx file. I've pasted the jmeter log file below. So far, we have the same Java versions, JMeter versions and virtually the same installed plugins in JMeter. We have tried opening the .jmx file on other users' JMeter tool and no issue was encountered. Is there a solution to this?
2017/02/09 09:04:00 INFO - jmeter.util.JMeterUtils: Setting Locale to en_US
2017/02/09 09:04:00 INFO - jmeter.JMeter: Loading user properties from: C:\apache-jmeter-3.1\bin\user.properties
2017/02/09 09:04:00 INFO - jmeter.JMeter: Loading system properties from: C:\apache-jmeter-3.1\bin\system.properties
2017/02/09 09:04:00 INFO - jmeter.JMeter: Copyright (c) 1998-2016 The Apache Software Foundation
2017/02/09 09:04:00 INFO - jmeter.JMeter: Version 3.1 r1770033
2017/02/09 09:04:00 INFO - jmeter.JMeter: java.version=1.8.0_121
2017/02/09 09:04:00 INFO - jmeter.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2017/02/09 09:04:00 INFO - jmeter.JMeter: os.name=Windows 7
2017/02/09 09:04:00 INFO - jmeter.JMeter: os.arch=amd64
2017/02/09 09:04:00 INFO - jmeter.JMeter: os.version=6.1
2017/02/09 09:04:00 INFO - jmeter.JMeter: file.encoding=Cp1252
2017/02/09 09:04:00 INFO - jmeter.JMeter: Max memory =523763712
2017/02/09 09:04:00 INFO - jmeter.JMeter: Available Processors =4
2017/02/09 09:04:00 INFO - jmeter.JMeter: Default Locale=English (United States)
2017/02/09 09:04:00 INFO - jmeter.JMeter: JMeter Locale=English (United States)
2017/02/09 09:04:00 INFO - jmeter.JMeter: JMeterHome=C:\apache-jmeter-3.1
2017/02/09 09:04:00 INFO - jmeter.JMeter: user.dir =C:\apache-jmeter-3.1\bin
2017/02/09 09:04:00 INFO - jmeter.JMeter: PWD =C:\apache-jmeter-3.1\bin
2017/02/09 09:04:00 INFO - jmeter.gui.action.LookAndFeelCommand: Using look and feel: javax.swing.plaf.metal.MetalLookAndFeel [Metal, CrossPlatform]
2017/02/09 09:04:00 INFO - jmeter.JMeter: Loaded icon properties from org/apache/jmeter/images/icon.properties
2017/02/09 09:04:01 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2017/02/09 09:04:01 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2017/02/09 09:04:03 INFO - org.jmeterplugins.repository.PluginManager: Plugins Status: [jpgc-graphs-basic=0.0.0-STOCK, jpgc-graphs-additional=0.0.0-STOCK, jpgc-autostop=0.0.0-STOCK, jpgc-sense=0.0.0-STOCK, jpgc-cmd=0.0.0-STOCK, jpgc-graphs-composite=0.0.0-STOCK, jpgc-csl=0.0.0-STOCK, jpgc-functions=0.0.0-STOCK, jpgc-casutg=0.0.0-STOCK, jpgc-dbmon=0.0.0-STOCK, jpgc-graphs-dist=0.0.0-STOCK, jpgc-dummy=0.0.0-STOCK, jmeter-ftp=3.1, jpgc-filterresults=0.0.0-STOCK, jpgc-ffw=0.0.0-STOCK, jpgc-ggl=0.0.0-STOCK, jmeter-http=3.1, jpgc-httpraw=0.0.0-STOCK, jpgc-sts=0.0.0-STOCK, jpgc-fifo=0.0.0-STOCK, jmeter-jdbc=3.1, jpgc-jms=0.0.0-STOCK, jmeter-jms=3.1, jpgc-jmxmon=0.0.0-STOCK, jmeter-monitors=3.1, jmeter-core=3.1, jpgc-json=2.5, jmeter-junit=3.1, jmeter-java=3.1, jpgc-graphs-vs=0.0.0-STOCK, jmeter-ldap=3.1, jpgc-lockfile=0.0.0-STOCK, jmeter-mail=3.1, jpgc-mergeresults=0.0.0-STOCK, jmeter-mongodb=3.1, jpgc-oauth=0.0.0-STOCK, jmeter-native=3.1, jpgc-pde=0.0.0-STOCK, jpgc-prmctl=0.0.0-STOCK, jpgc-perfmon=0.0.0-STOCK, jpgc-plugins-manager=0.11, jpgc-redis=0.0.0-STOCK, jpgc-synthesis=0.0.0-STOCK, jmeter-tcp=3.1, jpgc-plancheck=0.0.0-STOCK, jpgc-tst=0.0.0-STOCK, jpgc-udp=0.0.0-STOCK, jpgc-csvars=0.0.0-STOCK, jmeter-components=3.1, jpgc-wsc=0.0.0-STOCK, jpgc-xml=0.0.0-STOCK, jpgc-standard=2.0]
2017/02/09 09:04:05 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.assertions.BSFAssertion
2017/02/09 09:04:05 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.extractor.BSFPostProcessor
2017/02/09 09:04:05 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.modifiers.BSFPreProcessor
2017/02/09 09:04:05 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2017/02/09 09:04:05 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2017/02/09 09:04:05 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2017/02/09 09:04:05 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2017/02/09 09:04:05 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2017/02/09 09:04:05 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser
2017/02/09 09:04:05 INFO - jorphan.exec.KeyToolUtils: keytool found at 'C:\Program Files\Java\jre1.8.0_121\bin\keytool'
2017/02/09 09:04:05 INFO - jmeter.protocol.http.proxy.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file C:\apache-jmeter-3.1\bin\proxyserver.jks
2017/02/09 09:04:06 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.java.sampler.BSFSampler
2017/02/09 09:04:06 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.mongodb.config.MongoSourceElement
2017/02/09 09:04:06 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.mongodb.sampler.MongoScriptSampler
2017/02/09 09:04:06 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.timers.BSFTimer
2017/02/09 09:04:06 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.visualizers.BSFListener
2017/02/09 09:04:06 INFO - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.visualizers.MonitorHealthVisualizer
2017/02/09 09:04:06 INFO - jmeter.samplers.SampleResult: Note: Sample TimeStamps are START times
2017/02/09 09:04:06 INFO - jmeter.samplers.SampleResult: sampleresult.default.encoding is set to ISO-8859-1
2017/02/09 09:04:06 INFO - jmeter.samplers.SampleResult: sampleresult.useNanoTime=true
2017/02/09 09:04:06 INFO - jmeter.samplers.SampleResult: sampleresult.nanoThreadSleep=5000
2017/02/09 09:04:26 INFO - jmeter.services.FileServer: Default base='C:\apache-jmeter-3.1\bin'
2017/02/09 09:04:26 INFO - jmeter.gui.action.Load: Loading file: C:\M3 BE TA\M3 BE Regression Test Suite\Test Plans\CARAP\PO_GR-IVM.jmx
2017/02/09 09:04:26 INFO - jmeter.services.FileServer: Set new base='C:\M3 BE TA\M3 BE Regression Test Suite\Test Plans\CARAP'
2017/02/09 09:04:27 INFO - jmeter.save.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2
2017/02/09 09:04:27 INFO - jmeter.save.SaveService: Using SaveService properties file encoding UTF-8
2017/02/09 09:04:27 INFO - jmeter.save.SaveService: Using SaveService properties version 3.1
2017/02/09 09:04:27 INFO - jmeter.save.SaveService: All converter versions present and correct
2017/02/09 09:04:27 INFO - jmeter.save.SaveService: Loading file: C:\M3 BE TA\M3 BE Regression Test Suite\Test Plans\CARAP\PO_GR-IVM.jmx
2017/02/09 09:04:27 INFO - jmeter.protocol.http.control.CacheManager: Will only cache the following methods: [GET]
2017/02/09 09:04:27 WARN - jmeter.gui.action.Load: Unexpected error java.lang.IllegalArgumentException: Problem loading XML from:'C:\M3 BE TA\M3 BE Regression Test Suite\Test Plans\CARAP\PO_GR-IVM.jmx', missing class com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception : com.thoughtworks.xstream.converters.ConversionException
cause-message :
first-jmeter-class : org.apache.jmeter.save.converters.TestElementConverter.unmarshal(TestElementConverter.java:107)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jmeter.testelement.property.StringProperty
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree[4]/BeanShellSampler/stringProp
line number : 112
version : 3.1 r1770033
-------------------------------
at org.apache.jmeter.save.SaveService.readTree(SaveService.java:537)
at org.apache.jmeter.save.SaveService.loadTree(SaveService.java:505)
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:130)
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:102)
at org.apache.jmeter.gui.action.Load.doActionAfterCheck(Load.java:89)
at org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest.doAction(AbstractActionWithNoRunningTest.java:45)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:80)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:62)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception : com.thoughtworks.xstream.converters.ConversionException
cause-message :
first-jmeter-class : org.apache.jmeter.save.converters.TestElementConverter.unmarshal(TestElementConverter.java:107)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jmeter.testelement.property.StringProperty
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree[4]/BeanShellSampler/stringProp
line number : 112
version : 3.1 r1770033
-------------------------------
at org.apache.jmeter.save.ScriptWrapperConverter.createConversionException(ScriptWrapperConverter.java:103)
at org.apache.jmeter.save.ScriptWrapperConverter.unmarshal(ScriptWrapperConverter.java:97)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:70)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1230)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1214)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1085)
at org.apache.jmeter.save.SaveService.readTree(SaveService.java:522)
... 22 more
Caused by: com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception : com.thoughtworks.xstream.io.StreamException
cause-message :
class : org.apache.jmeter.testelement.property.StringProperty
required-type : org.apache.jmeter.testelement.property.StringProperty
converter-type : org.apache.jmeter.save.converters.StringPropertyConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree[4]/BeanShellSampler/stringProp
line number : 112
class[1] : org.apache.jmeter.protocol.java.sampler.BeanShellSampler
converter-type[1] : org.apache.jmeter.save.converters.TestElementConverter
class[2] : org.apache.jorphan.collections.ListedHashTree
converter-type[2] : org.apache.jmeter.save.converters.HashTreeConverter
-------------------------------
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:70)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:73)
at org.apache.jmeter.save.converters.TestElementConverter.unmarshal(TestElementConverter.java:107)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:70)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:73)
at org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:70)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:73)
at org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:70)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:73)
at org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:70)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at org.apache.jmeter.save.ScriptWrapperConverter.unmarshal(ScriptWrapperConverter.java:95)
... 32 more
Caused by: com.thoughtworks.xstream.io.StreamException:
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:124)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:135)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.getValue(AbstractPullReader.java:180)
at com.thoughtworks.xstream.io.ReaderWrapper.getValue(ReaderWrapper.java:48)
at org.apache.jmeter.save.converters.ConversionHelp.getPropertyValue(ConversionHelp.java:245)
at org.apache.jmeter.save.converters.StringPropertyConverter.unmarshal(StringPropertyConverter.java:62)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
... 60 more
Caused by: org.xmlpull.v1.XmlPullParserException: unexpected character in markup < (position: START_TAG seen ...oice match on line level with internal and external line charge\n<<... #112:3)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1261)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
... 67 more
confirming that this issue has been resolved. The .jmx file was corrupted and my colleague just deleted it and performed an SVN update. The script now works fine. Thanks for the help guys!
Related
What is wrong with this Config ? I am not able to overwrite an existing file in the sftp server location (new and old file name are the same). the directory has 777 as chmod too. I have added the error logs below. I have attached the atmoz dockercompose file for you to analyze this issue.
#Bean
#ServiceActivator(inputChannel = "toSftpChannel")
public MessageHandler toSftpChannelHandler() {
SftpOutboundGateway sftpOutboundGateway =
new SftpOutboundGateway(
sftpDestinationSessionFactory(),
AbstractRemoteFileOutboundGateway.Command.PUT.getCommand(),
"headers['remote-target-dir']");
sftpOutboundGateway.setRemoteDirectoryExpression(PARSER.parseExpression("headers['remote-target-dir']"));
sftpOutboundGateway.setUseTemporaryFileName(true);
sftpOutboundGateway.setTemporaryFileSuffix(".temp");
sftpOutboundGateway.setFileExistsMode(FileExistsMode.REPLACE);
sftpOutboundGateway.setOutputChannelName("deleteLocalFilesChannel");
sftpOutboundGateway.setAdviceChain(List.of(retryAdvice));
return sftpOutboundGateway;
}
file_remoteFile=SampleIntegrationFile.txt, timestamp=1675720242276}]
2023-02-07T07:55:18.854+10:00 INFO 9752 --- [ scheduling-1] c.d.s.sftpTosftp.middle.ProcessMessage : Input File Path: C:\tmp\sftp-inbound\sftpToSftpData\SampleIntegrationFile.txt
2023-02-07T07:55:18.854+10:00 INFO 9752 --- [ scheduling-1] c.d.s.sftpTosftp.middle.ProcessMessage : Input File Headers: [file_remoteHostPort=localhost:22, file_name=SampleIntegrationFile.txt, file_remoteDirectory=//sftp/Outgoing/sftpToSftp/, file_originalFile=\tmp\sftp-inbound\sftpToSftpData\SampleIntegrationFile.txt, id=35841395-ac31-6636-966c-fc3cc0d04329, file_relativePath=SampleIntegrationFile.txt, file_remoteFile=SampleIntegrationFile.txt, timestamp=1675720518854]
2023-02-07T07:55:18.854+10:00 DEBUG 9752 --- [ scheduling-1] o.s.retry.support.RetryTemplate : Retry: count=0
2023-02-07T07:55:21.891+10:00 DEBUG 9752 --- [ scheduling-1] o.s.retry.support.RetryTemplate : Checking for rethrow: count=1
2023-02-07T07:55:21.891+10:00 DEBUG 9752 --- [ scheduling-1] o.s.retry.support.RetryTemplate : Retry: count=1
2023-02-07T07:55:21.916+10:00 WARN 9752 --- []-nio2-thread-2] o.a.s.c.k.AcceptAllServerKeyVerifier : Server at localhost/127.0.0.1:22 presented unverified RSA key: SHA256:kQ7FBDG5+ZBmGHEsYW4RQmhmKHptYsN0MsAeQ7Cx1So
2023-02-07T07:55:22.014+10:00 WARN 9752 --- [-nio2-thread-13] o.a.s.c.session.ClientConnectionService : globalRequest(ClientConnectionService[ClientSessionImpl[admin#localhost/127.0.0.1:22]])[hostkeys-00#openssh.com, want-reply=false] failed (SshException) to process: EdDSA provider not supported
2023-02-07T07:55:25.250+10:00 DEBUG 9752 --- [ scheduling-1] o.s.retry.support.RetryTemplate : Checking for rethrow: count=2
2023-02-07T07:55:25.250+10:00 DEBUG 9752 --- [ scheduling-1] o.s.retry.support.RetryTemplate : Retry: count=2
2023-02-07T07:55:25.271+10:00 WARN 9752 --- []-nio2-thread-4] o.a.s.c.k.AcceptAllServerKeyVerifier : Server at localhost/127.0.0.1:22 presented unverified RSA key: SHA256:kQ7FBDG5+ZBmGHEsYW4RQmhmKHptYsN0MsAeQ7Cx1So
2023-02-07T07:55:25.327+10:00 WARN 9752 --- [-nio2-thread-13] o.a.s.c.session.ClientConnectionService : globalRequest(ClientConnectionService[ClientSessionImpl[admin#localhost/127.0.0.1:22]])[hostkeys-00#openssh.com, want-reply=false] failed (SshException) to process: EdDSA provider not supported
2023-02-07T07:55:28.561+10:00 DEBUG 9752 --- [ scheduling-1] o.s.retry.support.RetryTemplate : Checking for rethrow: count=3
2023-02-07T07:55:28.561+10:00 DEBUG 9752 --- [ scheduling-1] o.s.retry.support.RetryTemplate : Retry: count=3
2023-02-07T07:55:28.584+10:00 WARN 9752 --- []-nio2-thread-8] o.a.s.c.k.AcceptAllServerKeyVerifier : Server at localhost/127.0.0.1:22 presented unverified RSA key: SHA256:kQ7FBDG5+ZBmGHEsYW4RQmhmKHptYsN0MsAeQ7Cx1So
2023-02-07T07:55:28.683+10:00 WARN 9752 --- [-nio2-thread-13] o.a.s.c.session.ClientConnectionService : globalRequest(ClientConnectionService[ClientSessionImpl[admin#localhost/127.0.0.1:22]])[hostkeys-00#openssh.com, want-reply=false] failed (SshException) to process: EdDSA provider not supported
2023-02-07T07:55:31.958+10:00 DEBUG 9752 --- [ scheduling-1] o.s.retry.support.RetryTemplate : Checking for rethrow: count=4
2023-02-07T07:55:31.958+10:00 DEBUG 9752 --- [ scheduling-1] o.s.retry.support.RetryTemplate : Retry: count=4
2023-02-07T07:55:31.979+10:00 WARN 9752 --- [-nio2-thread-10] o.a.s.c.k.AcceptAllServerKeyVerifier : Server at localhost/127.0.0.1:22 presented unverified RSA key: SHA256:kQ7FBDG5+ZBmGHEsYW4RQmhmKHptYsN0MsAeQ7Cx1So
2023-02-07T07:55:32.072+10:00 WARN 9752 --- [-nio2-thread-13] o.a.s.c.session.ClientConnectionService : globalRequest(ClientConnectionService[ClientSessionImpl[admin#localhost/127.0.0.1:22]])[hostkeys-00#openssh.com, want-reply=false] failed (SshException) to process: EdDSA provider not supported
2023-02-07T07:55:32.315+10:00 DEBUG 9752 --- [ scheduling-1] o.s.retry.support.RetryTemplate : Checking for rethrow: count=5
2023-02-07T07:55:32.315+10:00 DEBUG 9752 --- [ scheduling-1] o.s.retry.support.RetryTemplate : Retry failed last attempt: count=5
2023-02-07T07:55:32.318+10:00 ERROR 9752 --- [ scheduling-1] o.s.integration.handler.LoggingHandler : org.springframework.messaging.MessagingException: Failed to handle, failedMessage=GenericMessage [payload=\tmp\sftp-inbound\sftpToSftpData\SampleIntegrationFile.txt, headers={file_remoteHostPort=localhost:22, file_name=SampleIntegrationFile.txt, file_remoteDirectory=//sftp/Outgoing/sftpToSftp/, remote-target-dir=/sftp/Incoming/sftpToSftp/, file_originalFile=\tmp\sftp-inbound\sftpToSftpData\SampleIntegrationFile.txt, id=cd33b5fa-4fab-93c3-d46a-5955f858ce0a, file_relativePath=\tmp\sftp-inbound\sftpToSftpData\SampleIntegrationFile.txt, file_remoteFile=SampleIntegrationFile.txt, timestamp=1675720518854}]
at org.springframework.integration.handler.advice.AbstractRequestHandlerAdvice$CallbackImpl.cloneAndExecute(AbstractRequestHandlerAdvice.java:175)
at org.springframework.integration.handler.advice.RequestHandlerRetryAdvice.lambda$doInvoke$1(RequestHandlerRetryAdvice.java:86)
at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:329)
at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:255)
at org.springframework.integration.handler.advice.RequestHandlerRetryAdvice.doInvoke(RequestHandlerRetryAdvice.java:86)
at org.springframework.integration.handler.advice.AbstractRequestHandlerAdvice.invoke(AbstractRequestHandlerAdvice.java:67)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:218)
at jdk.proxy3/jdk.proxy3.$Proxy60.handleRequestMessage(Unknown Source)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.doInvokeAdvisedRequestHandler(AbstractReplyProducingMessageHandler.java:155)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:139)
at org.springframework.integration.handler.AbstractMessageHandler.doHandleMessage(AbstractMessageHandler.java:105)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73)
at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:115)
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:133)
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:106)
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:72)
at org.springframework.integration.channel.AbstractMessageChannel.sendInternal(AbstractMessageChannel.java:373)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:327)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:297)
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:187)
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:166)
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47)
at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:109)
at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:484)
at org.springframework.integration.handler.AbstractMessageProducingHandler.doProduceOutput(AbstractMessageProducingHandler.java:339)
at org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput(AbstractMessageProducingHandler.java:268)
at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutputs(AbstractMessageProducingHandler.java:232)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:142)
at org.springframework.integration.handler.AbstractMessageHandler.doHandleMessage(AbstractMessageHandler.java:105)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73)
at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:115)
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:133)
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:106)
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:72)
at org.springframework.integration.channel.AbstractMessageChannel.sendInternal(AbstractMessageChannel.java:373)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:327)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:297)
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:187)
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:166)
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47)
at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:109)
at org.springframework.integration.endpoint.SourcePollingChannelAdapter.handleMessage(SourcePollingChannelAdapter.java:196)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.messageReceived(AbstractPollingEndpoint.java:474)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:460)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.pollForMessage(AbstractPollingEndpoint.java:412)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$createPoller$4(AbstractPollingEndpoint.java:348)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.lambda$execute$0(ErrorHandlingTaskExecutor.java:57)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:55)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$createPoller$5(AbstractPollingEndpoint.java:341)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:96)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.springframework.messaging.MessageDeliveryException: Error handling message for file [C:\tmp\sftp-inbound\sftpToSftpData\SampleIntegrationFile.txt -> SampleIntegrationFile.txt], failedMessage=GenericMessage [payload=\tmp\sftp-inbound\sftpToSftpData\SampleIntegrationFile.txt, headers={file_remoteHostPort=localhost:22, file_name=SampleIntegrationFile.txt, file_remoteDirectory=//sftp/Outgoing/sftpToSftp/, remote-target-dir=/sftp/Incoming/sftpToSftp/, file_originalFile=\tmp\sftp-inbound\sftpToSftpData\SampleIntegrationFile.txt, id=cd33b5fa-4fab-93c3-d46a-5955f858ce0a, file_relativePath=\tmp\sftp-inbound\sftpToSftpData\SampleIntegrationFile.txt, file_remoteFile=SampleIntegrationFile.txt, timestamp=1675720518854}]
at org.springframework.integration.file.remote.RemoteFileTemplate.doSend(RemoteFileTemplate.java:367)
at org.springframework.integration.file.remote.RemoteFileTemplate.lambda$send$0(RemoteFileTemplate.java:314)
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:452)
at org.springframework.integration.file.remote.RemoteFileTemplate.send(RemoteFileTemplate.java:314)
at org.springframework.integration.file.remote.RemoteFileTemplate.send(RemoteFileTemplate.java:302)
at org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway.put(AbstractRemoteFileOutboundGateway.java:831)
at org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway.lambda$doPut$13(AbstractRemoteFileOutboundGateway.java:817)
at org.springframework.integration.file.remote.RemoteFileTemplate.invoke(RemoteFileTemplate.java:484)
at org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway.doPut(AbstractRemoteFileOutboundGateway.java:816)
at org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway.doPut(AbstractRemoteFileOutboundGateway.java:812)
at org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway.handleRequestMessage(AbstractRemoteFileOutboundGateway.java:589)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler$AdvisedRequestHandler.handleRequestMessage(AbstractReplyProducingMessageHandler.java:208)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.integration.handler.advice.AbstractRequestHandlerAdvice$CallbackImpl.cloneAndExecute(AbstractRequestHandlerAdvice.java:166)
... 58 more
Caused by: org.springframework.messaging.MessagingException: Failed to write to '/sftp/Incoming/sftpToSftp/SampleIntegrationFile.txt.temp' while uploading the file
at org.springframework.integration.file.remote.RemoteFileTemplate.sendFileToRemoteDirectory(RemoteFileTemplate.java:573)
at org.springframework.integration.file.remote.RemoteFileTemplate.doSend(RemoteFileTemplate.java:353)
... 77 more
Caused by: SFTP error (SSH_FX_FAILURE): Failure
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.throwStatusException(AbstractSftpClient.java:217)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkResponseStatus(AbstractSftpClient.java:212)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkResponseStatus(AbstractSftpClient.java:186)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.checkCommandStatus(AbstractSftpClient.java:164)
at org.apache.sshd.sftp.client.impl.AbstractSftpClient.rename(AbstractSftpClient.java:647)
at org.apache.sshd.sftp.client.SftpClient.rename(SftpClient.java:617)
at org.springframework.integration.sftp.session.SftpSession.rename(SftpSession.java:162)
at org.springframework.integration.file.remote.session.CachingSessionFactory$CachedSession.rename(CachingSessionFactory.java:252)
at org.springframework.integration.file.remote.RemoteFileTemplate.doSend(RemoteFileTemplate.java:606)
at org.springframework.integration.file.remote.RemoteFileTemplate.sendFileToRemoteDirectory(RemoteFileTemplate.java:570)
My Atmoz dockercompose file
I need to fetch all the data from Db2 table and copy to mongoDB. I am using Spring batch without metadata tables. I am using JpaPagingItemReader for fetching data from Db2. I am able to get the data from Db2 for the first fetch which based on the PageSize attribute and save in mongoDB successfully but for the next set of data, getting error in fetching the data with the pagination.
Below given the Error:
15:17:36,085 INFO [stdout] (default task-2) 2017-12-06 15:17:36.084 INFO 7088 --- [ default task-2] c.t.controller.ItemController : About to copy All Item
15:17:36,135 INFO [stdout] (default task-2) 2017-12-06 15:17:36.135 INFO 7088 --- [ default task-2] o.s.b.c.l.support.SimpleJobLauncher : Job: [SimpleJob: [name=readDB2]] launched with the following parameters: [{}]
15:17:36,180 INFO [stdout] (default task-2) 2017-12-06 15:17:36.180 INFO 7088 --- [ default task-2] o.s.batch.core.job.SimpleStepHandler : Executing step: [step1]
15:17:36,215 INFO [stdout] (default task-2) Hibernate: select itm0_.itm_nbr as t1_4_, itm0_.itm_des_txt as itm_des13_4_ from itm itm0_ fetch first 10 rows only
15:17:36,884 INFO [stdout] (default task-2) 2017-12-06 15:17:36.884 DEBUG 7088 --- [ default task-2] o.s.data.mongodb.core.MongoTemplate : Saving DBObject containing fields: [_class, itmDesTxt, itemId]
15:17:38,621 INFO [stdout] (default task-2) 2017-12-06 15:17:38.621 INFO 7088 --- [ default task-2] org.mongodb.driver.connection : Opened connection [connectionId{localValue:3, serverValue:1998}] to lxmdbpmdmdev001:27017
15:17:38,894 INFO [stdout] (default task-2) 2017-12-06 15:17:38.894 DEBUG 7088 --- [ default task-2] o.s.data.mongodb.core.MongoTemplate : Saving DBObject containing fields: [_class, itmDesTxt, itemId]
15:17:39,139 INFO [stdout] (default task-2) 2017-12-06 15:17:39.139 DEBUG 7088 --- [ default task-2] o.s.data.mongodb.core.MongoTemplate : Saving DBObject containing fields: [_class, itmDesTxt, itemId]
15:17:39,386 INFO [stdout] (default task-2) 2017-12-06 15:17:39.386 DEBUG 7088 --- [ default task-2] o.s.data.mongodb.core.MongoTemplate : Saving DBObject containing fields: [_class, itmDesTxt, itemId]
15:17:39,632 INFO [stdout] (default task-2) 2017-12-06 15:17:39.632 DEBUG 7088 --- [ default task-2] o.s.data.mongodb.core.MongoTemplate : Saving DBObject containing fields: [_class, itmDesTxt, itemId]
15:17:39,881 INFO [stdout] (default task-2) 2017-12-06 15:17:39.881 DEBUG 7088 --- [ default task-2] o.s.data.mongodb.core.MongoTemplate : Saving DBObject containing fields: [_class, itmDesTxt, itemId]
15:17:40,123 INFO [stdout] (default task-2) 2017-12-06 15:17:40.123 DEBUG 7088 --- [ default task-2] o.s.data.mongodb.core.MongoTemplate : Saving DBObject containing fields: [_class, itmDesTxt, itemId]
15:17:40,377 INFO [stdout] (default task-2) 2017-12-06 15:17:40.377 DEBUG 7088 --- [ default task-2] o.s.data.mongodb.core.MongoTemplate : Saving DBObject containing fields: [_class, itmDesTxt, itemId]
15:17:40,619 INFO [stdout] (default task-2) 2017-12-06 15:17:40.619 DEBUG 7088 --- [ default task-2] o.s.data.mongodb.core.MongoTemplate : Saving DBObject containing fields: [_class, itmDesTxt, itemId]
15:17:40,865 INFO [stdout] (default task-2) 2017-12-06 15:17:40.865 DEBUG 7088 --- [ default task-2] o.s.data.mongodb.core.MongoTemplate : Saving DBObject containing fields: [_class, itmDesTxt, itemId]
15:17:41,109 INFO [stdout] (default task-2) Hibernate: select * from ( select inner2_.*, rownumber() over(order by order of inner2_) as rownumber_ from ( select itm0_.itm_nbr as t1_4_, itm0_.itm_des_txt as itm_des13_4_ from itm itm0_ fetch first 20 rows only ) as inner2_ ) as inner1_ where rownumber_ > 10 order by rownumber_
15:17:41,346 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-2) SQL Error: -199, SQLState: 42601
15:17:41,347 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-2) DB2 SQL Error: SQLCODE=-199, SQLSTATE=42601, SQLERRMC=OF;;??( [ DESC ASC NULLS RANGE CONCAT || / MICROSECONDS MICROSECOND, DRIVER=4.18.60
15:17:41,347 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-2) SQL Error: -516, SQLState: 26501
15:17:41,347 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-2) DB2 SQL Error: SQLCODE=-516, SQLSTATE=26501, SQLERRMC=null, DRIVER=4.18.60
15:17:41,347 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-2) SQL Error: -514, SQLState: 26501
15:17:41,347 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-2) DB2 SQL Error: SQLCODE=-514, SQLSTATE=26501, SQLERRMC=SQL_CURLN200C1, DRIVER=4.18.60
15:17:41,362 INFO [stdout] (default task-2) 2017-12-06 15:17:41.362 ERROR 7088 --- [ default task-2] o.s.batch.core.step.AbstractStep : Encountered an error executing step step1 in job readDB2
15:17:41,362 INFO [stdout] (default task-2)
15:17:41,362 INFO [stdout] (default task-2) javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
15:17:41,362 INFO [stdout] (default task-2) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
15:17:41,362 INFO [stdout] (default task-2) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
15:17:41,362 INFO [stdout] (default task-2) at org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:492) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
15:17:41,362 INFO [stdout] (default task-2) at org.springframework.batch.item.database.JpaPagingItemReader.doReadPage(JpaPagingItemReader.java:225) ~[spring-batch-infrastructure-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,362 INFO [stdout] (default task-2) at org.springframework.batch.item.database.AbstractPagingItemReader.doRead(AbstractPagingItemReader.java:108) ~[spring-batch-infrastructure-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,362 INFO [stdout] (default task-2) at org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.read(AbstractItemCountingItemStreamItemReader.java:88) ~[spring-batch-infrastructure-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,362 INFO [stdout] (default task-2) at org.springframework.batch.core.step.item.SimpleChunkProvider.doRead(SimpleChunkProvider.java:91) ~[spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,362 INFO [stdout] (default task-2) at org.springframework.batch.core.step.item.SimpleChunkProvider.read(SimpleChunkProvider.java:157) ~[spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,363 INFO [stdout] (default task-2) at org.springframework.batch.core.step.item.SimpleChunkProvider$1.doInIteration(SimpleChunkProvider.java:116) ~[spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,363 INFO [stdout] (default task-2) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374) ~[spring-batch-infrastructure-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,363 INFO [stdout] (default task-2) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215) ~[spring-batch-infrastructure-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,363 INFO [stdout] (default task-2) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144) ~[spring-batch-infrastructure-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,363 INFO [stdout] (default task-2) at org.springframework.batch.core.step.item.SimpleChunkProvider.provide(SimpleChunkProvider.java:110) ~[spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,363 INFO [stdout] (default task-2) at org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:69) ~[spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,363 INFO [stdout] (default task-2) at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406) ~[spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,363 INFO [stdout] (default task-2) at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330) ~[spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,363 INFO [stdout] (default task-2) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) ~[spring-tx-4.3.12.RELEASE.jar:4.3.12.RELEASE]
15:17:41,363 INFO [stdout] (default task-2) at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:272) ~[spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,363 INFO [stdout] (default task-2) at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81) ~[spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374) ~[spring-batch-infrastructure-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215) ~[spring-batch-infrastructure-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144) ~[spring-batch-infrastructure-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257) ~[spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200) ~[spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148) [spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at org.springframework.batch.core.job.AbstractJob.handleStep(AbstractJob.java:392) [spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at org.springframework.batch.core.job.SimpleJob.doExecute(SimpleJob.java:135) [spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306) [spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135) [spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50) [spring-core-4.3.12.RELEASE.jar:4.3.12.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128) [spring-batch-core-3.0.8.RELEASE.jar:3.0.8.RELEASE]
15:17:41,376 INFO [stdout] (default task-2) at com.test.service.impl.ItemServiceImpl.itemCopy(ItemServiceImpl.java:266) [classes:na]
15:17:41,376 INFO [stdout] (default task-2) at com.test.controller.ItemController.allItemCopy(ItemController.java:48) [classes:na]
....
15:17:41,410 INFO [stdout] (default task-2) 2017-12-06 15:17:41.410 INFO 7088 --- [ default task-2] o.s.b.c.l.support.SimpleJobLauncher : Job: [SimpleJob: [name=readDB2]] completed with the following parameters: [{}] and the following status: [FAILED]
Batch Configuration:
#Configuration
#EnableBatchProcessing
public class ItemBatch {
#Autowired
private JobBuilderFactory jobBuilderFactory;
#Autowired
private StepBuilderFactory stepBuilderFactory;
#Autowired
EntityManagerFactory entityManagerFactory;
#Autowired
MongoTemplate mongoTemplate;
#Bean
public Job readDB2() {
return jobBuilderFactory.get("readDB2").start(step1()).build();
}
#Bean
public Step step1() {
return stepBuilderFactory.get("step1")
.<Itm, com.test.model.mongodb.Itm> chunk(5)
.reader(reader())
.writer(writer())
.build();
}
#Bean
public ItemStreamReader<Itm> reader() {
JpaPagingItemReader<Itm> databaseReader = new JpaPagingItemReader<>();
try {
databaseReader.setEntityManagerFactory(entityManagerFactory);
JpaQueryProviderImpl<Itm> jpaQueryProvider = new JpaQueryProviderImpl<>();
jpaQueryProvider.setQuery("Itm.findAll");
databaseReader.setQueryProvider(jpaQueryProvider);
databaseReader.setPageSize(10);
databaseReader.afterPropertiesSet();
} catch (Exception e) {
System.err.println("Error :" + e);
}
return databaseReader;
}
#Bean
public MongoItemWriter<com.test.model.mongodb.Itm> writer() {
MongoItemWriter<com.test.model.mongodb.Itm> writer = new MongoItemWriter<>();
try {
writer.setTemplate(mongoTemplate);
} catch (Exception e) {
e.printStackTrace();
}
writer.setCollection("itm");
return writer;
}
}
In-Memory Configuration instead of metadata:
#Configuration
public class SpringBatchTestConfiguration {
#Bean
public ResourcelessTransactionManager transactionManager() {
return new ResourcelessTransactionManager();
}
#Bean
public MapJobRepositoryFactoryBean mapJobRepositoryFactory(ResourcelessTransactionManager txManager)
throws Exception {
MapJobRepositoryFactoryBean factory = new MapJobRepositoryFactoryBean(txManager);
factory.afterPropertiesSet();
return factory;
}
#Bean
public JobRepository jobRepository(MapJobRepositoryFactoryBean factory) throws Exception {
return factory.getObject();
}
#Bean
public JobExplorer jobExplorer(MapJobRepositoryFactoryBean factory) {
return new SimpleJobExplorer(factory.getJobInstanceDao(), factory.getJobExecutionDao(),
factory.getStepExecutionDao(), factory.getExecutionContextDao());
}
#Bean
public SimpleJobLauncher jobLauncher(JobRepository jobRepository) {
SimpleJobLauncher launcher = new SimpleJobLauncher();
launcher.setJobRepository(jobRepository);
return launcher;
}
}
QueryProvider:
public class JpaQueryProviderImpl<E> extends AbstractJpaQueryProvider {
private Class<E> entityClass;
private String query;
#Override
public Query createQuery() {
return getEntityManager().createNamedQuery(query, entityClass);
}
public void setQuery(String query) {
this.query = query;
}
public void setEntityClass(Class<E> entityClazz) {
this.entityClass = entityClazz;
}
#Override
public void afterPropertiesSet() throws Exception {
Assert.isTrue(StringUtils.hasText(query), "Query cannot be empty");
Assert.notNull(entityClass, "Entity class cannot be NULL");
}
}
Entity:
#Entity
#Table(name="ITM")
#NamedQueries({ #NamedQuery(name = "Itm.findAll", query = "select i from Itm i") })
public class Itm implements Serializable {
private static final long serialVersionUID = 1L;
#Id
#Column(name="ITEM_NBR")
private int itemId;
#Column(name="ITM_DES_TXT")
private String itmDesTxt;
//getter and setter
}
The root cause is this error:
DB2 SQL Error: SQLCODE=-199, SQLSTATE=42601, SQLERRMC=OF;;??( [ DESC ASC NULLS RANGE CONCAT || / MICROSECONDS MICROSECOND, DRIVER=4.18.60
which points you to the OF keyword being unexpected.
ORDER BY ORDER OF in the OLAP specification is not valid in Db2 for z/OS v11, as can be seen in the manual. You'll need to rewrite your statement to order by some explicit expression -- or skip ORDER BY altogether since you're not ordering the inner2_ subselect anyway.
It is not issue with Spring batch, it is the issue in Spring Pagination with DB2 Z/OS. To fix the issue, we have to with the new dialect. Still I am facing issue with the new dialect. Need to find the proper dialect configuration.
I have a spring-boot project.I have created a war file , i am deploying it on 2 linux based tomcat servers and 1 windows based tomcat server , The file is deployed successfully on 1 linux based server and windows based server but fails on 1 of the linux based server
Tried changing the dependency in pom
Below is the snippet from pom.xml currently using
<dependency>
<groupId>com.github.noraui</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0.2</version>
</dependency>
previously i was using below scope and systempath
<groupId>com.oracle</groupId>
<artifactId>ojdbc</artifactId>
<version>7</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/oracle/ojdbc/7/ojdbc-7.jar</systemPath>
still i am getting java.sql.SQLException: No suitable driver found for jdbc:oracle:thin on 1 particular linux server
Please provide suggestions , if any ,stuck since yesterday
Snippet from stacktrace is as below
2017-10-18 15:01:29.862 DEBUG 34036 --- [kground-preinit] org.jboss.logging : Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property
15:01:29.862 [DEBUG] o.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property
2017-10-18 15:01:42.347 INFO 34036 --- [ost-startStop-1] c.h.instance.DefaultAddressPicker : [LOCAL] [dev] [3.7] Picked [127.0.0.1]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
15:01:42.347 [INFO ] c.h.i.DefaultAddressPicker - [LOCAL] [dev] [3.7] Picked [127.0.0.1]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
2017-10-18 15:01:42.402 INFO 34036 --- [ost-startStop-1] com.hazelcast.system : [127.0.0.1]:5701 [dev] [3.7] Hazelcast 3.7 (20160817 - 1302600) starting at [127.0.0.1]:5701
15:01:42.402 [INFO ] c.h.system - [127.0.0.1]:5701 [dev] [3.7] Hazelcast 3.7 (20160817 - 1302600) starting at [127.0.0.1]:5701
2017-10-18 15:01:42.403 INFO 34036 --- [ost-startStop-1] com.hazelcast.system : [127.0.0.1]:5701 [dev] [3.7] Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
15:01:42.403 [INFO ] c.h.system - [127.0.0.1]:5701 [dev] [3.7] Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
2017-10-18 15:01:42.404 INFO 34036 --- [ost-startStop-1] com.hazelcast.system : [127.0.0.1]:5701 [dev] [3.7] Configured Hazelcast Serialization version : 1
15:01:42.404 [INFO ] c.h.system - [127.0.0.1]:5701 [dev] [3.7] Configured Hazelcast Serialization version : 1
2017-10-18 15:01:43.217 INFO 34036 --- [ost-startStop-1] c.h.s.i.o.impl.BackpressureRegulator : [127.0.0.1]:5701 [dev] [3.7] Backpressure is disabled
15:01:43.217 [INFO ] c.h.s.i.o.i.BackpressureRegulator - [127.0.0.1]:5701 [dev] [3.7] Backpressure is disabled
2017-10-18 15:01:45.730 DEBUG 34036 --- [ost-startStop-1] c.h.internal.cluster.ClusterService : [127.0.0.1]:5701 [dev] [3.7] Updating members [Member [127.0.0.1]:5701 - 9daa0612-f3dc-4eaa-9b29-06e4b11c225a this]
15:01:45.730 [DEBUG] c.h.i.c.ClusterService - [127.0.0.1]:5701 [dev] [3.7] Updating members [Member [127.0.0.1]:5701 - 9daa0612-f3dc-4eaa-9b29-06e4b11c225a this]
2017-10-18 15:01:45.731 DEBUG 34036 --- [ost-startStop-1] c.h.i.p.InternalPartitionService : [127.0.0.1]:5701 [dev] [3.7] Adding Member [127.0.0.1]:5701 - 9daa0612-f3dc-4eaa-9b29-06e4b11c225a this
15:01:45.731 [DEBUG] c.h.i.p.InternalPartitionService - [127.0.0.1]:5701 [dev] [3.7] Adding Member [127.0.0.1]:5701 - 9daa0612-f3dc-4eaa-9b29-06e4b11c225a this
2017-10-18 15:01:45.815 INFO 34036 --- [ost-startStop-1] com.hazelcast.core.LifecycleService : [127.0.0.1]:5701 [dev] [3.7] [127.0.0.1]:5701 is STARTING
15:01:45.815 [INFO ] c.h.c.LifecycleService - [127.0.0.1]:5701 [dev] [3.7] [127.0.0.1]:5701 is STARTING
2017-10-18 15:01:46.387 INFO 34036 --- [ost-startStop-1] c.h.s.i.o.impl.OperationExecutorImpl : [127.0.0.1]:5701 [dev] [3.7] Starting 4 partition threads
15:01:46.387 [INFO ] c.h.s.i.o.i.OperationExecutorImpl - [127.0.0.1]:5701 [dev] [3.7] Starting 4 partition threads
2017-10-18 15:01:46.391 INFO 34036 --- [ost-startStop-1] c.h.s.i.o.impl.OperationExecutorImpl : [127.0.0.1]:5701 [dev] [3.7] Starting 3 generic threads (1 dedicated for priority tasks)
15:01:46.391 [INFO ] c.h.s.i.o.i.OperationExecutorImpl - [127.0.0.1]:5701 [dev] [3.7] Starting 3 generic threads (1 dedicated for priority tasks)
2017-10-18 15:01:46.407 INFO 34036 --- [ost-startStop-1] c.h.n.t.n.NonBlockingIOThreadingModel : [127.0.0.1]:5701 [dev] [3.7] TcpIpConnectionManager configured with Non Blocking IO-threading model: 3 input threads and 3 output threads
15:01:46.407 [INFO ] c.h.n.t.n.NonBlockingIOThreadingModel - [127.0.0.1]:5701 [dev] [3.7] TcpIpConnectionManager configured with Non Blocking IO-threading model: 3 input threads and 3 output threads
2017-10-18 15:01:46.410 DEBUG 34036 --- [ost-startStop-1] c.h.n.t.n.NonBlockingIOThreadingModel : [127.0.0.1]:5701 [dev] [3.7] IO threads selector mode is SELECT
15:01:46.410 [DEBUG] c.h.n.t.n.NonBlockingIOThreadingModel - [127.0.0.1]:5701 [dev] [3.7] IO threads selector mode is SELECT
2017-10-18 15:01:46.438 WARN 34036 --- [ost-startStop-1] com.hazelcast.instance.Node : [127.0.0.1]:5701 [dev] [3.7] No join method is enabled! Starting standalone.
15:01:46.438 [WARN ] c.h.i.Node - [127.0.0.1]:5701 [dev] [3.7] No join method is enabled! Starting standalone.
2017-10-18 15:01:46.569 INFO 34036 --- [ost-startStop-1] com.hazelcast.core.LifecycleService : [127.0.0.1]:5701 [dev] [3.7] [127.0.0.1]:5701 is STARTED
15:01:46.569 [INFO ] c.h.c.LifecycleService - [127.0.0.1]:5701 [dev] [3.7] [127.0.0.1]:5701 is STARTED
profile:dev
property file lookup
2017-10-18 15:01:50.998 WARN 34036 --- [ost-startStop-1] o.a.tomcat.jdbc.pool.PooledConnection : Not loading a JDBC driver as driverClassName property is null.
15:01:50.998 [WARN ] o.a.t.j.p.PooledConnection - Not loading a JDBC driver as driverClassName property is null.
2017-10-18 15:01:51.025 ERROR 34036 --- [ost-startStop-1] o.a.tomcat.jdbc.pool.ConnectionPool : Unable to create initial connections of pool.
java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:#mumchora65:1821:STAGE
at java.sql.DriverManager.getConnection(DriverManager.java:689)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:308)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:718)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:650)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:468)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:143)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:180)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:257)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:231)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:240)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:846)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:873)
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:353)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:373)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:362)
at com.crisil.quantix.config.DatabaseConfiguration.entityManagerFactory(DatabaseConfiguration.java:109)
at com.crisil.quantix.config.DatabaseConfiguration$$EnhancerBySpringCGLIB$$61a361cf.CGLIB$entityManagerFactory$5(<generated>)
at com.crisil.quantix.config.DatabaseConfiguration$$EnhancerBySpringCGLIB$$61a361cf$$FastClassBySpringCGLIB$$5775aed4.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
at com.crisil.quantix.config.DatabaseConfiguration$$EnhancerBySpringCGLIB$$61a361cf.entityManagerFactory(<generated>)
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.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1022)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:589)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:370)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:589)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:370)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:234)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:215)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:91)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:79)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getServletContextInitializerBeans(EmbeddedWebApplicationContext.java:241)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:228)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:89)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:213)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:168)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:536)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)
at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)
at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
15:01:51.025 [ERROR] o.a.t.j.p.ConnectionPool - Unable to create initial connections of pool.
java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:#mumchora65:1821:STAGE
at java.sql.DriverManager.getConnection(DriverManager.java:689)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:308)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:718)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:650)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:468)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:143)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:180)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:257)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:231)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:240)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:846)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:873)
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)
Check that this jar /lib/oracle/ojdbc/7/ojdbc-7.jar is also found from the failing servers tomcat.home/lib in the same path.
If not, add it there, restart tomcat see if it deploys ok.
You can also change dependencys scope to compile, which is not good idea if the jar is found in other servers.
As mentioned in question it is a spring-boot project. I was running the war with dev profile on 1 server and sit profile on another server .
JDBC drives were not properly configured on 1 of the server that was the root cause after configuring the drives in application.yml . it worked
I am co-creator of com.github.noraui, this jar file is deprecated, please use this sample: github.com/sgrillon14/MavenSampleOracleJdbc
I'm getting this error when I try to load my .jmx file:
2016/10/13 11:20:10 WARN - jmeter.timers.ConstantThroughputTimer: Could not convert calcMode=this thread only using Locale: fr
2016/10/13 11:20:10 WARN - jmeter.config.CSVDataSet: Could not translate shareMode=All threads using Locale: fr
2016/10/13 11:20:10 WARN - kg.apc.jmeter.threads.UltimateThreadGroupGui: Received null property instead of collection
2016/10/13 11:20:10 INFO - kg.apc.jmeter.threads.UltimateThreadGroup: Profile prop: null
2016/10/13 11:20:10 INFO - kg.apc.jmeter.threads.UltimateThreadGroup: Profile prop: null
2016/10/13 11:20:10 INFO - kg.apc.jmeter.threads.UltimateThreadGroup: Profile prop: null
2016/10/13 11:20:10 INFO - kg.apc.jmeter.threads.UltimateThreadGroup: Profile prop: null
2016/10/13 11:20:10 ERROR - jmeter.gui.GuiPackage: Could not get GUI for http://MyURL java.lang.ClassNotFoundException: HttpTestSampleGui,HttpTestSampleGui2
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:264)
at org.apache.jmeter.gui.GuiPackage.getGui(GuiPackage.java:212)
at org.apache.jmeter.gui.tree.JMeterTreeModel.addComponent(JMeterTreeModel.java:153)
at org.apache.jmeter.gui.tree.JMeterTreeModel.addSubTree(JMeterTreeModel.java:129)
at org.apache.jmeter.gui.tree.JMeterTreeModel.addSubTree(JMeterTreeModel.java:129)
at org.apache.jmeter.gui.tree.JMeterTreeModel.addSubTree(JMeterTreeModel.java:121)
at org.apache.jmeter.gui.GuiPackage.addSubTree(GuiPackage.java:495)
at org.apache.jmeter.gui.action.Load.insertLoadedTree(Load.java:193)
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:131)
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:102)
at org.apache.jmeter.gui.action.Load.doAction(Load.java:89)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:81)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:63)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
2016/10/13 11:20:10 WARN - jmeter.gui.action.Load: Unexpected error java.lang.NullPointerException
at org.apache.jmeter.gui.tree.JMeterTreeModel.addComponent(JMeterTreeModel.java:154)
at org.apache.jmeter.gui.tree.JMeterTreeModel.addSubTree(JMeterTreeModel.java:129)
at org.apache.jmeter.gui.tree.JMeterTreeModel.addSubTree(JMeterTreeModel.java:129)
at org.apache.jmeter.gui.tree.JMeterTreeModel.addSubTree(JMeterTreeModel.java:121)
at org.apache.jmeter.gui.GuiPackage.addSubTree(GuiPackage.java:495)
at org.apache.jmeter.gui.action.Load.insertLoadedTree(Load.java:193)
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:131)
at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:102)
at org.apache.jmeter.gui.action.Load.doAction(Load.java:89)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:81)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:63)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
2016/10/13 11:20:11 INFO - kg.apc.jmeter.threads.UltimateThreadGroup: Profile prop: null
What does this mean?
Your test plan is using a third party plugin kg.apc.
Be sure you have the plugin jars in lib/ext and their dependencies in lib
I am testing a REST controller annotated with #RestController, and I'd like to inject mock services.
I am looking for help here spring boot ones but with no luck.
I am starting a test of a spring-boot application with the following annotations:
#RunWith(SpringJUnit4ClassRunner.class)
#SpringApplicationConfiguration(classes = Application.class)
#WebIntegrationTest
where Application.class is annotated with #SpringBootApplication, but it seems that I can't find a way to inject a mock dependency on my controller, for example doing this:
#Mock
private BlogPostService blogPostService;
#Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
}
This is the stack trace I see, and it fails after going in timeout since it tries to inject all dependencies down to the database (the exact thing I am trying to avoid trying to introduce mocks at the services level):
com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase
13:30:12.924 [main] DEBUG o.s.t.c.j.SpringJUnit4ClassRunner - SpringJUnit4ClassRunner constructor called with [class com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]
13:30:12.934 [main] DEBUG o.s.test.context.BootstrapUtils - Instantiating CacheAwareContextLoaderDelegate from class [org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]
13:30:12.943 [main] DEBUG o.s.test.context.BootstrapUtils - Instantiating BootstrapContext using constructor [public org.springframework.test.context.support.DefaultBootstrapContext(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)]
13:30:12.965 [main] DEBUG o.s.test.context.BootstrapUtils - Instantiating TestContextBootstrapper for test class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase] from class [org.springframework.boot.test.WebAppIntegrationTestContextBootstrapper]
13:30:12.998 [main] DEBUG o.s.b.t.WebAppIntegrationTestContextBootstrapper - Found explicit ContextLoader class [org.springframework.boot.test.SpringApplicationContextLoader] for context configuration attributes [ContextConfigurationAttributes#2b552920 declaringClass = 'com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase', classes = '{class com.xxx.cms.web.Application}', locations = '{}', inheritLocations = true, initializers = '{}', inheritInitializers = true, name = [null], contextLoaderClass = 'org.springframework.boot.test.SpringApplicationContextLoader']
13:30:13.015 [main] DEBUG o.s.t.c.s.AbstractContextLoader - Did not detect default resource location for test class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]: class path resource [com/xxx/cms/web/resources/BlogPostControllerWithTemplateTestCase-context.xml] does not exist
13:30:13.016 [main] DEBUG o.s.t.c.s.AbstractContextLoader - Did not detect default resource location for test class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]: class path resource [com/xxx/cms/web/resources/BlogPostControllerWithTemplateTestCaseContext.groovy] does not exist
13:30:13.016 [main] INFO o.s.t.c.s.AbstractContextLoader - Could not detect default resource locations for test class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]: no resource found for suffixes {-context.xml, Context.groovy}.
13:30:13.019 [main] DEBUG o.s.t.c.support.ActiveProfilesUtils - Could not find an 'annotation declaring class' for annotation type [org.springframework.test.context.ActiveProfiles] and class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]
13:30:13.026 [main] DEBUG o.s.test.util.ReflectionTestUtils - Setting field 'propertySourceProperties' of type [null] on target object [[WebMergedContextConfiguration#5f282abb testClass = BlogPostControllerWithTemplateTestCase, locations = '{}', classes = '{class com.xxx.cms.web.Application}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{}', resourceBasePath = '', contextLoader = 'org.springframework.boot.test.SpringApplicationContextLoader', parent = [null]]] or target class [class org.springframework.test.context.web.WebMergedContextConfiguration] to value [[Ljava.lang.String;#167fdd33]
13:30:13.027 [main] DEBUG o.s.b.t.WebAppIntegrationTestContextBootstrapper - #TestExecutionListeners is not present for class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]: using defaults.
13:30:13.036 [main] INFO o.s.b.t.WebAppIntegrationTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]
13:30:13.060 [main] INFO o.s.b.t.WebAppIntegrationTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener#7b69c6ba, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener#46daef40, org.springframework.test.context.support.DependencyInjectionTestExecutionListener#12f41634, org.springframework.test.context.support.DirtiesContextTestExecutionListener#13c27452, org.springframework.test.context.transaction.TransactionalTestExecutionListener#262b2c86, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener#371a67ec]
13:30:13.063 [main] DEBUG o.s.t.annotation.ProfileValueUtils - Retrieved #ProfileValueSourceConfiguration [null] for test class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]
13:30:13.064 [main] DEBUG o.s.t.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]13:30:13.105 [main] DEBUG o.s.t.annotation.ProfileValueUtils - Retrieved #ProfileValueSourceConfiguration [null] for test class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]
13:30:13.105 [main] DEBUG o.s.t.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]13:30:13.107 [main] DEBUG o.s.t.annotation.ProfileValueUtils - Retrieved #ProfileValueSourceConfiguration [null] for test class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]
13:30:13.107 [main] DEBUG o.s.t.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]
13:30:13.108 [main] DEBUG o.s.t.annotation.ProfileValueUtils - Retrieved #ProfileValueSourceConfiguration [null] for test class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]
13:30:13.108 [main] DEBUG o.s.t.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]
13:30:13.115 [main] DEBUG o.s.t.c.s.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext#74a10858 testClass = BlogPostControllerWithTemplateTestCase, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration#5f282abb testClass = BlogPostControllerWithTemplateTestCase, locations = '{}', classes = '{class com.xxx.cms.web.Application}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.IntegrationTest=true}', resourceBasePath = '', contextLoader = 'org.springframework.boot.test.SpringApplicationContextLoader', parent = [null]]], class annotated with #DirtiesContext [false] with mode [null].
13:30:13.124 [main] DEBUG o.s.t.annotation.ProfileValueUtils - Retrieved #ProfileValueSourceConfiguration [null] for test class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]
13:30:13.125 [main] DEBUG o.s.t.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase]
13:30:13.132 [main] DEBUG o.s.t.c.s.DependencyInjectionTestExecutionListener - Performing dependency injection for test context [[DefaultTestContext#74a10858 testClass = BlogPostControllerWithTemplateTestCase, testInstance = com.xxx.cms.web.resources.BlogPostControllerWithTemplateTestCase#75881071, testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration#5f282abb testClass = BlogPostControllerWithTemplateTestCase, locations = '{}', classes = '{class com.xxx.cms.web.Application}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.IntegrationTest=true}', resourceBasePath = '', contextLoader = 'org.springframework.boot.test.SpringApplicationContextLoader', parent = [null]]]].
13:30:13.259 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
13:30:13.261 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
13:30:13.261 [main] DEBUG o.s.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
13:30:13.263 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [integrationTest] PropertySource with search precedence immediately lower than [systemEnvironment]
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.3.1.RELEASE)
2016-01-18 13:30:14.252 INFO 3685 --- [ main] r.BlogPostControllerWithTemplateTestCase : Starting BlogPostControllerWithTemplateTestCase on Matteos-MacBook-Pro.local with PID 3685 (/Users/mox/Dati/Progetti/xxx/cms/cms-parent-pom/cms-web/target/test-classes started by mox in /Users/mox/Dati/Progetti/xxx/cms/cms-parent-pom/cms-web)
2016-01-18 13:30:14.253 INFO 3685 --- [ main] r.BlogPostControllerWithTemplateTestCase : No active profile set, falling back to default profiles: default
2016-01-18 13:30:14.362 INFO 3685 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#36902638: startup date [Mon Jan 18 13:30:14 CET 2016]; root of context hierarchy
2016-01-18 13:30:17.504 INFO 3685 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2016-01-18 13:30:17.521 INFO 3685 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2016-01-18 13:30:17.525 INFO 3685 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.0.30
2016-01-18 13:30:17.693 INFO 3685 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2016-01-18 13:30:17.694 INFO 3685 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3337 ms
2016-01-18 13:30:17.887 INFO 3685 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2016-01-18 13:30:17.892 INFO 3685 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2016-01-18 13:30:18.528 INFO 3685 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/post/{id}],methods=[PUT]}" onto public org.springframework.http.ResponseEntity<com.xxx.cms.services.dtos.BlogPostDTO> com.xxx.cms.web.resources.BlogPostController.update(com.xxx.cms.services.dtos.BlogPostDTO)
2016-01-18 13:30:18.528 INFO 3685 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/post/{id}],methods=[DELETE]}" onto public org.springframework.http.ResponseEntity<com.xxx.cms.services.dtos.BlogPostDTO> com.xxx.cms.web.resources.BlogPostController.delete(long)
2016-01-18 13:30:18.529 INFO 3685 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/post],methods=[POST]}" onto public org.springframework.http.ResponseEntity<com.xxx.cms.services.dtos.BlogPostDTO> com.xxx.cms.web.resources.BlogPostController.create(com.xxx.cms.services.dtos.BlogPostDTO)
2016-01-18 13:30:18.529 INFO 3685 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/post/{id}],methods=[GET]}" onto public org.springframework.http.ResponseEntity<com.xxx.cms.services.dtos.BlogPostDTO> com.xxx.cms.web.resources.BlogPostController.findById(long)
2016-01-18 13:30:18.529 INFO 3685 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/post],methods=[GET]}" onto public org.springframework.http.ResponseEntity<java.util.List<com.xxx.cms.services.dtos.BlogPostDTO>> com.xxx.cms.web.resources.BlogPostController.findAll()
2016-01-18 13:30:18.529 INFO 3685 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/hello/{player}]}" onto public com.xxx.cms.persistence.domain.model.Message com.xxx.cms.web.resources.HelloWorldRestController.message(java.lang.String)
2016-01-18 13:30:18.537 INFO 3685 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2016-01-18 13:30:18.538 INFO 3685 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2016-01-18 13:30:18.580 INFO 3685 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/resources/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-01-18 13:30:18.655 INFO 3685 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#36902638: startup date [Mon Jan 18 13:30:14 CET 2016]; root of context hierarchy
2016-01-18 13:30:18.786 INFO 3685 --- [ main] c.i.c.p.config.MongoConfiguration : localhost:27017/smart-cms
2016-01-18 13:30:19.264 INFO 3685 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2016-01-18 13:30:19.270 INFO 3685 --- [ main] r.BlogPostControllerWithTemplateTestCase : Started BlogPostControllerWithTemplateTestCase in 5.996 seconds (JVM running for 7.084)2016-01-18 13:30:19.756 INFO 3685 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring FrameworkServlet 'dispatcherServlet'
2016-01-18 13:30:19.756 INFO 3685 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started
2016-01-18 13:30:19.771 INFO 3685 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 15 ms
2016-01-18 13:30:29.844 ERROR 3685 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting, exception={com.mongodb.MongoException$Network: Exception opening the socket}, caused by {java.net.ConnectException: Connection refused}}]; nested exception is com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting, exception={com.mongodb.MongoException$Network: Exception opening the socket}, caused by {java.net.ConnectException: Connection refused}}]] with root cause
com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=localhost:27017, type=Unknown, state=Connecting, exception={com.mongodb.MongoException$Network: Exception opening the socket}, caused by {java.net.ConnectException: Connection refused}}]
at com.mongodb.BaseCluster.getDescription(BaseCluster.java:128) ~[mongo-java-driver-2.13.3.jar:na]
at com.mongodb.DBTCPConnector.getClusterDescription(DBTCPConnector.java:402) ~[mongo-java-driver-2.13.3.jar:na]
at com.mongodb.DBTCPConnector.getType(DBTCPConnector.java:579) ~[mongo-java-driver-2.13.3.jar:na]
at com.mongodb.DBTCPConnector.isMongosConnection(DBTCPConnector.java:376) ~[mongo-java-driver-2.13.3.jar:na]
at com.mongodb.Mongo.isMongosConnection(Mongo.java:622) ~[mongo-java-driver-2.13.3.jar:na]
at com.mongodb.DBCollection.findOne(DBCollection.java:936) ~[mongo-java-driver-2.13.3.jar:na]
at com.mongodb.DBCollection.findOne(DBCollection.java:914) ~[mongo-java-driver-2.13.3.jar:na]
at com.mongodb.DBCollection.findOne(DBCollection.java:858) ~[mongo-java-driver-2.13.3.jar:na]
at org.springframework.data.mongodb.core.MongoTemplate$FindOneCallback.doInCollection(MongoTemplate.java:2098) ~[spring-data-mongodb-1.8.2.RELEASE.jar:na]
at org.springframework.data.mongodb.core.MongoTemplate$FindOneCallback.doInCollection(MongoTemplate.java:2082) ~[spring-data-mongodb-1.8.2.RELEASE.jar:na]
at org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1855) ~[spring-data-mongodb-1.8.2.RELEASE.jar:na]
at org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1672) ~[spring-data-mongodb-1.8.2.RELEASE.jar:na]
at org.springframework.data.mongodb.core.MongoTemplate.findById(MongoTemplate.java:614) ~[spring-data-mongodb-1.8.2.RELEASE.jar:na]
at org.springframework.data.mongodb.repository.support.SimpleMongoRepository.findOne(SimpleMongoRepository.java:119) ~[spring-data-mongodb-1.8.2.RELEASE.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25]
at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25]
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:483) ~[spring-data-commons-1.11.2.RELEASE.jar:na]
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:468) ~[spring-data-commons-1.11.2.RELEASE.jar:na]
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:440) ~[spring-data-commons-1.11.2.RELEASE.jar:na]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61) ~[spring-data-commons-1.11.2.RELEASE.jar:na]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) ~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at com.sun.proxy.$Proxy66.findOne(Unknown Source) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25]
at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) ~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136) ~[spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) ~[spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at com.sun.proxy.$Proxy66.findOne(Unknown Source) ~[na:na]
at com.xxx.cms.services.BlogPostService.findTodoById(BlogPostService.java:54) ~[classes/:na]
at com.xxx.cms.services.BlogPostService.findById(BlogPostService.java:43) ~[classes/:na]
at com.xxx.cms.web.resources.BlogPostController.findById(BlogPostController.java:55) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25]
at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) ~[spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) ~[spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) ~[tomcat-embed-core-8.0.30.jar:8.0.30]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ~[tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) ~[tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.0.30.jar:8.0.30]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.30.jar:8.0.30]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) ~[spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) ~[tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) [tomcat-embed-core-8.0.30.jar:8.0.30]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) [tomcat-embed-core-8.0.30.jar:8.0.30]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_25]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.30.jar:8.0.30]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25]
2016-01-18 13:30:29.905 INFO 3685 --- [ Thread-4] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#36902638: startup date [Mon Jan 18 13:30:14 CET 2016]; root of context hierarchy
Process finished with exit code 0
You're using Mockito, why don't you use the Mockito test runner?
In stead of annotating your tests with the annotations you provided, use the following annotation:
#RunWith(MockitoJUnitRunner.class)
For example:
#RunWith(MockitoJUnitRunner.class)
public class MyControllerTest {
}
To inject a mock with Mockito in your controller, you use:
#RunWith(MockitoJUnitRunner.class)
public class MyControllerTest {
#InjectMocks
private MyController controller;
#Mock
private BlogPostService service;
}
In this case Mockito will create a new instance of MyController (your REST controller) and inject a mock of type BlogPostService in all fields of your controller with the given field.
The annotations you provided are great for integration testing, but you don't need them when you're testing your controller as a unit.
And if you're integration testing, mocking a service isn't right either.