December 28, 2020

Could not determine type for: com.google.model.user.adminuser, at table: amazon, for columns: [org.hibernate.mapping.Column(business_seller)]

Could not determine type for: com.fp.ordermanagementservice.model.user.FP_Business_User, at table: fp_order, for columns: [org.hibernate.mapping.Column(business_seller)]


solution

You need to provide mapping annotations like @onetoone

December 21, 2020

No validator could be found for constraint 'javax.validation.constraints.NotBlank' validating type 'java.lang.Long'. Check configuration for 'WorldEnd'



 No validator could be found for constraint 'javax.validation.constraints.NotBlank' validating type 'java.lang.Long'. Check configuration for 'Bean validation in spirng boot'


Solutions

As clearly mentioned in the  problem, to solve this error you MUST use correct annotations.

In above case, 

@NotBlank or @NotEmpty annotation are used in String datatype.

you need to use @NotNull for Long datatypes.


December 14, 2020

No qualifying bean of type 'org.springframework.boot.test.web.client.TestRestTemplate' available: expected at least 1 bean which qualifies as autowire candidate

No qualifying bean of type 'org.springframework.boot.test.web.client.TestRestTemplate' available: expected at least 1 bean which qualifies as autowire candidate

2020-07-04 09:39:16.837 ERROR 1680 --- [           main] o.s.test.context.TestContextManager      : Caught exception while allowing TestExecutionListener [org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@1fdf1c5] to prepare test instance [com.fp.ordermanagementservice.OrderManagementServiceApplicationTests@3f6bfcbe]

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.fp.ordermanagementservice.OrderManagementServiceApplicationTests': Unsatisfied dependency expressed through field 'restTemplate'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.test.web.client.TestRestTemplate' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

December 07, 2020

To developed a pricing engine for a cycle in java - coding test

CODING TEST ( Problem)

The module to be developed is a pricing engine for a cycle. A cycle can be thought of as high level components - 

1. frame 

2. handle bar with brakes 

3. seating, 

4. wheels, 

5. chain assembly 

Each of the above high level components will have parts, for instance, a wheel has spokes, rim, tube, tyre. 

The pricing module should be able to calculate the price of the cycle given its configuration. For example, price a cycle with tubeless tyres, steel frame, 4 gears. The pricing of the parts is time sensitive, means the cost of a tyre will change with time and the module should support this. A tyre can cost 200Rs from Jan 2016 - Nov 2016, and its price can change to Rs 230 from Dec 2016 onwards. 

The pricing module should be a command line executable, no graphical ui needed. It can take its input as command line parameters or as a json text file, whatever is convenient to specify in. The inputs to the module will be the list of constituent parts, date of pricing and it will output the price of the entire cycle and also price for each high level component - frame, wheels etc. 

Modular code and well thought out class/object model is expected as well as Junit tests for main classes. 

Calculate Pricing for 1000 cycles using multithread and blocking queue using a maximum of 10 threads. 



Solution



Facebook comments