These are chat archives for spring-cloud/spring-cloud

20th
Feb 2018
Abhishek Dujari
@abshkd
Feb 20 2018 01:17
I have this entire microservices setup with spring-cloud netflix and i cant get discovery client to work at all
ihave to use FQDN urls
    @Bean
    @LoadBalanced
    public RestTemplate restTemplate() { return new RestTemplate(); }

    @Autowired
    protected RestTemplate restTemplate;
when I do as above, it appears that a lookup is performed. but when testing offline there is no way I know to override the lookup and perform a regular url access in test
Abhishek Dujari
@abshkd
Feb 20 2018 01:49
i just get NPE for resttemplate
Tommy Ludwig
@shakuzen
Feb 20 2018 05:51
Looks like the data on this page isn’t up-to-date for Finchley.M6 (it still mentions M5 as the latest)
http://projects.spring.io/spring-cloud/
Jagmohan Sharma
@JagmohanSharma
Feb 20 2018 07:04
@dsyer Please find sample code regarding issue with DataSourceTransactionManager as discussed previously.
spring-cloud/spring-cloud-commons#327
Dave Syer
@dsyer
Feb 20 2018 10:14
Thanks
I can't build it until I remove the oracle driver dependency
But once I remove that it builds. Tests are green. How do I make it fail?
Fabian Wallwitz
@cforce
Feb 20 2018 10:50
hi
how would i execute junit tests running in spring cloud dataflow-server ?
is that possible .. maybe embedded as "Cloud Task"
Dave Syer
@dsyer
Feb 20 2018 10:53
"running in data flow server"?
Doesn't quite make sense to me yet
(Usually the best place to ask about SCDF is in the spring-cloud-stream channel BTW)
The server is a standalone app. Nothing runs "in it" other than itself.
Fabian Wallwitz
@cforce
Feb 20 2018 10:55
i thought it can start/schedle task jar's on X inftrastructure
i would like to use i for a regaulr remote execution of a client that is basically a junit test
Dave Syer
@dsyer
Feb 20 2018 10:57
Sounds kind of novel.
But I guess it works.
Isn't it better to use regular CI service?
Fabian Wallwitz
@cforce
Feb 20 2018 10:58
.. well the ci server (jenkins) need a slave to master tcp socket connection to do things like thta .. any your now .. the it guys /firewall) are stil a blocker in this use case
business as usual .. hail to devops
Jagmohan Sharma
@JagmohanSharma
Feb 20 2018 10:59

But once I remove that it builds. Tests are green. How do I make it fail?

Actually I did not add test around this. I added a Rest controller with rest/v1/save endpoint which can be used to reproduce this once service is up. Should I add test to reproduce this?

Dave Syer
@dsyer
Feb 20 2018 11:05
I can do that I guess
Dave Syer
@dsyer
Feb 20 2018 11:29
Why are you creating a DataSourceTransactionManager in a JPA application?
Don't you need a JPA one?
(And to switch off the Spring Boot autoconfigured one?)
Jagmohan Sharma
@JagmohanSharma
Feb 20 2018 12:34
actually in our ecosystem we have such scenario where single service can require multiple dataSources so we went ahead with configuring them property based keys.datasources and switched off autoconfiguration.
Ingo Griebsch
@ingogriebsch
Feb 20 2018 12:51
@NeilMcKeown Thanks for answering. The mentioned is so far clear, what I'm searching for is either a recommendation wich version to use or something we can decide on our own. At the moment we only have 'Edgware is newer' which is not always the best solution in either way. :)
Dave Syer
@dsyer
Feb 20 2018 13:05
Yes, but you didn't switch off the autoconfiguration for JPA.
So the transaction manager is the wrong type, and there is another one attached to this data source from the JPA autoconfig.