Questions tagged [illegalstateexception]

About java.lang.IllegalStateException, a general-purpose exception defined in the Java API.

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 views

How to solve 'java.lang.IllegalStateException: No thread-bound request found: [...]'?

BRIEF EXPLANATION: I am developing a micro-service (MS-1) that should at some point reach information from another micro-service (MS-2) through a REST operation. The MS-1 have a public end-point and ...
André Raja's user avatar
0 votes
0 answers
11 views

printerInit(PrinterName: String) throw Exception Message : Fragment WebViewFragment not attached to an activity

I have created an AAR library which contains my printing code. I also have an application which has main activity and a Fragment in it. Fragment from Main Activity initializes my printing module and ...
Abdul Qayoom's user avatar
0 votes
0 answers
40 views

Given component holder class androidx.compose.ui.tooling.PreviewActivity does not implement interface dagger.hilt.internal.GeneratedComponent

After update some library in Jetpack Compose, I got this issue when run preview java.lang.IllegalStateException: Given component holder class androidx.compose.ui.tooling.PreviewActivity does not ...
Trần Đạt's user avatar
0 votes
0 answers
56 views

ExoPlayer always automatically stops when playing videos

I am using ExoPlayer as follows: import androidx.media3.exoplayer.ExoPlayer; I am attempting to use SurfaceTexture to retrieve video frames from ExoPlayer and render them in openGL ES. However, after ...
denghua deng's user avatar
0 votes
0 answers
10 views

I have integrate exoplayer in my app, getting this error on clicking full-screen button

FATAL EXCEPTION: main Process: com.flixo.videostreaming, PID: 5730 java.lang.IllegalStateException: Fragment HomeFragment{b5fddb4} (cb02f463-644e-4d0f-b742-696dba6c214d) not attached to an activity. //...
Akash Softintra's user avatar
1 vote
2 answers
114 views

Android Kotlin - requireContext() throws IllegalStateException inside Android Fragment's onViewCreated

I am dealing with IllegalStateException crashes pertaining to the usage of getString in onViewCreated; looking at the stack trace this goes back through getResources into requireContext, which throws ...
MajinKenn's user avatar
0 votes
1 answer
144 views

Mockmaker exception - Could not initialize inline Byte Buddy mock maker

My project uses the below mockito dependencies. I am facing the below issue only when I added my company's internal dependency. How to fix it? I already tried making sure my Intellij dea is using JDK ...
user3903418's user avatar
0 votes
0 answers
93 views

Method threw 'java.lang.IllegalStateException' exception. Cannot evaluate jdk.proxy2.$Proxy134.toString()

Dependencies: spring boot 3.0.4 spring-weblux 6.0.6 I have created the HttpExchange Client: @HttpExchange("${path.to.baseUrl}") public interface ExternalClient { @PostExchange("${...
tliub666's user avatar
0 votes
0 answers
26 views

IllegalStateException when saving a data from rabbitmq queue to DB using JPA

Iam getting the below error for the piece of code pasted below. The code receives a json string in the listener and successfully deserialises it but facing error when trying to save a new dto to ...
wary_coder's user avatar
1 vote
2 answers
34 views

( modifier 'static' is only allowed in constant variable declarations ) compilation error

import java.io.*; import java.math.*; import java.security.*; import java.text.*; import java.util.*; import java.util.concurrent.*; import java.util.function.*; import java.util.regex.*; import java....
HarshSinha_7's user avatar
1 vote
1 answer
1k views

You must ensure the ActivityResultLauncher is registered before calling launch()

In some android device, I'm getting this IllegalStateException in ActivityResultLauncher Fatal Exception: java.lang.IllegalStateException: Attempting to launch an unregistered ActivityResultLauncher ...
Andyson's user avatar
  • 65
0 votes
0 answers
24 views

java.lang.IllegalStateException: Location is not set. JAVAFX cant open window [duplicate]

im trying to build a client-server program with javaFX. this is my project structure: this is my code for opening the window in LoginController: public void start(Stage primaryStage) throws ...
Din Salman's user avatar
0 votes
0 answers
18 views

Is this correct regarding fragment state loss transactions for safe transactions?

is if (isStateSaved()) { commitAllowingStateLoss() } else { commit() } same as commitAllowingStateLoss() As the method internals are the same with only diff of throwing IllegalStateException? If ...
siddharth sharma's user avatar
0 votes
0 answers
57 views

Recieve IllegalStateException when I try to build GeoApiContext to get polyline for my maps

I am trying to display the distance between two points as a polyline on the google maps in my app. For some reason this line of code keeps giving me the same exception which causes my app to crash at ...
kinghabz 14's user avatar
0 votes
0 answers
22 views

IllegalStateMonitor exception on Thread Execution [duplicate]

I don't understand why we get an IllegalMonitorState exception here. If the thread1 has synchronized on the boolean flag then how is thread2 able to change it. shouldn't it block on thread1? this code ...
arp5's user avatar
  • 169
0 votes
1 answer
291 views

Re-use of fragments in ViewPager2

I have fragment A with Viewpager2. In this fragment I create a list of B fragments to present in Viewpager2. When I navigate to another fragment and return to fragment A I would like to re-use a list ...
Maya's user avatar
  • 359
0 votes
0 answers
11 views

how to avoid error in the code of spring boot?

@Override public void updateStudent(int s_id) { Session sc=eman.unwrap(Session.class); Query query=sc.update("update Students set s_name = Rajeev where id = "+s_id); query.executeUpdate(); } ...
Pooja's user avatar
  • 1
1 vote
0 answers
37 views

Processing sketch causing a java crashed thread

I'm developing an audio-visual performance using Processing - I am getting the following and have no understanding of what it means, what's causing it, and hence how I might go about fixing it. Any ...
jonnieNightTime's user avatar
0 votes
0 answers
83 views

java.lang.IllegalStateException: unread block data - on openjdk version "1.8.0_352"

This is the exception we are getting on a target linux centos environment when the build is created from the same java version on Ubuntu 20.04 unread block data. Stacktrace follows: java.lang....
Vikas Bodani's user avatar
1 vote
1 answer
63 views

ClarifaiChannel.INSTANCE.getGrpcChannel() throwing IllegalStateException: Could not find TLS ALPN provider

I am trying to use Clarifai to predict images in an Android app. I am using the Clarifai gRPC Java client. However, I am getting an IllegalStateException saying 'Could not find TLS ALPN provider; no ...
Dinux's user avatar
  • 650
0 votes
0 answers
58 views

Default FirebaseApp is not initialized , Make sure to call FirebaseApp.initializeApp(Context) first

FATAL EXCEPTION java.lang.IllegalStateException: Default FirebaseApp is not initialized Make sure to call FirebaseApp.initializeApp(Context) first. After upgrading all the dependencies and ...
Anaahatas Wellness's user avatar
0 votes
0 answers
196 views

java.lang.IllegalAccessException: class com.sleepycat.je.utilint.JVMSystemUtils cannot access class sun.management.BaseOperatingSystemImp

java.lang.IllegalAccessException: class com.sleepycat.je.utilint.JVMSystemUtils cannot access class sun.management.BaseOperatingSystemImpl (in module java.management) because module java.management ...
Zahoor Ahmed's user avatar
0 votes
1 answer
96 views

SpringBootTest ApplicationContext failed to load errors after first test case file runs

Individually all my test cases are running properly, but when I run maven test or even right click run tests in IntelliJ, the first test case file always passes and then I receive the error given ...
C Byte's user avatar
  • 1
0 votes
0 answers
259 views

Android Navigation : java.lang.IllegalStateException - Could not find Navigator with name "navigation"

I am using android navigation on my project . On Some Xiaomi devices ,app crashes on startup. I could not find problem. code; <?xml version="1.0" encoding="utf-8"?> <...
ahmetvefa53's user avatar
0 votes
1 answer
47 views

Error message of missing jr file when running Android Studio application on emulator

I am trying to run an app on my Android Studio IDE. The imported files for the app are made with an older gradle configuration, and that an older version of Android Studio (Android Studio 2.3.2) is ...
Softwareisgreat's user avatar
0 votes
0 answers
592 views

I am using spring-integration-sftp version 5.5.12. Getting error while creating sftp connection

I am using spring-integration-sftp version 5.5.12. I am using following code to create session factory. DefaultSftpSessionFactory factory = new DefaultSftpSessionFactory(true); factory.setHost(...
Poorva Gokhale's user avatar
0 votes
0 answers
206 views

Could not find FeatureManager when running test on REST API

I get this error when trying to run a test: java.lang.IllegalStateException: Could not find the FeatureManager. For web applications please verify that the TogglzFilter starts up correctly. In other ...
runnerpaul's user avatar
  • 6,048
0 votes
0 answers
120 views

H264 Decoder Illegal State Exception

I received this crashlytics crash event, Fatal Exception: java.lang.IllegalStateException: start failed at android.media.MediaCodec.native_start(MediaCodec.java) at android.media.MediaCodec.start(...
Burak Ceylan's user avatar
0 votes
0 answers
73 views

.buildMetadata() raise 'java.lang.IllegalStateException: Cannot get a connection as the driver manager is not properly initialized'

I'm quite a beginner using Hibernate but i'm using it for a javaFX application using my school's Database. It's a school project but I really want it to work. I know that the connection with the DB as ...
Deadsife's user avatar
0 votes
0 answers
504 views

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name defined in file

I use jdk-19 and try to run my application. All other classes, that have the same architecture work, except for this one. The model: package ch.ps_backend.model; import lombok.*; import javax....
SomeoneNewThatHasNoIdea's user avatar
0 votes
1 answer
211 views

Transfer messages from direct message to specific channel using Java Discord API

I want to make my bot in a server channel to say whatever an user dm it. public class PrivateMessage extends ListenerAdapter { private TextChannel channel; @Override public void onReady(@...
Alex Cai's user avatar
0 votes
0 answers
117 views

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/HttpEntity

I am using eclipse luna which is an out-of-date version. I'm having an issue with setting up selenium.I'm using vanilla java, no marven or anything like that. public static WebDriver driver; ...
Jon Jon Micallef's user avatar
1 vote
0 answers
80 views

Android - java.lang.IllegalStateException: Theme.getKey() reflection exception

After uploading my app for closed testing the following exception is reported in the prelaunch report: Exception java.lang.IllegalStateException: Theme.getKey() reflection exception at aufa.b (aufa....
Yeamin Chowdhury's user avatar
1 vote
1 answer
65 views

Understanding problem regarding operated streams in Java

Let's say we have the following code Stream<Integer> ints = Stream.of(1, 2, 3); ints.peek(System.out::println); ints.forEach(System.out::println); and I run it, I'll get an exception: ...
mrbela's user avatar
  • 4,517
1 vote
1 answer
3k views

Exception in thread "main" java.lang.IllegalStateException: Attempted to load Config resource 'class path resource [application.yml]'

Exception in thread "main" java.lang.IllegalStateException: Attempted to load Config resource 'class path resource [application.yml]' via location 'optional:classpath:/' but snakeyaml was ...
userdr725's user avatar
0 votes
0 answers
27 views

Saving to DataStore After Screen Rotate

I have an app that will record the users latitude and longitude once it is acquired, then save the 2 Double values to Datastore. This works fine except if the device is rotated before the location is ...
Justin's user avatar
  • 363
1 vote
0 answers
342 views

WorkManager is not initialized

I got this error on sentry panel only on production build variant. IllegalStateException WorkManager is not initialized properly. You have explicitly disabled WorkManagerInitializer in your manifest,...
sahar shamloo's user avatar
0 votes
1 answer
66 views

java.lang.IllegalStateException: Fragment MapFragment{2fe7116} (69b05d78-5cf3-46a9-829c-6b6507944575) not attached to an activity.?

I am developing location based android app using google maps but when I run project I am getting crash and getting following exception java.lang.IllegalStateException: Fragment MapFragment{2fe7116} (...
Edgar's user avatar
  • 872
1 vote
0 answers
17 views

IllegalStateException : getInputStream() called after getReader() called

// Create a new file upload handler ServletFileUpload upload = new ServletFileUpload(factory); try{ HashMap<String, String> propMap = readIniFile("search.ini")...
S Naveen Kumar's user avatar
0 votes
0 answers
109 views

Java Thread - IllegalThreadStateException when starting a Thread

I'm working on a project, similar to the mobile Game "Clash Royale", currently the program is moving the Character on the Anchorpane through an Animationtimer, to simulate a battle between ...
JavaVariable's user avatar
0 votes
1 answer
75 views

Failed to open the CloudDBZone because the object type has not been created

I'm trying to open an (existing) AGConnectCloudDB CloudDBZone with Android Java: public void openCloudDBZone(String regionName, boolean isAllowToCreate) { CloudDBZoneConfig config = new ...
Martin Zeitler's user avatar
-1 votes
2 answers
32 views

How to inflate RecyclerView from constraintLayout in fragment?

My app was working completely fine , when I just had the recyclerview in fragment's xml , but I need to wrap it in constraintlayout for some reason but my app starts crashing after that. error ...
Anushka yadav's user avatar
3 votes
1 answer
1k views

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first in jetpack compose

I have a webview with one URL, whenever it redirects within the webview, I load the same composable again with a new URL with a new title, as the redirection happens so fast it is happening before the ...
bharath v's user avatar
0 votes
1 answer
177 views

IllegalStateException with postgresql driver

I have this in my application.properties: spring.datasource.initialize=true spring.datasource.url=jdbc:postgresql://1.2.3.4:5432/myapp?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&...
runnerpaul's user avatar
  • 6,048
0 votes
1 answer
538 views

Room don't work migration when I try to add new column in table

After adding new migration I have the next exception. What didn't I do? When I debuging, migration was done. The new column is text and I try to write all data in one cell. java.lang....
Alex Fisher's user avatar
0 votes
1 answer
168 views

Issues Creating Apache Kudu Range Partitioned Table

I am trying to create a simple Kudu table with Hash and Range Partitions. When I try to use a Decimal(18,0) for the Range partition I get the following error: IllegalStateException: null drop table if ...
user19621400's user avatar
1 vote
1 answer
3k views

Exception in thread "main" java.lang.IllegalStateException: The driver executable must exist error using Selenium and Java

I am unable to execute my first selenium code. Tried changing webdriver path several times but that didn't work. Code trials: package Learningday1; import org.openqa.selenium.WebDriver; import org....
Aman Nigam's user avatar
-1 votes
1 answer
281 views

java.lang.IllegalStateException using ChromeDriver with Selenium Java

Code trials: import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class SeIntro { public static void main(String[] args) { System.setProperty(&...
Ramakrishna Kasa's user avatar
0 votes
0 answers
753 views

How do I resolve java.lang.IllegalStateException exception?

There is a legacy but working application running on an old machine. I rebuilt it with existing Ant file. I put it on a new machine, and when I run the JAR file, I get this: Exception in thread "...
user2526586's user avatar
1 vote
1 answer
76 views

How to catch IllegalStateException displayed in Firebase coming from Apollo GraphQL Android SDK

I'm unsure of how to catch this crash tracked in Firebase in our codebase which is coming from the Apollo GraphQL SDK for Android, version 2.5.12. I have also not been able to reproduce it. It seems ...
Peter Williams's user avatar

1
2 3 4 5
23