Saturday, December 4, 2021

Recent Questions - Stack Overflow

Recent Questions - Stack Overflow


What is the right way to handle App store In App Purchase response?

Posted: 04 Dec 2021 11:03 AM PST

I have integrated In App Purchase 2 in my IONIC 5 app but there are some activities on my php server which i want to do after successful purchase.

Failed to enable developer options

Posted: 04 Dec 2021 11:03 AM PST

Peace I have tried all the options displayed on the site, and I have no way of getting into developer options. Install an app that blocks this option. Is it possible through the computer to enable key mode / debugging mode? Thanks

Error: Unknown authentication strategy "spotify"

Posted: 04 Dec 2021 11:03 AM PST

I get an error when i try out my code 'Error: Unknown authentication strategy "spotify"'. I even tried googling this issue but can't didn't find an answer

Code

const express = require('express')  const app = express()  const passport = require('passport')    app.get('/', passport.authenticate('spotify'), (req, res)=>{      res.redirect('http://localhost:3001/user')  })   app.get('/user', (req, res) => {      if(req.user == undefined){res.status(401).redirect('http://localhost:3001/')}else{res.send(req.user)}  })    module.exports = app  

C# Project with many linked solutions, when changing code in a child solution, it does not apply to the parent solution

Posted: 04 Dec 2021 11:03 AM PST

I have an issue with C# structure. I have one folder with many sub folders and different solutions. I also have one Program.cs under one solution. And another file under another solution. When changing the code in Program.cs and regenerating the solution it works fine. but when changing the code in a child solution's file. it doe not apply to the main. I am quite new to C# and using a complex project of someone else. Could someone advise ? (.NET Framework).

How can I apply the changes from the child solutions to the parent when regenerating it?

what will be the logic behind this

Posted: 04 Dec 2021 11:03 AM PST

We want make a package of total kilos of chocolate. We have small bars that are small (1 kilo each) and big bars that are big (5 kilos each). Implement the function chocolate_package(small, big, total) that takes as inputs the number of small bars that are available, small, the number of big bars that are available, big, and the total number of kilos of chocolate that must be in the package, total. All the input arguments are integers. The function must return the integer number of small bars to use, under the constraint that big bars must be used before small bars, if feasible. If isn't possible to create the package, the function must return -1.

For instance:

• chocolate_package(4, 1, 4) returns 4,

• chocolate_package(3, 1, 9) returns -1,

• chocolate_package(6, 1, 11) returns 6.

how can i implement this

glTexSubImage2D error trying to create atlas with freetype

Posted: 04 Dec 2021 11:02 AM PST

this is the error i'm getting:

E/emuglGLESv2_enc: device/generic/goldfish-opengl/system/GLESv2_enc /GL2Encoder.cpp:s_glTexSubImage2D:2479 GL error 0x502

this is where im creating the texture array:

glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, w, h, 0, GL_ALPHA, GL_UNSIGNED_BYTE, 0);

and here's my call to texsubimage2d:

glTexSubImage2D(GL_TEXTURE_2D, 0, x, 0, face->glyph->bitmap.width,face->glyph->bitmap.rows, GL_RED,GL_UNSIGNED_BYTE,face->glyph->bitmap.buffer);

anyone know how i can fix this, im trying to create a texture atlas for a font using freetype...

vue config devServer proxy is not working in development mode

Posted: 04 Dec 2021 11:02 AM PST

i have added devServer proxy target as

devServer: {     proxy: {       '^/': {         target: 'https://xmlpi-ea.dhl.com/',         ws: true,         changeOrigin: true       }     }    }  

but it is not working when i make build with npm run build, is there a workaround for it?

Apple Business Chat REST API, Downloading and Decrypting Attachment with NodeJS

Posted: 04 Dec 2021 11:02 AM PST

I am reading the apple business chat api docs to decipher an attachment payload.

Then, using a cypher library, decrypt the file by using the AES/CTR/NoPadding algorithm with an all-zero, 16-byte initialization vector (IV) with the key value in the Attachment dictionary for the downloaded attachment.  

Here is my interpretation of this summary

 // The single-use, 256-bit AES key represented as a hex-encoded string.  

const algorithm = 'aes-256-ctr';

        // remove the 00 prefix from the hex-encoded string,           // then decode the string into its original value.   

const key = Buffer.from(decryptKey.substr(2), 'hex');

        // Use the decoded key value to decrypt the downloaded attachment file.             const iv = Buffer.alloc(16, 0);          const key = Buffer.from(decryptKey.substr(2), 'hex');          const decipher = crypto.createDecipheriv(algorithm , key, iv);          decipher.setAutoPadding(false)          let decrypted = decipher.update(data, '', 'hex');          decrypted += decipher.final('hex');          console.log("decrypted:", decrypted);  

Here is a piece of the incoming data:

��F�ڼ���/��G����+� ��)�\M���x�tk��Y(���-�-G�ȍ$t��� )

After decipher:

d3ffade249263d1252ee0dcfa6accd0beff31c607889ff0d31d893adde5063616a15591e181fb698350fb955f

g

Im not sure if I am doing this correctly as when I send the decrypted code back to apple it is always code response 400

npm run build creates bad/duplicate jpg files in dist directory

Posted: 04 Dec 2021 11:02 AM PST

I'm new to Webpack and I'm trying to build a simple web server.

When I run npm run build, my jpg files are created in my dist directory, along with duplicates that can't be loaded. I have an src directory that looks like this:

enter image description here

When I run npm run build, my dist directory looks like this:

enter image description here

In VS Code, I can see that the first and third jpgs generated in the dist folder are loaded correctly and I can see the image when I click on them. These are the only jpg files I expect to be generated. However, the first and fourth jpgs seem to be duplicate generated files, and when I click on them, VS Code shows this:

enter image description here

In the generated index.html file in the dist directory, we can see the HTML is using the jpg files that can't be loaded. We can see this shown here:

<img src="9941501b9ff26a2ac9eb.jpg">  

Unsurprisingly, when I run my server with npm run start:dev, my page does not correctly display the image:

enter image description here

Here is the rule for loading images in my webpack.config.js file:

{      test: /\.(png|svg|jpg|gif)$/,      use: [          {              loader:'file-loader'          }      ]  }  

There has to be something I'm doing wrong here, but I'm not sure what it could be because I'm new to Webpack. Let me know if I can provide more information to help pinpoint the issue and I will be happy to do so.

Postgres: Order coordinates points in a direction

Posted: 04 Dec 2021 11:03 AM PST

I ran into a problem in Postgres when I was working with spatial dates. I have a table with columns: object id and its coordinates (latitude and longitude, data type is geometry). I need to sort this data by coordinates in the direction from northwest to southeast. How can I do this? I suppose that of course I need to use an "order by" and an index. But which and how?

area of the rectangle

Posted: 04 Dec 2021 11:03 AM PST

import java.io.*;  import java.util.*;    public class Solution {        public static void main(String[] args) {          /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */          Scanner s=new Scanner(System.in);          int l=s.nextInt();          int b=s.nextInt();          int area=l*b;          System.out.println(area);      }  }  

This is my code for area of the rectangle,

  1. Why only 12/20 test cases passed for me?
  2. In the question, they have given constraints as 1 <= L, B <=109,how to include them in the code if we want them to include> **

Has anyone seen a weird JavaScript multiplication error like this? 9.4 * 3.6 = 0.03127079174983367?

Posted: 04 Dec 2021 11:03 AM PST

I'm converting from meters/second to kilometers/hour. Very straighforward, right?

enter image description here

So, 9.4 * 3.6 = 33.84, right? Well, step forward with the debugger, and...

enter image description here

0.03127079174983367!?

This is happening using Node.js v14.16.0. I'm going to update my Node.js version and see if that helps, but this is very weird. I'm using TypeScript, so I suppose this could also be a transpilation error.

If I use conditions.windSpeed = conditions.windSpeed * 3.6 the problem goes away.

Could someone tell me where is the problem here?

Posted: 04 Dec 2021 11:04 AM PST

        float Balance, interstate, expected balance;            float years;          // here I want to know the number of years to have certain balance with certain interstate                    Console. WriteLine("Please inter balance ");          Balance = float. Parse(Console.ReadLine());  

        Console. WriteLine("Pease inter Interest Ratee");          interstate = float. Parse(Console.ReadLine());          Console. WriteLine("inter expected balance");          expected balance = float. Parse(Console.ReadLine());            for (float I = Balance; I <= expected balance; I += Balance*interstate)          {              Balance += Balance * interstate;              // Console. WriteLine($"your balance is {I}");              years = I;          }                   Console. WriteLine($"no of years :{years}");  

C++20: How is the returning from atomic::wait() guaranteed by the standard?

Posted: 04 Dec 2021 11:02 AM PST

This is a language-lawyer question.

First of all, does the a.wait() in the following code always get to return?

std::atomic_int a{ 0 };    void f()  {      a.store(1, std::memory_order_relaxed);      a.notify_one();  }  int main()  {      std::thread thread(f);        a.wait(0, std::memory_order_relaxed);//always return?        thread.join();  }  

I believe the standard's intention is that a.wait() always get to return. (Otherwise atomic::wait/notify would be useless, isn't it?) But I think the current standard text cannot guarantee this.

The relevant part of the standard is in §31.6 [atomics.wait] paragraph 4:

A call to an atomic waiting operation on an atomic object M is eligible to be unblocked by a call to an atomic notifying operation on M if there exist side effects X and Y on M such that:

  • (4.1) — the atomic waiting operation has blocked after observing the result of X,
  • (4.2) — X precedes Y in the modification order of M, and
  • (4.3) — Y happens before the call to the atomic notifying operation.

and §31.8.2 [atomics.types.operations] paragraph 29~33:

void wait(T old, memory_order order = memory_order::seq_cst) const volatile noexcept;

void wait(T old, memory_order order = memory_order::seq_cst) const noexcept;

Effects: Repeatedly performs the following steps, in order:

  • (30.1) — Evaluates load(order) and compares its value representation for equality against that of old.
  • (30.2) — If they compare unequal, returns.
  • (30.3) — Blocks until it is unblocked by an atomic notifying operation or is unblocked spuriously.

void notify_one() volatile noexcept;

void notify_one() noexcept;

Effects: Unblocks the execution of at least one atomic waiting operation that is eligible to be unblocked (31.6) by this call, if any such atomic waiting operations exist.

With the above wording, I see two problems:

  1. If the wait() thread saw the value in step (30.1), compared it equal to old in step (30.2), and got scheduled out; then in another thread notify_one() stepped in and saw no blocking thread, doing nothing; the subsequent blocking in step (30.3) would never be unblocked. Here isn't it necessary for the standard to say "wait() function atomically performs the evaluation-compare-block operation", similar to what is said about condition_variable::wait()?
  2. There's no synchronization between notify_*() and unblocking of wait(). If in step (30.3), the thread was unblocked by an atomic notifying operation, it would repeat step (30.1) to evaluate load(order). Here there is nothing preventing it from getting the old value. (Or is there?) Then it would block again. Now no one would wake it.

Is the above concern just nit-picking, or defect of the standard?

What is angular animation doing after a view is created and how to avoid it?

Posted: 04 Dec 2021 11:02 AM PST

I have a very large and complex view that is configured by a customer. So I cannot make it easier, but I want to do my best to make it more performant and to load faster. I am benchmarking the view right now and I have one big block that i don't understand.

The following picture shows the problem. The left side is the view creation, this is my job to get the performance up. But the right side is angular animation. It are a lot of calls to _balanceNamespaceList, where angular does something I don't understand. When the view is created no animation is involved. I have a few animations for dropdowns and dialogs and so on, which are only rendered when they are opened, so they are inside an *ngIf.

Therefore I would like to understand what I have to do to improve that. I have turned off angular animation and this helps, but I would like to keep my animations.

Benchmark Result

FFMPEG not following FPS

Posted: 04 Dec 2021 11:03 AM PST

I have 1300 frames, and I convert them at 21fps. That should be over a minute of footage from my sequence of images, but the lossless command I'm using is producing an 18 second video out of the 1300 frames. Am I doing this wrong?

Command:

ffmpeg -framerate 21 -i Blots_%04d.0001_x2-standard-scale-2_00x.tif -c:v libx264rgb -crf 0 Blots.mp4  

The video in Media Player Classic says it only draws 337 frames at 21fps.

I also tried the following which resutls in the same size file and issue:

ffmpeg -r 21 -i Blots_%04d.0001_x2-standard-scale-2_00x.tif -c:v libx264rgb -crf 0 Blots.mp4  

In iOS, Cursor position is not able to update from the Started event using the "SelectedTextRange"

Posted: 04 Dec 2021 11:03 AM PST

Description

In iOS, not able to update the cursor position manually from the started event using the "SelectedTextRange" property on focus. Please refer to the below sample and screenshot.

Steps to Reproduce

  1. Create a custom control.
  2. Create native control by inheriting from UITextField.
  3. Hook started the event in native.
  4. Use the below code snippet to update the cursor position from the started event. Code Snippet:
var positionToSet = this.GetPosition(this.BeginningOfDocument, 3);                        if (positionToSet != null)                                                                  {                                                                                                this.SelectedTextRange = this.GetTextRange(positionToSet, positionToSet);                 }                                                                                  
       (OR)  
  1. Run the attached sample.
  2. Cursor should be positioned in the 3rd index (next to 3) while focusing on the control.

Expected Behavior

The cursor should be positioned at the third index (next to 3) as shown in the below screenshot. enter image description here

Actual Behavior

The cursor gets positioned at the last.
enter image description here

Sample: https://github.com/xamarin/Xamarin.Forms/files/7653944/CustomControl.zip

Note: Issue reproduced only on or above iOS device 14.4.

UML and CRC Java [closed]

Posted: 04 Dec 2021 11:03 AM PST

I'm trying to make a UML diagram for my program project, the program has 5 classes including the tester/main class, I need help with the relationship between the classes. The four classes are Services, Appointment, Routine and Emergency. Until now I'm certain that Routine and Emergency inherit from the Appointment class, since they use the same attributes and methods from the Appointment class.

My problem is with the Services class, which has methods that help with navigating the appointment menu, whether to schedule a new appointment or check or cancel or reschedule one. One idea I had is that each appointment has one or more services, so it must be that appointment class aggregates services.

NOTE that at the same time the services class uses methods from appointments class... I'm lost.

Help and correct me if I'm wrong.

Services class

public class Services  {  static void scheduleAppointment()      { // schedule an appointment }  static void checkAppointment()      { //check and display info of an appointment }  static void cancelAppointment()      { //cancel and remove an appointment }  static void rescheduleAppointment()      { //change an appointment }  }  

Appointment class

public class Appointment  {      private String serviceType;      private int patientID;      private String patientName;      private String appointmentTime;      private String doctorName;      private String symptoms;    public Appointment(String serviceType, int patientID, String patientName, String appointmentTime, String doctorName, String symptoms)      {      this.serviceType = serviceType;      this.patientID = patientID;      this.patientName = patientName;      this.appointmentTime = appointmentTime;      this.doctorName = doctorName;      this.symptoms = symptoms;      }    public String get/setSeriveType()  public int get/setPatientID()  public String get/setPatientName()  public String get/setAppointmentTime()  public String get/setDoctorName()  public String get/setSymptoms()  }  

Routine class

public class Routine extends Appointment  {      private static String serviceType;      private int patientID;      private String patientName;      private String appointmentTime;      private String doctorName;      private String tests;        public Routine(int patientID, String patientName, String appointmentTime, String doctorName, String tests)      {          super("Routine",patientID,patientName,appointmentTime,doctorName,tests);      }  }  

Emergency class

public class Emergency extends Appointment  {      private static String serviceType;      private int patientID;      private String patientName;      private String appointmentTime;      private String doctorName;      private String symptoms;        public Emergency(int patientID, String patientName, String appointmentTime, String doctorName, String symptoms)      {          super("Emergency",patientID,patientName,appointmentTime,doctorName,symptoms);      }  

My UML Diagram till now

How to get list of all subfolders in one folder and write it to txt file using vb

Posted: 04 Dec 2021 11:02 AM PST

I want to know, how it possible to get list of all subfolders in "C/Windows" and write it to txt file. Here is my code:

Sub Check  MkDir "c:\New_Folder"    Dim iFileNo as Integer  Dim strFile As String    strFile = "c:\New_Folder\data.txt" 'the file you want to save to    intFile = FreeFile    Open strFile For Output As #intFile      Print #intFile,     Close #intFile    End Sub  

Full Explanation: Write a program, like opening a folder on the D drive (the folder is your nickname). In this folder open the file data.txt, in which write down the names of all folders from the directory C: \ Windows. 2. Write a program that reads information from a file, which was opened with a first program and transfer through MsgBox skin another row to the file

uint32_t to double with negative result not working [closed]

Posted: 04 Dec 2021 11:04 AM PST

I have a uint32_t that needs to be translated into a signed float or double.

I have tried converting to 2s compliment and divding by the resolution, but when I print the value, the negative sign is not shown, but the absolute value seems to be correct.

I converted to 2s compliment and adjusting resolution by by (~a +1) / 10000000 and storing to a new double variable

However, the negative sign doesn't come through For example, 0xB9EB02A8 converts to 11757806960 and is missing the minus sign.

Any ideas?

Double lat;  uint32_t rxFrame.dataWord0 = 0xb9eb04f2; //actually received from canbus    lat = (~rxFrame.dataWord0 + 1);   printf("%f",lat);  

Output: 1175780110

Ionic inappbrowser not working after coming back from external link

Posted: 04 Dec 2021 11:03 AM PST

I have and ionic project with ios, android and browser. The problem is in IOS and Android: from tab1.page.html, after opening a login page (which in an external server) in the iOS browser without any problem, that external page has a link back to the ionic project(to map.component.html) which opens alright but buttons in the page which should open the browser again will not work, not error no nothing, just there is no action.

If I open map.component.html directly from inside the ionic project the button work normally and the browser is open. It's only where I come back from an external page when button do nothing.

Any help would be much appreciate it, it's been days banging my head against the wall...

tab1.page.html

<div>  <a href="#" routerLink="/login" routerDirection="root"><ion-ripple-effect></ion-ripple-effect><img src="../../assets/images/top-btn-reserve.png" class="drop-shadow" alt="login"></a>  </div>  

login.page.ts

private  loginUrl = 'https://test.blabla.reservation/index';      constructor(          private inAppBrowser: InAppBrowser      ) {      }        ngOnInit() {          const browser = this.inAppBrowser.create(this.loginUrl, '_self', {location: 'no', zoom: 'no', toolbar: 'no'});      }  

app-routing.module

{ path: 'guidance', loadChildren: './guidance/tab2.module#Tab2PageModule',pathMatch: 'full'},  

map.component.ts

openMapApp() {          console.log("In openMAPPPP");          const browser = this.inAppBrowser.create('https://www.google.com', '_system', {location: 'yes', zoom: 'no', toolbar: 'no'});  }  

map.component.html

<ion-button  id="navigation_icon" class="navigation_icon" shape="round" size="default" color="light" (click)="openMapApp()">GoogleMapsで見る</ion-button>      Ionic:       Ionic CLI                     : 6.18.1 (/Users/allround/.nvm/versions/node/v12.22.6/lib/node_modules/@ionic/cli)     Ionic Framework               : @ionic/angular 4.11.5     @angular-devkit/build-angular : 0.13.10     @angular-devkit/schematics    : 8.3.19     @angular/cli                  : 7.3.10     @ionic/angular-toolkit        : 1.5.1    Capacitor:       Capacitor CLI      : 1.5.1     @capacitor/android : not installed     @capacitor/core    : 1.5.1     @capacitor/ios     : 1.5.2    Cordova:       Cordova CLI       : 10.0.0 (cordova-lib@10.1.0)     Cordova Platforms : browser 6.0.0, ios 6.2.0     Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 12 other plugins)  

Monospace in ipywidgets.Textarea?

Posted: 04 Dec 2021 11:02 AM PST

how could I get my widgets to use monospace fonts?

from ipywidgets import Textarea  Textarea('The world is bigger than you.')  

I want to show some table style data.

How to write console output to a text file with Rscript, like you can with R CMD BATCH

Posted: 04 Dec 2021 11:03 AM PST

In the past I have used R CMD BATCH to execute R code from the command line on a Linux server. The syntax I used was

R CMD BATCH --no-save --no-restore rcode.r output.txt  

The above code writes console output to output.txt which can be monitored as the script is running. Is this also possible with Rscript? I would prefer to use Rscript since I have heard that R CMD BATCH is deprecated.

To clarify my original question, R CMD BATCH writes all console output, including messages, warnings, and print() statements, to output.txt. In contrast Rscript rcode.r > output.txt writes only the print()ed output to the text file and everything else to the terminal. How can I replicate the behavior of R CMD BATCH with Rscript?

How to Split Material Chips On New Line?

Posted: 04 Dec 2021 11:04 AM PST

On pressing enter I am in need to split each item on next line. Material Chips. Any pointers on how to get started.

I started with textarea and started writing custom CSS to achieve it. But UI is not as great as Material.

Bootbox alert not working

Posted: 04 Dec 2021 11:02 AM PST

trying to use Bootbox confirmation but i start testing it with bootbox.alert(), but it's not working.

I confirm that i have bootstrab.css, bootstrab.js, jquery.js and -bootbox.min.js included in the web header:

 <link href="{% static "css/patients.css" %}" rel="stylesheet">   <link href="{% static "css/bootstrap.css" %}" rel="stylesheet">    <link href="{% static "css/bootstrap.min.css" %}" rel="stylesheet">  <link href="{% static "css/jquery-ui.min.css" %}" rel="stylesheet">  <link href="{% static "css/bootstrap.min.css" %}" rel="stylesheet">  <link href="{% static "css/bootstrap-datetimepicker.min.css" %}" rel="stylesheet">  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.4.0/bootbox.min.js"></script>  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>  

Here is my button that i want to generate the alert when clicked:

<form id='form'  name='delete'  action="{% url 'delete_person' person.id %}"            method='POST'>        {% csrf_token %}        <button type='submit' class='btn btn-xs btn-link icon'><i  class='glyphicon glyphicon-remove'></i></button>  </form>  

In same .html file i have :

<script type="text/javascript">      $(document).ready(function(){             $('.btn').on('click' , function(){                   bootbox.alert("hello there!");                           });                   });</script>  

when i click on the button nothing happened,

I confirmed that my browser are able to download the content from CDN, not sure where is the issue.

Access is denied (user is anonymous); redirecting to authentication entry point in Spring

Posted: 04 Dec 2021 11:02 AM PST

I am new to Spring Security. I am trying to add LDAP authentication to a Spring Web app. I set up a test LDAP server and trying to authenticate the web app using it. But somehow, when I enter username and password in the login page, I keep getting this error.

Following is my WebSecurityConfig.java file:

package com.logsniffer.web.util;    import org.springframework.beans.factory.annotation.Autowired;  import org.springframework.context.annotation.Configuration;  import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;  import org.springframework.security.config.annotation.web.builders.HttpSecurity;  import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;  import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;  import org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider;  import org.springframework.context.annotation.Bean;   import org.apache.log4j.Logger;    @Configuration  @EnableWebSecurity  public class WebSecurityConfig extends WebSecurityConfigurerAdapter {        static Logger log = Logger.getLogger(WebSecurityConfig.class.getName());        @Override      protected void configure(HttpSecurity http) throws Exception {          http              .authorizeRequests()              .anyRequest()              .authenticated()              .and()              .formLogin();      }        @Autowired      public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {          auth              .ldapAuthentication()              .userDnPatterns("uid={0},cn=admin,ou=support,dc=ldap,dc=com")              .contextSource()              .port(389)              .url("ldap://localhost")              .managerDn("cn=admin,dc=ldap,dc=com")              .managerPassword("thresh143");      }  }  

I enabled the debug logs and my stack trace is shown below.

    016-09-11 20:25:09,608 DEBUG [org.springframework.security.web.FilterChainProxy] / at position 1 of 12 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'  2016-09-11 20:25:09,612 DEBUG [org.springframework.security.web.FilterChainProxy] / at position 2 of 12 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'  2016-09-11 20:25:09,613 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] No HttpSession currently exists  2016-09-11 20:25:09,613 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] No SecurityContext was available from the HttpSession: null. A new one will be created.  2016-09-11 20:25:09,617 DEBUG [org.springframework.security.web.FilterChainProxy] / at position 3 of 12 in additional filter chain; firing Filter: 'HeaderWriterFilter'  2016-09-11 20:25:09,618 DEBUG [org.springframework.security.web.header.writers.HstsHeaderWriter] Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@9a6237a  2016-09-11 20:25:09,618 DEBUG [org.springframework.security.web.FilterChainProxy] / at position 4 of 12 in additional filter chain; firing Filter: 'LogoutFilter'  2016-09-11 20:25:09,618 DEBUG [org.springframework.security.web.util.matcher.AntPathRequestMatcher] Checking match of request : '/'; against '/logout'  2016-09-11 20:25:09,618 DEBUG [org.springframework.security.web.FilterChainProxy] / at position 5 of 12 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'  2016-09-11 20:25:09,619 DEBUG [org.springframework.security.web.util.matcher.AntPathRequestMatcher] Request 'GET /' doesn't match 'POST /login  2016-09-11 20:25:09,619 DEBUG [org.springframework.security.web.FilterChainProxy] / at position 6 of 12 in additional filter chain; firing Filter: 'DefaultLoginPageGeneratingFilter'  2016-09-11 20:25:09,619 DEBUG [org.springframework.security.web.FilterChainProxy] / at position 7 of 12 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'  2016-09-11 20:25:09,619 DEBUG [org.springframework.security.web.FilterChainProxy] / at position 8 of 12 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'  2016-09-11 20:25:09,621 DEBUG [org.springframework.security.web.FilterChainProxy] / at position 9 of 12 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'  2016-09-11 20:25:09,622 DEBUG [org.springframework.security.web.authentication.AnonymousAuthenticationFilter] Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken@9055e4a6: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@957e: RemoteIpAddress: 127.0.0.1; SessionId: null; Granted Authorities: ROLE_ANONYMOUS'  2016-09-11 20:25:09,623 DEBUG [org.springframework.security.web.FilterChainProxy] / at position 10 of 12 in additional filter chain; firing Filter: 'SessionManagementFilter'  2016-09-11 20:25:09,623 DEBUG [org.springframework.security.web.session.SessionManagementFilter] Requested session ID 1f9bsaf2s4smc1qgbhwob9rv0p is invalid.  2016-09-11 20:25:09,623 DEBUG [org.springframework.security.web.FilterChainProxy] / at position 11 of 12 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'  2016-09-11 20:25:09,623 DEBUG [org.springframework.security.web.FilterChainProxy] / at position 12 of 12 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'  2016-09-11 20:25:09,624 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] Secure object: FilterInvocation: URL: /; Attributes: [authenticated]  2016-09-11 20:25:09,625 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor] Previously Authenticated: org.springframework.security.authentication.AnonymousAuthenticationToken@9055e4a6: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@957e: RemoteIpAddress: 127.0.0.1; SessionId: null; Granted Authorities: ROLE_ANONYMOUS  2016-09-11 20:25:09,631 DEBUG [org.springframework.security.access.vote.AffirmativeBased] Voter: org.springframework.security.web.access.expression.WebExpressionVoter@3e7987f7, returned: -1  2016-09-11 20:25:09,641 DEBUG [org.springframework.security.web.access.ExceptionTranslationFilter] Access is denied (user is anonymous); redirecting to authentication entry point  org.springframework.security.access.AccessDeniedException: Access is denied          at org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:83)          at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:232)          at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:123)          at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)          at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)          at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)          at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)          at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)          at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)          at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:162)          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)          at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)          at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)          at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)          at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)          at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)          at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)          at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)          at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)          at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)          at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)          at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)          at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)          at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)          at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)          at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)          at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)          at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)          at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)          at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)          at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)          at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)          at org.eclipse.jetty.server.Server.handle(Server.java:499)          at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)          at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)          at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)          at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)          at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)          at java.lang.Thread.run(Thread.java:745)  2016-09-11 20:25:09,646 DEBUG [org.springframework.security.web.util.matcher.AndRequestMatcher] Trying to match using NegatedRequestMatcher [requestMatcher=Ant [pattern='/**/favicon.ico']]  2016-09-11 20:25:09,646 DEBUG [org.springframework.security.web.util.matcher.AntPathRequestMatcher] Checking match of request : '/'; against '/**/favicon.ico'  2016-09-11 20:25:09,647 DEBUG [org.springframework.security.web.util.matcher.NegatedRequestMatcher] matches = true  2016-09-11 20:25:09,647 DEBUG [org.springframework.security.web.util.matcher.AndRequestMatcher] Trying to match using NegatedRequestMatcher [requestMatcher=MediaTypeRequestMatcher [contentNegotiationStrategy=org.springframework.web.accept.ContentNegotiationManager@784167fc, matchingMediaTypes=[application/json], useEquals=false, ignoredMediaTypes=[*/*]]]  2016-09-11 20:25:09,653 DEBUG [org.springframework.security.web.util.matcher.MediaTypeRequestMatcher] httpRequestMediaTypes=[text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8]  2016-09-11 20:25:09,654 DEBUG [org.springframework.security.web.util.matcher.MediaTypeRequestMatcher] Processing text/html  2016-09-11 20:25:09,654 DEBUG [org.springframework.security.web.util.matcher.MediaTypeRequestMatcher] application/json .isCompatibleWith text/html = false  2016-09-11 20:25:09,654 DEBUG [org.springframework.security.web.util.matcher.MediaTypeRequestMatcher] Processing application/xhtml+xml  2016-09-11 20:25:09,654 DEBUG [org.springframework.security.web.util.matcher.MediaTypeRequestMatcher] application/json .isCompatibleWith application/xhtml+xml = false  2016-09-11 20:25:09,654 DEBUG [org.springframework.security.web.util.matcher.MediaTypeRequestMatcher] Processing application/xml;q=0.9  2016-09-11 20:25:09,654 DEBUG [org.springframework.security.web.util.matcher.MediaTypeRequestMatcher] application/json .isCompatibleWith application/xml;q=0.9 = false  2016-09-11 20:25:09,654 DEBUG [org.springframework.security.web.util.matcher.MediaTypeRequestMatcher] Processing */*;q=0.8  2016-09-11 20:25:09,654 DEBUG [org.springframework.security.web.util.matcher.MediaTypeRequestMatcher] Ignoring  2016-09-11 20:25:09,654 DEBUG [org.springframework.security.web.util.matcher.MediaTypeRequestMatcher] Did not match any media types  2016-09-11 20:25:09,654 DEBUG [org.springframework.security.web.util.matcher.NegatedRequestMatcher] matches = true  2016-09-11 20:25:09,655 DEBUG [org.springframework.security.web.util.matcher.AndRequestMatcher] Trying to match using NegatedRequestMatcher [requestMatcher=RequestHeaderRequestMatcher [expectedHeaderName=X-Requested-With, expectedHeaderValue=XMLHttpRequest]]  2016-09-11 20:25:09,655 DEBUG [org.springframework.security.web.util.matcher.NegatedRequestMatcher] matches = true  2016-09-11 20:25:09,655 DEBUG [org.springframework.security.web.util.matcher.AndRequestMatcher] All requestMatchers returned true  2016-09-11 20:25:09,669 DEBUG [org.springframework.security.web.savedrequest.HttpSessionRequestCache] DefaultSavedRequest added to Session: DefaultSavedRequest[http://localhost:8082/]  2016-09-11 20:25:09,669 DEBUG [org.springframework.security.web.access.ExceptionTranslationFilter] Calling Authentication entry point.  2016-09-11 20:25:09,670 DEBUG [org.springframework.security.web.DefaultRedirectStrategy] Redirecting to 'http://localhost:8082/login'  2016-09-11 20:25:09,670 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.  2016-09-11 20:25:09,674 DEBUG [org.springframework.security.web.context.SecurityContextPersistenceFilter] SecurityContextHolder now cleared, as request processing completed  2016-09-11 20:25:09,680 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 1 of 12 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'  2016-09-11 20:25:09,680 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 2 of 12 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'  2016-09-11 20:25:09,680 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] HttpSession returned null object for SPRING_SECURITY_CONTEXT  2016-09-11 20:25:09,680 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] No SecurityContext was available from the HttpSession: org.eclipse.jetty.server.session.HashedSession:17btgxu8eozffd9lq5nj9wzbv@2100204867. A new one will be created.  2016-09-11 20:25:09,680 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 3 of 12 in additional filter chain; firing Filter: 'HeaderWriterFilter'  2016-09-11 20:25:09,680 DEBUG [org.springframework.security.web.header.writers.HstsHeaderWriter] Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@9a6237a  2016-09-11 20:25:09,681 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 4 of 12 in additional filter chain; firing Filter: 'LogoutFilter'  2016-09-11 20:25:09,681 DEBUG [org.springframework.security.web.util.matcher.AntPathRequestMatcher] Checking match of request : '/login'; against '/logout'  2016-09-11 20:25:09,681 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 5 of 12 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'  2016-09-11 20:25:09,681 DEBUG [org.springframework.security.web.util.matcher.AntPathRequestMatcher] Request 'GET /login' doesn't match 'POST /login  2016-09-11 20:25:09,681 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 6 of 12 in additional filter chain; firing Filter: 'DefaultLoginPageGeneratingFilter'  2016-09-11 20:25:09,684 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.  2016-09-11 20:25:09,687 DEBUG [org.springframework.security.web.context.SecurityContextPersistenceFilter] SecurityContextHolder now cleared, as request processing completed  2016-09-11 20:25:13,812 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 1 of 12 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'  2016-09-11 20:25:13,813 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 2 of 12 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'  2016-09-11 20:25:13,813 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] HttpSession returned null object for SPRING_SECURITY_CONTEXT  2016-09-11 20:25:13,813 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] No SecurityContext was available from the HttpSession: org.eclipse.jetty.server.session.HashedSession:17btgxu8eozffd9lq5nj9wzbv@2100204867. A new one will be created.  2016-09-11 20:25:13,813 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 3 of 12 in additional filter chain; firing Filter: 'HeaderWriterFilter'  2016-09-11 20:25:13,813 DEBUG [org.springframework.security.web.header.writers.HstsHeaderWriter] Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@9a6237a  2016-09-11 20:25:13,813 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 4 of 12 in additional filter chain; firing Filter: 'LogoutFilter'  2016-09-11 20:25:13,813 DEBUG [org.springframework.security.web.util.matcher.AntPathRequestMatcher] Checking match of request : '/login'; against '/logout'  2016-09-11 20:25:13,813 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 5 of 12 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'  2016-09-11 20:25:13,813 DEBUG [org.springframework.security.web.util.matcher.AntPathRequestMatcher] Checking match of request : '/login'; against '/login'  2016-09-11 20:25:13,813 DEBUG [org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter] Request is to process authentication  2016-09-11 20:25:13,818 DEBUG [org.springframework.security.authentication.ProviderManager] Authentication attempt using org.springframework.security.ldap.authentication.LdapAuthenticationProvider  2016-09-11 20:25:13,819 DEBUG [org.springframework.security.ldap.authentication.LdapAuthenticationProvider] Processing authentication request for user: sramasinghe  2016-09-11 20:25:13,829 DEBUG [org.springframework.security.ldap.authentication.BindAuthenticator] Attempting to bind as uid=sramasinghe,ou=support,dc=ldap,dc=com,dc=ldap,dc=com  2016-09-11 20:25:13,829 DEBUG [org.springframework.security.ldap.DefaultSpringSecurityContextSource] Removing pooling flag for user uid=sramasinghe,ou=support,dc=ldap,dc=com,dc=ldap,dc=com  2016-09-11 20:25:13,839 DEBUG [org.springframework.security.ldap.authentication.BindAuthenticator] Failed to bind as uid=sramasinghe,ou=support,dc=ldap,dc=com: org.springframework.ldap.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]  2016-09-11 20:25:13,839 DEBUG [org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter] Authentication request failed: org.springframework.security.authentication.BadCredentialsException: Bad credentials  2016-09-11 20:25:13,840 DEBUG [org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter] Updated SecurityContextHolder to contain null Authentication  2016-09-11 20:25:13,840 DEBUG [org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter] Delegating to authentication failure handler org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler@29fe65da  2016-09-11 20:25:13,840 DEBUG [org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler] Redirecting to /login?error  2016-09-11 20:25:13,840 DEBUG [org.springframework.security.web.DefaultRedirectStrategy] Redirecting to '/login?error'  2016-09-11 20:25:13,840 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.  2016-09-11 20:25:13,840 DEBUG [org.springframework.security.web.context.SecurityContextPersistenceFilter] SecurityContextHolder now cleared, as request processing completed  2016-09-11 20:25:13,853 DEBUG [org.springframework.security.web.FilterChainProxy] /login?error at position 1 of 12 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'  2016-09-11 20:25:13,854 DEBUG [org.springframework.security.web.FilterChainProxy] /login?error at position 2 of 12 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'  2016-09-11 20:25:13,854 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] HttpSession returned null object for SPRING_SECURITY_CONTEXT  2016-09-11 20:25:13,854 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] No SecurityContext was available from the HttpSession: org.eclipse.jetty.server.session.HashedSession:17btgxu8eozffd9lq5nj9wzbv@2100204867. A new one will be created.  2016-09-11 20:25:13,854 DEBUG [org.springframework.security.web.FilterChainProxy] /login?error at position 3 of 12 in additional filter chain; firing Filter: 'HeaderWriterFilter'  2016-09-11 20:25:13,854 DEBUG [org.springframework.security.web.header.writers.HstsHeaderWriter] Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@9a6237a  2016-09-11 20:25:13,854 DEBUG [org.springframework.security.web.FilterChainProxy] /login?error at position 4 of 12 in additional filter chain; firing Filter: 'LogoutFilter'  2016-09-11 20:25:13,854 DEBUG [org.springframework.security.web.util.matcher.AntPathRequestMatcher] Checking match of request : '/login'; against '/logout'  2016-09-11 20:25:13,854 DEBUG [org.springframework.security.web.FilterChainProxy] /login?error at position 5 of 12 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'  2016-09-11 20:25:13,854 DEBUG [org.springframework.security.web.util.matcher.AntPathRequestMatcher] Request 'GET /login' doesn't match 'POST /login  2016-09-11 20:25:13,854 DEBUG [org.springframework.security.web.FilterChainProxy] /login?error at position 6 of 12 in additional filter chain; firing Filter: 'DefaultLoginPageGeneratingFilter'  2016-09-11 20:25:13,854 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.  2016-09-11 20:25:13,855 DEBUG [org.springframework.security.web.context.SecurityContextPersistenceFilter] SecurityContextHolder now cleared, as request processing completed  2016-09-11 20:25:13,916 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 1 of 12 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'  2016-09-11 20:25:13,917 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 2 of 12 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'  2016-09-11 20:25:13,917 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] HttpSession returned null object for SPRING_SECURITY_CONTEXT  2016-09-11 20:25:13,917 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] No SecurityContext was available from the HttpSession: org.eclipse.jetty.server.session.HashedSession:17btgxu8eozffd9lq5nj9wzbv@2100204867. A new one will be created.  2016-09-11 20:25:13,917 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 3 of 12 in additional filter chain; firing Filter: 'HeaderWriterFilter'  2016-09-11 20:25:13,917 DEBUG [org.springframework.security.web.header.writers.HstsHeaderWriter] Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@9a6237a  2016-09-11 20:25:13,917 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 4 of 12 in additional filter chain; firing Filter: 'LogoutFilter'  2016-09-11 20:25:13,917 DEBUG [org.springframework.security.web.util.matcher.AntPathRequestMatcher] Checking match of request : '/login'; against '/logout'  2016-09-11 20:25:13,917 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 5 of 12 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'  2016-09-11 20:25:13,917 DEBUG [org.springframework.security.web.util.matcher.AntPathRequestMatcher] Request 'GET /login' doesn't match 'POST /login  2016-09-11 20:25:13,917 DEBUG [org.springframework.security.web.FilterChainProxy] /login at position 6 of 12 in additional filter chain; firing Filter: 'DefaultLoginPageGeneratingFilter'  2016-09-11 20:25:13,917 DEBUG [org.springframework.security.web.context.HttpSessionSecurityContextRepository] SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.  2016-09-11 20:25:13,918 DEBUG [org.springframework.security.web.context.SecurityContextPersistenceFilter] SecurityContextHolder now cleared, as request processing completed  

Android Studio ClassNotFoundException: com.mysql.jdbc.Driver after adding module

Posted: 04 Dec 2021 11:02 AM PST

The error I am getting is java.lang.ClassNotFoundException: com.mysql.jdbc.Driver even though I have already added the .jar file by going to file -> project structure -> import .JAR Package. What could be the issue here?
Image of module inside project structure:

enter image description here

Find the width of the widest word in the html block

Posted: 04 Dec 2021 11:02 AM PST

The goal is to find the width of the widest word here.

The text is a sentence consisting of words with different fonts, as shown in the image.

font ranges the html looks like :

<span style="font:bold 14px Verdana;">LONGESTW</span>  <span style="font:bold 42px Verdana;">ORD</span>  <span style="font:bold 14px Verdana;">&nbsp;</span>  <span style="font:bold 24px Verdana;">ORD</span>  <span style="font:bold 14px Verdana;">&nbsp;</span>  <span style="font:bold 24px Verdana;">regular</span>  <span style="font:bold 14px Verdana;">&nbsp;</span>  <span style="font:bold 32px Verdana;">w</span>  <span style="font:bold 96px Verdana;">id</span>  <span style="font:bold 64px Verdana;">est</span>   

So, here the 3rd word is the widest. Any ideas? Everything is html and we can use any thing ( jquery,ES5 techniques etc).

QAction shortcut doesnt always work

Posted: 04 Dec 2021 11:03 AM PST

I have a Qaction on a menu item for deleting selected items in one of my views. Here is how i create the action:

deleteAct = new QAction( tr("Delete Selected"), this);  deleteAct->setShortcut(QKeySequence::Delete);  connect(deleteAct, SIGNAL(triggered()), this, SLOT(deleteSelected()));    

I setup a keyboard shortcut (Delete Key) which should trigger the delectAct action. It works most of the time but at some points it stops working... Does anyone know why the shortcut would stop working?

Note: the action still works if i trigger it from the menu item. Its just the shortcut that doesn't...

Connection Error:Oracle.DataAccess.Client.OracleException ORA-12170

Posted: 04 Dec 2021 11:02 AM PST

This has taken many hours of mine. I have to get this .Net app to run on an XP system. Someone seems to have messed up some files so conn.Open() in the C# is causing this error:

    Connection Error:Oracle.DataAccess.Client.OracleException ORA-12170:   TNS:Connect timeout occurred at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection   conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure) at   Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn,   IntPtr opsErrCtx, Object src) at Oracle.DataAccess.Client.OracleConnection.Open() at   Service.connect(Int32 sql_choice, String databaseIdentifier, String authenticationKey) in   c:\Documents ....  

This is my sqlnet.ora file:

# sqlnet.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora    SQLNET.AUTHENTICATION_SERVICES= (NTS)    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)    SQLNET.INBOUND_CONNECT_TIMEOUT = 180  SQLNET.SEND_TIMEOUT = 180  SQLNET.RECV_TIMEOUT = 180  

This is tnsnames.ora:

# tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora  # Generated by Oracle configuration tools.    ORACLE2 =    (DESCRIPTION =      (ADDRESS = (PROTOCOL = TCP)(HOST = dell )(PORT = 1521))      (CONNECT_DATA =        (SERVER = DEDICATED)        (SERVICE_NAME = oracle2)      )    )    ORCL =    (DESCRIPTION =      (ADDRESS = (PROTOCOL = TCP)(HOST = dell )(PORT = 1521))      (CONNECT_DATA =        (SERVER = DEDICATED)        (SERVICE_NAME = orcl)      )    )    EXTPROC_CONNECTION_DATA =    (DESCRIPTION =      (ADDRESS_LIST =        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))      )      (CONNECT_DATA =        (SID = PLSExtProc)        (PRESENTATION = RO)      )    )  

This is listener.ora:

# listener.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\listener.ora  # Generated by Oracle configuration tools.    SID_LIST_LISTENER =    (SID_LIST =      (SID_DESC =        (SID_NAME = PLSExtProc)        (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)        (PROGRAM = extproc)      )    )    LISTENER =    (DESCRIPTION_LIST =      (DESCRIPTION =        (ADDRESS = (PROTOCOL = TCP)(HOST = dell  )(PORT = 1521))      )    )  

I've tried changing the host name to localhost, 127.0.0.1 but that doesn't work. Also,

  • I can execute queries from SQL Plus.
  • There are NO firewalls on the system
  • The .Net app and DB are on the same machine.

No comments:

Post a Comment