[Beginners Corner] - Jboss Seam Spring tutorial example problem
by louberl
While going through the Jboss Seam examples as a tutorial/learning exercise, I encountered a problem with only the Seam-Spring tutorial example.
The Seam-Spring example generates a java.lang.NullPointerException error.
...
| 2007-05-29 16:56:43,461 DEBUG [org.springframework.beans.factory.xml.DefaultDocumentLoader] Using JAXP provider [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl]
| 2007-05-29 16:56:43,462 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1a328aa, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@14093f{ url=null ,addedOrder=0}
| 2007-05-29 16:56:43,464 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] Found XML schema [http://www.springframework.org/schema/beans/spring-beans-2.0.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-2.0.xsd
| 2007-05-29 16:56:43,473 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] Found XML schema [http://www.springframework.org/schema/tool/spring-tool-2.0.xsd] in classpath: org/springframework/beans/factory/xml/spring-tool-2.0.xsd
| 2007-05-29 16:56:43,477 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1a328aa, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@908fa9{ url=null ,addedOrder=0}
| 2007-05-29 16:56:43,483 DEBUG [org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver] Loaded mappings [{http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting...., http://www.springframework.org/schema/jee=org.springframework.ejb.config...., http://www.springframework.org/schema/aop=org.springframework.aop.config...., http://www.springframework.org/schema/util=org.springframework.beans.fact..., http://www.springframework.org/schema/tx=org.springframework.transaction....]
| 2007-05-29 16:56:43,492 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1a328aa, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@8270d7{ url=null ,addedOrder=0}
| 2007-05-29 16:56:43,501 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1a328aa, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1be5978{ url=null ,addedOrder=0}
| 2007-05-29 16:56:43,503 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1a328aa, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1e3f2e5{ url=null ,addedOrder=0}
| 2007-05-29 16:56:43,512 DEBUG [org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader] Loading bean definitions
| 2007-05-29 16:56:43,512 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1a328aa, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@5fd9fb{ url=null ,addedOrder=0}
| 2007-05-29 16:56:43,523 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1a328aa, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@e015ef{ url=null ,addedOrder=0}
| 2007-05-29 16:56:43,523 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1a328aa, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1c03ae1{ url=null ,addedOrder=0}
| 2007-05-29 16:56:43,533 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1a328aa, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@159c41f{ url=null ,addedOrder=0}
| 2007-05-29 16:56:43,534 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1a328aa, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@5ad0f0{ url=null ,addedOrder=0}
| 2007-05-29 16:56:43,534 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/seam-spring]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
| org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.NullPointerException
| Caused by:
| java.lang.NullPointerException
| at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.decorateIfRequired(BeanDefinitionParserDelegate.java:1142)
| at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.decorateBeanDefinitionIfRequired(BeanDefinitionParserDelegate.java:1132)
| at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.processBeanDefinition(DefaultBeanDefinitionDocumentReader.java:237)
| at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:151)
| at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:130)
| at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
| at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)
| at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)
| at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
| at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)
| at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
| at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
| at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
| at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
| at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:100)
| at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:298)
| at org.jboss.seam.ioc.spring.ContextLoader.startupContextLoader(ContextLoader.java:59)
| at org.jboss.seam.ioc.spring.ContextLoader.create(ContextLoader.java:43)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1834)
| at org.jboss.seam.Component.callCreateMethod(Component.java:1757)
| at org.jboss.seam.Component.newInstance(Component.java:1746)
| at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:175)
| at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:145)
| at org.jboss.seam.init.Initialization.init(Initialization.java:504)
| at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5052)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
| at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
| at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
| at org.jboss.web.WebModule.startModule(WebModule.java:83)
| at org.jboss.web.WebModule.startService(WebModule.java:61)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy42.start(Unknown Source)
| at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy43.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| ...
|
Based on what I have read in the Jboss forums, I think I have a ClassLoader problem. But I do not know why? (as this is a stock tutorial example)
The following software versions are installed on my computer.
Jboss AS=4.0.5-r2
Spring =2.0.3
Jboss Seam=1.2.1 GA
While disecting the problem, I reduced the Spring configuration file applicationContext.xml to the bare minimum while preserving the same generated error. (All other files in the tutorial are untouched)
<?xml version="1.0" encoding="UTF-8"?>
| <beans xmlns="http://www.springframework.org/schema/beans"
| xmlns:aop="http://www.springframework.org/schema/aop"
| xmlns:util="http://www.springframework.org/schema/util"
| xmlns:seam="http://jboss.com/products/seam/spring-seam"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xmlns:tx="http://www.springframework.org/schema/tx"
| xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
| http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
| http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
| http://jboss.com/products/seam/spring-seam http://jboss.com/products/seam/spring-seam-1.2.xsd
| http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
| default-lazy-init="true">
|
| <bean id="userService" class="org.jboss.seam.example.spring.UserService">
| <property name="entityManager" ref="em"/>
| <seam:component />
| </bean>
|
| <seam:instance name="entityManager" id="em" proxy="true"/>
| </beans>
|
What can I do to make Spring register, the userService bean as a component with Seam/SeamListener ?
Any ideas anyone?
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049411#4049411
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049411
18 years, 10 months
[JBoss Seam] - using pages.xml to manage conversation
by richajon
Hi
I am trying to use only pages.xml to manage my conversation creation and end.
I want to go from a page called pharmacyList.xhtml > pharmacyEdit.xhtml using a method on my controller (action) class.
If I put something like this:
| <s:link value="Add New Pharmacy" action="#{pharmacyEditController.newPharmacy}" style=" color: #000000;" propagation="end"></s:link>
|
it works fine if I use the propagation="end" attritube. (I have a @Begin on my pharmacyEditController.newPharmacy method).
But it does not work if I remove my prograpagation="end" and I put the <end-conversation/> in the pages.xml file.
| <page view-id="/views/admin/pharmacies/pharmacyList.xhtml">
| <description>Pharmacy List</description>
| <navigation from-action="#{pharmacyEditController.newPharmacy}">
| <end-conversation/>
| <redirect view-id="/views/admin/pharmacies/pharmacyEdit.xhtml"/>
| </navigation>
| </page>
|
What's wrong? Is there anything else I should do to make it work correctly? My goal is to use the pages.xml ONLY and the @Begin/@Eng to manage my conversations and not use the propagation="" attribute in my templates.
Thanks for any info!
Jonathan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049404#4049404
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049404
18 years, 10 months
[JBoss Portal] - Quirky Behavior of Jackrabbit CMS?
by david.hoffman
I have attempted to use mysql-connector-java-3.1.14-bin.jar based on the earlier post that the developer was using mysql-connector-java-3.1.4-beta-bin.jar.
I am experiencing the same behavior. The content continues to exist so long as the portal is not stopped and then restarted.
Is there anyone who has had success with this, or from jboss, that could offer some support to identify what it is that I have configured improperly which is causing this "quirky behavior"?
anonymous wrote :
| I am using the latest production release JDBC driver for MySQL5.
|
| I have no doubt this is a configuration issue I may have missed. Can someone point me toward specific configuration files that I can provide which may shed some light on the matter.
|
| To recap:
|
| I am able to see new content in the CMSAdmin portlet, and in instances that are configured to point to it, so long as I don't restart. Once I restart all new data appears to be gone (from a UI perspective). I have confirmed that the content does in fact exist inside the database (after a restart), however the CMSAdmin porlet does not display it. Additionally any instance configured to display the content is showing a message:
|
| 404 - Page Not Found
| Oops! We can't really find the resource you're looking for.
|
| I am running "jboss-portal-2.6-CR2-bundled" against a mySQL5 database. The portal is working fine, all functions as expected with the exception of the CMS Functionality
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049400#4049400
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049400
18 years, 10 months