JAR file not found during build in Netbeans - netbeans

hello i am trying to run java jsp/servlet application using netbeans but i am getting error message it say
C:\Users\isslam\Desktop\jsp2_allfiles\servlet_jsp\netbeans\book_apps\musicStore\nbproject\build-impl.xml:1009 Warning: Could not find file C:\Users\isslam\Desktop\jsp2_allfiles\Program Files\NetBeans 6.0 M9\enterprise4\modules\ext\standard.jar to copy.
BUILD FAILED (total time: 0 seconds)
I downloaded the standard.jar but i am not sure if it is the right one and i added it to the Libraries and still giving me the same error. the path he is giving me is not real path i can not find it in fact it is kind of wrong

I know this question is almost a year old, but I had the same problem and fixed it so I thought I'd chime in.
It looks like you're using Murach's Java Servlets and JSP exercise files, which is what I'm using too. Well, those are kind of old and include some old libraries.
To resolve the issue, open your project in Netbeans. Right click on it and select properties. Select libraries. You should see a JSTL library that is outdated. Remove it from the project. Now add the updated JSTL library by clicking Add Library and selecting the new JSTL library.

Related

in my eclipse its showing red cross error on each project.how to fix it?

I removed tomcat server after going into windows-->preferences-->server-->run time environmentsenter image description here. after this its showing red cross on each project .and not running any project even after adding the server. but newly created projects are running without any error. how to fix this red cross error from every project
As mentioned by #howlger, you should clean up your project's Java Build Path so that you only build against one Java runtime.
Ok, so after removing that Tomcat Server Runtime, you were probably prompted to remove it from any projects that were referring to it. If so, this is how to get things working again.
When working with Java, you need a Java Runtime from which to get the classes to compile your own code against. When working with servlets and JSP files, you need to get the Servlet API from somewhere so you can compile against them, and WTP (which you're using) has you get them from an actual server--like Tomcat (ideally the same version of the server you're going to deploy to, so you have the same libraries and classes at development time that you have at runtime). By removing it from your preferences and project(s), they no longer have jar files with those classes to compile your own sources against, so the Java tools don't know what those types are.
That means that fixing the problem requires getting a server runtime back on the Java Build Path. Screenshots are valid for Eclipse IDE 2021-12 (WTP 3.24).
Make sure you have a valid runtime on the Server / Runtime Environments preference page. In this picture, I've let it download both Apache Tomcat 9 and 10 for me. Really, you must have something here to proceed.
Open the Java Build Path property page of your project and select the Classpath node. Unless you select that node, the buttons to Add a Library won't enable.
Select the Server Runtime type of Library from the list. Continue through the later pages in the dialog until you've selected the runtime you intended. Once finished, your Servlets will be recompiled the next time a build happens.
I found the solution for this. To solve this issue just right click on project name and go to properties and then click on project facets. After that, click on runtimes and tick on Apache tomcat and and JRE and then apply. Done.

ClassNotFoundException: com.itextpdf.text.Element

Situation: I have a Java file in my project that uses the features of the iTextPDF library. The project compiles properly. I use JDK 1.7, Tomcat 7.45 and Eclipse Neon.3 Release (4.6.3).
Problem: While starting the server via Eclipse, I get an error:
java.lang.ClassNotFoundException: com.itextpdf.text.Element
What I've tried so far:
Ensured that only 1 version of iTextPdf 5.4.jar is available in the entire project. It's there in WEB-INF/lib folder. It's not there in any of the externally referenced libraries.
I updated my Eclipse.
Any help will be greatly appreciated.
Well, as a starting point- try and expanding the JAR, and see if you can search for or manually find com.itextpdf.text.Element class.
if it's not found there, you know there's nothing wrong with your eclipse or project settings, and nothing wrong with your jar imports.
You should then determine between 3 options:
Is the JAR even on the classpath? it's possible everything is present there, but the project does not even consider looking in it.
Should this class be in the JAR? is it available on other versions of this JAR?
Is this class neccesasry for you application? why is eclipse looking for it, where in the code it is referecened? can you live without it? or, can you manullay replace it with a class file you can find online? (this will take some debug time, and some more research on your part)

google-api-client-java eclipse build path and google app engine

I am trying to follow the instructions here:
http://android-developers.blogspot.ca/2013/01/verifying-back-end-calls-from-android.html
I have decided to download the google-api-java-client library and see if I can instantiate the code on the bottom half of the page referenced above. I have imported libraries in eclipse in my app engine project so that eclipse doesn't complain about anything BUT when I try this:
GoogleIdToken token = GoogleIdToken.parse(mJFactory, tokenString);
eclipse complains with red underlining on 'GoogleIdToken.parse()' and this text
The project was not built since its build path is incomplete. Cannot find the class file for com.google.api.client.auth.jsontoken.JsonWebSignature. Fix the build path then try building this project
and
The type com.google.api.client.auth.jsontoken.JsonWebSignature cannot be resolved. It is indirectly referenced from required .class files
I have gone to this site and have followed the instructions as closely as I can, but the error remains.
http://code.google.com/p/google-api-java-client/wiki/Setup#Download_Library_with_Dependencies
can anyone tell me how to get rid of this error?
see this link:
http://code.google.com/p/google-api-java-client/
The jars with version 1.12.0-beta were not working for me, (as described above) but 1.13.2-beta was released and seems to work fine.
BTW, I was willing to try anything, including different versions of eclipse and wiping my eclipse workspace metadata. I even tried older versions of the google api library, which actually worked. I was going to go with 1.9, but I found out the last one (1.13) had some useful options that I wanted to take advantage of. 1.13.2-beta got rid of the eclipse errors for me.

Why does restarting a computer wreak havoc on Java Build Path?

I'm sure we've all been there, I've got a JSF (Java) project on Eclipse that built fine yesterday, I call it quits for the night, turn off my computer and come back to it the next day only to find missing JAR errors, some of which are due to actual missing classes, others I can clearly find by navigating my build path. What's up with that? Is windows scheming against me and re-indexing files or something while I'm away?
So this might be IDE dependent on Eclipse Java EE Juno but on restart it created a copy of my src folder as a library which caused some Hibernate - duplicate mapping errors

JFXtras and Netbeans compiler issue

Would somebody be able to walk me through the proper way of adding the latest JFXtras package to a project in Netbeans? I'm not sure what I'm doing wrong... whether it be importing incorrectly, implementing incorrectly, or just simply downloading the wrong jar files. I'm using JavaFX 1.3 and NetBeans 6.9.
I've been able to get NetBeans to recognize the components in the library (I type XCustomNode, and it prompts me to import from org.​jfxtras.​scene.) Upon trying to build/run, however, I get a compiler error such as the following:
Note: An internal error has occurred in the OpenJFX compiler. Please file a bug at the Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues) after checking for duplicates. Include in your report:
- the following diagnostics
- file C:\Documents and Settings\me\Local Settings\Temp\javafx_err_4220242024568343160.txt
- and if possible, the source file which triggered this problem. Thank you. C:\Documents and Settings\me\My Documents\NetBeansProjects\project\src\input\NumberWithLabelNode.fx:24: cannot access com.sun.javafx.runtime.location.ObjectVariable class file for com.sun.javafx.runtime.location.ObjectVariable not found public class NumberWithLabelNode extends XCustomNode { 1 error
I don't think I really need to go report this to Openjfx... my gut says I'm missing a file.
Not sure what version of JFXtras you're using, but I've had much better success with version 0.7rc alongside JavaFX 1.3.
In addition to making sure Common and Controls jars in in your library, I've had to add miglayout-3.7.jar and swing-worker-1.2.jar as well, available on the project downloads page
The problem you are facing is incorrect version of library. You are trying to use JFXtras compiled with JavaFX 1.2.* and your project is using JavaFX 1.3.. As you can learn on official site, JavaFX is not backward compatible yet. Get newer library or rebuild sources with JavaFX 1.3.