issue while installing FindBugs in NetBeans 8-2 [duplicate] - java

I am getting below error while installing Findbugs into Netbeans 8.2:
"There were some problems while storing Establishing a connection …
Cause: Cannot resolve external reference to m2:/org:ow2:asm:asm-debug-all:5.0.2:jar"
I have tried uninstalling NetBeans 8.2 and removing anything associated with the installation to get a fresh install with no success there, and I have tried the latest version of NetBeans 11.3 which I found does not have Findbugs available. I need the plugin for a school project and no one there has been able to help me with this issue either. Any help would be greatly appreciated.
I am using a Windows 10 PC.
Thank you.

The reason of the error
The error happens because when you download the plugin, NetBeans also tries to download additional dependencies. The links where to download the jars from are written inside the nbm package.
For example, one of the dependencies is asm-debug-all-5.0.2.jar, and the link is:
http://repo1.maven.org/maven2/org/ow2/asm/asm-debug-all/5.0.2/asm-debug-all-5.0.2.jar.
The maven repository is no longer accessible using the HTTP link. You can read more about it here.
So basically, you could not install the plugin because the plugin is outdated and contains invalid links for downloading dependencies from maven repo.
Before solving the issue, consider using SpotBug instead because the FindBug is outdated and is no longer actively maintained, for more information, please, see here in another answer. Also, keep in mind that it works only with JDK8.
How to solve it?
To solve the issue, you need to fiddle around a bit with plugins.
You need two plugins FindBug Libs (org-netbeans-libs-findbugs.nbm) and FindBug Integration (org-netbeans-modules-findbugs.nbm). Download them using thees links:
https://updates.netbeans.org/netbeans/updates/8.2/uc/final/certified/82/extra/org-netbeans-modules-findbugs.nbm
https://updates.netbeans.org/netbeans/updates/8.2/uc/final/certified/82/extra/org-netbeans-libs-findbugs.nbm
Unzip org-netbeans-libs-findbugs.nbm manually as if it is a simple zip file.
Edit the files in org-netbeans-libs-findbugs\netbeans\modules\ext extracted folder. In every file, you need to change the link from http to https.
Edit manifest file org-netbeans-libs-findbugs\META-INF\MANIFEST.MF. You need to remove all lines that contain CRS checksum. After editing it should contains only these lines:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.2
Created-By: 1.8.0_45-b14 (Oracle Corporation)
Remover other two files in org-netbeans-libs-findbugs\META-INF (ORACLE_C.RSA and ORACLE_C.SF).
Zip it again.
After that, the file is ready for manually installing into Net Beans. Alternatively, you can download the file from here. I have already modified the plugin using the steps.
How to install and use it?
Got to Windows -> Plugins -> Downloaded -> Add Plugins
Manually add the modified org-netbeans-libs-findbugs.nbm file and click install.
Then add org-netbeans-modules-findbugs.nbm and click install.
When installing, it shows that it downloads the plugin, but actually, it downloads only dependencies. It can take some time.
After that, select your project in the project tree, make sure it was compiled before. Got to Source -> Inspect, choose FindBus in the Configuration.
After you click to inspect your report will be ready.
It works both on NetBeans 11.3 and 8.2. Make sure you are using JDK8 with NetBeans. I'm not sure it will work with the newest versions of JDK.
Here is an example with running it on 11.3 using JDK8 on some NetBeans module:

Related

"Package javax.xml.ws does not exist"

I am rusty on Java and completely new to IntelliJ IDEA, an IDE which has been causing a lot of problems for me so far.
I am trying to run a program with the line "import javax.xml.ws.Response;". However, I get the error message "package javax.xml.ws does not exist."
I've tried to select the "Add Java EE 6 JARs to module dependencies" automated solution by IntelliJ IDEA, but it doesn't seem to do anything.
(I believe I am running Java 11, if it makes any difference at all. According to the readme by the author of the code, I should be running Java 8, but so far I haven't been able to because I get an unrelated error when trying to change Java versions with IntelliJ.)
What do I do? Thanks in advance.
Your issue is not related to Java version. It will work for both version 8 and 11.
You will need to either download the jaxws-api jar or add it as a Maven dependency accordingly.
You may download the Jar from the below maven repository URL, and then add it to your build path, or update your pom.xml with this dependency:
https://mvnrepository.com/artifact/javax.xml.ws/jaxws-api/2.3.1
This is intermittent issue and can eat up hours. Try to do below steps
Remove all dependencies from classpath.
Close the project and open it again.
Add all required dependencies.
Clean your project.
Go to Project Structure and change Project SDK to Java 1.8 solved my problem

could not find http://www.objectdb.com/eclipse

In eclipse when i am going to install objectDb data Source Driver like:
help-->Install New Software...-->then i am adding
url: http://www.objectdb.com/eclipse. it gives the error like:
"could not find http://www.objectdb.com/eclipse" so i am unable to getting objectDb data source inside eclipse IDE so how can i solve this problem.
Thank You....
Attachment of screen shoot of this problem
Updated for manual installation: Since Eclipse won't recognize the software site, you can try downloading those jars yourself and do a local installation. When you go to Install New Software -> Add, there should be an option called Archive for installing the jar files.
I've tried looking around for an Eclipse plugin for Object DB and haven't found much. Since the plugin files in the link you provided appear two years old and the link does not work with Eclipse, perhaps Object DB can be installed manually? On their website, the downloads section here offers Object DB's jar files and more (and these ones are recent).
There was an issue that was fixed. Automatic installation should be available now.

eclipse external tools configurations -> referenced library in classpath does not exist: org.eclipse.swt

After updating to the latest eclipse mars release
Version: Mars Release Candidate 1 (4.5.0RC1)
Build id: 20150521-1252
I am not able to start any Ant Script. It always results in the following error:
First I checked if the path is really correct, and made sure that the specific jar org.eclipse.swt.win32.win32.x86_64_3.104.0.v20150513-1901.jar exists at the given location, which it does. After some digging I noticed the following within the external tools configurations:
Somehow I think eclipse is not able to resolve the classpath with the given '%20' tag within the url to the library. Usually there is just a blank. Restoring the defaults always fills in the '%20' for this specific library.
So I created a copy of eclipse at a location without blanks and all works fine again.
Unfortunatly I would prefer keeping the location at it is, so is there a way to correctly resolve the classpath for Additional Tasks & Support?
There is one other "fix" that's basically an easier workaround.
If you go to your Ant build configuration (under External Tools, then highlight your configuration and select the JRE tab) and change from running an external JRE to the top button, that is, "Run in the same JRE as the workspace", this will make it work.
This is a known bug in Eclipse Mars:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=470390
Update: Eclipse 4.5.1 was released on October the 2nd and the bug has been fixed. An Eclipse update will resolve this issue.
I resolved this by moving C:\Program Files\eclipse to C:\eclipse
Answer also found here, Eclipse Mars: ANT Task references missing SWT library

Cordova run does not build plugin classes

I am getting crazy here: it has been 3 hours that I try to understand why InAppBrowser does not work. I have removed the platforms/android folder completely, added again the plugin via the CLI only to see in adb logcat that the InAppBrowser plugin is not found. Indeed, I do not see the classes generated in the platforms/android/ant/build. On the computer of my colleague, everything is fine, the classes are generated and the plugin works. We have basically the same setup and I do not see why those classes are not generated. I am not an expert in Ant builds.
Can someone point me to the right direction ?
[EDIT] More information:
To install the plugin, I did as suggested in https://github.com/apache/cordova-plugin-inappbrowser/blob/master/doc/index.md:
cordova plugin add org.apache.cordova.inappbrowser
I did run cordova build.
I suspect your /plugins/android.json got somehow corrupted.
The simpliest I could recommend you is to remove the /plugins folder and re-add all the plugins you need in your project.

Google adt/gwt support for eclipse 4.4 (Luna)

Have anyone gotten the release version of eclipse 4.4 to work with adt(Android development) and/or google web toolkit(gwt).
It seems like the gwt/adt plugins don't works with eclipse 4.4, so is there a secret place to download new versions or should I keep using 4.3 -(
Edit:
The reason I thought adt was not working was that the documentation(http://developer.android.com/sdk/installing/installing-adt.html) says that the plugin is called "ADT Plugin" which it is not.
Google just released its official SDK for Eclipse Luna: https://developers.google.com/eclipse/docs/getting_started
For adt ,
help -> Install new Software ->
https://dl-ssl.google.com/android/eclipse/ -> don't select everything
(it worked that way for me) i selected everything except Native development tools(i guess you don't need them if you debelop in java) and it's working well for me .
well… the gwt plugin actually can not work with luna release since it has a bundle dependency for eclipse core.runtime [3.8.0,3.10.0), here, ")" means it NOT includes 3.10.0 wihich is used in luna, however, it can been get rid of by modifying the osgi bundle file and then it will works fine with luna ,at least for me for now.
1 download the last update site zip file from google eclipse plugin site
2 unpack it
3 then you will need to modify 2 files firstly
an osgi META INF/manifest file included in a jar named *gdt*e42 (sorry, forget the full name, you can find it when you are trying to install the plugin, luna will complain that some dep bundle is missed)that is located in plugins dir, just change core.runtime version from 3.10.0) to 3.10.0]
another one should be contents.jar (maybe artifacts. jar), same above
now you can install the plugin if you have already have the eclipse RCP installed
however, install will failed because the md5 hashing is changed,
finally, copy the expected md5 from error message dialog to replace the old md5 value in artifacts.jar(maybe contents.jar)
now reinstall the plugin ,it should work for now
UPDATED:
maybe you should remove the bundle-version from MANIFEST.MF at com.google.gdt.eclipse.platform.e42 jar
and change the version to "0.0.0" from content.xml at content.jar
If you are using the Help----->Install New Software option, you might encounter this error message just like i did trying to install the Android plugin.
An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTrust, operand=, action=).
Error reading signed content.
error in opening zip file
My solution was to go through Help-->Eclipse Marketplace and then search for "Android" Select the plugin from the search result and install it from there.

Categories