Disclaimer: I am not in any way an expert on Jetty. OpenBD is my first
experience with it so I am learning along the way.

Ok, with that out of the way, I've researched this for several hours now.
Loading a default Ready to Run version of OpenBD/Jetty and installing the
service, I began to watch the jetty-service.log to see what was going on
which was:

STATUS | wrapper  | 2008/12/18 08:28:56 | --> Wrapper Started as Service

STATUS | wrapper  | 2008/12/18 08:28:56 | Launching a JVM...

INFO   | jvm 1    | 2008/12/18 08:28:56 | Wrapper (Version 3.2.3)
http://wrapper.tanukisoftware.org

INFO   | jvm 1    | 2008/12/18 08:28:56 |   Copyright 1999-2006 Tanuki
Software, Inc.  All Rights Reserved.

INFO   | jvm 1    | 2008/12/18 08:28:56 |

INFO   | jvm 1    | 2008/12/18 08:28:56 | ARG[0] =
../etc/jetty-win32-service.xml

INFO   | jvm 1    | 2008/12/18 08:28:56 | ARG[1] = ../etc/jetty.xml

INFO   | jvm 1    | 2008/12/18 08:28:57 | 2008-12-18 08:28:57.158::INFO:
Logging to STDERR via org.mortbay.log.StdErrLog

INFO   | jvm 1    | 2008/12/18 08:28:58 | 2008-12-18 08:28:58.448::INFO:
jetty-6.1.12rc1

INFO   | wrapper  | 2008/12/18 08:29:01 | Waiting to start...

INFO   | jvm 1    | 2008/12/18 08:29:01 | Open BlueDragon: Error
java.io.FileNotFoundException: .\etc\openbd\bluedragon.xml (The system
cannot find the path specified) loading:
BLUEDRAGON_XML=./etc/openbd/bluedragon.xml

INFO   | jvm 1    | 2008/12/18 08:29:01 | 2008-12-18 08:29:01.907:/:WARN:
unavailable

INFO   | jvm 1    | 2008/12/18 08:29:02 | Open BlueDragon: Error
java.io.FileNotFoundException: .\etc\openbd\bluedragon.xml (The system
cannot find the path specified) loading:
BLUEDRAGON_XML=./etc/openbd/bluedragon.xml


Notice the file not found errors above.


After reading A LOT  about Jetty and its configuration files it seems the
leading "." which should enumerate to Jetty's working directory does not do
so on Windows (or at least I can't get it to using it like that).


I tried setting an environment variable for JETTY_HOME like so "set
JETTY_HOME=C:/jetty" and then using %JETTY_HOME% in place of the "." but I
believe its a Java enumeration rather than a Windows one.


So, that said, basically what I did was hard code the paths for the
following servlet in "/etc/webdefault.xml":


<servlet>

<servlet-name>cfmServlet</servlet-name>

<servlet-class>com.naryx.tagfusion.cfm.cfServlet</servlet-class>

<init-param>

<param-name>BLUEDRAGON_WORKING_DIRECTORY</param-name>

<param-value>C:/jetty/logs/openbd</param-value>

</init-param>

<init-param>

<param-name>BLUEDRAGON_XML</param-name>

<param-value>C:/jetty/etc/openbd/bluedragon.xml</param-value>

</init-param>

<load-on-startup>0</load-on-startup>

  </servlet>


Be aware that "C:/jetty" is my Jetty home so substitute yours in place of
that.


The other change I made was in "/etc/openbd/bluedragon.xml" substituting the
"." for the {JETTY_HOME} like so:


<cfmlcustomtags>

    <mapping name="cf">

      <directory>C:/jetty/webroot_cfmlapps/customtags</directory>

      <name>cf</name>

    </mapping>

  </cfmlcustomtags>

  <system>

    <assert>false</assert>

    <runtimelogging>true</runtimelogging>

    <debug>true</debug>

    <component-cfc>C:/jetty/etc/openbd/component.cfc</component-cfc>

    <whitespacecomp>false</whitespacecomp>

    <nativelibdir>C:/jetty/etc/openbd/bin</nativelibdir>

    <plugin>com.bluedragon.extra.ExtraPackPlugIn</plugin>

    <missingtemplatehandler></missingtemplatehandler>

    <lastfile>C:\jetty\etc\openbd\bluedragon.xml.bak.1</lastfile>

    <errorhandler></errorhandler>

    <password>admin</password>

    <buffersize>0</buffersize>

    <deniedips></deniedips>

    <allowedips></allowedips>

    <defaultcharset>utf-8</defaultcharset>

    <lastupdated>18/Dec/2008 09:31.55</lastupdated>

  </system>

</server>

I did not alter the default "/etc/jetty.xml" file.

Once you get everything set your jetty-service.log should contain something
like this when everything fires up correctly:

STATUS | wrapper  | 2008/12/18 09:31:09 | Starting the Jetty6-Service
service...

STATUS | wrapper  | 2008/12/18 09:31:09 | --> Wrapper Started as Service

STATUS | wrapper  | 2008/12/18 09:31:09 | Launching a JVM...

INFO   | jvm 1    | 2008/12/18 09:31:10 | Wrapper (Version 3.2.3)
http://wrapper.tanukisoftware.org

INFO   | jvm 1    | 2008/12/18 09:31:10 |   Copyright 1999-2006 Tanuki
Software, Inc.  All Rights Reserved.

INFO   | jvm 1    | 2008/12/18 09:31:10 |

INFO   | jvm 1    | 2008/12/18 09:31:10 | ARG[0] =
../etc/jetty-win32-service.xml

INFO   | jvm 1    | 2008/12/18 09:31:10 | ARG[1] = ../etc/jetty.xml

INFO   | jvm 1    | 2008/12/18 09:31:10 | 2008-12-18 09:31:10.328::INFO:
Logging to STDERR via org.mortbay.log.StdErrLog

INFO   | jvm 1    | 2008/12/18 09:31:10 | 2008-12-18 09:31:10.579::INFO:
jetty-6.1.12rc1

INFO   | wrapper  | 2008/12/18 09:31:14 | Waiting to start...

INFO   | jvm 1    | 2008/12/18 09:31:14 | 2008-12-18 09:31:14.489::INFO:
Opened C:\jetty\logs\2008_12_18.request.log

INFO   | jvm 1    | 2008/12/18 09:31:14 | 2008-12-18 09:31:14.519::INFO:
Started [email protected]:8080

STATUS | wrapper  | 2008/12/18 09:31:16 | Jetty6-Service started.

Rob, I didn't have any cfx tags to test so please let me know if they work
once the service starts up cleanly. I'm very curious to know. :)

Sorry for the lengthy explanation, but I wanted to explain everything I did
clearly. The real trick going forward is trying to find a variable for
{JETTY_HOME} that will enumerate correctly so it does not have to be hard
coded (That way maybe a "Windows" version of the XML files could be added to
a separate package). I'm sure someone will find it or maybe someone knows
something to do in Windows that doesn't require altering the XML files at
all. I just need to move on to some other projects for a bit or I would
continue working on it, but I'll definitely keep searching if no one else
comes up with it.

Anyway, I hope this helps someone out along the way.

On Thu, Dec 18, 2008 at 2:31 AM, Rob <[email protected]> wrote:

>
> More testing results, may be significant - the error messages received
> when running as a service?
>
> Run as Service
>         <init-param>
>                <param-name>BLUEDRAGON_XML</param-name>
>                 <param-value>../etc/openbd/bluedragon.xml</param-value>
>        </init-param>
>
> Error messages are different...
>        UnsatisfiedLinkError invoking CFXNativeLib method
> when using absolute path: <module>E:/Explorers_Log/webroot_cfmlapps/
> customtags/cfx_openimage.dll</module>
>
>         Native library does not exist: ./webroot_cfmlapps/customtags/
> cfx_openimage.dll
> when using relative path: <module>./webroot_cfmlapps/customtags/
> cfx_openimage.dll</module>
>
>
> Then, stopping the service, and starting openBD/Jetty with start.jar,
> the CFX tag worked.  Maybe related, I had to change webdefault.xml to
>         <init-param>
>                <param-name>BLUEDRAGON_XML</param-name>
>                 <param-value>./etc/openbd/bluedragon.xml</param-value>
>        </init-param>
>
>        Note changing the relative path map from ../etc (service) to ./etc
> (start.jar).
>
> I have now tried this on two different XP Pro SP3 machines and one
> Vista Home Premium, all with the same results - (repeatable).
>
> Thanks,
>
> Rob
> >
>


-- 
Anthony Hixon, Jr.
Certified Advanced ColdFusion MX 7 Developer
Mobile: (706) 639-3617
[email protected]

--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
 http://groups.google.com/group/openbd?hl=en
 official blog @ http://blog.openbluedragon.org/
!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---

Reply via email to