gwt-preprocessor - Unknown argument: -remoteUI - gwt

I'm trying to use the gwt-preprocessor for reflection with gwt. I created a run configuration for it in Eclipse. It seems to run the preprocessor fine, but after that I think it's trying to run the gwt compiler when I get "Unknown argument: -remoteUI".
If I remove the "remoteUI" argument from the run configuration, then I get the following error: Missing required argument 'module[s]'
If someone has a working configuration in Eclipse, can you specify the exact steps for installing gwt-preprocessor? Thanks!

If you are using dev mode please use org.hawk.gwt.ppc.DevModeWrapper instead of org.hawk.gwt.ppc.CompilerWrapper as main class. Here is my example how I'm creating debug configurations:
Create web application configuration (gwt web application).
On the main tab replace DevMode class with org.hawk.gwt.ppc.DevModeWrapper
Here is example of Arguments->Program arguments section:
-Puse-generics -Pprocess-annotations -Preflect=org.hawk.gwtppc.webtest.tests.** -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9997 -port 8888 -war /Users/alexbereznevatiy/dev/gwtppc/webtests/war org.hawk.gwtppc.webtest.webtest
The rest is pretty much the same. Make sure you are including proprocessor binary to the classpath tab as well as on sources tab.
Feel free to ask any questions or register bugs in gwt-preprocessor (if you find any).

Related

Intellij IDEA Error: Could not find or load main class org.jetbrains.jps.cmdline.Launcher in Scala Project

I am facing the following error when I click Run from simple Hello World program of Scala. I am unable to find any solution as I am beginner in the Java field.
I am currently using IntelliJ IDEA 2021.2.3 which I am trying to integrate with Scala but to no avail.I am following this tutorial to run the Scala Program and Install all the required softwares and libraries as mentioned in this link.
https://www.guru99.com/scala-tutorial.html
Screenshot - Intellij IDEA Error for Scala Program
"C:\Program Files\Java\jdk1.8.0_144\bin\java.exe" -Xmx700m -Djava.awt.headless=true -Djava.endorsed.dirs=\"\" -Dpreload.project.path=D:/Scala-Projects -Dpreload.config.path=C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/options -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Djdt.compiler.useSingleThread=true -Daether.connector.resumeDownloads=false -Dio.netty.initialSeedUniquifier=-2427656205608767245 -Dfile.encoding=windows-1252 -Duser.language=en -Duser.country=US -Didea.paths.selector=IdeaIC2021.2 -Didea.home.path=D:/Softwares/ideaIC-2021.2.3.win -Didea.config.path=C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2 -Didea.plugins.path=C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins -Djps.log.dir=C:/Users/Khalid/AppData/Local/JetBrains/IdeaIC2021.2/log/build-log -Djps.fallback.jdk.home=D:/Softwares/ideaIC-2021.2.3.win/jbr -Djps.fallback.jdk.version=11.0.12 -Dio.netty.noUnsafe=true -Djava.io.tmpdir=C:/Users/Khalid/AppData/Local/JetBrains/IdeaIC2021.2/compile-server/helloworld_14920d90/_temp_ -Djps.backward.ref.index.builder=true -Dkotlin.incremental.compilation=true -Dkotlin.incremental.compilation.js=true -Dkotlin.daemon.enabled -Dkotlin.daemon.client.alive.path=\"C:\Users\Khalid\AppData\Local\Temp\kotlin-idea-3911355212386532999-is-running\" -Dtmh.instrument.annotations=true -Dtmh.generate.line.numbers=true -Dcompile.parallel.max.threads=4 -Dcompile.parallel=true -Dscala.compile.server.socket.connect.timeout.milliseconds=10000 -Dscala.compiler.indices.rebuild=true -classpath "D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/jps-launcher.jar;C:/Program Files/Java/jdk1.8.0_144/lib/tools.jar" org.jetbrains.jps.cmdline.Launcher D:/Softwares/ideaIC-2021.2.3.win/lib/annotations.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/slf4j.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/jps-builders.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/kotlin-stdlib-jdk8.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/jps-model.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/javac2.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/forms_rt.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/maven-resolver-transport-file-1.3.3.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/util.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/protobuf-java-3.15.8.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/platform-api.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/jna-platform.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/aether-dependency-resolver.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/jps-javac-extension-1.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/jps-builders-6.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/jna.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/idea_rt.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/3rd-party.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/maven-resolver-connector-basic-1.3.3.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/maven-resolver-transport-http-1.3.3.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Kotlin/lib/kotlin-reflect.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Kotlin/lib/kotlin-plugin.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/IntelliLang/lib/java-langInjection-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/eclipse/lib/eclipse-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/eclipse/lib/eclipse-common.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/javaFX/lib/javaFX-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/javaFX/lib/javaFX-common.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/ant/lib/ant-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Groovy/lib/groovy-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Groovy/lib/groovy-constants-rt.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/uiDesigner/lib/jps/java-guiForms-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/maven/lib/maven-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/gradle-java/lib/gradle-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Kotlin/lib/jps/kotlin-jps-plugin.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Kotlin/lib/kotlin-jps-common.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Kotlin/lib/kotlin-common.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/space/lib/space-java-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/devkit/lib/devkit-jps.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/scala-library.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/compiler-shared.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/jps/nailgun.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/jps/compiler-jps.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/jps/sbt-interface.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/jps/incremental-compiler.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/jps/scala-parallel-collections.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/spray-json_2.13-1.3.5.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/scala-compiler-indices-protocol_2.12-0.1.1.jar org.jetbrains.jps.cmdline.BuildMain 127.0.0.1 57901 33b87547-d627-4a07-bd5f-0b53060f32c9 C:/Users/Khalid/AppData/Local/JetBrains/IdeaIC2021.2/compile-server
Error: Could not find or load main class org.jetbrains.jps.cmdline.Launcher
Make sure you are correctly specified the main class in Run configuration dialog:
You can open it from the main toolbar:

Remoting in spring: es.interop.dto.NameDto cannot be cast to es.interop.dto.NameDto

I have a Multi-Project gradle + spring-boot configuration. There is a ":interop" project that contains common classes and there are other two projects, ":backend" and ":frontend" that include this other project as dependency, like this:
compile project(":interop")
I execute an RMI call from ":frontend" to ":backend". If I execute .gradlew build and run the resulting jars from command line I get no error. But if I run them directly in eclipse I get the following error in ":frontend":
java.lang.ClassCastException: es.interop.dto.NameDto cannot be cast to es.interop.dto.NameDto
There are only two copy of NameDto.class in file system.
$ find ~ -name NameDto.class
./interop/bin/es/interop/dto/NameDto.class
./interop/build/classes/main/es/interop/dto/NameDto.class
The .classpath includes the project as:
$ grep interop frontend/.classpath
<classpathentry kind="src" path="/interop"/>
Any glues are welcome.
edit The service definition is:
public interface NameService {
List<NameDto> findAll();
NameDto create(String value);
}
edit I am using Dev-Tools. It is causing the problems:
compile("org.springframework.boot:spring-boot-devtools:1.3.0.RELEASE")
I found that Dev-Tools reloads always on startup, even without changing the code once started. In this reload, probably, bytecode of NameDto is modified in backend and frontend so two different versions classes appear.
Removing Dev-Tools dependency worked for me.
Looking for a better answer in Dev-Tools docs it seems that using Dev-Tools in addition to a java-agent such as JRebel or SpringLoaded prevents reload on start and, therefore, it should work.

How can I fix tests in Ember testem with errors such as 'could not load', 'failed', 'could not find module' or 'died'?

I managed to get a couple of EAK/grunt based Ember apps upgraded to 1.11 with HTMLBars, and then got them migrated to Ember CLI/Brocolli. The unit tests were setup for karma test runner so I'm looking at how to get those running in the CLI projects now, but I didn't write the tests and really have no experience with unit testing javascript modules.
Searching around the iNet, I can see that others have also used karma becasue of its coverage output and are trying to get it to work with Ember CLI, but that Ember Core isn't supporting it, though they say anyone should be able to get it set up with a custom addon. I'm also trying to use the 'testem' runner to see what sticks with that.
The Ember site does have an 'automating tests with runners' page for v1.10, with sections on 'testem' and 'karma', but it doesn't appear for v1.11 so I can't tell from that site what is or isn't relevant. But it seems like I should be able to work out a solution for the karma test runner, so I added the old devDependencies to the project package.json:
"karma": "^0.12.31",
"karma-chai": "~0.1.0",
"karma-chrome-launcher": "~0.1.2",
"karma-coverage": "~0.2.1",
"karma-firefox-launcher": "~0.1.3",
"karma-junit-reporter": "~0.2.1",
"karma-mocha": "~0.1.3",
"karma-phantomjs-launcher": "~0.1.2",
"karma-sinon-chai": "~0.1.5"
I also dropped the old 'karma.conf.js' (along with a few other karma confs) in the project and updated the paths inside (from 'vendor' to 'bower_components'). I did find a 'ember-cli-karma' node mode and installed it, but it seems to just have a 'package.json'. It has no docs and seems like just a stubbed out starter project with no implementation. I also installed 'karma', 'karma-cli' and 'testem' node modules.
The testem docs say to add you src and test files to 'testem.json', but with out examples I don't know what that means; a list of every src and test file? With what path; relative, absolute? Forward slashes, backslashes? preceded with / or ./ or ../? I just left them out because I think the system just finds the src and tests by convention.
When I run 'karma init' I get:
readline.js:529
this.line = this.line.slice(this.cursor);
^
TypeError: Cannot read property 'slice' of undefined
When I run 'testem' I get:
TEST'EM 'SCRIPTS!
Open the URL below in a browser to connect.
http://localhost:7357/aN;0faN;NaNf
...then the project's '../tests/index.html' loads in a browser, but is not able to 'find' any of the asset files (css, js) so nothing executes or renders correctly. I just see template expressions ({{content-for 'head'}}, etc).
When I run 'ember test' I get:
Building...BuildingBuilding.Building..Building...Built project successfully.
1..0
# tests 0
# pass 0
# fail 0
# ok
No tests were run, please check whether any errors occurred in the page (ember test --server) and ensure that you have a test launcher (e.g. PhantomJS) enabled.
When I run 'ember test --server' I get:
The test index.html loaded in a browser with a test report. When I uncheck 'hide passed tests' the report indicates '29 passed, 28 failed'. It has 11 sections where a particular test may have 3 problems such as 'could not load', 'failed', 'could not find module', 'attempting to register an unknown factory' or 'died'.
With this, I'm obviously running testem and not karma, so may as well work on getting testem working and figure out karma later. If there were more examples and migration troubleshooting docs I might have a systematic way to work through some of these problems.
I ran into "No tests were run,..." problem recently after a node upgrade. I fixed it with a:
npm install -g phantomjs
This provides some additional options as well:
https://github.com/ember-cli/ember-cli/issues/3969
I had the Cannot read property 'slice' of undefined error on MS Windows, running via MSys2. I have solved it by using karma init from an ordinary cmd prompt.

Unknown argument: -launcherDir GWT

I'm trying to debug in superDevMode using Tomcat instead of Jetty.
I followed this tutorial https://www.youtube.com/watch?v=w9270Yqt-5I
I added the argument -launcherDir to my debug configuration but when I run the configuration I get an unknown arguement error.
Console Output
Unknown argument: -launcherDir
Google Web Toolkit 7.1.12
CodeServer [-noprecompile] [-compileTest] [-bindAddress address] [-port port] [-workDir dir] [-allowMissingSrc] [-src dir] [module]
where
-noprecompile Disables pre-compilation of modules.
-compileTest Just compile the modules and exit.
-bindAddress The ip address of the code server. Defaults to 127.0.0.1.
-port The port where the code server will run.
-workDir The root of the directory tree where the code server willwrite compiler output. If not supplied, a temporary directorywill be used.
-allowMissingSrc Disables the directory existence check for -src flags.
-src A directory containing GWT source to be prepended to the classpath for compiling.
and
module The GWT modules that the code server should compile. (Example: com.example.MyApp)
I noticed a similar question GWT plugin for Intellij IDEA , but I think it went over my head a bit and a fix was not given.
Does anybody have a solution?
I came accross this issue,
Delete the web.xml file in the war folder and recreate a blank one
Fixed the issue for me.

How to include predefined set of netbeans platform modules in maven project?

I am working on maven netbeans platform project consisting of several modules. I need to depend on some modules (say java.source module), but when I try to run the application, it reports, that required modules are not installed. And event despite I have dependency on java.source declared in my pom.xml
I think, that I have to tell maven somehow, to install (and turn on) these modules in the final assembled application before my module is loaded.
How could I do something like this?
UPDATE:
When I try to create complete netbeans application project from maven artifact and add Java Source API as a dependency into pom.xml... when I run the application, window with following message appears:
Warning - could not install some modules: Editor Library 2 - None of the modules providing the capability org.netbeans.modules.editor.actions could be installed. Editor Indentation for Projects - The module named org.netbeans.modules.editor.settings.storage/1 was needed and not found. Editor Indentation for Projects - The module named org.netbeans.modules.options.editor/1 was needed and not found. Project UI API - No module providing the capability org.netbeans.modules.project.uiapi.ActionsFactory could be found. Project UI API - No module providing the capability org.netbeans.modules.project.uiapi.OpenProjectsTrampoline could be found. Project UI API - No module providing the capability org.netbeans.modules.project.uiapi.ProjectChooserFactory could be found. Editor Error Stripe Impl - The module named org.netbeans.modules.editor.errorstripe.api/1 was needed and not found. Java Source - The module named org.netbeans.libs.javacimpl/1 was needed and not found. Java Source - The module named org.netbeans.modules.editor.indent.project/0-1 was needed and not found. Java Source - The module named org.netbeans.modules.java.preprocessorbridge was needed and not found. Java Source - The module named org.netbeans.modules.options.editor/1 was needed and not found. Java Source - The module named org.netbeans.modules.parsing.api/1 was needed and not found. Editor Settings - No module providing the capability org.netbeans.api.editor.settings.implementation could be found. Diff - The module named org.netbeans.modules.options.editor/1 was needed and not found. 11 further modules could not be installed due to the above problems.
The error-message "Module dependency has friend dependency [...] but is not listed as friend" means that you need to specify an implementation version of org.netbeans.modules.options.editor.
You can achieve this by editing src/main/nbm/module.xml to contain the following entry (I didn't use the actually needed values here. Make sure to find out which values to enter for id and explicitValue to satisfy the dependencies (You can find explanations / instructions in the article linked below):
<dependencies>
<dependency>
<id>org.netbeans.modules:org-netbeans-modules-editor</id>
<type>impl</type>
<explicitValue>org.netbeans.modules.editor/1 = 201107282000</explicitValue>
</dependency>
</dependencies>
I'm pretty sure that the following article will explain some issues and help you find out the needed values for id and explicitValue (language is english, author is me):
http://blog.macrominds.de/2011/08/open-favorites-per-default-in-netbeans-rich-client-platform-maven-standalone-application/
I'm currently having related problems with my application, so I might come back with a more concrete solution in a while.
the easiest way is to grab a class that its complaining about, say "org.netbeans.modules.editor.actions" and go to the Add Dependencies and plug it into the Query field.
From there you should be able to tell which module you will need to include