wyzssw / protobuf-dt

Automatically exported from code.google.com/p/protobuf-dt
0 stars 0 forks source link

NPE when generating protoc command #203

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When i save a .proto file I receive the following exception.
I've created the src-gen folder and the protobuf-dt is stetted-up like in the 
wiki tutorial.

java.lang.NullPointerException
    at com.google.eclipse.protobuf.ui.protoc.command.ProtocCommand.setFileToCompile(ProtocCommand.java:42)
    at com.google.eclipse.protobuf.ui.protoc.command.ProtocCommandBuilder.buildCommand(ProtocCommandBuilder.java:56)
    at com.google.eclipse.protobuf.ui.builder.protoc.ProtobufBuildParticipant.build(ProtobufBuildParticipant.java:60)
    at org.eclipse.xtext.builder.impl.RegistryBuilderParticipant.build(RegistryBuilderParticipant.java:60)
    at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:160)
    at org.eclipse.xtext.builder.impl.XtextBuilder.incrementalBuild(XtextBuilder.java:141)
    at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:91)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Java and Eclipse Info:

eclipse.buildId=M20110909-1335
java.version=1.6.0_29
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=it_IT

Original issue reported on code.google.com by greotti....@gmail.com on 10 Feb 2012 at 4:48

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 10 Feb 2012 at 6:08

GoogleCodeExporter commented 9 years ago
What version of the proto editor are you using?

Thanks,
-Alex

Original comment by alr...@google.com on 10 Feb 2012 at 9:57

GoogleCodeExporter commented 9 years ago
I can't reproduce this issue. Please provide steps to reproduce (or better yet, 
attach a project where this issue is reproducible.)

Original comment by alr...@google.com on 12 Feb 2012 at 10:17

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 12 Feb 2012 at 10:19

GoogleCodeExporter commented 9 years ago
I've installed the eclipse plugin from 
http://protobuf-dt.googlecode.com/git/update-site
I'm developing an OSGi plugin project.
I've attached a simple OSGi plugin project that reproduces the issue.

Original comment by greotti....@gmail.com on 13 Feb 2012 at 8:37

Attachments:

GoogleCodeExporter commented 9 years ago
Great!! thanks a lot.

Original comment by alr...@google.com on 13 Feb 2012 at 2:55

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 13 Feb 2012 at 2:55

GoogleCodeExporter commented 9 years ago
I found the problem: IResource#getLocation does not like whitespace in the 
parent root folder. The interesting part: fixing it.

Original comment by alr...@google.com on 14 Feb 2012 at 1:13

GoogleCodeExporter commented 9 years ago
r48452a6cad7f

Original comment by alr...@google.com on 14 Feb 2012 at 10:51

GoogleCodeExporter commented 9 years ago
Proto editor will not throw NPEs when the path of file to compile has 
whitespace, but protoc may not be able to compile it. See 
http://code.google.com/p/protobuf/issues/detail?id=169

Original comment by alr...@google.com on 14 Feb 2012 at 11:04

GoogleCodeExporter commented 9 years ago
Thanks, I will pay attention to specify paths without white spaces to avoid 
further problems with protoc.

Original comment by greotti....@gmail.com on 14 Feb 2012 at 12:43