cfmlprojects / runwar

Other
11 stars 16 forks source link

Flex /CFForm paths incorrect on Windows. #29

Closed bdw429s closed 8 years ago

bdw429s commented 8 years ago

When I start a CF11 update 9 server, I get the following in the server out log:

08/17 13:00:03 INFO License Service: Flex 1.5 CF Edition enabled java.io.FileNotFoundException: C:\Users\Brad.development\.CommandBox\server\EA0C94E13CBC167445ACE038CC36B0B7-wwwroot\adobe-11.0.09.299201C:\Users\Brad.develo pment\.CommandBox\server\EA0C94E13CBC167445ACE038CC36B0B7-wwwroot\adobe-11.0.09.299201\WEB-INF\cfform\logs\flex.log (The filename, directory name, or volume label syntax is incorrect) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at flex.services.logging.FileLogEventHandler.openFile(FileLogEventHandler.java:333) at flex.services.logging.FileLogEventHandler.checkForRotation(FileLogEventHandler.java:252) at flex.services.logging.FileLogEventHandler.logEvent(FileLogEventHandler.java:178) at flex.services.logging.LogEventHandler.log(LogEventHandler.java:27) at flex.services.logging.ThreadedLogEventHandler.processNextInQueue(ThreadedLogEventHandler.java:153) at flex.services.logging.ThreadedLogEventHandler$ProcessQueueTask.run(ThreadedLogEventHandler.java:125) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) java.lang.NullPointerException at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at flex.services.logging.FileLogEventHandler.openFile(FileLogEventHandler.java:333) at flex.services.logging.FileLogEventHandler.checkForRotation(FileLogEventHandler.java:300) at flex.services.logging.FileLogEventHandler.logEvent(FileLogEventHandler.java:178) at flex.services.logging.LogEventHandler.log(LogEventHandler.java:27) at flex.services.logging.ThreadedLogEventHandler.processNextInQueue(ThreadedLogEventHandler.java:153) at flex.services.logging.ThreadedLogEventHandler$ProcessQueueTask.run(ThreadedLogEventHandler.java:125) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) 08/17 13:00:03 INFO Starting Flex 1.5 CF Edition 2016-08-17 13:00:03 INFO io.undertow.servlet CFMxmlServlet: Macromedia Flex Build: 87315.134646 08/17 13:00:03 INFO Macromedia Flex Build: 87315.134646 08/17 13:00:03 ERROR Mxml Manager: Unable to locate manifest file: C:\Users\Brad.development\.CommandBox/server/EA0C94E13CBC167445ACE038CC36B0B7-wwwroot/adob e-11.0.09.299201C:\Users\Brad.development\.CommandBox/server/EA0C94E13CBC167445ACE038CC36B0B7-wwwroot/adobe-11.0.09.299201/WEB-INF/cfform/mxml-manifest.xml 08/17 13:00:03 ERROR Mxml Manager: System classes could not be loaded: C:\Users\Brad.development\.CommandBox/server/EA0C94E13CBC167445ACE038CC36B0B7-wwwroot/ adobe-11.0.09.299201C:\Users\Brad.development\.CommandBox/server/EA0C94E13CBC167445ACE038CC36B0B7-wwwroot/adobe-11.0.09.299201/WEB-INF/cfform/system_classes does not exist.

It looks like the root directory for the cfform stuff is messed up and appending the entire thing in their twice. (Note how C:\ appears again in the middle of the paths)

Here's the three incorrect paths pulled out of the error message:

C:\Users\Brad.development\.CommandBox\server\EA0C94E13CBC167445ACE038CC36B0B7-wwwroot\adobe-11.0.09.299201C:\Users\Brad.develo
pment\.CommandBox\server\EA0C94E13CBC167445ACE038CC36B0B7-wwwroot\adobe-11.0.09.299201\WEB-INF\cfform\logs\flex.log

C:\Users\Brad.development\.CommandBox/server/EA0C94E13CBC167445ACE038CC36B0B7-wwwroot/adob
e-11.0.09.299201C:\Users\Brad.development\.CommandBox/server/EA0C94E13CBC167445ACE038CC36B0B7-wwwroot/adobe-11.0.09.299201/WEB-INF/cfform/mxml-manifest.xml

C:\Users\Brad.development\.CommandBox/server/EA0C94E13CBC167445ACE038CC36B0B7-wwwroot/
adobe-11.0.09.299201C:\Users\Brad.development\.CommandBox/server/EA0C94E13CBC167445ACE038CC36B0B7-wwwroot/adobe-11.0.09.299201/WEB-INF/cfform/system_classes

I'm not sure where the directory for this is set up. Is this something Runwar is doing, or do we need to tweak the adobe WARs?

denuno commented 8 years ago

Can you confirm that this is happening for all Adobe versions? Or is it just 11?

I really need to write some tests for this stuff, as I'm fearful that something I thought I saw, and then thought, thankfully, that I hadn't seen, had, indeed, been seen, and does, indeed -- sadly -- exist. That thing, being: different behavior for this between Adobe versions.

The setting for the cfform directory comes, IIRC, from the flex.dir system property, and like the WEB-INF bit I mentioned in #30, there's some funkyness about how Adobe expects to get the path here, too...

There wouldn't be a problem if Adobe asked the servlet container for the file, after it got the path for it from the web.xml parsing, but instead it seems to take that literal value and ask the file system for it, and the file system doesn't know that /WEB-INF is relative to the war root dir-- how could it?

I want to say that some ACF versions need the absolute file system path, and others need the 'relative' one of /WEB-INF/..., but hopefully I really am mistaken, and you'll see the same behavior regardless of version you test with.

bdw429s commented 8 years ago

@denuno Do you think your fix for https://github.com/cfmlprojects/runwar/issues/30 fixed this too? I can test the other ACF versions, but if you have a fix in place for https://github.com/cfmlprojects/runwar/issues/30 , I might as well get that first before doing any more testing.

denuno commented 8 years ago

I don't think #30 will affect this, as although it's the same-ish problem, it's a different init parameter, and I think it may need to vary based on the Adobe engine version, versus just the engine type.

I had an idea about this though, if it does turn out to be version specific, and that is to check for files that only exist in the versions (AFAIK, assuming I'm not way off, the variance is between major versions only, e.g. 9, 10, 11, and 2016) instead of adding yet another command line option to specify the version or some such.

It would be nice to get this one in there, so if you get a chance to check it out, that'd be swell. Could quite possibly be that I'm way off, and we just need one tweak to get it squared away. I would love to be wrong about this one. :-)

bdw429s commented 8 years ago

I think this is fixed by this ticket: https://ortussolutions.atlassian.net/browse/COMMANDBOX-475