i'm struggling since a couple of days ago in the attempt to resuscitate an old GWT application (which version is not updatable due to budget reasons).
In particular i've found several issues during the compilation phase.
This is what is blocking me:
Compiling module OctoMonitor Validating units: Ignored 200 units with compilation errors in first pass. Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. Finding entry point classes [ERROR] Unable to find type 'com.lynxspa.octomonitor.frontend.client.OctoMonitorEntryPoint' [ERROR] Hint: Check that the type name 'com.lynxspa.octomonitor.frontend.client.OctoMonitorEntryPoint' is really what you meant [ERROR] Hint: Check that your classpath includes all required source roots [ERROR] Compiler returned false [WARN] continuing to serve previous version
I've checked my source folder (which is referred in classpath) and my .gwt.xml file is in the parent folder of my EntryPoint class.
source folder:
.gwt.xml file
client folder (containing EntryPoint Class)
I've also checked in project > preference > build path > source that every entry does not have any excluded resource anymore.
Ideas?
Related
I am trying to compile a GWT project but I am getting the following error: Can anyone please explain if I am missing anything? I have downloaded the GWT plugins for the eclipse.
Compiling module com.nolij.nolijweb.ui.entrypoint.user.UserInterface Validating units:
Ignored 28 units with compilation errors in first pass. Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. Finding entry point classes
[ERROR] Errors in 'com/google/gwt/core/client/GWTBridge.java'
[ERROR] Line 25: No source code is available for type com.google.gwt.core.shared.GWTBridge; did you forget to inherit a required module?
[ERROR] Unable to find type 'com.nolij.nolijweb.ui.entrypoint.user.client.UserInterface'
[ERROR] Hint: Previous compiler errors may have made this type unavailable
[ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
Attempting to sbt compile a branch of my project ENSIME (experiment if you're interested) under Java 6 is giving a bizarre compiler warning:
[info] Compiling 48 Scala sources to /home/fommil/Projects/ensime-server/target/scala-2.11/classes...
[error] Class java.lang.invoke.MethodHandle not found - continuing with a stub.
[error] two errors found
[error] (compile:compile) Compilation failed
[error] Total time: 18 s, completed 03-Sep-2014 22:57:44
It works under Java 7.
Calling last reveals nothing more than the classpath of the compile (this would be equivalent to setting --debug level).
I've removed all the plugins from the project, and the problem still shows.
If I remove all my code - leaving just the build system and dependencies - with some stub scala entry points then there is no problem.
However, I can't exactly bisect my source code file because then it doesn't compile.
When the code is compiled, a grep (including binaries) of MethodHandle doesn't give any hits (although there is a jdk8 file in the tests resources, it is not relevant because the problem appears if it is removed).
It is only one (big) patch that has caused the problem (the previous commit compiles ok).
How can I debug this further in sbt? it doesn't want to give any more info
is this a known problem, or can anyone make an informed guess what is going on?
It turns out that this was caused by pulling in Lucene, which requires Java 7.
A bit of an epic message fail from sbt: there doesn't appear to be any way to get it to output anything sensible.
I have an error compiling my app:
[INFO] Compiling module com.mycompany.myapp.MyAppMocked
[INFO] Finding entry point classes
[INFO] [ERROR] Unable to find type 'com.mycompany.myapp.client.mock.MockEntryPoint'
[INFO] [ERROR] Hint: Check that the type name 'com.mycompany.myapp.client.mock.MockEntryPoint' is really what you meant
[INFO] [ERROR] Hint: Check that your classpath includes all required source roots
In my .gwt.xml, I have:
<entry-point class="com.mycompany.myapp.client.mock.MockEntryPoint" />
The problem occurs when I put MockEntryPoint.java in src/mocked/java instead of src/main/java.
I need to have both directories to exclude everything in src/mocked/java when compiling the "no-mock" version.
If I move MockEntryPoint.java to src/main/java, the compilation will succeed with no error. In both cases, the class MockEntryPoint is in the package "com.mycompany.myapp.client.mock".
How can I tell gwt to look for my entry class in src/mocked/java?
Assuming this is a Maven project, you need to add src/mocked/java as a source folder. In Maven, it has to be done using the build-helper-maven-plugin's add-source mojo.
But there's little to no reason to have that src/mocked hierarchy:
you can put everything in src/main and just compile the GWT module you need/want (set the module or modules configuration property for the gwt-maven-plugin accordingly)
if you want them clearly separated, Maven wants you to use distinct Maven modules/projects. You don't want to fight against Maven.
Replace statement <source path='main'/> with <source path='mocked'/> in your .gwt.xml
Then compiler will know which directory to choose for compilation.
I hope it helps.
I'm trying to start using GWTQuery in a GWT project.
I've created sample GWT project in Eclipse
Added gwtquery-1.3.2.jar
into war/WEB-INF/lib
Edited Myproject.gwt.xml (added <inherits name='com.google.gwt.query.Query'/>)
When I compile the project it writes a lot of deffered errors but at the end it comes with:
Scanning for additional dependencies: jar:file:/C:/eclipseBacklog/Backlog/war/WEB-INF/lib/gwtquery-1.3.2.jar!/com/google/gwt/query/client/GQuery.java
Computing all possible rebind results for 'com.google.gwt.query.client.GQuery'
Rebinding com.google.gwt.query.client.GQuery
Checking rule <replace-with class='com.google.gwt.query.client.impl.SelectorEngineNativeIE8'/>
[ERROR] Errors in 'jar:file:/C:/eclipseBacklog/Backlog/war/WEB-INF/lib/gwtquery-1.3.2.jar!/com/google/gwt/query/client/Properties.java'
[ERROR] Line 20: The import com.google.gwt.core.shared cannot be resolved
[ERROR] Line 39: GWT cannot be resolved
[ERROR] Unable to find type 'com.google.gwt.query.client.GQuery'
[ERROR] Hint: Previous compiler errors may have made this type unavailable
[ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[ERROR] Errors in 'jar:file:/C:/eclipseBacklog/Backlog/war/WEB-INF/lib/gwtquery-1.3.2.jar!/com/google/gwt/query/client/GQuery.java'
[ERROR] Line 1483: Failed to resolve 'com.google.gwt.query.client.GQuery' via deferred binding
What I'm doing wrong?
Check your version of gwt, you have to update to GWT-2.5.x. because this artifact of gquery has a undesired dependency of it. There are two GWT.java classes in 2.5, and gquery is depending of the new com.google.gwt.core.shared by mistake.
Open an issue at the gwtquery site becasuse this release should work with older gwt version as well.
You could also change the gquery version to 1.3.1 or 1.4.0-SNAPSHOT
Update: I've just deprecated version 1.3.2, and released 1.3.3 which compiles with previous gwt versions
I created a service, async, impl for an rpc service. However, when I go to do the gwt compile (I'm using Eclispe Indigo with the gwt 2.4 plugin) I'm getting these errors:
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Scanning for additional dependencies: file:/C:/.../client/activity/CalculatorActivity.java
Computing all possible rebind results for '...Calculator.client.CalculatorService'
Rebinding com... CalculatorService
Checking rule
[ERROR] Errors in 'file:/...Calcuator/src/...Calculator/client/CalculatorService.java'
[ERROR] Line 17: No source code is available for type java.io.InputStream; did you forget to inherit a required module?
[ERROR] Unable to find type '...Calculator.client.CalculatorService'
[ERROR] Hint: Previous compiler errors may have made this type unavailable
[ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[ERROR] Errors in 'file:/...Calculator/client/activity/CalculatorActivity.java'
[ERROR] Line 59: Failed to resolve '...CalculatorService' via deferred binding
[ERROR] Cannot proceed due to previous errors
I'm not sure what is causing this? I'm not getting any compile errors under Eclipse, but something isn't setup right for the RPC service apparently.
Any ideas as to what the problem is?
It seems, you use the InputStream class somewhere in your client side code. But in client side code you are restricted to the classes mentioned in the JRE Emulation Reference.