the import org.zkoss.zul cannot be resolved - import

I am using the ZK framework and I need to import this:
import org.zkoss.zul.Label;
But I keep on getting this error:
the import org.zkoss.zul cannot be resolved
I already added the zul.jar to the classpath but the error still exists. What should I do?

I solved it. I just removed the zul.jar from the class path and added it again. It works now.

Related

import statsmodels package returns ModuleNotFound despite correct path

I am trying to import statsmodels.stats.weightstats.DescrStatsW.tconfint_mean.
I run
from statsmodels.stats.weightstats.DescrStatsW import tconfint_mean
I get the error
ModuleNotFoundError: No module named
'statsmodels.stats.weightstats.DescrStatsW';
'statsmodels.stats.weightstats' is not a package
I have confirmed that I can import other packages from statsmodels with no problems.
I must be using the wrong path, but the docs don't specify any other path to use.
I just figured it out. I will leave this up for progeny.
from statsmodels.stats.weightstats import DescrStatsW
DescrStatsW.tconfint_mean(...)
Not sure why this behaves differently from other python libraries.

"The import org.apache.commons.fileupload cannot be resolved" does not go off despite adding lib

When I try to import
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
Eclipse shows an error,
The import org.apache.commons.fileupload cannot be resolved
I added these libraries but still this error does not go off.
commons-fileupload-1.3.jar
commons-fileupload-1.3-javadoc.jar
commons-fileupload-1.3-sources.jar
commons-fileupload-1.3-tests.jar
commons-fileupload-1.3-test-sources.jar
How should I correct this error?
I had to add these libraries in the build path after which it worked. Eclipse did not do it by itself.
You have to add these libraries at 2 places. To build path of the project and in /WEB-INF/lib folder

The import com.interwoven cannot be resolved

I am new to Teamsite and a not sure which jar file to use for resolving the issue that I get while trying to write a Java Datasource in Eclipse.
The list of imports I am using are:
import com.interwoven.datasource.MapDataSource;
import com.interwoven.datasource.core.DataSourceContext;
import com.interwoven.livesite.dom4j.Dom4jUtils;
import com.interwoven.serverutils100.InstalledLocations;
import com.interwoven.cssdk.filesys.CSVPath;
All these imports show the same error
The import com.interwoven cannot be resolved.
Can anyone please tell me which jar files should I add?

NestableException cannot be resolved when using apache.commons.configuration

Im using the following:
import java.util.Collections;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.configuration.XMLConfiguration;
and i get:
The type org.apache.commons.lang.exception.NestableException cannot be resolved. It is indirectly referenced from required .class files
Im using eclipse...
how can i resolve this? he offers me to Configure build path but i dont really know how to solve this collision from there.....
Problem solved...
had to download the commons-lang-2.4.jar and include in project.
couldnt be more simple than that....
Sounds like what is really needed is an update to the PropertiesConfiguration lib so that it gets along with latest lang lib. If its a "free" lib then it might not be coming, considering that its been years since last reply on this thread and this is still happening.
I have been having this issue as well, and have not found a way of resolving it apart from the aforementioned inclusion of both lang libs ... which does not seem to present any problems, though strict repository framework implementations (like Maven) might have problems with both libs included.
Had to remove commons-lang3-3.4 from my Java Build Path and added 2.6 , it solved the problem!

permanently hidden warning in scala application

I get the following warning whenever I start my Scala application:
WARN - imported `SVNProperties' is permanently hidden by definition of object SVNProperties in package core, at line 4 of app/core/SVNResource.scala
What could this mean?
You probably have code that looks something like this:
object Hidden {
import scala.collection.immutable
object immutable { def x = 7 }
}
except in a less obvious way. You're importing something--in my example, the package immutable--and then you go and define something else with the same name that prevents you from using what you imported.
In particular, it looks like you tried to import SVNProperties into SVNResource.scala, except that SVNResource.scala defines its own SVNProperties which hides the import.
I encountered this warning after moving some classes from one package to another. I guess there was some conflict between the new location and binaries from the old location. In my case this helped:
sbt clean
I got this warning when my class was importing classes in the same package.
Once I removed the unnecessary import, the warnings were removed.
This happened to me after moving a class from one package to another, like in astasiak's case. I ran sbt clean with no luck. For the life of me, I couldn't find the class in the old location.
However, I had other errors preventing me from building. When I fixed those, this error disappeared. My guess is that until you can build cleanly, sbt still thinks you have the class is in the old package, and includes this error with any other build errors that are preventing you from building.
My advice? Check for other compilation errors and fix those -- you might be erroneously getting this error due to sbt having an outdated view of your package structure since its last successful build.
Just to further expand on a comment posted by Nick, as this was the case for me:
Another common cause is that SVNProperties is in the same package and so is already in scope. Trying to import it explicitly results in this warning.
More concretely, you may have:
package app.core
// No need to import the following - it is already visible as
// you are in the same package
import app.core.SVNProperties
object SVNResource {
Use instead:
package app.core
object SVNResource {
(Opinion) As a matter of coding style you may want to camel case your variables differently like for eg. SvnProperties, SvnResource. It reads easier for most people, see also this question.
I had a main class with name Server and I was creating a jetty server in the main class in the following way.
import org.eclipse.jetty.server.Server
var server:Server=new Server()
I got the below warn on running sbt run
> [warn] /home/xxx/xxx/xxx/src/main/scala/com/xxx/xxx/main/Server.scala:3:
> imported `Server' is permanently hidden by definition of object Server in package main
[warn] import org.eclipse.jetty.server.Server
[warn] ^
[warn] one warning found
I renamed my main class and the warning disappeared.
If you are using Scala Eclipse IDE you can do :
Project > Clean...
After that all the warning will be removed.
Also, make sure the name of the package you import =/= object name.
I got this by having circular dependencies. Both my classes were using each other on accident.
If the warning comes from importing a class with the same name, you can always use import renaming.
package domain
case class Company (...
package models
import domain.{Company => _Company}
object Company extends SkinnyCRUDMapper[_Company] {
Issue is related to dependency conflict, When you have same class in multiple Jars compiler found one of class is hidden and gives an error.
check for your Jar version is same across project or try to change name/package for one of conflicted class