Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] m2e connector produces "Internal error updating Maven Project"

Possibly missed providing information in the configuration?

The best and easiest way would be to self host m2e + your plugin, then place a breakpoint and look at what it is doing.


On 16 May 2013 11:44, Thorsten Heit <thorsten.heit@xxxxxx> wrote:
Hi,

sorry for the long post, but I hope someone can enlighten me why a self-written m2e connector doesn't work...:


I'm creating Java code from a WSDL via the JAX-WS Maven plugin ([1]) by following some hints I found in a blog entry ([2]). This works fine using the command line. Here's the relevant part of my pom.xml:

<plugin>
  <groupId>org.jvnet.jax-ws-commons</groupId>
  <artifactId>jaxws-maven-plugin</artifactId>
  <version>2.2.1</version>
  <executions>
    <execution>
      <goals>
        <goal>wsimport</goal>
      </goals>
    </execution>
  </executions>

  <!-- if you want to use a specific version of JAX-WS, you can do so like this -->
  <dependencies>
    <dependency>
      <groupId>com.sun.xml.ws</groupId>
      <artifactId>jaxws-tools</artifactId>
      <version>2.1.7</version>
      <exclusions>
        <exclusion>
          <groupId>org.jvnet.staxex</groupId>
          <artifactId>stax-ex</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jvnet.staxex</groupId>
      <artifactId>stax-ex</artifactId>
      <version>1.2</version>
      <exclusions>
        <exclusion>
          <groupId>javax.xml.stream</groupId>
          <artifactId>stax-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</plugin>

No big magic.


Now I've tried to write a connector for m2e to a) avoid the tedious "plugin execution not covered by lifecycle configuration" message and b) have it automatically add the folder containing the generated sources to the project class path. I've followed the instructions in the m2e wiki, looked at the code of the antlr connector, and because I already wrote a connector for the axistools plugin (that basically does similar things), I thought this would be straightforward. Unfortunately this doesn't work and results in the following error:



!ENTRY org.eclipse.core.jobs 4 2 2013-05-16 16:58:17.881
!MESSAGE An internal error occurred during: "Updating Maven Project".
!STACK 0
java.lang.NullPointerException
        at org.eclipse.m2e.jdt.AbstractJavaProjectConfigurator.getFullPath(AbstractJavaProjectConfigurator.java:65)
        at org.eclipse.m2e.jdt.AbstractJavaProjectConfigurator.configureRawClasspath(AbstractJavaProjectConfigurator.java:54)
        at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.invokeJavaProjectConfigurators(AbstractJavaProjectConfigurator.java:171)
        at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:127)
        at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:109)
        at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:472)
        at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:1)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:137)
        at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:465)
        at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration0(ProjectConfigurationManager.java:403)
        at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:316)
        at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:1)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:137)
        at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:89)
        at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1301)
        at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:313)
        at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:77)
        at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)


That's all that I see, nothing more. I found a message in the mailing list concerning debugging plugin execution errors ([3]); therefore installed the "m2e - slf4j over logback logging" plugin, changed the log level in the logback configuration file in .metadata/.plugins/org.eclipse.m2e.logback.configuration to "DEBUG", but all that didn't change anything. IIUC there should be a log file in ${org.eclipse.m2e.log.dir}/0.log, but this file doesn't exist / isn't generated. Starting Eclipse from the command line outputs the following additional messages when it comes up:

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.
org.eclipse.m2e.logback.configuration: SLF4J logger factory is not an instance of LoggerContext: org.slf4j.helpers.NOPLoggerFactory



Questions:
- What does the above message in my terminal means? It isn't shown anywhere else, btw.
- What can I do to turn on (debug) logging?
- How can I find out why the connector doesn't work?

The connector code itself is quite similar to my axistools connector, so I can only imagine that there's something different inside the plugin that lets the error occur when being executed within m2e and my connector. As far as I can tell the plugin itself spawns a process for the $JAVA_HOME/bin/wsimport executable which in turn generates the Java sources.

BTW, the connector code is available at my Github site ([4]).


My configuration:
* Eclipse 4.3M7 (fresh installation)
* m2e 1.4 RC1
* JDK 1.7.0u21



Regards

Thorsten


[1] http://jax-ws-commons.java.net/jaxws-maven-plugin
[2] https://blogs.oracle.com/enterprisetechtips/entry/using_jax_ws_with_maven
[3] http://dev.eclipse.org/mhonarc/lists/m2e-users/msg02408.html
[4] https://github.com/theit/m2e-jaxws
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev



Back to the top