classcastexception Questions
2
I'm getting an issue when my application starts up. The application fails when configuring log levels, on a ClassCastException java.util.HashMap cannot be cast to org.springframework.boot.logging.L...
Hackett asked 1/11, 2019 at 14:0
1
Solved
I'm working with a micro-service built using Java 11, this service has a dependency built in Java 8. Dependency has rest-clients in it and there is a method that does this:
public <T> Respo...
Bountiful asked 9/9, 2019 at 22:23
3
Solved
I have a Service that I am trying to bind to my main Activity, but I am receiving a
java.lang.ClassCastException: android.os.BinderProxy cannot be cast to com.walintukai.rubix.ConnectionService$L...
Cicely asked 31/7, 2014 at 0:37
3
I am running into a weird problem . I have a class A which implements Parcelable interface in kotlin.
I am passing the array of class A from one activity to another no issues here.
var arrayOfA:...
Monseigneur asked 12/9, 2017 at 5:54
11
Solved
I have 2 different Java projects, one has 2 classes: dynamicbeans.DynamicBean2 and dynamic.Validator.
On the other project, I load both of these classes dynamically and store them on an Object
cl...
Secure asked 5/5, 2009 at 18:38
2
Solved
I'm using Hibernate with an EntityManager. When I use
Session session = (Session)entityManager.getDelegate();
session.flush();
session.clear();
I get
java.lang.ClassCastException: org.hib...
Psychobiology asked 14/9, 2011 at 6:41
3
I am doing a java project and I got this problem and don't know how to fix it.
The classes in my project (simplified):
public class Item {
private String itemID;
private Integer price;
publ...
Energy asked 31/10, 2013 at 21:18
10
ArrayList marks = new ArrayList();
Double sum = 0.0;
sum = ((Double)marks.get(i));
Everytime I try to run my program, I get a ClassCastException that states: java.lang.Integer cannot be cast to j...
Broad asked 6/4, 2011 at 12:27
4
when I am running this code its giving me exception
java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String on q1.list();
Query q=session.createQuery("select categor...
Gelatinate asked 19/10, 2014 at 6:52
2
Solved
I created a report using JasperSoft Studio.
I'm referencing to this helpful post Jaspersoft Studio: How to use Collection of Java Beans in data adapter by Alex K
I'd like to retrieve a list of or...
Triumvirate asked 18/5, 2017 at 11:58
2
I execute a native query by JPA. My DB is oracle and I have a Clob column. When I get the result, How can I get the clob value from the resultList? I cast it to String and I get ClassCastException....
Terrarium asked 3/3, 2018 at 8:13
4
Solved
I was experiencing occasional exceptions in XPages application:
java.lang.ClassCastException: someClass incompatible with someClass.
Both mentioned classes are the same, it is class used as sess...
Tripod asked 18/3, 2011 at 13:21
2
Solved
Switching from LinearLayout to ConstraintLayout throwing this error
java.lang.ClassCastException: android.support.v7.widget.ActivityChooserView$InnerLayout cannot be cast to android.support.v7.wid...
Sulfuric asked 8/3, 2018 at 13:21
4
Solved
I use filterFunction method of datatable on primefaces 5.0. I want to filter birthday by date range on column header.
On browser console I receive this error:
<?xml version="1.0"
encoding="ut...
Dania asked 21/5, 2014 at 18:25
1
Solved
Suppose I have a method
@SuppressWarnings("unchecked")
public <T extends Number> T getNumber() {
try {
return (T)number;
} catch (ClassCastException e) {
return null;
}
}
Assuming nu...
Nonce asked 29/11, 2017 at 8:51
6
I have two different webapps, and each load the same class A with different classloader. When I put one instance in the session and then get it from the other webapp, a ClassCastException is thrown...
Lallygag asked 13/5, 2012 at 7:13
2
Solved
i'm very confused...
I have a class which directly implements an interface:
public class Device implements AutocompleteResult
{...}
Here is proof that I'm looking at the right variables:
Objec...
Cretic asked 7/11, 2011 at 11:32
4
I create 2 classes(Meal, Restaurant) which extend ParseObject, and create 2 custom adapters(BottomFragmentMealAdapter, RestaurantAdapter). I tried to do whatever I made in BottomFragmentMealAdapter...
Lenny asked 14/3, 2016 at 21:25
3
Solved
As always I was looking through JDK 8 sources and found very interesting code:
@Override
default void forEachRemaining(Consumer<? super Integer> action) {
if (action instanceof IntConsumer)...
Retaretable asked 31/5, 2017 at 15:27
3
Solved
I have the following JOINED inheritance root entity for geographic areas (like continents, countries, states etc.):
@Entity
@Table(name = "GeoAreas")
@Inheritance(strategy = InheritanceType.JOINED...
Scattering asked 7/1, 2012 at 13:45
3
I am trying simple word-count example on spark in Cluster Mode and Local Mode it works fine in local mode but throwing class cast exception in Cluster Mode here is code snippet...
package com.exa...
Borrego asked 20/2, 2016 at 21:50
3
Solved
In my application, I have a layout which has a RelativeLayout to which I want to set margins at runtime programmatically. But when I do that, it gives me ClassCastException saying FrameLayout can n...
Spritsail asked 18/7, 2012 at 15:31
1
I'm attempting to pass a serialized LinkedHashMap between activities, and getting a confusing result/error when I deserialize the object.
I serialize the object as follows:
Bundle exDetails = n...
Orsola asked 10/9, 2014 at 17:21
4
Solved
This morning I came in to my office and the first thing I saw: my company site crashed. Because of me I think.
Now I tried for one hour and a half to fix this, but I found nothing and everybody lo...
Factotum asked 25/11, 2013 at 8:45
4
Solved
I'm trying to add a header to an ExpandableListView like so:
headerView = View.inflate(this, R.layout.header, null);
expandableListView.addHeaderView(headerView);
expandableListView.setAdapter(new...
Cornice asked 9/12, 2010 at 0:33
© 2022 - 2024 — McMap. All rights reserved.