Failed to hot deploy a resource file
------------------------------------

                 Key: GERONIMODEVTOOLS-787
                 URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-787
             Project: Geronimo-Devtools
          Issue Type: Bug
          Components: eclipse-plugin
    Affects Versions: 3.0
            Reporter: Patrick Ouyang


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 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to