I have a little application which is working fine when testing is on localhost.
But when I want to deploy it to google app engine server, I have thoses errors :
Compiling module org.magnetik.semola.Org_magnetik
Validating newly compiled units
Ignored 1 unit 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 'file:/C:/Users/magnetik/git/semola-rdf/org.magnetik/src/org/magnetik/semola/client/RDFServlet.java'
[ERROR] Line 13: No source code is available for type javax.servlet.http.HttpServlet; did you forget to inherit a required module?
[ERROR] Line 16: No source code is available for type javax.servlet.http.HttpServletRequest; did you forget to inherit a required module?
[ERROR] Line 16: No source code is available for type javax.servlet.http.HttpServletResponse; did you forget to inherit a required module?
[ERROR] Line 25: No source code is available for type com.hp.hpl.jena.rdf.model.Model; did you forget to inherit a required module?
[ERROR] Line 25: No source code is available for type com.hp.hpl.jena.rdf.model.ModelFactory; did you forget to inherit a required module?
[ERROR] Line 37: No source code is available for type java.io.ByteArrayInputStream; did you forget to inherit a required module?
[ERROR] Unable to find type 'org.magnetik.semola.client.RDFServlet'
[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
Usefull files (I think) are here : http://pastebin.com/zuELG18u
Does your project use GWT for the client side? Your deployment is failing when it is trying to do a special GWT compliation step.
I believe your problem is that your RDFServlet class is part of a GWT module, which is not what you are intending.
The default Eclipse project for GAE comes preconfigured to work with GWT. The package is structure in the example is like this:
client/ <--- GWT code (for client side, compiled to JavaScript)
shared/ <--- Code necessary on both the client and server
server/ <--- Server side code
When GWT compiles client/ down to JavaScript, it needs the full source of all its dependencies, and there are many classes that should not be referenced. However, it seems that you have a servlet (RDFServlet) in the "client" package.
You probably want to either disable GWT in your project, or move RDFServlet into a package that is not part of a GWT module. (For example, if you are using the Eclipse sample project, Servlets would be put somewhere under the 'server' package.
Related
I generated a simple libGDX project with no dependencies. When I tried to build it as HTML app with Gradle (./gradlew html:dist), I get the following error message:
Tracing compile failure path for type 'xjcl.downgradius.client.HtmlLauncher'
[ERROR] Errors in 'file:/home/jan/Dropbox/py/AndroidStudioProjects/Downgradius_Android/html/src/xjcl/downgradius/client/HtmlLauncher.java'
[ERROR] Line 49: No source code is available for type xjcl.downgradius.DowngradiusGame; did you forget to inherit a required module?
I think the problem is caused by me using Kotlin in this project, and libGDX being intended for Java development. I observed that when I made a new main Game class in Java, that class was found by GWT, but not the Kotlin classes it imports.
I know Kotlin does some re-packaging (for example, if you put funA and funB in file Foo, they will be re-packaged as part of a new FooKt package, I think), but it should be able to find it as
it is declared in the right package (xjcl.downgradius)
it is declared as the only class in its file
I get no IDE warnings about importing it from Java.
I also tried converting Kotlin to Java code but the resulting Java code was full of errors.
Your assumptions are correct. GWT compiler works on Java sources. The error message it gives you is correct: There are no Java source code files to be found, you say it yourself that you used Kotlin.
If you want to use GWT, convert to correct Java source code.
I know there is already a lot of topic about this issue (did you forget to inherit a required module?) but my problem is a little bit special.
Let me explain it:
I have an existing package that contains my models classes(the name of the package is model). All my models were located into that package. But I made a change in my application and now part of the models that I am using in my application is now pulled from another application named "MyAppModel". I have added the dependency to this MyAppModel application in my pom.xml file. I have no compilation error (mvn compile is successful) but when I do maven install: I have the following error:
[ERROR] Line 130: No source code is available for type com.data.service.models.Product; did you forget to inherit a required module?
[INFO] [ERROR] Line 588: No source code is available for type com.data.service.models.Order; did you forget to inherit a required module?
These 2 models:com.data.service.models.Order.java and com.data.service.models.Product.java are from the MyAppModel application but I am not authorized to add them manually to the existing model package of my application.
It seems like it can not find those 2 models Product and Order.
Here is the content of my gwt.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<module>
<inherits name='com.google.gwt.user.User'/>
<source path='model'/>
</module>
The source path is only pointing to he existing model package. My question is: how can I do to modify this gwt.xml file to take into account both models packages(the model package of the existing application and also the model package of the external application "MyAppModel")
I need to keep my existing source path='model' and should add an access to my external models in my MyAppModel application
Thank you very much for your help
I think this is one of those few cases where the error is exactly what it says.
If you have part of those models in another artifact just make sure you also have the sources available and not just class files, for that artifact.
You need to either package a -sources artifact or include sources in the same artifact as compiled classes.
In case of GWT, sometimes we see this error if we refer server side classes in client side code.
I am building GWT application by Maven.
When compiling get the following message:
Validating newly compiled units
At first there is this warning:
[WARNING] Don't declare gwt-dev as a project dependency. This may introduce complex dependency conflicts
Then there is this error:
[ERROR] Line 19: No source code is available for type org.apache.commons.lang.StringUtils did you forget to inherit a required module?
Despite this build does not fall and Dev mode works properly.
How can I get rid of these error messages?
Perhaps a reason is in your module file. You should to identify packages that is to be compiled. This is configured in .gwt.xml module.
<source path="packagename">
And GWT compiler will compile packages gwtxmlmodulepath.packagename.
See more
The error means that some of the client code (to be compiled as javascript) contains a reference to the StringUtils class from Apache Commons. This is not allowed because this library contains code that is not GWT-client compatible.
While compiling my code I am getting this problem:
No source code is available for type com.google.gwt.visualization.client.visualizations.corechart.PieChart; did you forget to inherit a required module?
[ERROR] Line 30: No source code is available for type com.google.gwt.visualization.client.visualizations.corechart.PieChart.PieOptions; did you forget to inherit a required module?
[ERROR] Line 38: No source code is available for type com.google.gwt.visualization.client.AbstractDataTable; did you forget to inherit a required module?
[ERROR] Line 39: No source code is available for type com.google.gwt.visualization.client.DataTable; did you forget to inherit a required module?
[ERROR] Line 40: No source code is available for type com.google.gwt.visualization.client.AbstractDataTable.ColumnType; did you forget to inherit a required module?
[ERROR] An internal compiler exception occurred
I am using gwt 2.1 and visualizations. I tried adding an entry in *.gwt.xml, but it didnt help.
Any help will be highly appreciated.
Are you sure that you have added
<inherits name='com.google.gwt.visualization.Visualization'/>
to your *.gwt.xml file? Because it seems to me that this is a reason of problem.
I have an external JAR signpost-core-1.2.1.1.jar (from http://code.google.com/p/oauth-signpost/), that I want to include into my Java GWT project.
So I add this external JAR file to my build path in Eclipse and put theese imports to my Class:
import oauth.signpost.basic.DefaultOAuthConsumer;
import oauth.signpost.exception.OAuthCommunicationException;
import oauth.signpost.exception.OAuthExpectationFailedException;
import oauth.signpost.exception.OAuthMessageSignerException;
While compiling I got theese error messages:
[ERROR] Line 130: No source code is available for type oauth.signpost.basic.DefaultOAuthConsumer; did you forget to inherit a required module?
[ERROR] Line 133: No source code is available for type oauth.signpost.exception.OAuthMessageSignerException; did you forget to inherit a required module?
[ERROR] Line 135: No source code is available for type oauth.signpost.exception.OAuthExpectationFailedException; did you forget to inherit a required module?
[ERROR] Line 137: No source code is available for type oauth.signpost.exception.OAuthCommunicationException; did you forget to inherit a required module?
So I put the following line in my Admin.gwt.xml file:
<inherits name='oauth.signpost.Signpost' />
And now I'm getting this message:
Loading inherited module 'oauth.signpost.Signpost'
[ERROR] Unable to find 'oauth/signpost/Signpost.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
Unfortunately the Signpost does not seam provide a gwt.xml file, since it consists only of a jar file.
So how can I write it?
And where do I have to place it?
Or do I just need to set some additional paths?
I don't know Signpost library but I suppose that you want to use it in your client side. Unfortunately oauth-signpost is only provided for traditional web services. Anyway if you want to use it, its possible only on server side where you have full support of jre 6. On client side you can use only provided gwt modules that use only emulated gwt-jre environment.