I wanted to code from this answer but i have error The import org.bouncycastle.openssl cannot be resolved The import org.bouncycastle.openssl cannot be resolved and i have no idea how coudl i repair this becouse other bouncycastle libs are detected correctly.
I will be grateful for any ideas whats wrong. Im using eclipse and i have instaled bouncycastle like in this instruction itcsoultions
In addition to the provider (a.k.a. bcprov) and lightweight API, you also need the PKIX API, which provides the openssl package.
Either download bcpkix-jdk15on-150.jar from BC downloads page (direct link) and drop it in the same directory of bcprov or add it to your maven dependencies with its coordinates:
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.50</version>
</dependency>
Whenever we get error saying "The import *** cannot be resolved", it means that there is problem with library. Here, bcprov-jdk jar is missing.
I did the following, and it worked for me!
1. Download bcprov-jdk15on-152.jar from https://www.bouncycastle.org/latest_releases.html
2. Right click on Project-->Properties-->Java Build Path-->Libraries tab--> Click on Add External JARs.. Select the path where you have the dowlnloaded bcprov-jdk15on-152.jar. Then click OK. That's it.
Related
I have a project that I'm trying to play around with the Immutables Criteria: https://immutables.github.io/criteria.html
I added the following to my pom.xml:
<dependency>
<groupId>org.immutables</groupId>
<artifactId>criteria-inmemory</artifactId>
<version>2.8.2</version>
</dependency>
Everything seemed fine. However, I am having some issues getting things imported and working. I have no issues with Immutables.Value that works fine. When I import Criteria Eclipse complains about:
The type org.immutables.criteria.Criteria is not accessible
So I tried adding the module to my module-info.java as follows:
requires org.immutables.criteria-common;
Also tried:
requires org.immutables.criteria-inmemory;
I'm using Eclipse suggestions to auto-complete the module name because I don't really know what the module name should be but, when I add the above Eclipse says there is a syntax error with the "-" in the requires statement. So at this point I am kinda stuck! If anyone has any suggestions I would love to hear them!
Thanks!!
I was able to track down the issue with the Immutables Library and I posted the following issue: https://github.com/immutables/immutables/issues/1223
Basically, the library was creating an invalid Automatic-Module-Name tag in there pom.xml's when building the jar files. The values that we being set contained a "-" which is invalid.
Shoutout to #Naman for pointing me in the right direction! Thanks!
I am still wondering if it is possible to override the jar files module-name. It seems like it could be useful for users of a library to somehow override a libraries jar files module-name for situations like this.
My current setup :
OS : windows 7
IDE : Android Studio (with updated SDKs)
Parse jar (v 1.10)
I am trying out an example for ParseQueryAdapter, and I run into this error on my IDE : import com.parse.ParseQueryAdapter; -> cannot resolve symbol ParseQueryAdapter
I want to try something similar to this example, and the import does not seem to go through because of the error.
If you need anymore information, please leave comments & I will respond.
PS : I am able to add com.parse.ParseObject without errors.
In your libs folder you'll find Parse-1.4.1.jar file.
Right click or control+click on it then 'Add as Library...'
Edit: Parse-1.10 does not have ParseQueryAdapter. You have to use Parse-1.4.1, which is included in that example.
ParseQueryAdapter was removed from the official Parse SDK and moved onto the Parse-UI libraries..
You can install them on via this link: https://github.com/ParsePlatform/ParseUI-Android
If we include 1.4.1, and keep 1.10.1 as well, it gives error because we cannot keep the same jar with two versions in the libs folder. And I think its not advisable to use just 1.4.1. I feel that ParseQueryAdapter is deprecated and we would just have to use the normal adapters. Any comments?
I've added following into dependencies section of my pom.xml:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.4.1</version>
<scope>test</scope>
</dependency>
But when I add the 1st line of "Quick start guide" (http://hc.apache.org/httpcomponents-client-4.4.x/quickstart.html):
CloseableHttpClient httpclient = HttpClients.createDefault();
IntelliJ IDEA highlights "HttpClients" and tells me:
Cannot resolve symbol 'HttpClients'
It looks like I have mistake with configuration. What exactly is wrong? please advise how to add support for HttpClients into the project?
Thanks!
P.S. Learned a bit more, looks like "" is redundant and wrong for this case, I removed it but that didn't help: still non-compilable.
EDIT: If I put cursor to 'HttpClients' and hit "Alt-enter" the pop-up doesn't contain any class to import. See screenshot:
It looks like my IntelliJ had issues with caching, cleaning cache with following re-importing of the project helped.
I found tips on that here: IntelliJ inspection gives "Cannot resolve symbol" but still compiles code
P.S. Though few other project were broken as a result of this action. Looks like I need to keep learning :)
Download the jar file from
https://jar-download.com/artifacts/org.apache.httpcomponents/httpclient/4.5.6/source-code
Extract the .jar file name httpclient-4.5.6.jar. Form a directry name lib under your project and import this .jar file to it. Right click your .jar file and click addtolibrary.
I am trying to run Mallet`s topic modelling but got the following error:
Couldn't open cc.mallet.util.MalletLogger resources/logging.properties file.
Perhaps the 'resources' directories weren't copied into the 'class' directory.
Continuing.
Exception in thread "main" java.lang.IllegalArgumentException: Trouble reading file stoplists\en.txt at cc.mallet.pipe.TokenSequenceRemoveStopwords.fileToStringArray(TokenSequenceRemoveStopwords.java:144) at cc.mallet.pipe.TokenSequenceRemoveStopwords.<init>(TokenSequenceRemoveStopwords.java:73) at LDA.TopicModel.main(TopicModel.java:23)
I have already added all the jar files! Could you please advise what is the problem here?
Thanks,
I received the first error, which it's able to continue from, as well.
But the actual exception that stops you seems to be that you don't have the MALLET stop words list in the right place. I downloaded their en.txt stopwords list to a specific location and gave it a direct path instead of "stoplists/en.txt", which worked.
Your english stop words file is missing (stoplists\en.txt). Either try downloading the jar files again, or just use maven which will make it easier for you to import in your java project. In the Maven POM file add:
<dependencies>
<dependency>
<groupId>cc.mallet</groupId>
<artifactId>mallet</artifactId>
<version>2.0.8</version>
</dependency>
....
</dependencies>
Latest version can be found here.
I've created a GWT project using Eclipse which was working perfectly (I was able to run it in both Hosted Mode and on Google App Engine) until I tried to import the Gears API for Google Web Toolkit. After adding the following line to my java source file:
import com.google.gwt.gears.client.geolocation.Geolocation;
I get the following error when I try to compile:
19-Jun-2009 3:36:09 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext#1c7d682{/,C:\Documents and Settings\Geoff Denning\workspace\TaskPath\war}
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found
I've already added the gwt-gears.jar file to my \war\WEB-INF\lib directory, and I've referenced it in Eclipse as follows:
I've even opened the gwt-gears.jar file and confirmed that org/apache/xerces/jaxp/SAXParserFactoryImpl.class does exist. Can anyone give me any pointers as to why I'm getting the above error?
Check that Xerces exists in:
$JAVA_HOME/lib/endorsed
Sounds like a Java 5 issue. Also check the Java system property for:
javax.xml.parsers.SAXParserFactory
It should be:
org.apache.xerces.jaxp.SAXParserFactoryImpl
If not then that's your issue, make sure you set the system property.
Apparently this is a bug in jre 1.5. I was able to resolve the problem by switching my default JRE in Eclipse from 1.5.0_06 to 1.6.0_03, as shown below:
Thanks to Jon and Rahul for pointing me in the right direction.
This happened to me. I had conflicting JARs in my workspace. I removed one and boom it worked. The message didn't lend very well to the root of the error.
My SAXParserFactoryImpl problem was caused by gwt-gadgets.jar I had in my boot class path. Removing this JAR from the boot class path solved the problem for me. Basically you have to remove any JAR containing a SAXParserFactoryImpl class from your build path (user libs).
Remove the $JAVA_HOME/jre/lib/jaxp.properties fixed the issue.
Take a look at Trouble with Selenium (XercesImpl) and Google App Engine.
I had a similar problem with GWT / GAE (SAXParserFactoyImpl not found) and solved it by;
Importing the jar to war/WEB-INF/lib
Adding the jar to the build path