Uploaded image for project: 'Geronimo-Devtools'
  1. Geronimo-Devtools
  2. GERONIMODEVTOOLS-787

Failed to hot deploy a resource file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0.2
    • eclipse-plugin
    • None

    Description

      It seems that G3 pickup the modified 4cb files from the wrong place. (4cb file is a resource file)

      expect:C:/workspaces/Ride/New/sample1/TestContent1/TestContent1Web/target/classes/v4contentsource/source/en/TestContent1Web/Sample.4cb

      actual:C:/workspaces/Ride/New/sample1/TestContent1/TestContent1Web/src/main/webapp/WEB-INF/classes/v4contentsource/source/en/TestContent1Web/Sample.4cb

      Exception trace throw out from G3:

      java.io.FileNotFoundException: C:\workspaces\Ride\New\sample1\TestContent1\TestContent1Web\src\main\webapp\WEB-INF\classes\v4contentsource\source\en\TestContent1Web\Sample.4cb (The system cannot find the path specified.)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:123)
      at java.io.FileInputStream.<init>(FileInputStream.java:83)
      at org.apache.geronimo.st.v30.core.GeronimoServerBehaviourDelegate.findAndReplaceFiles(GeronimoServerBehaviourDelegate.java:1040)
      at org.apache.geronimo.st.v30.core.GeronimoServerBehaviourDelegate.tryFileReplace(GeronimoServerBehaviourDelegate.java:971)
      at org.apache.geronimo.st.v30.core.GeronimoServerBehaviourDelegate.publishModules(GeronimoServerBehaviourDelegate.java:453)
      at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:952)
      at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:775)
      at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2893)
      at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:337)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

      This is the issue of GeronimoServerBehaviourDelegate. Please see the below code.

      String sourceFile = module.getProject().getFile(rootFolder + ch + moduleFile.getModuleRelativePath() + ch + moduleFile.getName()).getLocation().toString();

      The path was constructed by three part.

      rootFolder: C:/workspaces/Ride/New/sample1/TestContent1/TestContent1Web

      moduleFile.getModuleRelativePath(): src/main/webapp/WEB-INF/classes/v4contentsource/source/en/TestContent1Web

      moduleFile.getName(): Sample.4cb

      G3 supposed that all the resources should come from main/webapp

      Attachments

        1. TouchAndGo.png
          11 kB
          Patrick Ouyang

        Activity

          People

            gawor@mcs.anl.gov Jarek Gawor
            patrick.ouyang Patrick Ouyang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: