Code Recommenders do not work for me [message #893767] |
Thu, 05 July 2012 13:33 |
|
I just installed the recent version of the Code Recommenders, but unfortunately it doesn't work for me (eclipse 3.7 or 4.2, doesn't matter).
The only working thing is Subwords content assistant.
I don't know, does it make sense, but .plugins\org.eclipse.recommenders.rcp is almost empty. Repository folder has the following subfolders:
.plugins\org.eclipse.recommenders.rcp\repository\org\eclipse\recommenders\index\0.0.0\
That's all I have in it.
|
|
|
Re: Code Recommenders do not work for me [message #893786 is a reply to message #893767] |
Thu, 05 July 2012 13:59 |
|
Anything in these folders?
under .metdata/plugins/org.eclipse.recommenders.rcp there should be
/index/
(some index files in there)
/repository/org/eclipse/recommenders/index/0.0.0/
_maven.repositories
index-0.0.0.zip
index-0.0.0.zip.etag
I assume you have an internet connection as the search index will be downloaded/updated when Recommenders starts. Without an internet connection only the folder gets created. Also: Models are downloaded on demand (once), i.e., on first access. However to make this happen the index needs to be downloaded successfully before.
Is there anything in the logs?
[Updated on: Thu, 05 July 2012 14:32] Report message to a moderator
|
|
|
Re: Code Recommenders do not work for me [message #893955 is a reply to message #893786] |
Fri, 06 July 2012 07:59 |
|
Quote:.metdata/plugins/org.eclipse.recommenders.rcp there should be
/index/
empty as well
Quote:I assume you have an internet connection
yes, through the corporate proxy/firewall. At least Eclipse was able to download & install code recommenders via the Install feature
Quote:Is there anything in the logs?
Nope.
Is there any way to enable kinda 'detailed log' or debug this somehow?
|
|
|
|
Re: Code Recommenders do not work for me [message #893972 is a reply to message #893969] |
Fri, 06 July 2012 09:30 |
|
Marcel Bruch wrote on Fri, 06 July 2012 05:03
In the PDE error log view there should be at least two error messages
like those below:
Error log is empty.
Quote:Is there a local virus scanner running that checks the files downloaded
from the internet or block download requests until you accept them to
happen?
Nope.
Quote:I don't think you changed any default settings but to be sure: I also
assume that Preferences > Code Recommenders > "Enable auto-download" is
checked?
Checked.
Quote:Just to get one step further, you could download the index manually
Well, there is one more empty subdir - .plugins\o.e.r.r\repository\org\eclipse\swt\org.eclipse.swt.win32.win32.x86\3.0.0\
and
.plugins\o.e.r.r\repository\org\eclipse\swt\org.eclipse.swt.win32.win32.x86\resolver-status.properties:
#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Fri Jul 06 13:21:39 MSK 2012
maven-metadata-remote-models.xml.error=Could not transfer metadata org.eclipse.swt\:org.eclipse.swt.win32.win32.x86/maven-metadata.xml from/to remote-models (http\://download.eclipse.org/recommenders/models/juno/)\: Error transferring file\: Connection timed out\: no further information to http\://download.eclipse.org/recommenders/models/juno/org/eclipse/swt/org.eclipse.swt.win32.win32.x86/maven-metadata.xml
maven-metadata-remote-models.xml/default-http\://download.eclipse.org/recommenders/models/juno/.lastUpdated=1341566499141
Btw, Internal Web Browser displays this file (htt://.../maven-metadata.xml) successfully.
|
|
|
|
Re: Code Recommenders do not work for me [message #893982 is a reply to message #893973] |
Fri, 06 July 2012 10:28 |
|
The same problem.
I just run code recommenders in debug mode and got the following:
14:24:35.689 [Worker-1] DEBUG o.e.r.i.rcp.repo.ModelRepository - java.net.ConnectException: Connection timed out: no further information to http://download.eclipse.org/recommenders/models/juno/org/eclipse/recommenders/index/0.0.0/index-0.0.0.pom
14:24:35.689 [Worker-1] WARN o.e.r.i.rcp.repo.ModelRepository - 'remote-models (http://download.eclipse.org/recommenders/models/juno/, releases+snapshots)' did not send ETAG header for 'org.eclipse.recommenders:index:pom:0.0.0'.
14:24:35.689 [New I/O client boss #1] DEBUG c.n.h.c.p.n.NettyAsyncHttpProvider - Unexpected I/O exception on channel [id: 0x00513b74, /0.0.0.0:3134]
java.net.ConnectException: Connection timed out: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_03]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:701) ~[na:1.7.0_03]
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.connect(NioClientSocketPipelineSink.java:384) ~[na:na]
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processSelectedKeys(NioClientSocketPipelineSink.java:354) ~[na:na]
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:276) ~[na:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_03]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_03]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_03]
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Code Recommenders do not work for me [message #894030 is a reply to message #894023] |
Fri, 06 July 2012 12:44 |
|
No not directly.
But the simplest approach I can imagine that could work right away:
Find one of the mirrors that allows rsync on the models folder and copy/link everything below into you repository folder under .metadata/plugins
An alterantive would be to provide a test repository for download that can be extracted and used locally. I'll consider that for Monday. I'm travelling and won't have good internet access during the weekend.
In the meanwhile: I've triggered a build (build-id: b582) for recommenders which will be available on recommenders head update site in ~20 minutes [1]. It has a larger timeout value. Maybe one of you could give it a spin later today?
[1] http://download.ecipse.org/recommenders/updated/head/e42/
[Updated on: Fri, 06 July 2012 13:01] Report message to a moderator
|
|
|
|
|
Re: Code Recommenders do not work for me [message #894042 is a reply to message #894030] |
Fri, 06 July 2012 13:27 |
|
My guess that this is the proxy issue.
For instance, if I change
Response r = http.prepareHead(url).execute().get();
to
Response r = http.prepareHead(url).setProxyServer(new ProxyServer(MY_PROXY_ADDR, 8081)).execute().get();
then it successfully creates .plugins\org.eclipse.recommenders.rcp\repository\org\eclipse\recommenders\index\0.0.0\index-0.0.0.pom.etag
Well, no progress after that, but...
|
|
|
|
|
Re: Code Recommenders do not work for me [message #894110 is a reply to message #894058] |
Fri, 06 July 2012 16:55 |
|
Great! As Eclipse comes with it's own proxy preferences we should reuse them for Recommenders' model repositories too. Could you open a bug for this in Bugzilla?
As you already have a working environment: If you'd like to finalize your hack and add support of proxy settings, I'd very much appreciate a patch in Gerrit
|
|
|
|
|
|
|
|
Re: Code Recommenders do not work for me [message #895617 is a reply to message #895611] |
Fri, 13 July 2012 19:56 |
|
Srujan,
from your rar I can see that the network connection works fine. The index is downloaded properly. However, yet no model file gets downloaded.
Could you send me the java project you try to use Code Recommenders in? Maybe you use an unexpected configuration that prevents Recommenders from resolving the models of your Java Runtime. A Screenshot showing your project folder contents in the Package Explorer could also help.
[Updated on: Fri, 13 July 2012 19:57] Report message to a moderator
|
|
|
Re: Code Recommenders do not work for me [message #895655 is a reply to message #895617] |
Sat, 14 July 2012 07:12 |
|
Srujan,
after thinking about it for a while. Can you send me your project's .classpath file?
Resolving the model for all Java Runtimes independent of the underlying OS and exact classpath, we check the project's classpath for a classpath container named "org.eclipse.jdt.launching.JRE_CONTAINER". All jars below are mapped to the JRE model. It may be the case that your project uses a different name for this special container which would cause the lookup to fail.
To give an example, in my projects the classpath file looks as follows:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
|
|
|
Re: Code Recommenders do not work for me [message #895951 is a reply to message #895655] |
Mon, 16 July 2012 15:45 |
Srujan kumar Messages: 4 Registered: July 2012 |
Junior Member |
|
|
hey marcel,
Here is the contents of .classpath file.
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7"/>
<classpathentry kind="lib" path="C:/Documents and Settings/sgulla/Desktop/Downloads/icu4j-4_8_1_1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
In the same project(as .classpath above), One more thing i noticed that, when I do a "java". and wait for content assist i do see the feature "Intelligent Code Completion" working meaning giving the most uses method of String class in this case(giving % usage like .equals - 41%, length -20%)
Even though I see "Intelligent Code Completion", still going to Preferences-> I see the jars to be "UNRESOLVED"
[Updated on: Mon, 16 July 2012 15:54] Report message to a moderator
|
|
|
|
Re: Code Recommenders do not work for me [message #897323 is a reply to message #897290] |
Mon, 23 July 2012 15:18 |
|
Hi Srujan,
you said code completion works but does not highlight the resolved model on the preference page, right?
As code completion on "string" worked - does the preference page still show UNRESOLVED for rt.jar?
Just to be sure we have the same understanding of what UNRESOLVED means: All jars will initially have the status UNRESOLVED. Models for these jars will be loaded lazily, i.e., when you trigger code completion on any of the types contained in these jars - and the server has a model available for them.
In the case of String for instance, rt.jar is initially UNRESOLVED but after you triggered code completion on "java".<^space> the model gets automatically downloaded and state should be changed to RESOLVED. Can you check your preference page and tell me what't the sate for rt.jar now?
|
|
|
|