[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
FileNotFoundException using p2.director.app.application (was Re: [p2-dev] Re: [pde-dev] error running P2 metadata generation)

Try adding/removing the file: prefix on paths. Some need it, others do not.

Here are some working examples of using the director:

http://wiki.eclipse.org/Equinox_p2_director_application#Scripted_Examples
http://wiki.eclipse.org/Equinox_p2_director_application/Examples/Install_into_eclipse_using_SDKProfile

N

Mark Russell wrote:
this is actually being called via an ant script but I can change it to a batch script
Ian Bull wrote:
Can you past your director call? Reading the [java] lines are hard. It looks like there might just be a problem with a path somewhere:

F:\eclipses_openarbor\eclipse_
34_openArbor\configuration\f:\build\openArbor\temp\eclipse.build\result\tmp\eclipse\p2\org.eclipse.equinox.p2.core\cache\artifacts.xml



that is likely not a path on your machine.

cheers,
ian



On Wed, Jul 15, 2009 at 10:45 AM, Mark Russell <mark_russell@xxxxxxxxxxxxxxxxxx <mailto:mark_russell@xxxxxxxxxxxxxxxxxx>> wrote:

    thanks Ian.  that got rid of the NPE.  however all I'm getting is
    one file in my repository directory.  it is content.xml see below
    for contents.  Any ideas why P2 is not generating the metadata.  I
    already posted what the error is if I try to run the metadata
    generation from an external eclipse.

the content.xml looks like this:
<?xml version='1.0' encoding='UTF-8'?>
<?metadataRepository
class='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository'


version='1.0.0'?>
<repository name='file:/f:/build/openArbor/temp/repo/ - metadata'
type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository'


    version='1'>
     <properties size='1'>
       <property name='p2.timestamp' value='1247661625641'/>
     </properties>
    </repository>

    the is the errors I get from the run of director:
           [echo] installing com.ddci.openarbor.application.product to
    3.4.2.v200907150829 to
    f:\build\openArbor\temp\eclipse.build/result/tmp/eclipse

[java] Executing 'C:\Program Files\Java\jre6\bin\java.exe'
with arguments:
[java] '-jar'
[java]
'f:\eclipses_openarbor\eclipse_34_openArbor\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar'


           [java] '-data'
           [java]
    'f:\build\openArbor\temp\eclipse.build\result\workspace-director'
           [java] '-application'
           [java] 'org.eclipse.equinox.p2.director.app.application'

           [java] '-nosplash'
           [java] '--launcher.suppressErrors'
           [java] '-consoleLog'
           [java] '-flavor'
           [java] 'tooling'
           [java] '-installIU'

           [java] 'com.ddci.openarbor.application.product'
           [java] '-version'
           [java] '3.4.2.v200907150829'
           [java] '-p2.os'
           [java] 'win32'
           [java] '-p2.ws <http://p2.ws>'
           [java] 'win32'
           [java] '-p2.arch'
           [java] 'x86'
           [java] '-roaming'
           [java] '-profile'
           [java] 'OpenArborProfile'

[java] '-metadataRepository'
[java] 'file:/f:/build/openArbor/temp/repo/'
[java] '-artifactRepository'
[java] 'file:/f:/build/openArbor/temp/repo/'
[java] '-destination'
[java] 'f:\build\openArbor\temp\eclipse.build/result/tmp/eclipse'
[java] '-bundlepool'
[java] 'f:\build\openArbor\temp\eclipse.build/result/tmp/eclipse'
[java] '-vmargs'
[java]
'-Declipse.p2.data.area=f:\build\openArbor\temp\eclipse.build/result/tmp/eclipse/p2'



[java]
[java] The ' characters around the executable and arguments are
[java] not part of the command.
[java] java.io.FileNotFoundException:
F:\eclipses_openarbor\eclipse_34_openArbor\configuration\f:\build\openArbor\temp\eclipse.build\result\tmp\eclipse\p2\org.eclipse.equinox.p2.core\cache\artifacts.xml


(The filename, directory name, or volume label syntax is incorrect)
[java] at java.io.FileOutputStream.open(Native Method)
[java] at java.io.FileOutputStream.<init>(Unknown Source)
[java] at java.io.FileOutputStream.<init>(Unknown Source)
[java] at
org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.save(SimpleArtifactRepository.java:852)


[java] at
org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.save(SimpleArtifactRepository.java:833)


[java] at
org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.<init>(SimpleArtifactRepository.java:299)


[java] at
org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.SimpleArtifactRepositoryFactory.create(SimpleArtifactRepositoryFactory.java:110)


[java] at
org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.createRepository(ArtifactRepositoryManager.java:222)


[java] at
org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.restoreDownloadCache(ArtifactRepositoryManager.java:595)


[java] at
org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.restoreRepositories(ArtifactRepositoryManager.java:656)


[java] at
org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.getRepository(ArtifactRepositoryManager.java:338)


[java] at
org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:395)


[java] at
org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:389)


[java] at
org.eclipse.equinox.internal.p2.console.ProvisioningHelper.addArtifactRepository(ProvisioningHelper.java:78)


[java] at
org.eclipse.equinox.internal.p2.director.app.Application.initializeRepositories(Application.java:170)


[java] at
org.eclipse.equinox.internal.p2.director.app.Application.run(Application.java:345)


[java] at
org.eclipse.equinox.internal.p2.director.app.Application.start(Application.java:423)



[java] at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)


[java] at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)


[java] at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)


[java] at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)


[java] at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)


[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[java] at java.lang.reflect.Method.invoke(Unknown Source)
[java] at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
[java] at
org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
[java] at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
[java] at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
[java] !SESSION 2009-07-15 08:40:23.610
-----------------------------------------------
[java] eclipse.buildId=M20090211-1700
[java] java.version=1.6.0_13
[java] java.vendor=Sun Microsystems Inc.
[java] BootLoader constants: OS=win32, ARCH=x86, WS=win32,
NL=en_US
[java] Framework arguments: -application
org.eclipse.equinox.p2.director.app.application
--launcher.suppressErrors -flavor tooling -installIU
com.ddci.openarbor.application.product -version 3.4.2.v200907150829
-p2.os win32 -p2.ws <http://p2.ws> win32 -p2.arch x86 -roaming
-profile OpenArborProfile -metadataRepository
file:/f:/build/openArbor/temp/repo/ -artifactRepository
file:/f:/build/openArbor/temp/repo/ -destination
f:\build\openArbor\temp\eclipse.build/result/tmp/eclipse -bundlepool
f:\build\openArbor\temp\eclipse.build/result/tmp/eclipse
[java] Command-line arguments: -data
f:\build\openArbor\temp\eclipse.build\result\workspace-director
-application org.eclipse.equinox.p2.director.app.application
--launcher.suppressErrors -consoleLog -flavor tooling -installIU
com.ddci.openarbor.application.product -version 3.4.2.v200907150829
-p2.os win32 -p2.ws <http://p2.ws> win32 -p2.arch x86 -roaming
-profile OpenArborProfile -metadataRepository
file:/f:/build/openArbor/temp/repo/ -artifactRepository
file:/f:/build/openArbor/temp/repo/ -destination
f:\build\openArbor\temp\eclipse.build/result/tmp/eclipse -bundlepool
f:\build\openArbor\temp\eclipse.build/result/tmp/eclipse
[java] !ENTRY org.eclipse.osgi 4 0 2009-07-15 08:40:25.688
[java] !MESSAGE Application error
[java] !STACK 1
[java] java.lang.IllegalStateException: Registry Directory
not available.
[java] at
org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.restore(SimpleProfileRegistry.java:330)


[java] at
org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.getProfileMap(SimpleProfileRegistry.java:223)


[java] at
org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.internalGetProfile(SimpleProfileRegistry.java:180)


[java] at
org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.getProfile(SimpleProfileRegistry.java:171)


[java] at
org.eclipse.equinox.internal.p2.console.ProvisioningHelper.getProfile(ProvisioningHelper.java:143)


[java] at
org.eclipse.equinox.internal.p2.director.app.Application.initializeProfile(Application.java:130)


[java] at
org.eclipse.equinox.internal.p2.director.app.Application.run(Application.java:347)


[java] at
org.eclipse.equinox.internal.p2.director.app.Application.start(Application.java:423)



[java] at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)


[java] at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)


[java] at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)


[java] at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)


[java] at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)


[java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[java] at java.lang.reflect.Method.invoke(Unknown Source)
[java] at
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
[java] at
org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
[java] at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
[java] at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
[java] Java Result: 13
Ian Bull wrote:


        Can you try
        p2.gathering = true

        (instead of generate.metadata = true).  This should use the
        publisher (the new tool for generating metadata).

        cheers,
        ian

        On Mon, Jul 13, 2009 at 7:07 PM, Nick Boldt <nickboldt@xxxxxxxxx
        <mailto:nickboldt@xxxxxxxxx> <mailto:nickboldt@xxxxxxxxx
        <mailto:nickboldt@xxxxxxxxx>>> wrote:

           Some guesses:

           * ${buildDirectory} is not defined
           * ${buildDirectory} contains spaces
           * ${buildDirectory} contains the wrong slashes
           * repo.name <http://repo.name> <http://repo.name> properties
        need to be wrapped with quotes


You could try running the generator by hand and pass in all the
required parameters. Here's the syntax I used the last time I
had to
regen metadata for an update site:


cd /tmp/jbtm2nupdate/3.1.0.M2; rm -fr artifacts.jar
content.jar; \
/home/nboldt/eclipse/eclipse/eclipse -vm /opt/jdk1.5.0/bin/java \
-workspace /tmp/workspace -application \
org.eclipse.equinox.p2.metadata.generator.EclipseGenerator \
-updateSite /tmp/jbtm2nupdate/3.1.0.M2/ \
-source /tmp/jbtm2nupdate/3.1.0.M2/ \
-site file:/tmp/jbtm2nupdate/3.1.0.M2/site.xml \
-features /tmp/jbtm2nupdate/3.1.0.M2/features/ \
-bundles /tmp/jbtm2nupdate/3.1.0.M2/bundles/ \
-metadataRepository file:/tmp/jbtm2nupdate/3.1.0.M2/ \
-artifactRepository file:/tmp/jbtm2nupdate/3.1.0.M2/ \
-metadataRepositoryName "JBoss Tools Update Site" \
-artifactRepositoryName "JBoss Tools Artifacts" \
-noDefaultIUs -compress -reusePack200Files; \
rm -fr /tmp/workspace:


           Copying to p2-dev@xxxxxxxxxxx <mailto:p2-dev@xxxxxxxxxxx>
        <mailto:p2-dev@xxxxxxxxxxx <mailto:p2-dev@xxxxxxxxxxx>> in case

           they have a better idea than I.

           N


Mark Russell wrote:

               I'm trying to build the P@ metadata with the PDE build.
         When I
               run it I get a null pointer exception.  Here is the trace:
               generate.p2.metadata:
               [p2.generator] Generating metadata for
               f:\build\openArbor\temp\eclipse.build\tmp\openarbor.
               [p2.generator] Generation completed with success [28
        seconds].

customAssembly:
[zip] Updating zip:
f:\build\openArbor\temp\eclipse.build\I.200907131324\200907131324-win32.win32.x86.zip



[delete] Deleting directory f:\build\openArbor\temp\eclipse.build\tmp

               generate.p2.metadata:
               [p2.generator] Generating metadata for null.

BUILD FAILED
F:\ws\ddci\com.ddci.openarbor.application\build-product.xml:91:
The following error occurred while executing this line:
F:\ws\ddci\openarbor.pde.build\build-pde.xml:71: The
following
error occurred while executing this line:
C:\eclipses\eclipse_342\plugins\org.eclipse.pde.build_3.4.1.R34x_v20081217\scripts\productBuild\productBuild.xml:31:


The following error occurred while executing this line:
C:\eclipses\eclipse_342\plugins\org.eclipse.pde.build_3.4.1.R34x_v20081217\scripts\build.xml:102:


The following error occurred while executing this line:
F:\ws\ddci\openarbor.pde.build\customTargets.xml:10: The
following error occurred while executing this line:
C:\eclipses\eclipse_342\plugins\org.eclipse.pde.build_3.4.1.R34x_v20081217\scripts\productBuild\allElements.xml:10:


The following error occurred while executing this line:
C:\eclipses\eclipse_342\plugins\org.eclipse.pde.build_3.4.1.R34x_v20081217\scripts\genericTargets.xml:165:


The following error occurred while executing this line:
f:\build\openArbor\temp\eclipse.build\package.org.eclipse.pde.build.container.feature.all.xml:24:


The following error occurred while executing this line:
f:\build\openArbor\temp\eclipse.build\package.org.eclipse.pde.build.container.feature.all.xml:31:


               An error occurred when calling generator.

               Total time: 4 minutes 17 seconds

               here is my product.properties file p2 segment:
               generate.p2.metadata=true
               p2.metadata.repo = file:${buildDirectory}/repo
               p2.artifact.repo = file:${buildDirectory}/repo
               p2.metadata.repo.name <http://p2.metadata.repo.name>
        <http://p2.metadata.repo.name> = OpenArbor
               Meta Repo
               p2.artifact.repo.name <http://p2.artifact.repo.name>
        <http://p2.artifact.repo.name> = OpenArbor

               Artifact Repo
               p2.flavor = tooling
               p2.publish.artifacts=true

               can anyone shed some light on why I'm getting the NPE?


-- Nick Boldt :: http://nick.divbyzero.com Release Engineer :: Eclipse Modeling & Dash Athena _______________________________________________ p2-dev mailing list p2-dev@xxxxxxxxxxx <mailto:p2-dev@xxxxxxxxxxx> <mailto:p2-dev@xxxxxxxxxxx <mailto:p2-dev@xxxxxxxxxxx>>

           https://dev.eclipse.org/mailman/listinfo/p2-dev




-- R. Ian Bull | EclipseSource Victoria | +1 250 477 7484 http://eclipsesource.com | http://twitter.com/eclipsesource


------------------------------------------------------------------------


        _______________________________________________
        pde-dev mailing list
        pde-dev@xxxxxxxxxxx <mailto:pde-dev@xxxxxxxxxxx>
        https://dev.eclipse.org/mailman/listinfo/pde-dev



    --     Mark Russell
    Build Master
    Instantiations, Inc.
    +1 724-368-3331 (land line)
    http://www.instantiations.com
    _______________________________________________
    pde-dev mailing list
    pde-dev@xxxxxxxxxxx <mailto:pde-dev@xxxxxxxxxxx>
    https://dev.eclipse.org/mailman/listinfo/pde-dev




-- R. Ian Bull | EclipseSource Victoria | +1 250 477 7484 http://eclipsesource.com | http://twitter.com/eclipsesource


------------------------------------------------------------------------

_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-dev



-- Nick Boldt :: http://nick.divbyzero.com Release Engineer :: Eclipse Modeling & Dash Athena