I am trying to configure my GWT project to run in SuperDevMode and experience severe problem during server run time.
So, I have working "regular" devMode configuration in Intellij IDEA. Created a new GWT configuration in app-servers list. Set the following values:
[Checked] Super Dev Mode
VM options: -Xmx512m -XX:MaxPermSize=384M
Dev Mode parameters: -bindAddress 0.0.0.0 -port 1234 -workDir d:\projects\myApp\SDV\ -src d:\projects\myApp\src\main\java com.app.MyApp
Made changes to my project's build xml file adding the lines in the end of file:
<add-linker name="xsiframe"/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
<!-- enable source maps -->
<set-property name="compiler.useSourceMaps" value="true" />
Here is the console output on this config run:
workDir: d:\projects\myApp\SDV
deleting: d:\projects\myApp\SDV\com.app.MyApp\compile-1
binding: user.agent=safari
binding: compiler.useSourceMaps=true
binding: locale=en
Compiling module com.app.MyApp
Compiling 1 permutation
Compiling permutation 0...
Source Maps Enabled
Compile of permutations succeeded
Linking into d:\projects\myApp\SDV\com.app.MyApp\compile-1\war\myapp; Writing extras to d:\projects\myApp\SDV\com.app.MyApp\compile-1\extras\myapp
Link succeeded
Compilation succeeded -- 84.458s
Compile completed in 85210 ms
deleting: d:\projects\myApp\SDV\com.app.MyApp\compile-1
[ERROR] unable to create directory: d:\projects\myApp\SDV\com.app.MyApp\compile-1
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.codeserver.CompileDir.mkdir(CompileDir.java:103)
at com.google.gwt.dev.codeserver.CompileDir.create(CompileDir.java:93)
at com.google.gwt.dev.codeserver.Recompiler.makeCompileDir(Recompiler.java:267)
at com.google.gwt.dev.codeserver.Recompiler.compile(Recompiler.java:82)
....
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Process finished with exit code 1
I suspect it maybe Win8 file access permissions problem: cannot create the directory because it wasn't deleted successfully. Both lines in the log above that have this text:
deleting: d:\projects\myApp\SDV\com.app.MyApp\compile-1
are of red color in IDEA (if that has any special meaning).
I unchecked READ_ONLY checkbox in the properties of for the work folder in file explorer, and also run idea64.exe as Admin. Should I somehow run this codeserver compiler "as admin" too? Is it possible?
Also it may be a configuration issue, if it is and somebody can see it from the details below - I would really appreciate the help. Thanks in advance!
UPDATE
Running the superDevMode config with parameter "-noprecompile" gives the same results:
workDir: d:\projects\myApp\sdv
deleting: d:\projects\myApp\sdv\com.app.MyApp\compile-1
Module setup completed in 865 ms
deleting: d:\projects\myApp\sdv\com.app.MyApp\compile-1
[ERROR] unable to create directory: d:\projects\myApp\sdv\com.app.MyApp\compile-1
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.codeserver.CompileDir.mkdir(CompileDir.java:103)
at com.google.gwt.dev.codeserver.CompileDir.create(CompileDir.java:93)
at com.google.gwt.dev.codeserver.Recompiler.makeCompileDir(Recompiler.java:267)
So, definitely looks like file access problem (delete doesn't do its job?). Javadoc to CompileDir.create() method says: "Creates a new compileDir directory structure. The directory must not already exist, but its parent should exist." Seems that it already exists.
I think your configuration is correct. I am using the same parameters (with another portnumber) on my Mac and it works as expected.
The red color of the text:
deleting: d:\projects\myApp\SDV\com.app.MyApp\compile-1
is normal and indicates no problem.
I am not familiar with Windows 8, but would think, that you don't need to run idea.exe with admin rights. I think, uncheck the read-only checkbox should solve your problems.
Another way should be, that you create your workDir directory with Intellij.
File -> New -> directory
(That's what I did).
Ok, so this is fixed now in GWT 2.7.0 by GWT team.
https://code.google.com/p/google-web-toolkit/issues/detail?id=8619
Runs well, even though I can notice the message in the IDE console:
[WARN] unable to delete 'C:\Users\me\AppData\Local\Temp\gwt-codeserver-1341369077945982663.tmp\com.bla.MyAPP\compile-1' (skipped)
[ERROR] unable to create directory: C:\Users\me\AppData\Local\Temp\gwt-codeserver-1341369077945982663.tmp\com.bla.MyAPP\compile-1
Loading Java files in com.bla.MyAPP.
after printing this the IDE continues to run the app server.
Resolving the issue.
I also found that if you are converting your project from GWT 2.6.0 to 2.7.0, you should delete your 2.6.0 run configuration and setup a new one with GWT 2.7.0 defaults.
Related
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.
I'm trying to use OProfile on Eclipse (3.8). The Juno version of oprofile didn't work, so I installed the Luna one. This one at least starts up, but can never find the libraries.
Here is the error:
ns3-dev-lena-profiling-debug: error while loading shared libraries: libns3-dev-lte- debug.so: cannot open shared object file: No such file or directory
profiled app exited with the following status: 127
I know that that means I need to add the library path. So I went to Profiling Tools Configurations, and specified the path under environmental variables as:
name: LD_LIBRARY_PATH
value: {workspace_loc:ns3dev2}/build (appended)
I manually checked and the library is located in the build folder. Furthermore, this library path works fine if I debug the same project instead (or run it...).
I've deleted the configuration and remade it, but it's the same error.
I also tried adding the same path to PATH instead of LD_LIBRARY_PATH, but that doesn't make any difference. (Just tried it for the hell of it).
Any thoughts?
Edit, I get the same problem on Eclipse 4.4 (Luna). I found the logs for the errors and the error is:
!ENTRY org.eclipse.linuxtools.oprofile.core 4 0 2014-10-27 12:33:07.200
!MESSAGE opreport process error output: warning: /no-vmlinux could not be found.
I am using Karaf 2.3.1. I was following Apache Karaf Manual exercise "Extending the console" page no. 105. I followed all the instruction ditto, with a few deviations. I am able to load the bundle HelloShellCommand into Karaf. It threw me a bundle Id. But the command "test.hello" is not working.
karaf#root> osgi:classes is showing org/apache/karaf.shell/samplesHelloShellCommand.class
karaf#root> test.hello is showing command not found
karaf#root> osgi:list is showing Blueprint "Failure" for the given bundle.
I did deviate from the given instruction in "Compiling the JAR" section in following steps:
Let's try to build the jar: I did build the jar from Eclipse. File-Export-Java-Jar File.
Then run "mvn install": This is where I did not understand how Maven will use the .jar file. It is looking for pom.xml. So, I went into root directory and ran "mvn install". It went through successfully.
osgi:install .., also went through successfully. But I suspect Blueprint.xml did not go through.
I need help in:
How to resolve this?
How to know in Karaf what commands are installed with each bundle?
.jar file created in step-1 is different from "mvn install" which uses pom.xml. Is there something I am missing? How to make mvn use the .jar?
And why blueprint.xml did not load?
Thanks in advance
Further, we have this stackoverflow:
2013-07-27 19:44:30,733 | ERROR | rint Extender: 2
| BlueprintContainerImpl
| container.BlueprintContainerImpl 393
| 7 - org.apache.aries.blueprint.core - 1.1.0
| Unable to start blueprint container for bundle null
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:570)[:1.7.0-ea]
at java.util.ArrayList.get(ArrayList.java:348)[:1.7.0-ea]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.readDirectives
(BlueprintContainerImpl.java:211)[7:org.apache.aries.blueprint.core:1.1.0]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun
(BlueprintContainerImpl.java:283)[7:org.apache.aries.blueprint.core:1.1.0]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run
(BlueprintContainerImpl.java:261)[7:org.apache.aries.blueprint.core:1.1.0]
at java.util.concurrent.Executors$RunnableAdapter.call
(Executors.java:471)[:1.7.0-ea]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0-ea]
at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0-ea]
at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run
(ExecutorServiceWrapper.java:106)[7:org.apache.aries.blueprint.core:1.1.0]
at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run
(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.1.0]
at java.util.concurrent.Executors$RunnableAdapter.call
(Executors.java:471)[:1.7.0-ea]
at java.util.concurrent.FutureTask$Sync.innerRun (FutureTask.java:334)[:1.7.0-ea]
at java.util.concurrent.FutureTask.run (FutureTask.java:166)[:1.7.0-ea]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201
(ScheduledThreadPoolExecutor.java:178)[:1.7.0-ea]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run
(ScheduledThreadPoolExecutor.java:292)[:1.7.0-ea]
at java.util.concurrent.ThreadPoolExecutor.runWorker
(ThreadPoolExecutor.java:1110)[:1.7.0-ea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor.java:603)[:1.7.0-ea]
at java.lang.Thread.run(Thread.java:717)[:1.7.0-ea]
Regarding 1)
Is the bundle started? Did you use osgi:install -s with starting? If not you should start the bundle with start [bundleId]
Regarding 2)
Issue help at command line, it'll list all available commands. Using command -h will give you a overview of the command itself.
Regarding 3)
forget about creating a jar file from eclipse that won't work. Only with the maven pom you'll have a bundle that contains a valid Manifest unless you added this yourself (which I didn't see in your description)
Regarding 4)
Most likely your bundle either isn't started or it doesn't contain a valid manifest which in turn doesn't start the blueprint extender.
Besides that all those questions are usually best asked at the karaf users mailinglist
EDIT:
For finding the reason why a bundle did fail do a bundle:info on the bundle with the given ID
it should also show you why a blueprint failed.
When i try to run my code on Eclipse this error appears:
Usage: javaw [-options] class [args...]
(to execute a class)
or javaw [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
-hotspot is a synonym for the "server" VM [deprecated]
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
i try to coment my entired code and this error still appear.
It seems you haven't set your java path correctly.
Setting Up Eclipse with Java 1.6 on Windows
How To Install and Get Started with Java Programming
Run eclipse in clean mode
Edit the eclipse.ini file located in your Eclipse install directory and insert -clean as the first line.
If this is happening to a specific project only and other projects are running fine then your default run configuration might have changed. You may try the following
- Run -> Run As -> 1 Java Application.
I fixed this issue by deleting some of my old runtime configurations. Eclipse then started automatically generating them again.
I'm trying to deploy a JavaFX app. The app I've been working on is fairly complex and includes several libraries. When I create a jnlp and try to run it I always get a "Runtime error. Click for details" message. Someone suggested I try doing just a simple Hello World app to see if it's an issue with the included libraries. I tried that and I still get the "Runtime error."
Here's the build.xml I'm trying to use.
<project name="App" default="default" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpath="C:\Program Files\Java\jdk7\lib\ant-javafx.jar" />
<target name="default">
<fx:deploy width="600" height="400" outdir="${basedir}/dist" outfile="App">
<fx:application name="App" mainClass="${javafx.main.class}"/>
<fx:resources>
<!-- include application jars -->
<fx:fileset dir="${basedir}" includes="*.jar"/>
<fx:fileset dir="${basedir}/lib" includes="*.jar"/>
<fx:fileset dir="${basedir}" includes="app.ini" />
<fx:fileset dir="${basedir}/template" includes="*.template" />
</fx:resources>
<!-- request user level installation -->
<fx:preferences install="false"/>
</fx:deploy>
</target>
</project>
For the Hello World version I just removed the <fx:resources> section.
I run both of them from inside eclipse as an ant task. They both created a dist folder in my project with a .jnlp and a .html file. I then click on the jnlp to run the app and see a small window that has the text, "Runtime error. Click for details.' I click it and get an error window that says, "The application failed to run. There was an error while executing the application. Click 'Details' for more information." I click the 'Details' button and see a Java Console with the following information (HelloWorld version):
Java Plug-in 10.7.2.11
Using JRE version 1.7.0_07-b11 Java HotSpot(TM) 64-Bit Server VM
User home directory = C:\Users\user
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
Match: beginTraversal
Match: digest selected JREDesc: JREDesc[version 1.6+, heap=-1--1, args=null, href=http://java.sun.com/products/autodl/j2se, sel=false, null, null], JREInfo: JREInfo for index 0:
platform is: 1.7
product is: 1.7.0_07
location is: http://java.sun.com/products/autodl/j2se
path is: C:\Program Files\Java\jre7\bin\javaw.exe
args is: null
native platform is: Windows, amd64 [ x86_64, 64bit ]
JavaFX runtime is: JavaFX 2.2.1 found at C:\Program Files\Java\jre7\
enabled is: true
registered is: true
system is: true
Match: ignoring maxHeap: -1
Match: ignoring InitHeap: -1
Match: digesting vmargs: null
Match: digested vmargs: [JVMParameters: isSecure: true, args: ]
Match: JVM args after accumulation: [JVMParameters: isSecure: true, args: ]
Match: digest LaunchDesc: file:/G:/workspaces/JavaProjects/JavaFXHelloWorld/dist/HelloWorld.jnlp
Match: digest properties: []
Match: JVM args: [JVMParameters: isSecure: true, args: ]
Match: endTraversal ..
Match: JVM args final:
Match: Running JREInfo Version match: 1.7.0.07 == 1.7.0.07
Match: Running JVM args match: have:<> satisfy want:<>
CacheEntry[file:/G:/workspaces/JavaProjects/JavaFXHelloWorld/dist/HelloWorld.jnlp]: updateAvailable=false,lastModified=Fri Sep 14 07:13:28 MDT 2012,length=915
I get a nearly identical error when I run the app I'm working on.
I just uninstalled java and then reinstalled the latest SDK. That didn't do anything except may the app use the 64 bit JVM instead of a 32 bit JVM I had installed. The error message stayed the same.
Does anyone know what I'm doing wrong? Is my build script incorrect? Is there a better way to deploy? I don't have to have a jnlp so I'm open to any deploy method. I just need something I can run on a windows machine and possibly a mac.
I've tried googling my problem and I've searched StackOverflow and can't seem to find anything relevent. I might just be using the wrong search terms.
Any help would be greatly appreciated.
Thanks,
Hardy
If you are using netbeans then Right Click on the Project and Go to Project Properties then to Libraries then click on Manage Platform then select the Default Javafx platform then go to JAVAFX tab and then change the JAVAFX SDK location to where your Java fx 2 sdk is and also similarly change the JAVAFX JRE. Hope this will solve your Problem.
I eventually found out that, in my case, this issue was caused by a bug in the jar signing process. The problem is avoided by emptying the Java cache (on Windows, this can be done through the Java control panel). After doing so and rebuilding, the error no longer occurred in my case.
I'm unsure this will fix your problem, though, as you do not appear to do any signing.