-
Jun 6th, 2006, 07:40 AM
#1
Errors in Geronimo but not WAS
Now that Spring is certificed to work on WAS CE (aka Geronimo more or less) and WAS, is there any information anywhere that highlights what you have to do differrently between these two servers when deploying EARs with Spring jars and user code inside ? As an example I am posting an error I get when trying to start an app deployed to IBM WebSphere Application Server Community Edition V1.0.1.2. My guess is that this is a Geronimo problem not a Spring one, but as part of the certification process I was wondering if anyone came across this in Geronimo and knew of a workaround.
For instance I have a org.springframework.web.context.ContextLoaderListe ner that is defined thus:
<context-param>
<param-name>locatorFactorySelector</param-name>
<param-value>
net/targetgroup/tprweb/spring/beanRefContext.xml
</param-value>
</context-param>
<context-param>
<param-name>parentContextKey</param-name>
<param-value>servicelayer-context</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListe ner
</listener-class>
</listener>
This works fine in WAS and loads up my context files from here:
<bean id="servicelayer-context"
class="org.springframework.context.support.ClassPa thXmlApplicationContext">
<constructor-arg>
<list>
<value>net/targetgroup/sv2/model/spring/*Context.xml</value>
</list>
</constructor-arg>
</bean>
All the context files are within a "dependant jar file" that is on the web apps manifest classpath.
However in Geronimo I get this when the app starts to load:
13:33:44,855 ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.access.Bootstrap Exception: Unable to initialize group definition. Group resource name [classpath*:net/targetgroup/tprweb/spring/beanRefContext.xml], factory key [servicelayer-context]; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'servicelayer-context' defined in URL [file:/C:/Program%20Files/IBM/WebSphere/AppServerCommunityEdition1.1/config-store/26/TPRWeb.war/WEB-INF/classes/net/targetgroup/tprweb/spring/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlAp plicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanDefinitionSt oreException: Could not resolve bean definition resource pattern [net/targetgroup/sv2/model/spring/*Context.xml]; nested exception is java.io.FileNotFoundException: class path resource [net/targetgroup/sv2/model/spring/] cannot be resolved to URL because it does not exist
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'servicelayer-context' defined in URL [file:/C:/Program%20Files/IBM/WebSphere/AppServerCommunityEdition1.1/config-store/26/TPRWeb.war/WEB-INF/classes/net/targetgroup/tprweb/spring/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlAp plicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanDefinitionSt oreException: Could not resolve bean definition resource pattern [net/targetgroup/sv2/model/spring/*Context.xml]; nested exception is java.io.FileNotFoundException: class path resource [net/targetgroup/sv2/model/spring/] cannot be resolved to URL because it does not exist
org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlAp plicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanDefinitionSt oreException: Could not resolve bean definition resource pattern [net/targetgroup/sv2/model/spring/*Context.xml]; nested exception is java.io.FileNotFoundException: class path resource [net/targetgroup/sv2/model/spring/] cannot be resolved to URL because it does not exist
org.springframework.beans.factory.BeanDefinitionSt oreException: Could not resolve bean definition resource pattern [net/targetgroup/sv2/model/spring/*Context.xml]; nested exception is java.io.FileNotFoundException: class path resource [net/targetgroup/sv2/model/spring/] cannot be resolved to URL because it does not exist
java.io.FileNotFoundException: class path resource [net/targetgroup/sv2/model/spring/] cannot be resolved to URL because it does not exist
at org.springframework.core.io.ClassPathResource.getU RL(ClassPathResource.java:157)
at org.springframework.core.io.support.PathMatchingRe sourcePatternResolver.isJarResource(PathMatchingRe sourcePatternResolver.java:312)
at org.springframework.core.io.support.PathMatchingRe sourcePatternResolver.findPathMatchingResources(Pa thMatchingResourcePatternResolver.java:264)
at org.springframework.core.io.support.PathMatchingRe sourcePatternResolver.getResources(PathMatchingRes ourcePatternResolver.java:215)
at org.springframework.context.support.AbstractApplic ationContext.getResources(AbstractApplicationConte xt.java:667)
at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:144)
at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:113)
at org.springframework.context.support.Abst
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules