I had an issue where I was getting the following error in the Problems view when attempting to save/compile a Java script library in a DB held on a server. I'm using DDE 8.5.3 (Note, I've changed the app and the lib names):
Project 'app_name.nsf.java-lib-name.javalib' is missing required library: 'C:\lotus\notes8\jvm\lib\axis\axis.jar'
It's worth noting that I'm using the Eclipse based Java editor, this issue doesn't happen if I use the traditional editor.
My script library had a number of JAR files associated, however none of them were included via the path which appeared to be causing the issue. Also it couldn't have been some deeply concealed dependency thing as all of the included JARs are custom built and none of them user or require Axis.
I also did a test creating a fresh library without pulling any external JARs in and the same error occurred.
It turns out the problem was being caused by the use of "JavaUserClassesExt" in my local notes.ini. I've recently been using a LN client app which depends on Axis and part of the install process includes dropping the relevant Axis files into a custom directory within jvm/lib/ext and then updating the ini to include those files using "JavaUserClassesExt" when launching the JVM.
I guess the issue has only shown up now because I've recently had to change the location of my LN install from the path indicated above (lotus\notes8) to something slightly different (lotus\notes853). I copied my ini across from the original install location which is why it still references the old path. Once I removed the references to the wrong path, the error cleared up.
So I can kind of understand what is happening, the JVM is attempting to load all required files on the classpath but is running into an issue because the files being requested via "JavaUserClassesExt" can no longer be found.
What I don't understand is why it's throwing this error when I'm attempting to edit a script library in a completely different database which has nothing to do with the Axis framework. I'd expect a compile error if trying to import anything to do with Axis based on it being on my local classpath, but to throw this error when the library has nothing to do with Axis seems confusing and incorrect to me.
As I mentioned, this only happens when using the Eclipse based Java editor so I presume this is a bug with that version of the editor.
Has anyone come across anything similar? Would this be classed as expected behaviour or can anyone confirm if this is a bug?
I realise this is a pretty edge case issue but would be interested in any insight.
Cheers,
Lee
Related
Actually I have solved the problem but I don't understand why it works.
I have been developing under a change root environment, which was configured by someone else. I tried to use java command, but got that error message in the title.
After searching for solutions to this problem, I found no one works for my situation. Then I downloaded the newest java package from Oracle website and put it somewhere in my change root environment. By running ./java in .../jre.../bin, I tried test whether this new one works and it did work.
Then the thing I cannot understand happened. After testing the new jre, the old java command is fixed and I don't get the error message any more. I have used "java -version" to check the version of the java command and it was the old version.
Can someone explain?
I'm working on a Java project with a native library in question. I believe that another version is being loaded when I try to use it from a non-Netbeans environment- when I debug the file in Netbeans, it works as expected, but when I run it from anywhere else, it hits a "NoSuchMethodError", leading me to believe that there is another instance (in the wrong version) being loaded
I've already examined my java.library.path and removed all other instances of the library beyond the dist/lib, but the error persists. Is there an easy way to find the location of a loaded library, so that I might be able to find out what is happening?
I tried following various tutorials for getting a JavaFX hello world app running in a browser. I can't believe it's that hard, so I'm looking for any insight into what I may have done wrong. Some things I've tried and resolved (to rule out the obvious):
Had to download 32-bit JRE for the browsers and ensure they were using that
Thus using the latest JRE (7u21); running on Win 7 64-bit
Checked Windows Control Panel -> Programs -> Java to verify the JRE being used
Signed the JAR file
Tried running from local file, found that drive letters weren't recognized, so moved to running via Tomcat 6
Tried various changes to the codebase and url hrefs, but I believe those are correct.
Tried in both IE 10 and Chrome
What I ended up with was that loading the .html (which references the jnlp using the JavaFX default javascript) would spin for a while then fail. If I try to load the .jnlp file directly, I get an exception:
ClassNotFoundException: javafx.application.Application
I verified that the jfxrt.jar is in the lib folder of the JRE that the browser is using.
Any insight/suggestions as to what I may be missing at this point? Seems like it must be something obvious/basic at this point, but I'm not seeing it. Thanks.
Just to follow-up, I went ahead and used javafxpackager. That produced a web page that would load the JavaFX application in Chrome. However, it still doesn't work in IE. I'm going to write that off as an IE but since it works in Chrome. What I did learn by looking at the results, though, is there are several things javafxpackager does, and the results of that are not exactly what's described in most of the manual tutorials/examples. Minor differences, but apparently they matter.
It sounds as you don't have the JavaFX starter classes in your JAR (usually done by the Ant script) and don't have the correct JavaFX Manifest entries.
It should not be needed to add the jfxrt.jar as a resource to your JNLP file and you shouldn't have to sign it.
Please show your Manifest file.
The Manifest file should contain at least the following JavaFX entries:
JavaFX-Version: 2.2
JavaFX-Application-Class: yourPackage.YourApplication
Main-Class: com/javafx/main/Main
The JAR should contain the classes of the com.javafx.main package provided by the ant-javafx.jar (see /resources/classes in that Jar). The ant-javafx.jar is provided by the JDK.
I was able to mostly resolve my problem. I'm using Eclipse, not NetBeans, so doing a lot manually. The basic problem was that I had to include the jfxrt.jar as a resource in the jnlp file (and that jar also had to be signed).
My app now runs if I access the jnlp directly, though it still doesn't work via html page. I'll post an update if/when I figure that part out.
I'm a bit new to Java / Processing and I opened up a project/workspace with the following errors:
is missing required library: '/Applications/Processing.app/Contents/Resources/Java/libraries/javamail/smtp.jar'
/javamail/dsn.jar
/javamail/mailapi.jar
/javamail/pop3.jar
I have the Processing app installed, but it's been a while...do I just need to upgrade processing or is there another place I need to go to get these .jar files?
I'm using Eclipse and there seems to be quite a list of referenced jar files (some broken)
It's telling you that there used to be a library at
/Applications/Processing.app/Contents/Resources/Java/libraries/javamail/smtp.jar
but it's no longer there, or possibly you opened a project that somebody else edited on a different machine where things were laid out differently.
Open the project build-path dialog and make sure all the libraries point to the correct locations.
If the problem still persist, try doing clean and build in eclipse. It might help.
I downloaded the android Email app source code [version 2.2] from here. I deleted the .classpath and .project file so that I could import an existing android project. Everything seems to have worked. However, I get quite a few recurring errors such as:
Attendees cannot be resolved to a
variable
android.provider.Calendar cannot be
resolved to a variable
Calendar cannot be resolved to a
variable
I have set the correct android version 2.2, what am I missing?
Thanks all for any help
I faced the same issue with Email. I fixed the issue, by adding the following jars into the build path and thus, all the errors were resolved.
../out/target/common/obj/APPS/Email_intermediates/classes.jar
../out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar
But you need to make the Application build using the platform.
Many of the included applications cannot(or at least could not) be built with the SDK, as they depend(ed) on non-exported functionality that is only "visible" during the system build. I'm not sure if Email is still in this category, but it was in the cupcake days.
There are three potential workarounds. Best is to rewrite those parts of the application to instead use functionality which is exported in the SDK, and thus fairly stable.
Next up is to use reflection to pick up the missing pieces at runtime.
Last is to make do-nothing dummy classes for the needed non-public platform pieces, within your project. These are enough to let the program compile, and at runtime they get rejected due to name collisions with the hidden system functionality, so you end up utilizing the real classes rather than the dummies.
The proper thing to do is to build the application with the platform build system, rather than the SDK.