title: Internal error in the mapping processor: java.lang.NullPointerException
body: <p>I'm trying to my map local pojo to an autogenerated domain objects using mapstruct. Expect for a specific complex structure everything else seems to map and the mapper implementation class gets generation. Below is the error that I get.</p>
  
  <p>My mapper class is:</p>
  
  <pre><code>@Mappings({
          @Mapping(source = "sourcefile", target = "sourceFILE"),
          @Mapping(source = "id", target = "ID"),
          @Mapping(source = "reg", target = "regID"),
          @Mapping(source = "itemDetailsType", target = "ItemDetailsType") //This is the structure that does not map
  })
  AutoGenDomainType map(LocalPojo localPojo);
  
  @Mappings({
          @Mapping(source = "line", target = "LINE"),
          @Mapping(source = type", target = "TYPE")
  })
  ItemDetailsType map(ItemDetailsTypes itemDetailsType);
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Internal error in the mapping processor: java.lang.NullPointerException         at org.mapstruct.ap.internal.processor.creation.MappingResolverImpl$ResolvingAttempt.hasCompatibleCopyConstructor(MappingResolverImpl.java:547)          at org.mapstruct.ap.internal.processor.creation.MappingResolverImpl$ResolvingAttempt.isPropertyMappable(MappingResolverImpl.java:522)   at org.mapstruct.ap.internal.processor.creation.MappingResolverImpl$ResolvingAttempt.getTargetAssignment(MappingResolverImpl.java:202)   at org.mapstruct.ap.internal.processor.creation.MappingResolverImpl$ResolvingAttempt.access$100(MappingResolverImpl.java:153)    at  org.mapstruct.ap.internal.processor.creation.MappingResolverImpl.getTargetAssignment(MappingResolverImpl.java:121)   at 
  .....
  .....
  [ERROR] 
  [ERROR] Found 1 error and 16 warnings.
  [ERROR] -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project uwo-services: Compilation failure
  </code></pre>
  
  <p>The target object <code>ItemDetailsType</code> does have other properties that need not be mapped. The error says compilation issue, but I dont find any. Also I have tried adding have tried the <code>unmappedTargetPolicy = ReportingPolicy.IGNORE</code> at my mapper class level just to avoid if this is caused by the unmapped properties, but still no solution.</p>