jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven Integration for Eclipse
  • MNGECLIPSE-268

NullPointerException after adding new dependency

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 0.0.10
  • Fix Version/s: 0.0.10
  • Component/s: None
  • Labels:
    None
  • Environment:
    eclipse.buildId=M20060629-1905
    java.version=1.6.0
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
    Command-line arguments: -os win32 -ws win32 -arch x86

Description

Updated from 0.0.9 to 0.0.10. Now I get a NullPointerException after adding a new dependency. I have to do a manual console build and "Project -> Clean..." to workaround this.

18.02.07 15:06:24 CET: Downloading [sunsite.dk] -> http://mirrors.sunsite.dk/maven2/xalan/xalan/2.7.0/xalan-2.7.0.jar
18.02.07 15:06:37 CET: Downloaded [sunsite.dk] -> http://mirrors.sunsite.dk/maven2/xalan/xalan/2.7.0/xalan-2.7.0.jar
18.02.07 15:06:38 CET: Unable to read model from /MMArchive/pom.xml; java.lang.NullPointerException

Error log:
java.lang.NullPointerException
at org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:88)
at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:284)
at org.maven.ide.eclipse.index.Indexer$IndexerModifierAdapter.<init>(Indexer.java:529)
at org.maven.ide.eclipse.index.Indexer.createIndexerAdapter(Indexer.java:246)
at org.maven.ide.eclipse.index.Indexer.addDocument(Indexer.java:342)
at org.maven.ide.eclipse.index.MavenRepositoryIndexManager.updateIndex(MavenRepositoryIndexManager.java:95)
at org.maven.ide.eclipse.embedder.TransferListenerAdapter.transferCompleted(TransferListenerAdapter.java:95)
at org.apache.maven.wagon.events.TransferEventSupport.fireTransferCompleted(TransferEventSupport.java:135)
at org.apache.maven.wagon.AbstractWagon.fireGetCompleted(AbstractWagon.java:364)
at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:230)
at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:182)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:80)
at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:436)
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:327)
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:283)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:182)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:70)
at org.maven.ide.eclipse.embedder.EclipseArtifactResolver.resolve(EclipseArtifactResolver.java:61)
at org.apache.maven.embedder.MavenEmbedder.resolve(MavenEmbedder.java:300)
at org.maven.ide.eclipse.embedder.ClassPathResolver.materializeArtifactPath(ClassPathResolver.java:224)
at org.maven.ide.eclipse.embedder.ClassPathResolver.resolveClasspathEntries(ClassPathResolver.java:145)
at org.maven.ide.eclipse.builder.Maven2Builder.updateClasspath(Maven2Builder.java:95)
at org.maven.ide.eclipse.builder.Maven2Builder.build(Maven2Builder.java:86)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:603)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:167)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:230)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:233)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:252)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:285)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:145)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:208)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. XML File
    pom.xml
    21/Dec/08 9:35 PM
    5 kB
    Eugene Kuleshov
  2. XML File
    settings.xml
    18/Feb/07 11:30 AM
    1 kB
    Dennis Kieselhorst

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Eugene Kuleshov added a comment - 18/Feb/07 11:15 AM

Do you have more then one remote repository or declared mirrors in your settings.xml? I don't see /MMArchive/pom.xml in Maven central repository.

Can you reproduce that every time or it just happens once? If it happens every time, please attach test project and settings.xml that would allow to reproduce this issue.

I am not sure why command line build is needed. Project/Clean does trigger refresh of the Maven classpath container and you can also reindex local repository from the Window / Preferences / Maven.

Show
Eugene Kuleshov added a comment - 18/Feb/07 11:15 AM Do you have more then one remote repository or declared mirrors in your settings.xml? I don't see /MMArchive/pom.xml in Maven central repository. Can you reproduce that every time or it just happens once? If it happens every time, please attach test project and settings.xml that would allow to reproduce this issue. I am not sure why command line build is needed. Project/Clean does trigger refresh of the Maven classpath container and you can also reindex local repository from the Window / Preferences / Maven.
Hide
Permalink
Dennis Kieselhorst added a comment - 18/Feb/07 11:23 AM

MMArchive is the name of my eclipse project.

The error is reproducable. I will try to add a testcase for it.

When I hit the reindex button in the maven preferences, I get the following error message:

An internal error occurred during: "Indexing local".

java.lang.NullPointerException
at org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:88)
at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:284)
at org.maven.ide.eclipse.index.Indexer$IndexerModifierAdapter.<init>(Indexer.java:529)
at org.maven.ide.eclipse.index.Indexer.createIndexerAdapter(Indexer.java:246)
at org.maven.ide.eclipse.index.Indexer.reindex(Indexer.java:253)
at org.maven.ide.eclipse.index.IndexerJob.run(IndexerJob.java:63)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

Show
Dennis Kieselhorst added a comment - 18/Feb/07 11:23 AM MMArchive is the name of my eclipse project. The error is reproducable. I will try to add a testcase for it. When I hit the reindex button in the maven preferences, I get the following error message: An internal error occurred during: "Indexing local". java.lang.NullPointerException at org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:88) at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:284) at org.maven.ide.eclipse.index.Indexer$IndexerModifierAdapter.<init>(Indexer.java:529) at org.maven.ide.eclipse.index.Indexer.createIndexerAdapter(Indexer.java:246) at org.maven.ide.eclipse.index.Indexer.reindex(Indexer.java:253) at org.maven.ide.eclipse.index.IndexerJob.run(IndexerJob.java:63) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Hide
Permalink
Eugene Kuleshov added a comment - 18/Feb/07 1:17 PM

The stack trace you posted does not match line numbers from the 0.0.10 release. Are you sure you are using the last version from the update site at http://m2eclipse.codehaus.org/update/

You may want to uninstall plugin from the Help / Software Updates / Manage Configuration and install it again.

Show
Eugene Kuleshov added a comment - 18/Feb/07 1:17 PM The stack trace you posted does not match line numbers from the 0.0.10 release. Are you sure you are using the last version from the update site at http://m2eclipse.codehaus.org/update/ You may want to uninstall plugin from the Help / Software Updates / Manage Configuration and install it again.
Hide
Permalink
Dennis Kieselhorst added a comment - 18/Feb/07 1:34 PM

Yes I am sure...installed it three days ago.

I also uninstalled the 0.0.9 version with 'Manage Configuration'.

Show
Dennis Kieselhorst added a comment - 18/Feb/07 1:34 PM Yes I am sure...installed it three days ago. I also uninstalled the 0.0.9 version with 'Manage Configuration'.
Hide
Permalink
Eugene Kuleshov added a comment - 18/Feb/07 1:44 PM

I don't know what to say. As I said, you are running something that is mot in 0.0.10 release. Maybe there are some stale jars or some other garbage. This is quite basic functionality and no one reported such errors on 0.0.10 release.

By the way, what Eclipse version you are using and what Java version you are Eclipse on?

Show
Eugene Kuleshov added a comment - 18/Feb/07 1:44 PM I don't know what to say. As I said, you are running something that is mot in 0.0.10 release. Maybe there are some stale jars or some other garbage. This is quite basic functionality and no one reported such errors on 0.0.10 release. By the way, what Eclipse version you are using and what Java version you are Eclipse on?
Hide
Permalink
Dennis Kieselhorst added a comment - 18/Feb/07 1:51 PM

Eclipse 3.2.2, Java 1.6

Perhaps it's a classpath issue?! There is a lucence-core-2.0.0.jar in plugins/org.maven.ide.eclipse_0.0.10.jar/lib. And there is also a directory named org.apache.lucene_1.4.103.v20060601 in the plugins directory.

Thanks for your help.

Show
Dennis Kieselhorst added a comment - 18/Feb/07 1:51 PM Eclipse 3.2.2, Java 1.6 Perhaps it's a classpath issue?! There is a lucence-core-2.0.0.jar in plugins/org.maven.ide.eclipse_0.0.10.jar/lib. And there is also a directory named org.apache.lucene_1.4.103.v20060601 in the plugins directory. Thanks for your help.
Hide
Permalink
Eugene Kuleshov added a comment - 18/Feb/07 2:25 PM

Very unlikely. This been like this since beginning and plugin is using own Lucene jar instead of importing bundle from Eclipse.

So, all I can suggest is to delete all org.maven.ide.eclipse* jars and folders in your Eclipse install (main and external locations), then run Eclipse with -clean option and install plugin again from the update site.

Show
Eugene Kuleshov added a comment - 18/Feb/07 2:25 PM Very unlikely. This been like this since beginning and plugin is using own Lucene jar instead of importing bundle from Eclipse. So, all I can suggest is to delete all org.maven.ide.eclipse* jars and folders in your Eclipse install (main and external locations), then run Eclipse with -clean option and install plugin again from the update site.
Hide
Permalink
Dennis Kieselhorst added a comment - 19/Feb/07 6:16 AM

Unfortunately this doesn't help. I also tried to remove the old lucene version but then whole eclipse isn't running:

!SESSION 2007-02-19 13:06:35.687 -----------------------------------------------
eclipse.buildId=M20060629-1905
java.version=1.6.0
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Command-line arguments: -os win32 -ws win32 -arch x86 -clean

!ENTRY org.eclipse.core.runtime 2007-02-19 13:06:40.859
!MESSAGE Product org.eclipse.sdk.ide could not be found.

!ENTRY org.eclipse.osgi 4 0 2007-02-19 13:06:40.890
!MESSAGE Application error

!STACK 1
java.lang.RuntimeException: No application id has been found.
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:56)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

Show
Dennis Kieselhorst added a comment - 19/Feb/07 6:16 AM Unfortunately this doesn't help. I also tried to remove the old lucene version but then whole eclipse isn't running: !SESSION 2007-02-19 13:06:35.687 ----------------------------------------------- eclipse.buildId=M20060629-1905 java.version=1.6.0 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE Command-line arguments: -os win32 -ws win32 -arch x86 -clean !ENTRY org.eclipse.core.runtime 2007-02-19 13:06:40.859 !MESSAGE Product org.eclipse.sdk.ide could not be found. !ENTRY org.eclipse.osgi 4 0 2007-02-19 13:06:40.890 !MESSAGE Application error !STACK 1 java.lang.RuntimeException: No application id has been found. at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:56) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
Hide
Permalink
Eugene Kuleshov added a comment - 19/Feb/07 12:17 PM

The only suggestion I can give you is to try to install fresh copy of Eclipse and then try this plugin up there.

PS: haven't I told you that Maven plugin is NOT using Lucene plugin from Eclipse?

Show
Eugene Kuleshov added a comment - 19/Feb/07 12:17 PM The only suggestion I can give you is to try to install fresh copy of Eclipse and then try this plugin up there. PS: haven't I told you that Maven plugin is NOT using Lucene plugin from Eclipse?
Hide
Permalink
Dennis Kieselhorst added a comment - 19/Feb/07 1:02 PM

Clean installation doesn't help either.

Delete the folder \.metadata\.plugins\org.maven.ide.eclipse in your workspace!

Show
Dennis Kieselhorst added a comment - 19/Feb/07 1:02 PM Clean installation doesn't help either. Delete the folder \.metadata\.plugins\org.maven.ide.eclipse in your workspace!
Hide
Permalink
Eugene Kuleshov added a comment - 19/Feb/07 1:39 PM

Interesting. What version you have used before 0.0.10?

Show
Eugene Kuleshov added a comment - 19/Feb/07 1:39 PM Interesting. What version you have used before 0.0.10?
Hide
Permalink
Dennis Kieselhorst added a comment - 19/Feb/07 1:42 PM

version 0.0.9

Show
Dennis Kieselhorst added a comment - 19/Feb/07 1:42 PM version 0.0.9

People

  • Assignee:
    Unassigned
    Reporter:
    Dennis Kieselhorst
Vote (0)
Watch (1)

Dates

  • Created:
    18/Feb/07 8:19 AM
    Updated:
    21/Dec/08 9:35 PM
    Resolved:
    19/Feb/07 1:02 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.