Announcement Announcement Module
Collapse
No announcement yet.
UnknownHostException on osgi start command Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • UnknownHostException on osgi start command

    Hello all.
    I'm doing first steps with roo addon dev-t.
    Generating and building simple addon completed successfully. But at last step I've got strange error message.

    java.net.UnknownHostException: target
    Bundle ID file://target/org.canon.roo.addon.hello-0.1.0.BUILD-SNAPSHOT.jar is invalid.

    Target directory and jar do exist.
    Could you please give me an idea what I did wrong or missed?



    Code:
    C:\sts_workspaceRooAddOn\spring-roo-addon-hello> roo addon create simple --topLevelPackage org.canon.roo.addon.hello
        ____  ____  ____
       / __ \/ __ \/ __ \
      / /_/ / / / / / / /
     / _, _/ /_/ / /_/ /
    /_/ |_|\____/\____/    1.2.2.RELEASE [rev 7d75659]
    
    
    Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
    Created ROOT\pom.xml
    Created ROOT\readme.txt
    Created ROOT\legal
    Created ROOT\legal\LICENSE.TXT
    Created SRC_MAIN_JAVA\org\canon\roo\addon\hello
    Created SRC_MAIN_JAVA\org\canon\roo\addon\hello\HelloCommands.java
    Created SRC_MAIN_JAVA\org\canon\roo\addon\hello\HelloOperations.java
    Created SRC_MAIN_JAVA\org\canon\roo\addon\hello\HelloOperationsImpl.java
    Created SRC_MAIN_JAVA\org\canon\roo\addon\hello\HelloPropertyName.java
    Created ROOT\src\main\assembly
    Created ROOT\src\main\assembly\assembly.xml
    Created SRC_MAIN_RESOURCES\org\canon\roo\addon\hello
    Created SRC_MAIN_RESOURCES\org\canon\roo\addon\hello\info.tagx
    Created SRC_MAIN_RESOURCES\org\canon\roo\addon\hello\show.tagx
    
    
    C:\sts_workspaceRooAddOn\spring-roo-addon-hello>mvn clean install
    ...
    ...
    [INFO] Installing org/canon/roo/addon/hello/org.canon.roo.addon.hello/0.1.0.BUILD-SNAPSHOT/org.canon.roo.addon.hello-0.1
    .0.BUILD-SNAPSHOT.jar
    [INFO] Writing OBR metadata
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 14.268s
    [INFO] Finished at: Thu Jan 10 10:46:08 EST 2013
    [INFO] Final Memory: 29M/267M
    [INFO] ------------------------------------------------------------------------
    
    
    C:\sts_workspaceRooAddOn\spring-roo-addon-hello>roo osgi start --url file://target/org.canon.roo.addon.hello-0.1.0.BUILD
    -SNAPSHOT.jar
        ____  ____  ____
       / __ \/ __ \/ __ \
      / /_/ / / / / / / /
     / _, _/ /_/ / /_/ /
    /_/ |_|\____/\____/    1.2.2.RELEASE [rev 7d75659]
    
    
    Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
    0 upgrades available (plus 35 upgrades not visible due to your version stability setting of RELEASE)
    java.net.UnknownHostException: target
    Bundle ID file://target/org.canon.roo.addon.hello-0.1.0.BUILD-SNAPSHOT.jar is invalid.
    

  • #2
    I've try different url without any success
    osgi start --url file://c:/sts_workspaceRooAddOn/spring-roo-addon-hello/target/org.canon.roo.addon.hello-0.1.0.BUILD-SNAPSHOT.jar
    osgi start --url file://target/org.canon.roo.addon.hello-0.1.0.BUILD-SNAPSHOT.jar
    C:\sts_workspaceRooAddOn\spring-roo-addon-hello\target>roo
    roo> osgi start --url file://org.canon.roo.addon.hello-0.1.0.BUILD-SNAPSHOT.jar

    The result is always the same

    java.net.UnknownHostException: target
    Bundle ID file://target/org.canon.roo.addon.hello-0.1.0.BUILD-SNAPSHOT.jar is invalid.

    Is there nobody who can help me with that issue?
    Any suggestion or hint would be appreciated.

    Comment


    • #3
      It' turn out that current OSGI addon implementation has an error. If I type

      osgi start --url file:org.canon.roo.addon.hello.jar

      without slashes it will install addon jar without any problem.

      Code:
      roo> osgi start --url file:org.canon.roo.addon.hello.jar
      roo> say hello
      You must specify option 'name' for this command
      roo> say hello --name Alexei
      Welcome Alexei!

      Comment

      Working...
      X