i got a eclipse neon EE ver. and made a spring project, but it's o stuck like those, 2 errors - eclipse

2 errors : like this (follow the pict)
enter image description here
in a detail.. it's said
1.
Description Resource Path Location Type
Archive for required library: 'C:/Users/Administrator/.m2/repository/org/hibernate/hibernate-core/4.2.1.Final/hibernate-core-4.2.1.Final.jar' in project 'spring' cannot be read or is not a valid ZIP file spring Build path Build Path Problem
2.
Description Resource Path Location Type
The project cannot be built until build path errors are resolved spring Unknown Java Problem
i think it's cuz of a wrong path or no jar file
yeah but so what?
could you advice me some steps to solve it? plz...

Check the jar file written in the error message:
C:/Users/Administrator/.m2/repository/org/hibernate/hibernate-core/4.2.1.Final/hibernate-core-4.2.1.Final.jar
Is it there? Can you open it manually as a zip?
Occasionally it happens that the jar file is not correctly downloaded from the artifactory (when it happens it usually has 0kb size).
Delete the jar file, and let Maven redownload it again, it usually does the trick.
If it does not solve it, there may be a permission problem (does Eclipse has right to write under that path?), or an artifactory problem (are you using the central repository?) or even antivirus could block the download.

Related

Keep Getting Error When Trying to Run Javafx on Eclipse with Mac

So I keep getting this error when trying to run my program:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.controls not found
I'm using a mac with eclipse, and my VM argument is:
--module-path /Users/myname/Desktop/javafx-sdk-11.0.2_3/lib --add-modules javafx.controls,javafx.fxml
I've tried everything, javafx.controls.jar and the other .jar file are in my lib folder. I've reinstalled the javafx program, changed my file path around hundreds of times, and I've tried to install plugins. Does anyone have any idea as too what can be happening? JavaFX is also an added library in my project, and all the .jar files assocated with it are added to it. Please let me know if anyone has an idea. Best!
I had success with the following additional step.
In the Run Configuration->Dependencies tab, click the "ModulePath" and then add the JavaFX JDK's jars (or the /lib folder that holds the jars) to the list.
You can inspect the generated command line, and check that these are included in the -p option.
IDK why this step should be needed. I would think Eclipse should be smart enough to include something on the dependency module path if it were in the project's Build Path Library list.
I have questions about this at eclipse.org and gluon. Maybe there will be an explanation, or fix so that this step isn't needed, or an edit to the documentation to let us know we need to do this.

Getting a lot of "<classname> cannot be resolved to type" when installing SBT

I have Eclipse Juno 4.2.1 installed on my Win7 x64 machine, and try to install "Social Business Toolkit SDK - 20131012". I unpack the content to C:\ ending up with C:\sbtsdk. Then I run the initWin.cmd to create the junction point (success), and unpack tomcat (jar doesn't exist, so I must unpack manually). Loading the workspace gives a lot of " cannot be resolved to type". Most certainly this is a kind of noob-error from my side where something isn't properly defined. On the other hand, in this video http://www.youtube.com/watch?v=MsHxrccnO28, Bhavesh Shah, states that it should be extremely simple and fast to get going with the toolkit (fast forward to ~ 25:00 to see Shah's installation of Eclipse and toolkit). Anybody got any ideas on how to get past the front-door of SBT?
Update:
I saw another thing. For example, in the package com.ibm.sbt.core's com.ibm.sbt.services.client package I got an error referencing the Response-variable. It turned out that the Response.java file was actually located right in this package at location C:\sbtk\source\com.ibm.sbt.core\src\com\ibm\sbt\services\client, but for some reason wasn't referenced in the package.
By adding Response.java to the package, the error went away (BTW, I didn't find "Add file to package" in Eclipse, so I had to copy the content to clipboard, delete the Response.java file, and then manually add a new file to the package with the correct name, and then paste the content. Probably a much better way to do this :-).
But it is strange that the Response.java file wasn't referenced in the package, wasn't it?

project working in tomcat but not working from eclipse. error :cant find log4j.properties

I have a struts project which, I have imported to eclipse from a war file.
This is working perfectly by deploying it in tomcat. But the same after importing is showing up the error :
log4j:ERROR Could not read configuration file from URL [file:/D:/xxxfolder/xxxworkspace/xxxproject/WebContent/WEB-INF/classes/log4j.properties].
java.io.FileNotFoundException: D:xxx\xxx\xxx\WebContent\WEB-INF\classes\log4j.properties (The system cannot find the path specified)
I have the log4j.property in src folder.
Please help with proper solution to get rid of it !
Let me know if needed more info
EDIT!
I got the root of problem but cant find the solution
Bu default the ouput build path for src in eclipse is :build/classess. but the tomcat is searching the file at webContent/web_inf/ Classess/ Can you suggest how to do it . how to change the output file of only log4j to the specific it is tomcat is searching in.
In the comments above, the conclusion is that, the path is incorrect. After modifying the path, the issue is resolved.

jars getting loaded twice in eclipse

Problem: jar getting loaded twice in eclipse
Description:
I copied and pasted struts jar into lib folder of WEB-INF.
The jars icon get changed .
If I remove the jars in build path they get back to normal state but program says package not found.
My program is correct but i am getting
Resource not found ie HTTP-404
error due to this.
So please tell me how to load jars?
You can do two things
go to the build path and create user define library for you jar file and
when you deleting it from build path that mean it is not configured for you application but some times it shows like it is configured. For that you again go to lib and add the jar to build path

Problems deploying WAR file from Netbeans to Tomcat

I'm trying to configure build.xml files for build forge, but it seems like I am having trouble with the libraries required for the java servlet pages. I am actually trying to use OWASP's AntiSamy library but I keep getting a Policy Exception followed by a file not found
org.owasp.validator.html.PolicyException: java.io.FileNotFoundException: C:\Program%20Files \Apache%20Software%20Foundation\apache-tomcat-6.0.29\webapps\XSSDemo\WEB-INF\classes\...\antisamy.xml (The system cannot find the path specified)
The antisamy.xml file is definitely in this location, however.
So I tried using Netbeans to clean and build a WAR file that I would have expected to work, since the web app works fine when I run it through Netbeans. However, I get the same problem. Is there possible some reference that Netbeans is creating when I run the app through the ide that is not occurring in the WAR deployment? Could the URL Encoding in the antisamy.xml location be causing problems?
Thanks for the help.
Edit: I compressed the long class path into the three dots here. The actual response has the actual class path. I am not getting any kind of security errors.
The problem I had was not actually with the deployment--it was the file reference itself in my java servlet. The encoding in the path '%20' in the Program Files folder caused a FileNotFoundException. The reason this did not occur in netbeans is because the deployed files are in a c:\users... folder and there are no spaces to be encoded. The also explained why the application ran well on other computers with their tomcat folders directly on the root directory. This is the actual solution to my problem. Thanks for all your help.