Andy Dufresne

1

votes
1

answer
1.2k

views

Spring Boot Upgrade Error - Invalid bean definition with name org.springframework.transaction.config.internalTransactionalEventListenerFactory

In an attempt to upgrade spring boot to the latest version 2.1.1 & spring framework to 5.1.3 in a java based web application, I get the following error Invalid bean definition with name 'org.springframework.transaction.config.internalTransactionalEventListenerFactory' defined in null The complete st...
Andy Dufresne
1

votes
2

answer
2.2k

views

JUL to SLF4j with oracle jdbc driver

I am trying to redirect java.util.logging messages logged by the oracle jdbc driver and the oracle ucp (universal connection pool) library, but not able to do so. The messages logged by my application using JUL get logged but the ones logged by the oracle libraries are not getting logged. My intent...
Andy Dufresne
1

votes
0

answer
66

views

Can we access spring services outside the web application?

We use spring 4.3 and spring boot version 1.5 in our web application. For (product) analytics purposes we want to read the metadata of our product which is persisted in an RDBMS store (Oracle). Our application uses spring framework to define services that access the database through hibernate (jpa)....
Andy Dufresne
1

votes
0

answer
40

views

Spring Transaction Blocks On Hibernate Query Execution

I am using spring boot 2.0 and hibernate version 4.3.5. I have written a junit test case that gets blocked on a hibernate query execution. The service implementation is as below @Override @Transactional public void deleteAllEmployeesForDept(Long dptId) { entityManager.createQuery('DELETE FROM ' + Pe...
Andy Dufresne
1

votes
2

answer
1.2k

views

Same ROWID in Oracle Clustered Tables

Oracle ROWID is said to be unique within a table. I didn't understand how can two rows of two different tables stored in the same cluster have the same rowid since the last three characters of the ROWID format indicate the row number in the database block? I understand that rows in the clustered tab...
Andy Dufresne
1

votes
1

answer
192

views

Glassfish3 deployment options for third party libraries

We deploy multiple web applications on glassfish 3.1.x application server. I would like to separate out third party libraries out of the individual war files and add them to a common location so that the deployment time is reduced. As a additional advantage the disk space is also reduced. I tried a...
Andy Dufresne
1

votes
1

answer
561

views

Executing OLAP functions with Spark SQL

I am working with spark version 1.6. I want to execute OLAP functions include CUBE, ROLLUP, GROUPING SETS through sql queries on Spark. I understand that the cube and rollup functions are available on the dataframe api but how can I execute them through SQL queries? Do I need to use HiveContext for...
Andy Dufresne
1

votes
1

answer
232

views

Remove duplicates based on one column, then move the “older” duplicate to another sheet

I have a spreadsheet with data columns A through H. I need to remove duplicates based on data in column C. The tricky part is that I have a date in column E. I need the 'older' duplicate to be moved to another sheet, not deleted. I have a macro to move duplicates to another sheet, but it's selection...
Andy Dufresne
1

votes
1

answer
743

views

How to use SBT with Intellij Idea

I am using Scala version 2.10 and SBT version 0.13.8. To build a project I am currently executing the sbt commands through the Intellij terminal but I would like to know the use of SBT Tasks window on the right hand side of intellij idea window. Kindly have a look at the screenshot uploaded How can...
Andy Dufresne
1

votes
1

answer
561

views

Real Time Streaming With Multiple Data Sources Using Kafka

We are planning to build a real time monitoring system with apache kafka. The overall idea is to push data from multiple data sources to kafka and perform data quality checks. I have few questions with this architecture What are the best possible approaches of streaming data from multiple sources wh...
Andy Dufresne
1

votes
1

answer
50

views

Looping a macro for duplicates

I have a macro that runs through data looking for duplicate barcodes, then moves the 'oldest' duplicate (based off a date in another column) to another sheet. Problem here is that I have multiple duplicates due to data entry error and need to run the macro at least 3 times. I would like this program...
Andy Dufresne
1

votes
1

answer
72

views

Optimization Techniques For Rendering Microsoft Teams Conversations From Graph API

We plan to integrate with microsoft teams by calling graph api's and developing our own UI's to allow team discussions/chats. We would be making graph api calls to fetch the threaded discussions from various channels and display them in our application. The UI's look similar to microsoft teams. We a...
Andy Dufresne
1

votes
1

answer
122

views

Guava thread management when pre-loading and refreshing cache entries

We want to use guava cache for caching third party data to have better response times. The cache needs to be pre-loaded by making a sequence of api calls (~ 4000 api calls are to be made). The api response contains the cache key and its value. These api calls need to be made in parallel from multipl...
Andy Dufresne
1

votes
1

answer
401

views

WebClient GET Request Fails With 401 Unauthorized

I am trying to make a GET api request with the below C# code but it fails with System.Net.WebException: The remote server returned an error: (401) Unauthorized. at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) at System.Net.WebClient.DownloadString(Uri address) at Syst...
Andy Dufresne
1

votes
1

answer
194

views

Retaining authorization header in RestSharp during redirects

I am using RestSharp to make a GET api call. The api call is authenticated through HTTP Basic authentication by passing the authorization header. The server redirects the api call with a status code 307. My client code does handle the redirects but the authorization header is not passed to this red...
Andy Dufresne
1

votes
1

answer
0

views

Error while creating/importing skill in watson assistant with lite plan

While trying out the banking chatbot demo I am unable to import a skill with the json file mentioned for the demo. It is a valid json file but import fails with an error 'We could not import your Skill. Unable to fetch access token for account: ' I have a lite plan. I am uploading the json file fro...
Andy Dufresne
1

votes
1

answer
0

views

Language recognizers in Oracle

I wanted to know if there are any language recognizers/parsers in sql (we use Oracle as our relational database) similar to third party libraries like antlr or javacc in java. The intent is to define a grammar which can parse a language(string) and convert it to a sql query.
Andy Dufresne
1

votes
1

answer
0

views

JPA Two ElementCollections of same type in same class

I am using JPA2 specification with hibernate as my persistence provider. Can someone guide me on how to map two element collections of same type in the same class? For e.g. public class Employee { @Id //... private Long id; @ElementCollection private Collection tempAddresses; @ElementColle...
Andy Dufresne
1

votes
2

answer
0

views

Oracle UCP - FCF Planned Outage Support

I am I am testing the Fast Connection Failover(FCF) support from Oracle Universal Connection Pool (UCP) version 11.2.0.1.0. The scenario being tried out is a planned outage event. Oracle Database 11g Release 11.2.0.2.0 standard edition is the database version being used. Below are the steps I follow...
Andy Dufresne
1

votes
1

answer
885

views

Spring Internationalization Support

What are the different ways to resolve UI messages and provide internalization support in an web application using spring framework? We use property files and ResourceBundleMessageSource to resolve messages in Spring. Spring's implementation causes an high cpu usage in our application. There are two...
Andy Dufresne
1

votes
1

answer
796

views

JProfiler inherent time

The hotspots view (cpu view) shows incorrect time units for inherent times. I tried profiling an application which copies a physical file 200 times concurrently. The application completed in 1.2 seconds while the jprofiler snapshot shows a particular method taking 122 secs. That's strange. Anyone w...
Andy Dufresne
1

votes
2

answer
127

views

Hibernate multitenancy test fails with NPE

I'm using schema based multi-tenancy providing implementations for both MultiTenantConnectionProvider & CurrentTenantIdentifierResolver. Trying to get a hibernate session for a single tenant fails with an NPE. Looking into hibernate's source code, it seems that JDBCServicesImpl initializes the conne...
Andy Dufresne
1

votes
2

answer
538

views

Would spark dataframe read from external source on every action?

On a spark shell I use the below code to read from a csv file val df = spark.read.format('org.apache.spark.csv').option('header', 'true').option('mode', 'DROPMALFORMED').csv('/opt/person.csv') //spark here is the spark session df.show() Assuming this displays 10 rows. If I add a new row in the csv b...
Andy Dufresne
1

votes
1

answer
43

views

Instrumenting java string object size gives incorrect result

I am using the java.lang.instrument.Instrumentation package to calculate the size of a java string. I follow the steps as listed here to create a java agent jar. Below is the application code that calls the java agent class public static void main(String[] args) { String string = 'A very long strin...
Andy Dufresne
1

votes
5

answer
685

views

Solutions for virtually splitting a text file

I need to read & process a huge text file. To improve the data processing time, I thought of reading it concurrently by having multiple readers. The idea is to virtually split the file by noting down the start and end pointers. This is done by the main thread at the start of the program. By virtuall...
Andy Dufresne
2

votes
5

answer
399

views

Design Problem - Generating SQL Queries for business calculations

We have an application where the user is allowed to enter expressions for performing calculations on the fields of a database table. The calculations allows various types of functions (math, logic, string, date etc). For e.g MAX(col1, col2, col3). Note that these expressions can get complex by havin...
Andy Dufresne
2

votes
1

answer
1.4k

views

Oracle Update Batching Models - Using both batching models in same application

Oracle JDBC supports two distinct models for update batching: Standard Batching and Oracle Specific Batching. According to oracle 11g JDBC Developer Guide, in any single application, you can use one model or the other, but not both. Oracle JDBC driver will throw exceptions when you mix these. In my...
Andy Dufresne
5

votes
1

answer
11.4k

views

Shell script for logging cpu and memory usage of a linux process

I am looking for a way to log and graphically display cpu and RAM usage of linux processes over time. Since I couldn't find a simple tool to so (I tried zabbix and munin but installation failed) I started writing a shell script to do so The script file parses the output of top command through awk an...
Andy Dufresne
2

votes
2

answer
2.1k

views

How does spring self injection works with @Resource?

This is a question to understand spring internals. There are a couple of workarounds suggested for self injection of a bean in spring because @Autowired doesn't work. Here are few threads. I would like to know the reason why and how does self injection work technically with @Resource annotation? @Se...
Andy Dufresne
7

votes
1

answer
4.9k

views

Hibernate 4 - getGeneratedKeys() support is not enabled

We are in a mode of upgrading hibernate from version 3.6 to 4.1.9 and I am facing an error [#|2013-01-14T18:33:46.519+0530|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=122;_ThreadName=Thread-3;|2013-01-14 18:33:46,518 [http-thread-pool-8080(5)] ERROR e...
Andy Dufresne
20

votes
4

answer
36.3k

views

Taking thread dumps in production

I am analyzing the differences between approaches for taking thread dumps. Below are the couple of them I am researching on Defining a jmx bean which triggers jstack through Runtime.exec() on clicking a declared bean operation. Daemon thread executing 'ManagementFactory.getThreadMXBean().dumpAllThre...
Andy Dufresne
4

votes
1

answer
824

views

High thread context switching for java web application

We have been load testing our java web application and observe high cpu usage with 50 users (which doesn't seem practical). The CPU shoots up above 80%. While profiling it with java flight recording (JFR) we see that the context switch rate is 8400 per second (as seen in the Hot threads tab on java...
Andy Dufresne
3

votes
3

answer
1.5k

views

How to find number of database round trips by an application

I am a java programmer and I want to know how many database calls/trips are done by my application. We use Oracle as our relational database. With oracle, I got to know about a way to alter session statistics and generate the trace files. Below are the queries to be fired: ALTER SESSION SET TIMED_ST...
Andy Dufresne
2

votes
1

answer
1.4k

views

Linux Process Monitoring Using Statsd and Graphite

I would like to monitor linux processes (log cpu and ram usage statistics and display them graphically over a period of time) using statsd and graphite. I have configured statsd and graphite to run as services. How can I send linux resource usage statistics (namely CPU and RAM) to statsd so that th...
Andy Dufresne
2

votes
1

answer
1.4k

views

Deserializing JSON using Jackson 2

I have a json [ { 'host': { 'name': 'anotherfullhost', 'id': 55602819, 'operatingsystem_id': 1073012828, 'hostgroup_id': null } }, { 'host': { 'name': 'dhcp.mydomain.net', 'id': 219245707, 'operatingsystem_id': 1073012828, 'hostgroup_id': null } }, { 'host': { 'name': 'my5name.mydomain.net', 'id':...
Andy Dufresne
2

votes
1

answer
2.1k

views

Implementing application level locking

We have a requirement in our application where resources need to be locked before being accessed/modified to avoid concurrent operations and maintain integrity. Since there are a series of operations performed on the resource we decided to implement an application level locking concept which all the...
Andy Dufresne
2

votes
2

answer
2.3k

views

Java HTTP NTLM Implementation Differences

This link details on the various http client java implementations. I am looking for any links which could provide information about their NTLM protocol implementation differences. On one of the windows machine, I found that the commons-http client 3.1 implementation fails with an authorization erro...
Andy Dufresne
23

votes
2

answer
31.9k

views

inverse=true in JPA annotations

In my application I use JPA 2.0 with Hibernate as the persistence provider. I have a one-to-many relationship between two entities (using a @JoinColumn and not @JoinTable). I wanted to know how could I specify inverse=true (as specified in hbm.xml) in JPA annotations to reverse the relationship owne...
Andy Dufresne
2

votes
2

answer
2.3k

views

OCI JDBC Driver and NLS Settings

We have created a 'after logon' trigger to alter the session in order to set the two NLS settings - NLS_SORT and NLS_COMP. NLS_SORT needs to be set to BINARY_CI and NLS_COMP needs to be set to LINGUISTIC. By querying the V$NLS_PARAMETERS view after establishing the connection to verify the values I...
Andy Dufresne
3

votes
3

answer
2.5k

views

Spring beans with runtime initialization parameters

I have a class which needs Dependency injection for various beans it uses Runtime parameters for initialization The class would look something similar to this public class Validator { @Autowired private ServiceA serviceA; @Autowired private ServiceB serviceB; private String s; private ClassA a; pri...
Andy Dufresne

View additional