Category "java"

Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. with FF version 26.0 and selenium standalone jar 2.39

I am trying to connect to selenium 2.30 with FF version 26.0 installed in my AWS unix machine but I am getting below error when I start both my client which acc

Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.bean.CookieTei

I am trying to build struts 1 web project using maven in eclipse. I am getting the following error: My pom.xml is below: <project xmlns="http://maven.apa

Given sorted Array, Returns index i if array A contains an element A[i] such that A[i] = i (recursive and divide and conquer)

So i have homework to make a recursive method that uses a divide and conquer algorithm to search a sorted array and check if A[i] == i (if value matches current

What does joinPoint.proceed() do?

It is my first approaching to AOP. I've a spring-boot application with one Aspect, a Logger. Searching i reach to the conclusion that the @Around method execute

Why can an Object member variable not be both final and volatile in Java?

If in a class I have a ConcurrentHashMap instance that will be modified and read by multiple threads I might define like this: public class My Class { pri

DuplicateMappingException represented by different logical column names

I'm using OneToMany mapping for two classes MasavNew and MasavRow : @Entity @Table(name = "ArgoCHFileHdr") public class MasavNew { @OneToMany(fetch = Fetch

How to find the product and sum of digits of a number in java?

I need to find the sum and the product of the digits of the number entered. I have the sum part down but the only problem with it is that when I enter a number

protobuf - field name with special characters

I'm trying to manually model a .proto file representing a JSON which has one of the field names with a dot and an @ sign. I'm getting an error that doesn't expl

TestNG Cannot find class in classpath once a new scala class is added to the suite.xml file

Seems like this is a very "popular" question on SO with no definitive way to fix it but I'm asking the question anyway because I can provide some more details.

How to mock ResourceBundle.getString()?

I'm failing to mock ResourceBundle.getString(). This is my code: ResourceBundle schemaBundle = Mockito.mock(ResourceBundle.class); Mockito.when(schemaBundle.g

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z

trying to run MR program version(2.7) in windows 7 64 bit in eclipse while running the above exception occurring . I verified that using 64 bit 1.8 java versi

Solr 8 not working when trying to start Solr: java.lang.IllegalStateException: /opt/solr-8.11.1/server/NONE is not a valid keystore?

I am trying to setup Solr 8.11.1 on a new server that is running RHEL 8. I followed all of the steps listed in the Solr guide (https://solr.apache.org/guide/8_1

535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant

I am sending e email using an SMTP error . I am getting Authentication unsuccessful. The username and password are correct. Am I doing something wrong. public

What is wrong with my Preorder traversal?

I am trying to solve this problem https://oj.leetcode.com/problems/binary-tree-preorder-traversal/ , i.e. preorder traversal with recursive slution. EDIT: The

Trying to understand Abstract class inheritance and subclass object comparison

I'm working on a project for my data structures class and I've been having a hard time wrapping my head around Abstract class inheritance and how it can be mani

Best way to "negate" an instanceof

I was thinking if there exists a better/nicer way to negate an instanceof in Java. Actually, I'm doing something like: if(!(myObject instanceof SomeClass)) { /*

JPA (Hibernate) Native Query for Prepared Statement SLOW

Having strange performance issue using Hibernate 3.3.2GA behind JPA (and the rest of the Hibernate packages included in JBoss 5.) I'm using Native Query, and a

ChromeDriver Does not find the element on the page with selenium JAVA

I am trying to find an element on the page, I want to sorter the result list but my result show me that is not attached on the page: Exception in thread "main"

How to Add Java VM Arguments in JBoss EAP 6.1.1 Management Console

Does anyone know how to add Java VM arguments for a web application (*.war file) via the JBoss EAP 6.1.1 Management Console? For example, I want to specify th

What unicode characters are best for drawing a squarewave in a string

I am trying to represent a square wave pulse train in a string, from an array of stored GPIO events and timings. the code is working but I need better Unicode c