Hi Guys When I start ACF11, using the following C...
# cfml-general
c
Hi Guys When I start ACF11, using the following CommandBox recipe:
Copy code
cd C:\domains\<http://acf11-0-19_314546.com|acf11-0-19_314546.com>\wwwroot
server set web.http.port=8080
server show web.http.port
server start cfengine=adobe@11
The server never starts I have also tried [which I think is the same thing] but the server never starts:
Copy code
cd C:\domains\<http://acf11-0-19_314546.com|acf11-0-19_314546.com>\wwwroot
server set web.http.port=8080
server show web.http.port
server start cfengine=adobe@11.0.19+314546
I should tell you that I also have a stand-alone version of ACF2018 running on localhost:8500
Here is the log:
Copy code
[INFO ] runwar.server: ******************************************************************************
[INFO ] runwar.server: Starting RunWAR 4.7.14
[INFO ] runwar.server: Binding HTTP on acf11-0-19_314546.local:8080
[INFO ] runwar.server: Enabling HTTP/2
[INFO ] runwar.server: Binding AJP on acf11-0-19_314546.local:8011
[INFO ] runwar.server: Starting background wwwroot2 [adobe 11.0.19+314546] from: /C:/Users/cdesi/.CommandBox/lib/runwar-4.7.14.jar 
[INFO ] runwar.context: Starting in background - 
[INFO ] runwar.server: ******************************************************************************
[INFO ] runwar.server: Starting RunWAR 4.7.14
[INFO ] runwar.server: Binding HTTP on acf11-0-19_314546.local:8080
[INFO ] runwar.server: Enabling HTTP/2
[INFO ] runwar.server: Binding AJP on acf11-0-19_314546.local:8011
[INFO ] runwar.server: Servlet Context: /
[INFO ] runwar.server: Log Directory: C:\Users\cdesi\.CommandBox\server\C0BBB7E2DCDAF404E73EEEC24ED4A01B-wwwroot2\adobe-11.0.19.314546\logs
[INFO ] runwar.server: ******************************************************************************
[INFO ] runwar.config: Parsing 'C:\Users\cdesi\.CommandBox\server\C0BBB7E2DCDAF404E73EEEC24ED4A01B-wwwroot2\adobe-11.0.19.314546\WEB-INF\web.xml'
[INFO ] runwar.server: Creating deployment [default] in C:\domains\<http://acf11-0-19_314546.com|acf11-0-19_314546.com>\wwwroot
[INFO ] runwar.context: 10/11 13:54:16 INFO License Service: Flex 1.5 CF Edition enabled
[INFO ] runwar.context: 10/11 13:54:16 INFO Starting Flex 1.5 CF Edition
[INFO ] runwar.context: 10/11 13:54:17 INFO Macromedia Flex Build: 87315.134646
[ERROR] runwar.context: java.lang.NullPointerException
[ERROR] runwar.context: 	at coldfusion.CfmServlet.init(CfmServlet.java:97)
[ERROR] runwar.context: 	at coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:121)
[ERROR] runwar.context: 	at coldfusion.bootstrap.BootstrapServlet.init(BootstrapServlet.java:59)
[ERROR] runwar.context: 	at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
[ERROR] runwar.context: 	at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:309)
[ERROR] runwar.context: 	at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:145)
[ERROR] runwar.context: 	at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:588)
[ERROR] runwar.context: 	at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:559)
[ERROR] runwar.context: 	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
[ERROR] runwar.context: 	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
[ERROR] runwar.context: 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
[ERROR] runwar.context: 	at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:601)
[ERROR] runwar.context: 	at runwar.Server.createServletDeployment(Server.java:1374)
[ERROR] runwar.context: 	at runwar.Server.startServer(Server.java:530)
[ERROR] runwar.context: 	at runwar.Start.main(Start.java:51)
[ERROR] runwar.context: javax.servlet.ServletException: java.lang.NullPointerException
[ERROR] runwar.context: 	at coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:129)
[ERROR] runwar.context: 	at coldfusion.bootstrap.BootstrapServlet.init(BootstrapServlet.java:59)
[ERROR] runwar.context: 	at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
[ERROR] runwar.context: 	at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:309)
[ERROR] runwar.context: 	at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:145)
[ERROR] runwar.context: 	at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:588)
[ERROR] runwar.context: 	at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:559)
[ERROR] runwar.context: 	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
[ERROR] runwar.context: 	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
[ERROR] runwar.context: 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
[ERROR] runwar.context: 	at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:601)
[ERROR] runwar.context: 	at runwar.Server.createServletDeployment(Server.java:1374)
[ERROR] runwar.context: 	at runwar.Server.startServer(Server.java:530)
[ERROR] runwar.context: 	at runwar.Start.main(Start.java:51)
[ERROR] runwar.context: Caused by: java.lang.NullPointerException
[ERROR] runwar.context: 	at coldfusion.CfmServlet.init(CfmServlet.java:97)
[ERROR] runwar.context: 	at coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:121)
[ERROR] runwar.context: 	... 13 more
[INFO ] runwar.server: ******************************************************************************
[INFO ] runwar.server: *** stopping server 'wwwroot2' (socket 50206)
[INFO ] runwar.server: ******************************************************************************
[ERROR] runwar.context: [INFO ] runwar.server: ******************************************************************************
r
FYI, you would be better off posting CommandBox questions to the #box-products channel, but please don't cross post. Just a guess, but I'm thinking you don't have a supported version of Java for CF11 installed.
πŸ‘ 1
c
I have Java Version 8 Update 202; build 1.8.0_202-b08
But my JRE with CommandBox is:
Copy code
IMPLEMENTOR="Eclipse Adoptium"
IMPLEMENTOR_VERSION="Temurin-11.0.15+10"
JAVA_VERSION="11.0.15"
JAVA_VERSION_DATE="2022-04-19"
LIBC="default"
MODULES="java.base java.compiler java.datatransfer java.xml java.prefs java.desktop java.instrument java.logging java.management java.security.sasl java.naming java.rmi java.management.rmi java.net.http java.scripting java.security.jgss java.transaction.xa java.sql java.sql.rowset java.xml.crypto <http://java.se|java.se> java.smartcardio jdk.accessibility <http://jdk.internal.vm.ci|jdk.internal.vm.ci> jdk.management jdk.unsupported jdk.internal.vm.compiler jdk.aot jdk.internal.jvmstat jdk.attach jdk.charsets jdk.compiler <http://jdk.crypto.ec|jdk.crypto.ec> jdk.crypto.cryptoki jdk.crypto.mscapi jdk.dynalink jdk.internal.ed jdk.editpad jdk.hotspot.agent jdk.httpserver jdk.internal.le jdk.internal.opt jdk.internal.vm.compiler.management jdk.jartool jdk.javadoc jdk.jcmd jdk.management.agent jdk.jconsole jdk.jdeps jdk.jdwp.agent jdk.jdi jdk.jfr jdk.jlink jdk.jshell jdk.jsobject jdk.jstatd jdk.localedata jdk.management.jfr jdk.naming.dns jdk.naming.ldap jdk.naming.rmi <http://jdk.net|jdk.net> jdk.pack jdk.rmic jdk.scripting.nashorn jdk.scripting.nashorn.shell jdk.sctp jdk.security.auth jdk.security.jgss jdk.unsupported.desktop jdk.xml.dom jdk.zipfs"
OS_ARCH="x86_64"
OS_NAME="Windows"
SOURCE=".:git:670e17b14ab0"
BUILD_SOURCE="git:955033f"
BUILD_SOURCE_REPO="<https://github.com/adoptium/temurin-build.git>"
SOURCE_REPO="<https://github.com/adoptium/jdk11u.git>"
FULL_VERSION="11.0.15+10"
SEMANTIC_VERSION="11.0.15+10"
BUILD_INFO="OS: Windows Server 2012 R2 Version: 6.3"
JVM_VARIANT="Hotspot"
JVM_VERSION="11.0.15+10"
IMAGE_TYPE="JRE"
r
You can specify the port, CF engine, and Java version by using a server.json file. An example is below.
{
"app":{
"cfengine":"adobe@11.0.19+314546"
},
"jvm":{
"javaVersion":"openjdk8_jdk",
},
"web":{
"port":"8080"
}
}
That's the JRE for CommandBox, not the CF server you are trying to run.
πŸ‘ 1
c
This is my server.json:
Copy code
{
  "web": {
    "http": {
      "port": "8080"
    },
    "rewrites": {
      "enable": "true"
    },
    "ajp": {
      "enable": "true",
      "port": "8011"
    },
    "host": "acf11-0-19_314546.local"
  },
  "app": {
    "cfengine": "adobe@11.0.19+314546"
  }
}
OK. Then I have Java Version 8 Update 202; build 1.8.0_202-b08
I will try and add your java setting in server.json:
Copy code
"jvm":{
    "javaVersion":"openjdk8_jdk",
},
It works now. Thanks very much for your help! πŸ™
πŸ‘ 1
However, I now get a CFML issue: http://acf11-0-19_314546.local:8080/
Copy code
The web site you are accessing has experienced an unexpected error.
Please contact the website administrator. 

The following information is meant for the website developer for debugging purposes.

Error Occurred While Processing Request

Parameter validation error for the STRUCTNEW function.

The function takes 0 parameters.

Resources:
Enable Robust Exception Information to provide greater detail about the source of errors. In the Administrator, click Debugging & Logging > Debug Output Settings, and select the Robust Exception Information option.
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.

Browser

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0

Remote Address

127.0.0.1

Referrer
But, I think this maybe an issue with ColdBox:
C:\domains\<http://acf11-0-19_314546.com|acf11-0-19_314546.com>\wwwroot\coldbox\box.json
Copy code
{
  "name": "ColdBox Platform",
  "version": "6.2.2+1396",
  "location": "<https://downloads.ortussolutions.com/ortussolutions/coldbox/6.2.2/coldbox-6.2.2.zip>",
  "author": "Ortus Solutions <info@ortussolutions.com>",
  "slug": "coldbox",
  "packageDirectory": "coldbox",
  "type": "mvc",
  "keywords": "mvc,hmvc,conventions,coldbox",
  "homepage": "<https://www.coldbox.org>",
  "documentation": "<https://coldbox.ortusbooks.com/>",
  "repository": {
    "type": "git",
    "url": "<https://github.com/coldbox/coldbox-platform>"
  },
  "bugs": "<https://ortussolutions.atlassian.net/browse/COLDBOX>",
  "shortDescription": "A conventions based HMVC development framework",
  "license": [
    {
      "type": "Apache2",
      "url": "<http://www.apache.org/licenses/LICENSE-2.0.html>"
    }
  ],
  "contributors": [
    "Brad Wood <bdw429s@gmail.com>",
    "Curt Gratz <gratz@computerknowhow.com>"
  ],
  "ignore": [
    "**/.*",
    "tests",
    "apidocs",
    "testbox"
  ],
  "testbox": {
    "runner": [
      {
        "default": "<http://localhost:8599/tests/runner.cfm>"
      }
    ]
  },
  "devDependencies": {
    "testbox": "^4.1.0",
    "commandbox-dotenv": "*",
    "commandbox-cfconfig": "*",
    "commandbox-cfformat": "*",
    "commandbox-docbox": "*"
  },
  "installPaths": {
    "testbox": "testbox/"
  },
  "scripts": {
    "format": "cfformat run system/**/*.cfc,tests/specs/**/*.cfc --overwrite",
    "format:watch": "cfformat watch system/**/*.cfc,tests/specs/**/*.cfc ./.cfformat.json",
    "format:check": "cfformat check system/**/*.cfc,tests/specs/**/*.cfc",
    "start:lucee": "server start serverConfigFile='server-lucee@5.json' --force",
    "start:2016": "server start serverConfigFile='server-adobe@2016.json' --force",
    "start:2018": "server start serverConfigFile='server-adobe@2018.json' --force",
    "log:lucee": "server log coldbox-lucee@5 --follow",
    "log:2016": "server log coldbox-adobe@2016 --follow",
    "log:2018": "server log coldbox-adobe@2018 --follow"
  }
}
Perhaps this version of Coldbox is not compatible with ACF11?
And it is weird that the error is on:
Copy code
127.0.0.1
When I have added this website to:
Copy code
127.0.0.3
Via IIS + Boncode:
C:\domains\<http://acf11-0-19_314546.com|acf11-0-19_314546.com>\wwwroot\BIN
Copy code
<Settings>
<Server>127.0.0.3</Server>
<Port>8011</Port>
<EnableRemoteAdmin>False</EnableRemoteAdmin>
<EnableHeaderDataSupport>False</EnableHeaderDataSupport>
<ForceSecureSession>False</ForceSecureSession>
<AllowEmptyHeaders>False</AllowEmptyHeaders>
<ResolveRemoteAddrFrom>HTTP_X_FORWARDED_FOR</ResolveRemoteAddrFrom>
</Settings>
r
The StructNerw error is a CF syntax error you'll need to resolve. Exception handling settings can be done through the CF Admin. FYI, these are new issues so they should be a new thread as well.
πŸ‘ 1
c
OK. Thanks
r
I don't use ColdBox so I'm not much help here.
c
No worries. You have been a great help already...πŸ™
Any time a server won't start, just run
Copy code
start --debug --console
and you'll see any errors which may have otherwise been missed since a normal start is async
πŸ‘ 1
c
Thank you for this tip. Very useful for the future...πŸ™
b
Plus, that command above will show you the version of java being used to start the server, which may or may not be the same version of Java running the CLi an may or may not be the default version of Java in your OS's PATH.
πŸ‘ 1
Or, more explicitly, the
Copy code
server info property=javaHome
command will tell you what java binary was used on the last start
But as you fond, CF11 requires Java 8 and that NPE is the error you'll get if you try it on java 11
As far as ColdBox, we dropped support for CF11 years ago just like Adobe πŸ™‚
πŸ‘ 1
ColdBox 5 was the last version which supported CF11
We dropped it in ColdBox 6, which released in 2020
πŸ‘ 1
c
Yes. I realised this when it said that
StructNew()
has zero params! 😲
πŸ‘ 1
b
Regarding your first message about the recipe-- it's not necessary to set the port every time you start the server. The
server set foo=bar
command stores itself in the
server.json
which persists on disk across restarts. So on subsequent starts, you just need to run
Copy code
server start
and it will "remember" everything you've set before.
πŸ‘ 1
c
I don’t suppose I can download a pre 6 version of ColdBox? I am building a POC for a CommandBox based migration between ACF11 and Lucee 5 I just need to show it working?
b
Yes, it can be done, but it's very dangerous and few have ever returned when trying
Copy code
install coldbox@5
wait nevermind, it's easy πŸ˜‰
c
OK. Thanks πŸ˜…
b
CommandBox's package management works the same as npm and other tools
πŸ™Œ 1
So if you look at ColdBox, you can see all the versions it has here
When you install a package from forgebox, it's in the format of
Copy code
slug@<semantic version range>
Where the range could be an exact number or a range of numbers where the latest one is used
So,
coldbox@5
is the same as
coldbox@5.x.x
which will match the highest version starting with 5 but less than 6
c
When I try to start Coldbox5:
Copy code
CommandBox> recipe acf11-0-19_314546-CB5.boxr
cd C:\domains\<http://acf11-0-19_314546-CB5.com|acf11-0-19_314546-CB5.com>\wwwroot
C:\domains\<http://acf11-0-19_314546-CB5.com|acf11-0-19_314546-CB5.com>\wwwroot\
server set web.http.port=8080
Set web.http.port = 8080
server show web.http.port
8080
server start cfengine=adobe@11.0.19+314546
Error executing command [server start cfengine=adobe@11.0.19+314546], exiting recipe.
   |------------------------------
 Γ— | Starting Server
   |------------------------------


ERROR (5.6.1+00618)

The [.env] file is missing keys from the .env.example. You can populate your .env with the new settings using `dotenv populate --new`

Missing keys: [ DB_DATABASE, APPNAME, ENVIRONMENT, JWT_SECRET, DB_HOST, DB_USER, DB_PASSWORD, DB_PORT, S3_ACCESS_KEY, S3_DOMAIN, S3_REGION, DB_CONNECTIONSTRING, S3_SECRET_KEY, DB_DRIVER, DB_CLASS ]
It seems like there is some Docker stuff in this installation of Coldbox5?
message has been deleted
Oh hell. It looks like after I did:
Copy code
cd C:\domains\<http://acf11-0-19_314546-CB5.com|acf11-0-19_314546-CB5.com>\wwwroot
install coldbox@5
coldbox create app acf11019314546CB5
Although I downloaded Coldbox5, it actually created a Coldbox6 app?
Do you know the command to create a Coldbox5 app?
Maybe it is:
Copy code
coldbox create app acf11019314546CB5 version 5
r
I'd ask in the #box-products channel and you can always try the CoomandBox
help
command in CommandBox, such as
help coldbox create app
.
c
Yes. I understand, but I am in the middle of a conversation with Brad about Coldbox5, so I am not sure this warrants a new question?
r
πŸ‘ 1
c
After I do:
Copy code
install coldbox@5
I get [see screenshot]
But then when I do:
Copy code
coldbox create app acf11019314546CB5
It seems to create a
Coldbox6
app with Docker files etc? Maybe, this is a bug?
I then get:
b
Not a bug, the latest version of our app templates come with the latest version of ColdBox πŸ™‚
If you specifically want an app template that's older, you specify the version in the same manner, but using the full forgebox package name for it
Copy code
coldbox create app skeleton=cbtemplate-advanced-script@<version>
πŸ™Œ 1
The default
skeleton
for the
coldbox create app
command is
advancedScript
which is just a shortcut for the packge above
c
Thanks for this Brad. Much appreciated πŸ™
b
We now try to make the version numbers of our skeleton apps match the major number of the coldbox versions they go with, but we didn't start that until ColdBox 6.x
If you do version
1.31
of the advanced script template, it will probably be coldbox 5
So, something like
Copy code
coldbox create app skeleton=cbtemplate-advanced-script@1.31
c
I didn’t realise there was @<version> extension on the skeleton property. πŸ‘πŸ»
b
Well, the skeleton name is just an installation ID so it can literally be anything that's also valid to pass to the
install
command
You can install an app skeleton from β€’ forgebox β€’ a git repo β€’ local file β€’ local folder β€’ HTTP URL β€’ etc https://commandbox.ortusbooks.com/package-management/code-endpoints
So it follows the same format as
install slug@<version>
if you're wanting to pull from forgebox
many people don't realize this since they only ever use the default
There are many places in CommandBox which basically install something for you and they all follow the same format!
Because behind the scenes, we just run
Copy code
install <whatever you passed for the skeleton here>
c
So I would do something like:
Copy code
coldbox create app skeleton=cbtemplate-advanced-script@5
Does the version number equal the Coldbox version number?
Copy code
<major.minor.patch>
Or
Copy code
<major> = latest
b
I answered that above
I gave you the exact command to run so you could just copy and paste it
🫣 1
☺️ 1
c
Sorry. I didn’t see a whole load of your messages
I only saw the messages up to the 16 minute mark. Clearly Slack didn’t push stuff normally.
πŸ‘ 1
Yes. You must have thought I was a lunatic πŸ˜‚