How to compile the latest CN1 sources which require javax.media, org.cef etc? - codenameone

I just downloaded the latest version of the CN1 sources to use for building locally.
However, I don't have all the javax.media.* and org.cef.* that are required to build the JavsSE port.
Any quick tips on how to get everything to successfully build?
Since I couldn't build with the sources, I also tried copying the jars over from a just created CN1 project, but using those I get this error message:
/Users/me/NetBeansProjects/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaJMFSEPort.java:41: error: class, interface, or enum expected
import javax.media.Time;i
I'm no Java expert so I'm probably missing something obvious.

We added new jars to the binaries repository: https://github.com/codenameone/cn1-binaries/
These should include both, see this commit: https://github.com/codenameone/cn1-binaries/commit/6aa7e9d76b3653598e12396d7defc50d624a4e63

Related

Resource "/projectnamehere/.settings' already exists in Eclipse

I downloaded the newest version of Eclipse on an M1 Macbook Pro.
I downloaded the plugin from the Eclipse Marketplace. It's version 6.0
I made a new project, and when I get to the "finish" screen, I get this error:
Then, if I click finish again I get this error, which is the error that keeps showing up no matter how many times I click finish:
Some stuff ends up actually getting built in the project:
My professor doesn't know how to fix it, and there's nothing on Google. How can I make this work normally like it's supposed to? Thanks :)
The plugin is no longer supported for newer versions of Eclipse as we migrated to maven a while back.
You have two options
Use an old Intel version of Eclipse that predated the change to work with a legacy project.
Migrate the project to a Maven project which will work with all IDEs and doesn't use the plugin at all.

How do I migrate an older theme contribution to Qooxdoo 6.0?

I've recently been asked whether it was possible for me to convert my older theme contributions to the new Qooxdoo packaging system. So I installed Qooxdoo 6.0 and got a first test app running - not without problems because the instructions in the official docs are a bit buggy (e.g "npx qx" is an unknown command with my Ubuntu 18.04). I also read about the packaging system and what to do to install one of the existing packages from the Qooxdoo repository.
Then I followed the steps described in section "Create a new package". This procedure resulted in a folder structure which looked familiar at first sight, but a closer look made me wonder: There are two resource folders now, one is under "source" (as I would have expected) and the other one is under "source/class/[mypackage]". I also noticed that there is a "demo" folder in "source/class/[mypackage]", which used to be a top-level folder in previous Qooxdoo versions.
I then copied the theming files of my contribution to "source/class/theme", the demo app files to "source/class/[mypackage]/demo" and the demo resources to "source/class/[mypackage]/resource". After compiling the project I managed to run the demo app, but only without the expected resources (no icons, no fonts, no background images). The theming as such appears to be applied properly, but I keep getting plenty of error messages telling me "404 (Not found)" and "Image could not be loaded".
What am I doing wrong?
I guess you are running into a bug with our template for packages ... please open an issue https://github.com/qooxdoo/qooxdoo-compiler/issues/
As for how to do it. Have a look at an actual theme package for 6.0 https://github.com/ITISFoundation/qx-osparc-theme there you can see the required structure.
Also, for this kind of question, interactive help is probably best. Visit the qooxdoo chat on https://gitter.im/qooxdoo/qooxdoo

Jenkins Jacoco Plugin not linking Groovy source files

Is there a way to configure the Jenkins Jacoco Plugin to link Groovy source files to the coverage report? The coverage statistics are calculated correctly, however, in a mixed Java/Groovy Project, only the Java files are linked. The configuration looks as follows:
Switching to the latest release (3.0.3) I was able to fix that issue. However you still need to manually tell the plugin to check for *.groovy source files, e.g.:
jacoco classPattern: 'build/classes',
execPattern: 'build/jacoco/test.exec',
sourceInclusionPattern: '**/*.groovy', // new option required to tell the plugin to search for *.groovy source files
sourcePattern: 'src,test'
Based upon this bug report, it looks like the 2.2+ releases have changed how source code is linked in the report such that it only works for *.java files. One possible work-around is to downgrade the JaCoCo plugin to 2.1.0. This is what we did and it works; although I am not sure what features and bug fixes we give up in 2.2+ so it might not be worth it in your situation.
It looks like there is a Pull Request that needs to be reviewed and merged so that it can be released in an upcoming version.

NoClassDefFoundError: Could not initialize OauthRawGcsServiceFactory on production environment

I'm using appengine-sdk 1.9.3.
In devserver, works in Eclipse and Ant normally.
When I deploy (update) to appengine (production environment), I get this error:
event.getResults(): [<pre>Error for /p7/formPanelServlet
java.lang.NoClassDefFoundError: Could not initialize class
com.google.appengine.tools.cloudstorage.oauth.OauthRawGcsServiceFactory
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createRawGcsService(GcsServiceFactory.java:42)
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:34)
at com.bitvisio.p7.server.FormPanelServlet.<init>(FormPanelServlet.java:27)
At FormPanelServlet.java:27, the code is:
private final GcsService gcsService = GcsServiceFactory
.createGcsService(new RetryParams.Builder()
.initialRetryDelayMillis(10)
.retryMaxAttempts(10)
.totalRetryPeriodMillis(15000)
.build());
I put the lib appengine-gcs-client-0.3.9.jar in war/WEB-INF/lib. I think there is a problem with this lib.
Thanks for help.
Always use tools like Maven or Ivy to resolve dependencies for you. Copying JARs to war/WEB-INF/lib/ directory and editing .classpath file manually will be painful and may not help you always. If you use Eclipse & Google App Engine plugin, use Add Google APIs... as mentioned here - Google Plugin for Eclipse. In my case, adding Cloud Storage API via Google Plugin for Eclipse helped resolve this NoClassDefFoundError.
I had the same problem. I use Ivy to resolve dependencies and always get the latest.integration (with Maven use RELEASE) for revisions.
However I usually ignore transitive libraries. It looks like Google is expanding the API family - at least splitting out discrete functionality.
There are now quite a few transitive dependencies and it seems they released a new version of the GCS client around the same time as 1.9.3.
Getting all dependencies and packaging them in my deployment fixed my issue. I did not have the issue in development which made it more confusing.
You are facing this issue because you are not adding the some of the jar like
google-api-services-storage-v1-rev78-1.22.0.jar download link
joda-time-2.94.jar download link
guava-19.0.jar link to download
you can use the different version of jar according to your appengine-gcs-client jar file.
Note : Add all these jar and build path with the project and problem will get solve.

DataNucleus Enhancer doesn't work

I'm writing a web app using Google AppEngine and Spring MVC. I carefully upgraded to the v2 of the DataNucleus pluging by following these steps: http://code.google.com/p/datanucleus-appengine/wiki/UpgradingToVersionTwo (I use Eclipse).
When I try to run the Enhancer Tool I get following error:
Exception in thread "main" Plugin (Bundle) "org.datanucleus" is already registered. Ensure you dont have multiple JAR versions of the same plugin in the classpath. The URL
"file:/.../eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.6.4.v201203300216r37/appengine-java-sdk-1.6.4/lib/opt/user/datanucleus/v2/datanucleus-core-3.0.6.jar" is already registered, and you are trying to register an identical plugin located at URL
"file:/.../eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.6.4.v201203300216r37/appengine-java-sdk-1.6.4/lib/opt/tools/datanucleus/v2/datanucleus-core-3.0.6.jar."
I formatted the message so that you could see the tiny difference, one jar is loaded from "user" directory, the other one from "tools" directory. I don't understand why. In the project build path, there is only the one from "user" and to the DataNucleus configuration I added the one from "tools", just like the howto above suggested.
In other cases I've seen around this message was mostly caused by conflicting versions of datanucleus plugin but it doesn't apply to me. I guess it's just some stupid thing in my case... so what am I doing wrong?
So after all, I didn't read the instructions as carefully as I thought. The problem was really that the jars were there twice, one in the project build path, one in the datanucleus configuration. It shouldn't be in the project build path (or in fact, it shouldn't be in one of them, doesn't matter which one). I added it there automatically when I copied libs to the war directory and I assumed it had to be done. But the instructions clearly say that only jdo-api needs to be in the project build path.
One thing I don't understand though. In one step of the instructions I had to uncheck "use project classpath when running tools" in the DataNuclues configuration. So how is it possible that the plugin was still using the libs configured in the project build path?

Resources