[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: cannot load classes located in WEB-INF/lib
jbosshog98
do-not-reply at jboss.com
Thu Jun 11 06:24:48 EDT 2009
I should add that I tried the code below with my JARs in WEB-INF/lib
and am receiving the error below. With the JARs in the EAR file I
don't have to do the updateJar, I can just use the code as is without
the two tags and it works. I'm not sure if this is a
dependency thing or what, I'm a little baffled. I just need to get
ahold of the Spring application context from within Railo, which I can
do with the JAR in the EAR/lib but not this way.
<cfadmin action="updateJar"
| type="web"
| password="testtest"
| jar="/work/jboss/jboss-4.2.3.GA/server/default/deploy/
| railo.ear/railo1.war/WEB-INF/lib/spring.jar">
|
| <cfset var utils = createObject("java",
| "org.springframework.web.context.support.WebApplicationContextUtils",
| "/work/jboss/jboss-4.2.3.GA/server/default/deploy/railo.ear/railo1.war/
| WEB-INF/lib/spring.jar") />
|
| <cfset var context = getPageContext().getServletContext() />
|
| <cfset variables.applicationContext = utils.getWebApplicationContext
| (context)>
|
| <cfadmin action="removeJar"
| type="web"
| password="testtest"
| jar="/work/jboss/jboss-4.2.3.GA/server/default/deploy/
| railo.ear/railo1.war/WEB-INF/lib/spring-web-2.0.4.jar">
When I do this I get the following error:
Root context attribute is not of type WebApplicationContext:
org.springframework.web.context.support.XmlWebApplicationContext at 1ff48d8:
display name [Root WebApplicationContext]; startup date [Thu Jun 11
03:06:42 PDT 2009]; root of context hierarchy
at
org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext
(WebApplicationContextUtils.java:66):66
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):-2
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source):-1
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source):-1
at java.lang.reflect.Method.invoke(Unknown Source):-1
at railo.runtime.reflection.pairs.MethodInstance.invoke
(MethodInstance.java:37):37
at railo.runtime.java.JavaObject.call(JavaObject.java:241):241
at railo.runtime.java.JavaObject.call(JavaObject.java:260):260
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues
(VariableUtilImpl.java:617):617
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236957#4236957
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236957
More information about the jboss-user
mailing list