genericworkflownodes / GenericKnimeNodes

Base package for GenericKnimeNodes
https://github.com/genericworkflownodes/GenericKnimeNodes
Other
15 stars 16 forks source link

NullPointerException in PluginXMLTemplate.registerPathPrefix() on windows (path issue) #37

Closed aiche closed 12 years ago

aiche commented 12 years ago

Follow up of issue 36: After fixing the classpath issue user gets following build problem.

With above change i get following errors:

Buildfile: Z:\roettig-GenericKnimeNodes-0ae72df\build.xml

knime.sdk.condition:

knime.sdk.check:

clean:

prepare:
[echo] knime.sdk.exists: true
[mkdir] Created dir: C:\Temp\GKN-2012-04-23T08-20-13-309+0200

base.plugin.build:
[echo] Debug: true
[mkdir] Created dir: C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePlugin
[copy] Copying 1 file to C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePlugi
n
[copy] Copying 1 file to C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePlugi
n
[mkdir] Created dir: C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePlugin\lib

 [copy] Copying 11 files to C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePlu

gin\lib
[mkdir] Created dir: C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePlugin\MET
A-INF
[copy] Copying 1 file to C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePlugi
n\META-INF

base.plugin.classes.build:
[javac] Compiling 170 source files to C:\Temp\GKN-2012-04-23T08-20-13-309+02
00\basePlugin
[touch] Creating C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePlugin\org\bal
lproject\knime\baseplugin.properties
[propertyfile] Updating property file: C:\Temp\GKN-2012-04-23T08-20-13-309+0200\
basePlugin\org\ballproject\knime\baseplugin.properties
[copy] Copying 218 files to C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePl
ugin
[mkdir] Created dir: C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePlugin\dat
a
[copy] Copying 1 file to C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePlugi
n\data
[mkdir] Created dir: C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePlugin\ico
ns
[copy] Copying 2 files to C:\Temp\GKN-2012-04-23T08-20-13-309+0200\basePlug
in\icons
[zip] Building zip: Z:\roettig-GenericKnimeNodes-0ae72df\build\org.ballpro
ject.knime_0.6.0.jar

custom.plugin.build:
[mkdir] Created dir: C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin

custom.plugin.generate_sources:
[java] 23.04.2012 08:25:14 org.ballproject.knime.nodegeneration.NodeGenerat
or
[java] INFO: Creating KNIME plugin sources
[java] From: Z:\roettig-GenericKnimeNodes-0ae72df\sample
[java] To: C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-source
s
[java] 23.04.2012 08:25:14 org.ballproject.knime.nodegeneration.NodeGenerat
or
[java] INFO: Using static ctd files
[java] 23.04.2012 08:25:14 org.ballproject.knime.nodegeneration.templates.M
imeFileCellFactoryTemplate
[java] INFO: MIME Type read: FASTA
[java] 23.04.2012 08:25:14 org.ballproject.knime.nodegeneration.templates.M
imeFileCellFactoryTemplate
[java] INFO: MIME Type read: BlastXML
[java] 23.04.2012 08:25:14 org.ballproject.knime.nodegeneration.NodeGenerat
or
[java] INFO: Start processing ctd file: blastall.ctd
[java] 23.04.2012 08:25:15 org.ballproject.knime.nodegeneration.templates.P
luginXMLTemplate registerNode
[java] INFO: registering Node org.ballproject.blast.knime.nodes.BLAST.BLAST
NodeFactory
[java] 23.04.2012 08:25:15 org.ballproject.knime.nodegeneration.templates.P
luginXMLTemplate registerPathPrefix
[java] INFO: Registering path prefix: /community/blast/Sequence Tools
[java] 23.04.2012 08:25:15 org.ballproject.knime.nodegeneration.templates.P
luginXMLTemplate registerPathPrefix
[java] INFO: name=Sequence Tools
[java] 23.04.2012 08:25:15 org.ballproject.knime.nodegeneration.templates.P
luginXMLTemplate registerPathPrefix
[java] INFO: Registering path prefix: \community\blast
[java] 23.04.2012 08:25:15 org.ballproject.knime.nodegeneration.templates.P
luginXMLTemplate registerPathPrefix
[java] INFO: name=blast
[java] 23.04.2012 08:25:15 org.ballproject.knime.nodegeneration.templates.P
luginXMLTemplate registerPathPrefix
[java] INFO: Registering path prefix: \community
[java] 23.04.2012 08:25:15 org.ballproject.knime.nodegeneration.templates.P
luginXMLTemplate registerPathPrefix
[java] INFO: name=community
[java] java.lang.NullPointerException
[java] at org.ballproject.knime.nodegeneration.templates.PluginXMLTempl
ate.registerPathPrefix(PluginXMLTemplate.java:94)
[java] at org.ballproject.knime.nodegeneration.templates.PluginXMLTempl
ate.registerPath(PluginXMLTemplate.java:86)
[java] at org.ballproject.knime.nodegeneration.templates.PluginXMLTempl
ate.registerNode(PluginXMLTemplate.java:123)
[java] at org.ballproject.knime.nodegeneration.NodeGenerator.(Nod
eGenerator.java:147)
[java] at org.ballproject.knime.nodegeneration.Main.main(Main.java:27)

custom.plugin.classes.build:
[javac] Compiling 6 source files to C:\Temp\GKN-2012-04-23T08-20-13-309+0200
\customPlugin
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:21: package org.ballproject.blast
.knime.nodes.binres does not exist
[javac] import org.ballproject.blast.knime.nodes.binres.BinaryResources;
[javac] ^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:97: cannot find symbol
[javac] symbol : variable BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] String targetdir = home+System.getProperty("fil
e.separator")+BinaryResources.BINPACKNAME;
[javac]
^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:101: cannot find symbol
[javac] symbol : class BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] if(BinaryResources.class.getResourceAsStream
("binaries"+OS+"_64.zip")!=null)
[javac] ^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:103: cannot find symbol
[javac] symbol : variable BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] BinaryResources.decompressTo(home+System
.getProperty("file.separator")+BinaryResources.BINPACKNAME, BinaryResources.clas
s.getResourceAsStream("binaries"+OS+"64.zip"));
[javac]
^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:103: cannot find symbol
[javac] symbol : class BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] BinaryResources.decompressTo(home+System
.getProperty("file.separator")+BinaryResources.BINPACKNAME, BinaryResources.clas
s.getResourceAsStream("binaries"+OS+"64.zip"));
[javac]
^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:103: cannot find symbol
[javac] symbol : variable BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] BinaryResources.decompressTo(home+System
.getProperty("file.separator")+BinaryResources.BINPACKNAME, BinaryResources.clas
s.getResourceAsStream("binaries"+OS+"64.zip"));
[javac] ^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:104: cannot find symbol
[javac] symbol : class BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] PROPERTIES.load(BinaryResources.
class.getResourceAsStream("binaries"+OS+"64.ini"));
[javac] ^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:108: cannot find symbol
[javac] symbol : class BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] if(BinaryResources.class.getResourceAsSt
ream("binaries"+OS+"32.zip")!=null)
[javac] ^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:110: cannot find symbol
[javac] symbol : variable BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] BinaryResources.decompressTo(hom
e+System.getProperty("file.separator")+BinaryResources.BINPACKNAME, BinaryResour
ces.class.getResourceAsStream("binaries"+OS+"32.zip"));
[javac]
^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:110: cannot find symbol
[javac] symbol : class BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] BinaryResources.decompressTo(hom
e+System.getProperty("file.separator")+BinaryResources.BINPACKNAME, BinaryResour
ces.class.getResourceAsStream("binaries"+OS+"32.zip"));
[javac]
^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:110: cannot find symbol
[javac] symbol : variable BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] BinaryResources.decompressTo(hom
e+System.getProperty("file.separator")+BinaryResources.BINPACKNAME, BinaryResour
ces.class.getResourceAsStream("binaries"+OS+"32.zip"));
[javac] ^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:111: cannot find symbol
[javac] symbol : class BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] PROPERTIES.load(BinaryRe
sources.class.getResourceAsStream("binaries"+OS+"32.ini"));
[javac] ^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:122: cannot find symbol
[javac] symbol : class BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] if(BinaryResources.class.getReso
urceAsStream("binaries"+OS+"32.zip")!=null)
[javac] ^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:124: cannot find symbol
[javac] symbol : variable BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] BinaryResources.decompressTo(hom
e+System.getProperty("file.separator")+BinaryResources.BINPACKNAME, BinaryResour
ces.class.getResourceAsStream("binaries"+OS+"32.zip"));
[javac]
^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:124: cannot find symbol
[javac] symbol : class BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] BinaryResources.decompressTo(hom
e+System.getProperty("file.separator")+BinaryResources.BINPACKNAME, BinaryResour
ces.class.getResourceAsStream("binaries"+OS+"32.zip"));
[javac]
^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:124: cannot find symbol
[javac] symbol : variable BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] BinaryResources.decompressTo(hom
e+System.getProperty("file.separator")+BinaryResources.BINPACKNAME, BinaryResour
ces.class.getResourceAsStream("binaries"+OS+"32.zip"));
[javac] ^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:125: cannot find symbol
[javac] symbol : class BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] PROPERTIES.load(BinaryRe
sources.class.getResourceAsStream("binaries"+OS+"_32.ini"));
[javac] ^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:138: cannot find symbol
[javac] symbol : variable BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] String expectedBinDirPath = home + File.separato
r + BinaryResources.BINPACKNAME + File.separator + "bin";
[javac]
^
[javac] C:\Temp\GKN-2012-04-23T08-20-13-309+0200\customPlugin-sources\src\or
g\ballproject\blast\knime\PluginActivator.java:159: cannot find symbol
[javac] symbol : variable BinaryResources
[javac] location: class org.ballproject.blast.knime.PluginActivator
[javac] pStore.setValue("binaries_path", home+System.getProperty
("file.separator")+BinaryResources.BINPACKNAME);
[javac]
^
[javac] 19 errors

BUILD FAILED
Z:\roettig-GenericKnimeNodes-0ae72df\build.xml:139: The following error occurred
while executing this line:
Z:\roettig-GenericKnimeNodes-0ae72df\build.xml:152: Compile failed; see the comp
iler error output for details.

Total time: 7 minutes 59 seconds
aiche commented 12 years ago

The issue is related to the path formatting used in org.ballproject.knime.nodegeneration.util.Utils.getPathPrefixes(). On windows you get from /community/Sequence/BLAST [ \community, \community\Sequence\] instead of the / forward slash versions. And this case is not handled in PluginXMLTemplate.registerPathPrefix. Fix is in preparation ..