gringogordo

1

votes
0

answer
335

views

spring SQL Server Connection issues

I have migrated an existing ORM project to use SQL Server instead of MYSQL. I am using Java 8 and sqljdbc6.version - 6.2.0.jre8. I'm using maven and the reference is in the pom. I have connected to SQL Server in the past using 4.1 and I have the sqljdbc_auth.dll copied in locally. The application...
gringogordo
1

votes
0

answer
16

views

PrimeFaces ExternalContext responsewriter concrete type

I'm looking at a csv export from a java app using JBoss and PrimeFaces. The export is a straight call from the datatable on the web page to the PrimeFaces DataExporter and CSVExporter implementation. I can follow it all through reasonably enough but it begins by getting the writer type from the ex...
gringogordo
1

votes
1

answer
44

views

Deserialise Json into nested pojo's

There seem to be a few similar questions but I can't quite seem to find an answer ? I am trying to parse the json returned by a jqGrid filter property in a controller. To get it working I'm doing it in a very clunky way although once I have it working I'm hoping to ake a next step and pass it as a...
gringogordo
1

votes
1

answer
436

views

MySQL 5.7 default install running much slower than 5.6

I have a java / spring / hibernate app running with connections to a MySQL db. We recently upgraded from 5.6 to 5.7 (on a Windows server) and the app has gone from taking 3 hours to 3 days to complete. It essentially uses hibernate connections to retrieve read only data from the db before processin...
gringogordo
1

votes
1

answer
4.4k

views

Alter column length with liquibase

I am having problems changing a column length in my postgres db with liquibase. I have a table account with a field description varchar(300). I want to change it to varchar(2000). I have dropped and recreated the primary key in the same file so I don't have permissions issues or schema / db names o...
gringogordo
1

votes
1

answer
22

views

Create Test Case in version 14

I am playing with Enterprise Architect for the first time and looking at options for adding Test Cases. I have found a way to add A test case element - Right-click on element | Properties | Responsibilities > Scenarios > Structured Specification and this seems to get me where I want quicker as...
gringogordo
5

votes
5

answer
117

views

casting & generics to enable list concatenation in Java 8

Apologies that is probably the worst Title I've used but I can't quite think how to word it. I'm calling a method table.getColData(COL_1) which returns a generic public List getColData(final String col) I am calling it twice and getting two lists of strings. I want to concatenate these and have en...
gringogordo
6

votes
2

answer
11.5k

views

escaping forward slashes in elasticsearch

I am doing a general search against elasticsearch (1.7) and all is well except my account numbers have forward slashes in them. The account number field is not the id field and is 'not_analyzed'. If I do a search on an account number e.g. AC/1234/A01 then I get thousands of results, presumably be...
gringogordo
2

votes
1

answer
1.7k

views

Basics of adding a custom analyzer to an index built using spring

I think this is a very basic question but I keep going around the houses so any help pointing me in the right direction would be appreciated. I have inherited a java application which builds and elastic search index using spring-data-elasticsearch (1.2.1.RELEASE at the moment). I have modified this...
gringogordo
3

votes
3

answer
107

views

functional if else on a Boolean

I'm looking to do a very basic if else on a boolean optional value. I'm missing something very basic I think so the old school if else nest is like this if (filterValue.isPresent()) { if (filterValue.get()==true) { method1(); } else { method2(); } } else { method3(); } I've tried various attempts...
gringogordo
4

votes
2

answer
5.1k

views

Currency symbol with another number format

I was wondering if there was an elegant way to set the currency format of a number in one way but keep the actual number formatting in another. It is Java. Essentially I am doing this NumberFormat format = NumberFormat.getCurrencyInstance(locale); This is largely fine except I am writing a syste...
gringogordo
1

votes
1

answer
94

views

flatmap a list of keys and sets into a list of pairs

I'm doing an online course and misread a question (which is why I think it's okay to post this question as the answer isn't anything to do with what was asked on the course!). data class Trip( val driver: Driver, val passengers: Set, ... ) val trips: List so it would end up something like [ driv...
gringogordo
2

votes
1

answer
48

views

AngularJS controller performing a get times out

I have a slight passing understanding of AngularJS but nothing more. I have inherited a java app that is a mix between standard Spring MVC and AngularJS. One of the AngularJS controllers calls a standard MVC controller to get a json data set. When this controller takes too long the angularJS page...
gringogordo
2

votes
1

answer
48

views

codehaus sonarqube component moved to sonarsource

I've been trying to get a legacy application to start working with code coverage tools and Sonarqube this week and I've been struggling. I noticed when comparing 2 sample 'apps' I've downloaded and modified to get the basics working that they are using different group Ids for similar components....
gringogordo
2

votes
1

answer
84

views

Adding bootstrap to a css styled 'table'

I have a page which is currently styled centred on bootstrap css (I'm using bootstrap 3 but could probably upgrade to 4 if it made a difference). I can't get it to style the way that I want. I'm not sure if this is because it is not possible or because of y limited skills in this area. Essentially...
gringogordo
7

votes
1

answer
81

views

Add a default item to a stream collection

I am performing some actions on a stream and returning an array list. This is working without a problem but I need to do a final step to add an element if the array list is empty (nothing to do with options / nulls just part of the requirement) My way is a bit clunky and I wondered if it can be do...
gringogordo
3

votes
2

answer
1.5k

views

How to simulate multiple fields in a terms query

I have some code already written (java/spring) which allows users to select check boxes and then builds an elasticSearch query. Up to now this has been working well as the requirement has been that terms in different categories should be AND queries and so it has been possible to loop through the t...
gringogordo
2

votes
1

answer
28

views

Where is the code for the PrimeFaces datatable csv export?

I'm looking at some java code which exports csv & Excel from a PrimeFaces datatable. I've actually not quite got it up and running yet so can't debug, just was having a quick looksee. Oddly it's relatively clear what is going on for Excel & PDF (excel-type-excel-.jar & excel-type-pdf-.jar) but I...
gringogordo
2

votes
1

answer
69

views

IE version check stopped working

I have just released a new version of a web app into test (maven based java app). It checks for old versions of IE and displays a box warning that it is out of date if less than version 9. This is working fine on live and UAT and as far as I can see I haven't changed the relevant files at all - ho...
gringogordo
0

votes
1

answer
1.2k

views

Spring MVC jsp return an item from a select

I think I'm trying to do something very simple but I have been struggling! Essentially I want to open a form with 1 select which is populated by a list of fairly simple items of type user. @Entity @Table(name = 'user') public class User { @Id private String userId; private String userName; priva...
gringogordo
0

votes
3

answer
29

views

kotlin intProgression not iterating?

Sorry this seems very basic but I'm missing something I have a method signature override fun doSomeWork (range: IntProgression, j: Int): List{ I want to iterate the range whatever it is (could be up or down say 1 to 4 or 4 down to 1). The range itself seems to work, so on my 4 down to 1 example...
gringogordo
2

votes
2

answer
2.1k

views

NoClassDefFoundError error creating RestHighLevelClient bean

I'm getting an error creating a HighEndRestClient bean in a SpringBoot app. I have done a test 'app' where I checked I can instantiate the objects I want and then make the calls I want to and I am now making baby steps into making a new application. I have these dependencies in the pom org.elastic...
gringogordo
2

votes
1

answer
6k

views

Centering a list in Bootstrap CSS [duplicate]

This question already has an answer here: How to horizontally align ul to center of div? 5 answers Edit after duplicate report Apologies I think the suggested duplicate may actually be a duplicate. I tried it first and it didn't work for me hence a new question. Having looked again with the new s...
gringogordo