i cannot run any gradle projects - gradle

this is the minecraft forges default gradle
i also search but didnt find any answers
C:\Users\masiha.DESKTOP-VBVOMDJ\.gradle\wrapper\dists\gradle-4.10.3-bin\31t79e2qsceia4mkbojplrgx
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at org.gradle.wrapper.Install.unzip(Install.java:215)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:75)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
pleas help :)

This problem accrued to me yesterday as well, so I thought I might share my fix to this problem if this is still relevant.
While I am not familiar with Forge at all (I started using Fabric just a few days ago), how I fixed my problem was to change the settings in either the gradle.properties or build.gradle according to your mod's correct settings.
Most likely your problem occurs in gradle.properties. It might be the version number that isn't correct, and a quick research of the current Forge or Minecraft version you're planning on using would help. The same applies to build.gradle.
In the crash log you've provided, most of the errors are coming from the class org.gradle.wrapper.*, so it's likely to assume that it is something in one of the 2 files.
If neither of that worked, it might be because you've entered an incorrect path to your main class in the forge.mod.json file.
For example, if your classpath is hi.mashia.main, then you'll have to enter it in the 'main' field there as well. This could've happen if you've changed your classpath or name lately, or just installed a new Forge environment and didn't set this thing up.
Again, I'm not using Forge, and I'm just telling my own experience with things.
So if this doesn't help, just try to look for common Gradle errors in the Gradle User Manual, or if this doesn't help, then you might want to look into the Forge Docs or something similar to that. Google search or YouTube might help with that too.
A video that I think you could potentially find helpful is this one by TechnoVision.
It might be outdated, but not too outdated.
Really hope this helps!
Happy Coding!

Related

Firefox can't load temporary addon: Error: Can't find profile directory

I'm starting to work on a small firefox plugin, it's a basic js script, no problem on this side.
I've made a few successfull tests, and had a a few satisfying results. But starting yesterday, i'm unable to laod any temporary addons in firefox.
Everytime i try to start one (even a simple console.log("hello world")), i get the error message in the console:
Error: Can't find profile directory. XULStore.jsm:66:15
It work perfectly 2 days ago, the problem appeared yesterday, and, as far as i know, i didn't made any firefox upgrade.
I've made a few reseach, a found two usefull links, one on discourse.mozilla of someone that has the exact same problem ... but no answer, and another one on bugzilla saying this bug won't be fixed because it should last long ... https://bugzilla.mozilla.org/show_bug.cgi?id=1548017
I'm askign here because i can't find any solution to my problem, and right now, it's been 24h since i'm stuck in my development progress. I'm open to any suggestion that might work.
I've checked my profiles directory and files, they're existing and ok... and that's basically everything. I'm not familiiar with the tools available for firefox so, i might have forgotten to check basic things that might help.
P.S: i'm not using selenium at any time (i've seen a few requests here about a similar issue with selenium, but i'm writing vanilla JS here, so, i think it's not the same issue)

How do I interact with Apache Jena locally? - MacOS

I may just be going at this wrong, but I am not sure how to interact with Apache Jena on my computer. I think my main question revolves around where I store files and how I run them.
I use Atom editor and work in Python and Javascript normally. My goal here is to get a handle of how Jena and Fuseki work then potentially using Fuseki for the backend of a web app.
The tutorial, An Introduction to RDF and the Jena RDF API, links to Java files. Where do I store this file on my desktop and how can I run it?
While my question is about setting up my workspace/environment, I would appreciate feedback on more appropriate technologies.
Based on this tutorial I've gotten my workspace set up. I've removed the package identifier from my code.
Now I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/jena/rdf/model/ModelFactory at
Tutorial01.main(Tutorial01.java:34)
Caused by: java.lang.ClassNotFoundException:
org.apache.jena.rdf.model.ModelFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
I think it's a JENAROOT Issue. I think I'm setting it and adding it to the path correctly. It's also mentioned here, but I haven't been able to troubleshoot it yet.
Anybody can point me in the right direction?
I got help of this via the Apache Jena support email. I think I must have caused an issue by changing the environmental variables for Jena upon first use.
Based on a script I received from a community member I ran a script named jenaJarsScript.sh in terminal:
unset JARS
for f in $JENA_HOME/lib/*.jar
do
JARS=$JARS:$f
export JARS
done
I then added $JARS to my classpath - now I can compile and run code without an issue.
Note: I'm not sure if this is the best way to set this up, but it works for me.

Maven & InventoryClickEvent.getClickedInventory();

Whilst coding a fun new trash can for a Minecraft server network that I develop for, I came across a pretty strange, and therefore infuriating, bug concerning Maven. I've been using it for a year or two now and have only gotten a single build error before, when I first started using it. Suddenly, this problem has shown itself.
The red arrows indicate the lines that are causing the build failure.
This is a screenshot of the Maven logs that are causing the issue.
Well, according to the Bukkit API docs (note that the official docs seem to be down, thus third party), the class InventoryClickEvent has no method getClickedInventory().
This fact definitely explains your compilation error. The error comes from your Java compiler, Maven has nothing to do with it.

After SONAR and plug-in upgrades, all false-positives reappeared

Recently we upgraded our SONAR from 3.x to 4.3. There was an error in our Jenkins build (squidindex was null) which triggered the upgrade of the java from 2.2 to 2.2.1 along with the plugins for JaCoCo, Findbugs, Squid for Java, and Surefire.
Once SonarQube was up and running again, we discovered that although no code changes had taken place, we now had over 200 critical issues as well as a high number of major ones. Upon research, it became apparent that all of our previously marked false-positives had now reappeared.
Obviously we want to find a way to fix this besides walking through over a thousand various issues and re-marking them.
We have done some research in the database and have discovered a puzzle that we think might be related. In the Issues table, we have found that there are duplicate entries where the first difference is that one entry has the simple file name and the other entry has the file name along with the extension.
(I had an image of a few lines from the database to put here, but as I do not yet have a 10 reputation, I cannot. Please contact me and I will be glad to email the image. Sigh.)
As you can see, Lines 2 & 3 both refer to line 134 in the file PersistentObjectCollection.java. Line 2 shows that the issue is FIXED and CLOSED while Line 3 shows the same issue as Open and null resolution.
We are wondering if we could safely use SQL to find matched pairs like this and copy the necessary columns across to register the issues properly?
Can you please take a look and tell me if this is something feasible to do, or if there is a better alternative to try.
Question already asked on the SonarQube mailing list : http://sonar.markmail.org/thread/kpx3une24lwoilli
Please don't duplicate question !!

Coffeescript maven plugin gone from GitHub?

I make extensive use of the CoffeeScript Maven Plugin which used to live here: https://github.com/iron9light/coffeescript-maven-plugin. (if that link is no longer 404'ing then it must have come back; consider the question answered!)
It seems to have disappeared which is odd as it's always been there in the past. I have local copy so it's not a mega problem but I would be sad if the chap who maintains it has deleted it / stopped maintaining it!
Does anyone know what happened to it?
Huh, it's back now! I guess it took a little holiday. https://github.com/iron9light/coffeescript-maven-plugin

Resources