F3 Fails with "The resource is not on the build path of a Java project."

2,411 views
Skip to first unread message

Brian

unread,
Jul 17, 2008, 5:21:29 PM7/17/08
to Q for Eclipse users list
I've used q4e 0.7.0 to import the Spring Web Services 1.5.3 samples.
I'm looking at EchoClient.java from the samples. I want to see the
declaration of StringResult which is part of spring-xml-1.5.3.jar
which is on the Maven Classpath Container. When I try F3 in Eclipse
on StringResult, I get the error

"The resource is not on the build path of a Java project."

Is there anyway to make F3 work with q4e without manually adding the
source for spring-xml-1.5.3.jar to a Java project?

Should I report this issue as an q4e enhancement? This kind of
navigation use case seems fundamental. One of the best things about
an IDE is code analysis support.

Brian

Abel Muiño Vizcaino

unread,
Jul 17, 2008, 6:05:33 PM7/17/08
to q4e-...@googlegroups.com
Q4E already supports displaying the source code of a dependency if it is available from the repository.

If it is not on central, you can manually add the sources to your own repository as a workaround.

You might be interested in voting for Issue 485 and/or Issue 152.

Brian

unread,
Jul 18, 2008, 6:28:37 AM7/18/08
to Q for Eclipse users list
> Q4E already supports displaying the source code of a dependency if it
> is available from the repository.

How is this support activated? F3 (Eclipse->Menu Navigate->Open
Declaration) is not working.

> If it is not on central, you can manually add the sources to your own
> repository as a workaround.

The sources for spring-xml are in central

http://repo1.maven.org/maven2/org/springframework/ws/spring-xml/1.5.3/spring-xml-1.5.3-sources.jar

Brian


On Jul 17, 6:05 pm, Abel Muiño Vizcaino <amu...@gmail.com> wrote:
> Q4E already supports displaying the source code of a dependency if it  
> is available from the repository.
>
> If it is not on central, you can manually add the sources to your own  
> repository as a workaround.
>
> You might be interested in voting for Issue 485 and/or Issue 152.
> --
> Abel Muiño Vizcaino -http://ramblingabout.wordpress.com

Abel Muiño

unread,
Jul 18, 2008, 7:09:44 AM7/18/08
to q4e-...@googlegroups.com
Sorry, this is only available in the 0.8.0 snapshots

Brian

unread,
Jul 18, 2008, 2:08:05 PM7/18/08
to Q for Eclipse users list
I just tried out 0.8.0. F3 is not working in this version either.
When I press F3, Eclipse displays the error

Cannot Perform Operation
The resource is not on the build path of a Java project.

By the way, these errors below appear in the Error Log when I import
the spring web services 1.5.3 multimodule samples pom.xml. I'm
enabling the import wizard's "import parent" option as well.

eclipse.buildId=M20071023-1652
java.version=1.6.0_03
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86 -data C:
\workspace\springws153.2


1. Error enabling Maven nature for project samples
org.eclipse.core.runtime.CoreException: Problems encountered while
setting project description.
at
org.eclipse.core.internal.resources.Project.setDescription(Project.java:
983)
at
org.eclipse.core.internal.resources.Project.setDescription(Project.java:
1009)
at
org.devzuz.q.maven.embedder.nature.MavenNatureHelper.addNatures(MavenNatureHelper.java:
56)
at
org.devzuz.q.maven.jdt.core.MavenNatureHelper.addNature(MavenNatureHelper.java:
50)
at
org.devzuz.q.maven.jdt.ui.projectimport.ImportProjectJob.openProject(ImportProjectJob.java:
238)
at
org.devzuz.q.maven.jdt.ui.projectimport.ImportProjectJob.runInWorkspace(ImportProjectJob.java:
122)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
which has nested
Problems encountered while setting project description.
An exception stack trace is not available.
which has nexted
Error configuring nature 'org.devzuz.q.maven.jdt.core.mavenNature'.
java.lang.NullPointerException
at
org.devzuz.q.maven.jdt.core.nature.MavenNature.addEntryToClasspath(MavenNature.java:
368)
at
org.devzuz.q.maven.jdt.core.nature.MavenNature.getSourceFoldersClasspath(MavenNature.java:
326)
at
org.devzuz.q.maven.jdt.core.nature.MavenNature.addClasspath(MavenNature.java:
249)
at
org.devzuz.q.maven.jdt.core.nature.MavenNature.configure(MavenNature.java:
112)
at org.eclipse.core.internal.resources.NatureManager
$1.run(NatureManager.java:143)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.resources.NatureManager.configureNature(NatureManager.java:
158)
at
org.eclipse.core.internal.resources.NatureManager.configureNatures(NatureManager.java:
203)
at
org.eclipse.core.internal.resources.Project.basicSetDescription(Project.java:
65)
at
org.eclipse.core.internal.resources.Project.setDescription(Project.java:
981)
at
org.eclipse.core.internal.resources.Project.setDescription(Project.java:
1009)
at
org.devzuz.q.maven.embedder.nature.MavenNatureHelper.addNatures(MavenNatureHelper.java:
56)
at
org.devzuz.q.maven.jdt.core.MavenNatureHelper.addNature(MavenNatureHelper.java:
50)
at
org.devzuz.q.maven.jdt.ui.projectimport.ImportProjectJob.openProject(ImportProjectJob.java:
238)
at
org.devzuz.q.maven.jdt.ui.projectimport.ImportProjectJob.runInWorkspace(ImportProjectJob.java:
122)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


2. Problems occurred when invoking code from plug-in:
"org.eclipse.core.resources".
java.lang.NullPointerException
at
org.devzuz.q.maven.jdt.core.nature.MavenNature.addEntryToClasspath(MavenNature.java:
368)
at
org.devzuz.q.maven.jdt.core.nature.MavenNature.getSourceFoldersClasspath(MavenNature.java:
326)
at
org.devzuz.q.maven.jdt.core.nature.MavenNature.addClasspath(MavenNature.java:
249)
at
org.devzuz.q.maven.jdt.core.nature.MavenNature.configure(MavenNature.java:
112)
at org.eclipse.core.internal.resources.NatureManager
$1.run(NatureManager.java:143)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.resources.NatureManager.configureNature(NatureManager.java:
158)
at
org.eclipse.core.internal.resources.NatureManager.configureNatures(NatureManager.java:
203)
at
org.eclipse.core.internal.resources.Project.basicSetDescription(Project.java:
65)
at
org.eclipse.core.internal.resources.Project.setDescription(Project.java:
981)
at
org.eclipse.core.internal.resources.Project.setDescription(Project.java:
1009)
at
org.devzuz.q.maven.embedder.nature.MavenNatureHelper.addNatures(MavenNatureHelper.java:
56)
at
org.devzuz.q.maven.jdt.core.MavenNatureHelper.addNature(MavenNatureHelper.java:
50)
at
org.devzuz.q.maven.jdt.ui.projectimport.ImportProjectJob.openProject(ImportProjectJob.java:
238)
at
org.devzuz.q.maven.jdt.ui.projectimport.ImportProjectJob.runInWorkspace(ImportProjectJob.java:
122)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)





Brian

On Jul 18, 7:09 am, "Abel Muiño" <amu...@gmail.com> wrote:
> Sorry, this is only available in the 0.8.0 snapshots
>
>
>
> On Fri, Jul 18, 2008 at 12:28 PM, Brian <brian3...@gmail.com> wrote:
>
> > > Q4E already supports displaying the source code of a dependency if it
> > > is available from the repository.
>
> > How is this support activated? F3 (Eclipse->Menu Navigate->Open
> > Declaration) is not working.
>
> > > If it is not on central, you can manually add the sources to your own
> > > repository as a workaround.
>
> > The sources for spring-xml are in central
>
> >http://repo1.maven.org/maven2/org/springframework/ws/spring-xml/1.5.3...

Abel Muiño Vizcaino

unread,
Jul 18, 2008, 4:05:02 PM7/18/08
to q4e-...@googlegroups.com
I've checked out the latest sources for spring-ws (trunk) and imported the "spring-ws/samples/echo" as a Maven Project.

Regarding the error message you see ("The resource is not on the build path of a Java project."), the problem is that this project does not build the WS client with maven. So you must manually add "client/spring-ws/src" to eclipse's build path to let Eclipse know that there is another source folder.

Regarding the NullPointerError... I can reproduce it. Could you please open a new issue for this? (I think 1 and 2 are the same error triggered in different ways)

Thanks for your feedback!

Brian

unread,
Jul 25, 2008, 12:45:51 PM7/25/08
to Q for Eclipse users list
On Jul 18, 4:05 pm, Abel Muiño Vizcaino <amu...@gmail.com> wrote:
> Regarding the NullPointerError... I can reproduce it. Could you
> please open a new issue for this? (I think 1 and 2 are the same error
> triggered in different ways)

Done. http://code.google.com/p/q4e/issues/detail?id=522

Brian
Reply all
Reply to author
Forward
0 new messages