runtimeexception

UnsupportedOperationException is thrown with Lombok Builder annotation

你说的曾经没有我的故事 提交于 2019-12-08 17:43:20
问题 I am using Lombok for my project. My model looks like: @Builder @Data @AllArgsConstructor public class ScreenDefinitionDTO { @Singular private List<ScreenDeclaration> screens; } I want to do next operation: String screenName = ctx.screenName().getText(); ScreenDeclaration declaration = ParsingUtils .buildScreenDeclaration(StringUtils.trim(screenName)); Where instance is created: public static ScreenDefinitionDTO buildEmptyScreenDTO() { return ScreenDefinitionDTO.builder() .screens(new

'Too many open files' error

久未见 提交于 2019-12-08 05:31:55
问题 In my app, there is an insert operation on a form submission. Most of the cases the insert operation is successful. Sometimes the insertion operation is not happening and then , it is giving java.lang.RuntimeException . Here is the logcat details: 03-28 10:52:09.260: ERROR/IMemory(1501): cannot dup fd=1023, size=1048576, err=0 (Too many open files) 03-28 10:52:09.260: ERROR/IMemory(1501): cannot map BpMemoryHeap (binder=0x5919b0), size=1048576, fd=-1 (Bad file number) 03-28 10:52:09.260:

Android: java.lang.RuntimeException: takePicture failed

你。 提交于 2019-12-08 02:54:17
问题 I'm am trying to capture an image in the ontouchevent of surfaceview. However, everytime a touch the screen, the app crashes with the following exception: 01-05 21:03:18.500: ERROR/AndroidRuntime(10367): FATAL EXCEPTION: main java.lang.RuntimeException: takePicture failed at android.hardware.Camera.native_takePicture(Native Method) at android.hardware.Camera.takePicture(Camera.java:1126) at android.hardware.Camera.takePicture(Camera.java:1071) at com.test.MotionDetector.CameraSurfaceView

Android Studio can't create new project

无人久伴 提交于 2019-12-08 00:57:36
问题 I update Android studio to 2.2.1 but I create a new project I get the RuntimeException. java.lang.RuntimeException: com.android.tools.idea.templates.FreemarkerUtils$TemplateProcessingException: freemarker.core.ParseException: Parsing error in template "root://gradle-projects/NewAndroidModule/recipe.xml.ftl" in line 6, column 2:Unknown directive: #ifues. Help (latest version): http://freemarker.org/docs/ref_directive_alphaidx.html; you're using FreeMarker 2.3.20. 回答1: For some reason, your

MediaRecorder throw “java.lang.RuntimeException: start failed: -2147483648” when trying to record audio on LG G Watch

天涯浪子 提交于 2019-12-07 22:10:35
问题 I am trying to record audio in my app on a LG G Watch. The following code throws RuntimeException with message "start failed: -2147483648" at the statement "recorder.start();". Wondering what I'm doing wrong here. I have tried a lot of different set of parameters, for example for AudioSource: recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT); //-and- recorder.setAudioSource(MediaRecorder.AudioSource.MIC); Also for OutputFormat I have tried recorder.setOutputFormat(MediaRecorder

Design issue: to what extent should I rely on exceptions for the flow of control?

你。 提交于 2019-12-07 21:58:34
问题 I am working on a java web application and I have a few questions regarding design. Basically in its current version, it relies heavily on catching exceptions to determine the flow of control . For instance in one of my spring service classes, I have the following method that checks whether an email given as a parameter exists in the database. @Override public boolean validateEmailAddressDoesNotExist(String accountEmailAddress) { try { return !dao.checkIfEmailAddressAlreadyExists

Why is the ArrayStoreException a RuntimeException?

[亡魂溺海] 提交于 2019-12-07 12:02:55
问题 Let's say we have the following program: class Fruit {} class Apple extends Fruit {} class Jonathan extends Apple {} class Orange extends Fruit {} public class Main { public static void main(String[] args) { Fruit[] fruit = new Apple[10]; try { fruit[0] = new Fruit(); // ArrayStoreException fruit[0] = new Orange(); // ArrayStoreException } catch(Exception e) { System.out.println(e); } } } Based on the Java documentation: Thrown to indicate that an attempt has been made to store the wrong type

Android app fails to load on some phones in PathClassLoader

两盒软妹~` 提交于 2019-12-07 02:48:52
问题 I have an app, let us call it 'com.company.foo', with a main Activity 'FooBar'. In my AndroidManifest.xml, I have <application android:label="@string/app_name" android:icon="@drawable/icon" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > <activity android:name="FooBar" android:label="@string/app_name" android:configChanges="keyboardHidden|orientation" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /

RuntimeException: Could not dispatch event @ otto

不打扰是莪最后的温柔 提交于 2019-12-06 19:10:48
问题 we have an issue in our current app-version with the EventHandler from otto. We get a RuntimeException in our crash-log, with following description: "Reason: java.lang.RuntimeException: Could not dispatch event: classcom.nameOfBrand.ui.events.SwitchFragmentEvent to handler [EventHandler public void com.nameOfBrand.ui.activities.MainActivity.onSwitchFragmentEvent(com.nameOfBrand.ui.events.SwitchFragmentEvent)]" We have a button and in its onClickListener we fire an self-defined

Getting elasticsearch “can not run as root” error after upgrading from SonarQube 6.5 to 6.6. Nothing else changed

廉价感情. 提交于 2019-12-06 17:21:09
问题 Getting elasticsearch "can not run as root" error after upgrading from SonarQube 6.5 to 6.6. Nothing else changed. CentOS release 6.8 (Final) Java(TM) SE Runtime Environment (build 1.8.0_101-b13) java.lang.RuntimeException: can not run elasticsearch as root at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:106) ~[elasticsearch-5.6.2.jar:5.6.2] at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:195) ~[elasticsearch-5.6.2.jar:5.6.2] at org.elasticsearch