Hyrule Validation Framework

21 views
Skip to first unread message

Hatem Jaber

unread,
Feb 22, 2012, 11:31:19 AM2/22/12
to Railo
I was wondering if anyone here is using Hyrule Validation Framework on
Railo 3.3... I setup the framework and have not been able to get it to
work properly out of the box. I'm getting messages saying "invalid
component definition, can't find ValidationFactory", here's the full
stack trace:

invalid component definition, can't find ValidatorFactory
at
railo.runtime.component.ComponentLoader.load(ComponentLoader.java:269):
269
at
railo.runtime.component.ComponentLoader.loadComponent(ComponentLoader.java:
35):35
at railo.runtime.PageContextImpl.loadComponent(PageContextImpl.java:
2694):2694
at
railo.runtime.functions.other.CreateObject.doComponent(CreateObject.java:
135):135
at
railo.runtime.functions.other._CreateComponent.call(_CreateComponent.java:
22):22
at system.core.hyrule_cfc$cf.udfCall(C:\wwwroot\www\hyrule\system
\core\Hyrule.cfc:28):28
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215):215
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434):434
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384):384
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615):615
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502):502
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815):1815
at
railo.runtime.functions.other._CreateComponent.call(_CreateComponent.java:
33):33
at hyrule.samples.application_cfc$cf.udfCall(C:\wwwroot\www\hyrule
\samples\Application.cfc:23):23
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215):215
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434):434
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384):384
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:
738):738
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:
1443):1443
at hyrule.samples.application_cfc$cf.udfCall(C:\wwwroot\www\hyrule
\samples\Application.cfc:29):29
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215):215
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434):434
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384):384
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615):615
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502):502
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815):1815
at
railo.runtime.listener.ModernAppListener.call(ModernAppListener.java:
348):348
at
railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:
106):106
at
railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:
23):23
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1998):
1998
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1965):
1965
at
railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:
297):297
at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):
32
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717):
717
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290):290
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206):206
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
233):233
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
191):191
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127):127
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102):102
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109):109
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
298):298
at
org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:
427):427
at org.apache.coyote.ajp.AjpAprProtocol
$AjpConnectionHandler.process(AjpAprProtocol.java:384):384
at org.apache.tomcat.util.net.AprEndpoint
$Worker.run(AprEndpoint.java:1555):1555
at java.lang.Thread.run(Thread.java:722):722

Any help would be greatly appreciated.

Hatem Jaber

unread,
Feb 22, 2012, 12:07:13 PM2/22/12
to Railo
I seem to have fixed the issue by moving the import hyrule.system....
from outside the component tag to the inside of the tag like so:

BEFORE:

import hyrule.system.core.result.ValidationResult;
import hyrule.system.core.validator.ValidatorFactory;
import hyrule.system.core.i18n.i18n;
import hyrule.system.core.Settings;

component accessors="true" {
// CODE....
}


AFTER:

component accessors="true" {
import hyrule.system.core.result.ValidationResult;
import hyrule.system.core.validator.ValidatorFactory;
import hyrule.system.core.i18n.i18n;
import hyrule.system.core.Settings;
// CODE....
}

I'm curious why this works different from ACF and whether or not there
is a setting that i may have overlooked to get this behavior. The only
reason i ask is because of other projects out there other than Hyrule
that may be using the same syntax.

any suggestions are greatly appreciated.

thanks,

Hatem

Andrea Campolonghi

unread,
Feb 22, 2012, 12:12:06 PM2/22/12
to ra...@googlegroups.com

> import hyrule.system.core.result.ValidationResult;
> import hyrule.system.core.validator.ValidatorFactory;
> import hyrule.system.core.i18n.i18n;
> import hyrule.system.core.Settings;
>
> component accessors="true" {
> // CODE....
> }

Just my 2 cents.
This possibly working on acf but is horrible and make no sense at all.
Where are you supposed to import things here?

Andrea

Andrea Campolonghi
and...@getrailo.org

Mark Drew

unread,
Feb 22, 2012, 12:22:46 PM2/22/12
to ra...@googlegroups.com
That looks like a bug, the first item for a component SHOULD be component not import. 

Then again, that is how ti works in java but it makes no sense in CFML ?

Any docs related to this?

MD 

Hatem Jaber

unread,
Feb 22, 2012, 6:50:26 PM2/22/12
to Railo
I searched all over for information regarding this type of thing, it's
not just this project that does it this way, cfcommons.org for
example, they do the same thing. when i moved the imports inside the
component, it worked fine on Railo and ACF. I had a friend of mine
test it on ACF9 for me to make sure it works that way as well. Anyhow,
this is the code that's out there that people are writing,
unfortunately it's not cross platform.
Reply all
Reply to author
Forward
0 new messages