Karthik Prasad

1

votes
2

answer
331

views

REST on JMS Transport instead of HTTP

I'm trying to create multiple channels for REST such that my endpoints can be invoked from Browser using http protcol or other applications can asynchronously invoke by placing message on queue. Though I'm able to configure both transport types. I'm able to access the REST service and but fails when...
Karthik Prasad
0

votes
1

answer
23

views

Spring Oauth2 Authorization server User Info Endpoint with multiple grant_type not working

I've authorization server which has inbuilt DB Authentication manager. Here are the configurations. AuthConfig.java @Configuration @EnableAuthorizationServer public class AuthConfig extends AuthorizationServerConfigurerAdapter { @Autowired @Qualifier('authenticationManagerBean') private Authenticati...
Karthik Prasad
1

votes
1

answer
138

views

How to efficiently group events by time in RXJS 5+

I've 4 different types of events, I used Observable.fromEvent(object, 'type1') to convert to observable. They events are triggered has following combinations. only type1. type1, type2 type1, type3 type1, type4, type2, type1, type3 type3, type4, type1 Since there is no straight forward pattern. I use...
Karthik Prasad
1

votes
1

answer
2.1k

views

How to format output date in Itemwriter?

I've a domain class as follows class SubScritpion{ private String subScripId; private String useId; private Date subScripDate; private Date billStartDate; private Date billEndDate; private int amount; //getters and Setters } And I'm reading this data from database with data type as timestamp in da...
Karthik Prasad
1

votes
2

answer
137

views

Jackson map special character to null

How to configure Jackson json deserializer such that special characters say '##', '#null', '-' to null For example: Say my json is { 'userId':'kp','fname':'k','lname':'p','mname':'##', rndNum:'-'} And Java class is class User{ private String userId; private String fname; private String lname; privat...
Karthik Prasad
1

votes
2

answer
1.5k

views

Skip a Static method call in using mockito

I've a method in my main class which calls webservice. I want to skip that method calling, how can I do it in mockito. code is as below MainCLass{ int main(){ // I want to skip this method getting called MyClass.callWebservice(); } }
Karthik Prasad
6

votes
1

answer
4.2k

views

Java 8 DateTimeFormatter for month in all CAPS not working [duplicate]

This question already has an answer here: How to handle upper or lower case in JSR 310? [duplicate] 1 answer I'm trying to parse date time string to LocalDateTime. However if I send month with all caps its thorwning an error, is there any workaround. Here is the below code @Test public void testDat...
Karthik Prasad
3

votes
2

answer
3.1k

views

Callback on tomcat server startup complete

Are there any mechanism, life cycle event or callbacks in spring or tomcat to notify once tomcat server sartup completed( I've 8 web application and queues configured, I would prefer to get notification back to each applications once all the applications are started.). I know the spring has applica...
Karthik Prasad
3

votes
3

answer
10.9k

views

Spring batch Multithreaded processing for Single file to Multiple FIle

My problem statement. Read a csv file with 10 million data and store it in db. with as minimal time as possible. I had implemented it using Simple multi threaded executor of java and the logic is almost similar to spring batch's chunk. Read preconfigured number of data from csv file and then create...
Karthik Prasad
4

votes
1

answer
1.9k

views

what is difference between read_committed and serializable isolation in oracle?

After reading few documents regarding transaction, I'm totally confused now. Let me first explain my scenario. I've a batch read which takes up around 3 minutes to read the data(a select) query from a table. and the same time another thread tries to perfrom insert/update/delete. It was throwing err...
Karthik Prasad
3

votes
3

answer
7.9k

views

ClassNotFoundException Error even though jar file is present in WEB-INF/lib directory

I'm trying to setup tomcat server with all the common spring jars going to tomcat lib directory, since I've number of web apps using spring. However one of my web app uses spring batch with quartaz jar as well. This web app was working fine when all the jars was in app1/WEB-INF/lib directory. Howeve...
Karthik Prasad
2

votes
1

answer
8.2k

views

Spring Maven dependency issue during JUNIT

I'm Struggling to do junit to my code, I'm using spring 3.2.3, when I use spring 3.0.2 it working fine. This question is same as Spring JUnit Test Error but in the example he had said to use transitive dependency(which I don't understand what it is). what I understood from the answer is to exclude t...
Karthik Prasad
2

votes
2

answer
152

views

How to set property of child of child(or nth child) component in Angular 5

How can I set property of child of child(or nth level child) component from parent in Angular 5 without creating intermediate variables. For example lets say I've child component as shown below. @Component({ selector: 'app-child11', template: ' child11 works! Name is {{name}}', styleUrls: ['./child1...
Karthik Prasad
4

votes
2

answer
2.3k

views

How to Retry tasklet in Spring batch?

How to retry a method invoker task, I know that if a chunk task fails there is option to retry and there is option to setup backoff policies but, in method invoker task xsd I can't find retry option. Is there any other alternative to retry the task in case of failure.
Karthik Prasad
3

votes
1

answer
9.7k

views

How to integrate spring boot with JSF 2.2 with embedded tomcat

I'm trying to integrate spring boot with JSF in embedded tomcat with no luck, I tried with two approaches one with web.xml and other with Java config. In both cases xhtml pages are not getting rendered, instead a blank page is getting rendered. Below are configurations. pom.xml 4.0.0 com.kp.swasthik...
Karthik Prasad
2

votes
0

answer
629

views

Fabric8 Docker Maven plugin not working for compose.yml on Multi module project

I trying to use Fabric8 docker-maven-plugin, though I was successful in configuring plugin for individual module and run docker:build docker:start Maven goal without using docker-compose.yml, however I needed externalize ports and link the different module, hence I intended to use docker-compose.yml...
Karthik Prasad
4

votes
1

answer
1k

views

org.springframework.core.env.PropertySourcesPropertyResolver printing value in debug mode

I'm reading jdbc.properties file using properties placeholder as below. In the properties file I'm storing jdbc configuration along with password. When I run the springframework in debug mode. It's printing the properties value which is password. Is there any solution to fix this? Here is my log sta...
Karthik Prasad
8

votes
3

answer
11.5k

views

Spring batch scope issue while using spring boot

I'm having Standalone spring batch job. This works perfectly fine when in JUNIT @RunWith(SpringJUnit4ClassRunner.class) //@SpringApplicationConfiguration(classes = KPBootApplication.class) @ContextConfiguration(locations={'classpath:kp-sb.xml'}) public class KPBootApplicationTests { private final st...
Karthik Prasad
2

votes
1

answer
2k

views

CXF WebSocket configurtion

I'm trying to push some monitoring message to my client jsf page using websocket. But from past 2days have come close to solve but still unable to push message to jsf page though I sucesseded in creating connection to web socket. Here is my javaScript code. websocket = new WebSocket('ws://localhost:...
Karthik Prasad
1

votes
3

answer
212

views

How to cancel all the thread/ threads in ExcecutorService?

I've written following multi thread program. I want to cancel the all the thread if one of the thread sends back false as return. However though I'm canceling the thread by canceling individual task. Its not working. What changes I need to make inorder to cancel the thread? I've written following mu...
Karthik Prasad
8

votes
3

answer
33.2k

views

How to Iterate through HashMap in MyBatis foreach?

I'm trying to produce a sql which is as below in mybatis. SELECT COL_C FROM TBLE_1 WHERE (COL_A, COL_B) in ( ('kp','kar'),('srt','sach')); And my input parameter type is HashMap. Now How do I generate SQL from mapper xml file. The below code throws exception saying map evaluated to null. SELECT COL_...
Karthik Prasad
0

votes
0

answer
432

views

Jenkins REST API Auth using URL parameters

I'm trying configure my Jenkins to allow remote job trigger using REST API. If I pass username and password using basic authentication header param, I'm able to trigger the job -u : http://localhost:8080/job/kp-push-example/build However if I pass username and api token in url, Jenkins is unable to...
Karthik Prasad