Not able to get debugger in "com.vaadin.client.ApplicationConnection" class - google-chrome

My application is throwing an exception from "com.vaadin.client.ApplicationConnection" class of vaadin 7.4.6 and i want to debug this class to exactly identify the issue.
I'm using IntellijIdea IDE and I'm able to debug the classes in the "com.vaadin.server" package but not in "com.vaadin.client" through Super Dev mode.
Do we need to do anything special for debugging in the "com.vaadin.client" package.

Related

What previous javac errors prevent a checkerFramework checker from running in a class?

I am using the checkerFramework gradle plugin to statically analyze nullness and tainting in my code. When I run the checker via gradle, only one of my classes are properly checked. All the other classes return with the ambiguous error about the checker not running:
error: [type.checking.not.run] NullnessChecker did not run because of a previous error issued by ja
vac
public class Main {
^
The manual linked does not metion what potentially causes this. I had some #Nullable annotations prepended to some static instance variables of the primary class I am using, but undoing those did not fix the issue.
My build.gradle is set up like so:
plugins {
// Checker Framework pluggable type-checking
id 'org.checkerframework' version '0.6.3'
}
checkerFramework {
checkers = [
'org.checkerframework.checker.nullness.NullnessChecker',
'org.checkerframework.checker.tainting.TaintingChecker'
]
}
apply plugin: 'org.checkerframework'
Where do I find more detail on this error?
You didn't show the full javac output. The relevant errors should be just above the error: [type.checking.not.run] line that you did show.
The Checker Framework runs as a plugin to javac. When javac issues an error in one class (including any Checker Framework error), javac may or may not process other classes. Unfortunately, there is no good way for a user to predict how far javac will get. Your best bet is to focus on the code that matters most to you, and resolve each error in turn before proceeding to other classes.

Library class doesn't know of ConfigureWebHostDefaults extension method

I'm building a suite of REST micro-services using .Net Core 3.0 Preview 6. All these services will have the same start up logic. So, I'm trying to place all the code in a .Net Standard library.
The goal is to have the IHostBuilder:CreateHostBuilder method, as well as the Startup:Configure and Startup:ConfigureServices class and methods in the library. The library will also contain error handling logic, customized http response messages, etc.
However, I can't seem to find the correct package that contains the ConfigureWebHostDefaults method. I tried adding the Microsoft.AspNetCore package 2.2.0, but that didn't resolve the issue.
I added the Microsoft.Extensions.Hosting (3.0.0-preview-6) package, that also doesn't resolve the issue.
Is what I'm attempting even possible?
Thanks
-marc
I resolved it, not the best way, but it works. I decided to make the library targeted specifically for .NET Core 3.0. So, I changed the targetframework in the project file. That change automatically resolved my other issue.
Import the Microsoft.AspNetCore package, and use WebHost.CreateDefaultBuilder() instead. According to the code it is built from, both CreateDefaultBuilder() and ConfigureWebHostDefaults() call the same internal method: ConfigureWebDefaults().
The only downside of this is that the returned host will be an IWebHost instead of an IHost.

Breakpoint on exception seems broken in Android Studio

According to this and this, it should be easy to have Android Studio break on an uncaught exception. However, whatever I try, I seem not to get it working.
I set the "Class Filter" on my Activity, but the app just crashes on an uncaught exception, no breakpoint triggered.
Are you sure that the exception being raised is from the class that you've specified in the class filter?
Try configuring to break on all exceptions without the class filter enabled to validate that it's actually the specified class raising the exception: https://stackoverflow.com/a/28862538/3063884
I was unable to get the debugger to stop for anything until I clicked on the app folder in the project view (one level below root). Clicking on the Root folder of the project didn't work either.

Want to use JUnit in Domino Designer / Java Beans - but keep getting a "Class not found" error?

I do the following:
From the Package Explorer I select "New, Other, JUnit Test Case"
I write this code:
package dk.sample;
import org.junit.*;
import static org.junit.Assert.*;
public class TestCase {
#Test
public void alwaysTrue(){
assertTrue( true );
}
}
I then select "Run As, JUnit test"
Get this error: "Class not found dk.sample.TestCase
java.lang.ClassNotFoundException: ...."
What do I miss? Have tried with different Run Configurations - but it seems like I miss a classpath somewhere? But to what and where?
To make JUnit work within Domino Designer you need to perform few additional steps:
set up source control for your application
adjust the on-disk project to be recognized as Java application
run JUnit tests within your on-disk project
Please note that java agents have to be tested in a different way..
You can find more detailed explanation about enabling JUnit for both XPages and Agents in the following blog post: Unit Tests for Lotus Domino Applications
Here's also a great how-to on this topic.
Coundn't get JUnit to work inside the Domino Designer. Instead of running the tests from DDE, I now run the tests from a XPages. This works like a dream. Made my own 'JUnit runner' class - that is, I just call the JUnit runners but handles the result my self in order to display it as html on the XPage.
Code can be found here: http://xpages.dk/wp-content/uploads/2013/10/junitrunner.txt
Danish blog post here: http://xpages.dk/?p=1162

Android JUnit: Define a different Application subclass

So for my normal Android project, I have the following in AndroidManifest.xml:
<application android:name=".utilities.App" ...>
....
</application>
And then I have my App class:
public class App extends Application {
....
}
And then I have an Android JUnit Test project associated with the Android project. Everything is all fine and dandy and I can write JUnit tests. However, I'm trying to run code coverage with my JUnit tests and I'm getting bloated results. The reason is because my App class gets called and initialized as if my application were actually started. I do not want my custom App class to execute when I run the JUnit tests or code coverage. Any setup I would need for the JUnit tests will go in the appropriate JUnit setup() method. Is there any way I can prevent it from executing my custom App class or a way that any classes/methods/lines that are executed due to the creation of my App class aren't counted towards the code coverage?
A temporary solution that I've found will work unless someone has any better ideas.
Go into the main Android project's AndroidManifest.xml.
Change the android:name attribute from ".utilities.App" to "android.app.Application"
Run the code coverage utility/JUnit tests
Change the android:name attribute back from "android.app.Application" to ".utilities.App"
Re-deploy the app onto the device (so that it uses the right Application class when it runs external to the code coverage/JUnit tests)
I'm sure the real solution is to automate this process, but I'm too lazy to do so, and it just feels hackish and wrong. But at least it's a workaround unless someone has any ideas.