Missing dependency error with wirebox injection

As a followup, I know for a fact similar errors occur in Lucee when trying to run getComponentMetadata() on cfc’s stored in a directory with a period in the name. Hence… I’d look into the spaces. :slight_smile:

1 Like

Yup, the directory has spaces in it. I’ve been developing in this directory for 6 months though, and it hasn’t produced any errors until this week though :sweat_smile: Maybe there was an update and now that’s an issue though?

Check the casing on what, exactly? The injection?

Also, thanks. I will try to run this in a server not contained a directory with a weird name haha.

Just changed the directory the server was located in to the following:

C:\Users\jsteve\Documents\localDevelopment\DeliveryObservationGadget

Looks like we’re getting the same error :frowning:

Yes, exactly. Ensure your inject="blaBla@dog" in your code matches the casing of the filename and directory on disk. Not trying to patronize you, I’m just saying wrong casing has bitten me more times than I care to count.

1 Like

Do you make sure to reinit coldbox each time you change a DSL or try a setup?

1 Like

Okay, I made sure the name of the injected component is exactly the same as the file name as I copied and pasted the name of the file.

I restart my server each time I try a setup, as reiniting coldbox just usually throws a big error message in my terminal that’s hard to read :sweat_smile:

Alright, well if you’re still experiencing this error I have no idea what’s going on or what could be causing it. Perhaps there’s a regression in ColdBox? You haven’t mentioned what ColdBox version you are using, but you could try rolling back a few minor versions and see if the problem persists.

Apologies, Jeff - I’m sorta stumped on this one and without being at the keyboard myself I don’t have too much more to suggest for debugging.

1 Like

Hey Michael, no worries. Thanks for your time, man! I will roll back a couple versions of the module to see exactly what went wrong and when.

I am using Coldbox 6.5.2+37.

I will continue to try to track this down!

1 Like

I finally got a chance to test this. That big error in the console you mentioned before, you should have read it because it has the “real” error in it. Your CFC has some sort of syntax error that’s causing Lucee to puke when we read the metadata.

Original Error: class lucee.transformer.bytecode.statement.ExpressionAsStatement cannot be cast to class lucee.transformer.bytecode.statement.tag.TagComponent 

If you change from an injection to getInstance() in the handler, you’ll get the original error right there.

getInstance( dsl="addressValidationClient@cbAddy" )

That Lucee error seems like a bug in Lucee itself, either way it’s preventing ColdBox from mapping the module. Due to the error being real vague, you’ll probably need to take all the code out of the CFC and add it back in one method at a time until Lucee can compile it to find the issue.

2 Likes

Looks to be this line of code on line 948 of addressValidationClient.cfc

else if()

Please put in a bug for Lucee for not having a better error message there.

1 Like

That’s the ticket! Thanks so much!! Everything is fine now after I changed this line. I had been reading the error message the came up at the start of the server (in the yellow-orange window) every time instead of reading the error that you mentioned. I will submit a bug to Lucee right away. Thanks again, Brad.

If you ever need to validate addresses, you can say you had a hand in getting this project working :slight_smile:

2 Likes