[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [recommenders-dev] Need help to collect completion proposals made by code recommenders programetically
|
Hi Muhammad
I reproduced the error. The reason is that (probably) due to the change to use package-imports rather than required-bundles some transitive dependencies cannot be resolved by Eclipse statically anymore. When running this code in an OSGI container it should work out-of-the-box. The SingleZipCallRecommender, however, should work out of the box.
To make the EclipseOrgMain work (locally) in your case, add in the manifest.mf:
Require-Bundle: […]
com.ning.async-http-client;bundle-version="1.6.5",
org.jboss.netty;bundle-version="3.2.5"
Then you should be able to run EclipseOrgMain. Depending on whether you update the git repository or not, you will get a NPE on the console which can be ignored safely (fix for this is in Gerrit).
HTH
Marcel
On Aug 7, 2013, at 7:37 AM, Muhammad Asaduzzaman <parvez.usask@xxxxxxxxx> wrote:
> Hi Marcel,
> I run the main method (Right click on the example folder and select
> the option use as source folder) and I have received the same error:
>
> Setting up recommender and model repository (downloads search index
> the first time).
> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> SLF4J: Defaulting to no-operation (NOP) logger implementation
> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
> further details.
> Exception in thread "main" java.util.concurrent.ExecutionException:
> java.lang.NoClassDefFoundError: com/ning/http/client/AsyncHandler
> at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
> at java.util.concurrent.FutureTask.get(FutureTask.java:111)
> at org.eclipse.recommenders.models.AetherModelRepository.open(AetherModelRepository.java:111)
> at org.eclipse.recommenders.examples.calls.EclipseOrgCallRecommenderMain.main(EclipseOrgCallRecommenderMain.java:27)
> Caused by: java.lang.NoClassDefFoundError: com/ning/http/client/AsyncHandler
> at org.eclipse.recommenders.models.AetherModelRepository$ManualWagonProvider.lookup(AetherModelRepository.java:400)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.lookupWagon(WagonRepositoryConnector.java:282)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.<init>(WagonRepositoryConnector.java:154)
> at org.sonatype.aether.connector.wagon.WagonRepositoryConnectorFactory.newInstance(WagonRepositoryConnectorFactory.java:142)
> at org.sonatype.aether.impl.internal.DefaultRemoteRepositoryManager.getRepositoryConnector(DefaultRemoteRepositoryManager.java:346)
> at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453)
> at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
> at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
> at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
> at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
> at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:191)
> at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:333)
> at org.eclipse.recommenders.models.AetherModelRepository$DownloadArtifactTask.call(AetherModelRepository.java:315)
> at org.eclipse.recommenders.models.AetherModelRepository$DownloadArtifactTask.call(AetherModelRepository.java:1)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:679)
> Caused by: java.lang.ClassNotFoundException: com.ning.http.client.AsyncHandler
> at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> ... 19 more
>
> Any suggestion about resolving this issue?
> Thanks again for your help.
>
> -Muhammad Asaduzzaman
>
> On Tue, Aug 6, 2013 at 1:33 PM, Marcel Bruch
> <marcel.bruch@xxxxxxxxxxxxxx> wrote:
>> What does
>>
>> I have moved the java
>> source files (found in the example folder including
>> EclipseOrgCallRecommenderMain.java) inside Eclipse to a package and
>> try to run the main method.
>>
>>
>>
>> exactly mean? Are they still in the same project?
>>
>> You can simple right-click on the examples folder and select "Build Path >
>> Use as Source Folder". This should compile the classes and you should be
>> able to run the main program.
>>
>> HTH
>> Marcel
>>
>>
>> On Aug 6, 2013, at 9:11 PM, Muhammad Asaduzzaman <parvez.usask@xxxxxxxxx>
>> wrote:
>>
>> Hi,
>> I have just noticed the files are in a folder. I have moved the java
>> source files (found in the example folder including
>> EclipseOrgCallRecommenderMain.java) inside Eclipse to a package and
>> try to run the main method. This time program executes but gives me
>> the following error:
>>
>>
>>
>> _______________________________________________
>> recommenders-dev mailing list
>> recommenders-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/recommenders-dev
>>
> _______________________________________________
> recommenders-dev mailing list
> recommenders-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/recommenders-dev