[JBoss Seam] - Property not found on type org.hibernate.collection.Persist
by jdijkmeijer
Hi,
I have a datamodel of objects(keywords) having a one - many relation with other objects (competences).
Keyword.java:
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "keyword")
| public Set<Competence> getCompetences() {
| return this.competences;
| }
|
| public void setCompetences(Set<Competence> competences) {
| this.competences = competences;
| }
|
Competence.java:
| @ManyToOne(fetch = FetchType.LAZY)
| @JoinColumn(name = "keyword_id", nullable = false)
| @NotNull
| public Keyword getKeyword() {
| return this.keyword;
| }
|
| public void setKeyword(Keyword keyword) {
| this.keyword = keyword;
| }
| @ManyToOne(fetch = FetchType.LAZY)
| @JoinColumn(name = "person_id", nullable = false)
| @NotNull
| public Person getPerson() {
| return this.person;
| }
| public void setPerson(Person person) {
| this.person = person;
| }
|
|
Once the user selects a Keyword, the chosen keyword becomes the keyword in focus via:
| @DataModel(value="keywords")
| private List<Keyword> keywords;
|
| @Out(required=false)
| @DataModelSelection(value="keywords")
| Keyword focusKeyWord;
|
And the user is taken to a new page, On the new page I want to show the competences attached to the focusKeyWord:
| <ice:dataTable var="competence" value="#{focusKeyWord.competences}" id="test">
| <ice:column>
| <f:facet name="header"><ice:outputText value="naam"/></f:facet>
| <ice:commandLink value="#{competence.person.firstname}" action="{personMgr.selectPerson}">
| <f:param value="#{competence.person.personId}" />
| </ice:commandLink>
| </ice:column>
| </ice:dataTable>
|
But this fails with the exception: Property 'person' not found on type org.hibernate.collection.PersistentSet. Should I use a second datamodel for the competences attached to my focusKeyWord or are there smarter ways to solve this exception?
Many thanks in advance!
PS my environment:
Mac Ox 10.4.11
java 1.5.
jboss 4.2.2GA
seam 2.0.0.GA
icefaces 1.6.1
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118166#4118166
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118166
18 years, 3 months
[JBoss Portal] - Anybody got seam 2.0 portlets working?
by mhinten
Environment:
JBoss Portal Version: 2.6.3
Did you get Portal from CVS? or download it? --> download binaries
JBoss AS Version --> 4.2.2.GA
Database Vendor and Version --> Oracle 10g
JDBC Connector and Version --> ojdbc14.jar
OS Platform --> Windows XP
Problem/Question
I know this has been posted before, but am unable to verify wether anybody has successfully implemented portlets based on Seam 2.0.
Is there anybody out there who has made a simple working seam 2.0 portlet, and has starting with seam-gen?
I did get the examples working (well, more or less: there are still serious issues like several links that don't work, but at least the portlet shows in the portal), following this blog entry: http://blog.jboss-portal.org/2007/11/seam-20-portlet-example.html
But when I try to cook my own Seam 2.0 portlets I am getting all kinds of errors, the last one being:
17:07:04,530 ERROR [STDERR] Caused by: java.lang.ClassCastException: javax.portlet.faces.GenericFacesPortlet
| 17:07:04,530 ERROR [STDERR] at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:231)
| 17:07:04,530 ERROR [STDERR] ... 74 more
| 17:07:04,546 WARN [InstanceMetaData] The instance SimpleSeamPortletInstance will not be created because the component referenced is
| outside of the same web app portlets06simpleSeam.SimpleSeamPortlet
| 17:07:04,546 WARN [PortletAppDeployment] Failed to create instance SimpleSeamPortletInstance of portlet /portlets06simpleSeam.Simpl
| eSeamPortlet because portlet /portlets06simpleSeam.SimpleSeamPortlet is not available
(full stack trace pasted further down below).
My config files are:
faces-config.xml:
| <?xml version='1.0' encoding='UTF-8'?>
| <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
|
| <application>
| <locale-config>
| <default-locale>en</default-locale>
| </locale-config>
|
| <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
|
| </application>
| </faces-config>
|
portlet.xml
<portlet-app version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/portlet" xmlns="http://java.sun.com/xml/ns/portlet">
|
|
| <!-- this is a seam 2.0 portlet that doesn't work -->
| <portlet>
| <portlet-name>SimpleSeamPortlet</portlet-name>
| <portlet-class> javax.portlet.faces.GenericFacesPortlet </portlet-class>
|
| <init-param>
| <name>javax.portlet.faces.defaultViewId.view</name>
| <value>/home.xhtml</value>
| </init-param>
|
| <init-param>
| <name>javax.portlet.faces.defaultViewId.edit</name>
| <value>/edit_portlet.xhtml</value>
| </init-param>
|
| <init-param>
| <name>javax.portlet.faces.defaultViewId.help</name>
| <value>/help.xhtml</value>
| </init-param>
|
| <expiration-cache>-0</expiration-cache>
| <portlet-info>
| <title>Simple Seam Portlet</title>
| </portlet-info>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| <portlet-mode>EDIT</portlet-mode>
| <portlet-mode>HELP</portlet-mode>
| </supports>
| </portlet>
|
| <!-- This is a non-seam portlet that works -->
| <portlet>
| <portlet-name>MultiMasterPortlet</portlet-name>
| <portlet-class>nl.geotax.MultiMasterPortlet</portlet-class>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| <portlet-mode>EDIT</portlet-mode>
| <portlet-mode>HELP</portlet-mode>
| </supports>
| <portlet-info>
| <title>Geotax IPC Multi Master Portlet</title>
| </portlet-info>
| </portlet>
|
| </portlet-app>
|
portlet-instances.xml:
| <?xml version="1.0" encoding="utf-8" standalone="yes"?>
| <deployments>
| <!-- seam portlet that doesn't work -->
| <deployment>
| <instance>
| <instance-id>SimpleSeamPortletInstance</instance-id>
| <portlet-ref>SimpleSeamPortlet</portlet-ref>
| </instance>
| </deployment>
|
| <!-- non seam portlet that works -->
| <deployment>
| <instance>
| <instance-id>MultiMasterPortletInstance</instance-id>
| <portlet-ref>MultiMasterPortlet</portlet-ref>
| </instance>
| </deployment>
| </deployments>
|
seamportlet-object.xm:l
| <?xml version="1.0" encoding="UTF-8"?>
| <deployments>
|
| <!-- attempts at creating a seam portlet -->
| <deployment>
| <parent-ref>default</parent-ref>
| <if-exists>overwrite</if-exists>
| <instance>
| <instance-name>SimpleSeamPortletInstance</instance-name>
| <component-ref>portlets06simpleSeam.SimpleSeamPortlet</component-ref>
| </instance>
| </deployment>
|
|
| <deployment>
| <if-exists>overwrite</if-exists>
| <parent-ref>default</parent-ref>
| <page>
| <page-name>Simple Seam Portlets</page-name>
| <window>
| <window-name>SimpleSeamPortlet</window-name>
| <instance-ref>SimpleSeamPortletInstance</instance-ref>
| <region>left</region>
| <height>0</height>
| </window>
| </page>
| </deployment>
|
| <!-- non-seam portlet that works -->
| <deployment>
| <if-exists>overwrite</if-exists>
| <parent-ref>default</parent-ref>
| <page>
| <page-name>PoC Multi IPC-2</page-name>
| <window>
| <window-name>MultiMasterPortletWindow</window-name>
| <instance-ref>MultiMasterPortletInstance</instance-ref>
| <region>left</region>
| <height>0</height>
| </window>
| <window>
| <window-name>What the hell</window-name>
| <instance-ref>SimpleSeamPortletInstance</instance-ref>
| <region>center</region>
| <height>0</height>
| </window>
|
|
| </page>
| </deployment>
|
| </deployments>
|
web.xml:
| <?xml version="1.0" ?>
| <web-app xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
| version="2.5">
|
|
|
|
| <description>SeamPortlets</description>
|
|
| <context-param>
| <param-name>javax.portlet.faces.BridgeImplClass</param-name>
| <param-value>org.apache.myfaces.portlet.faces.bridge.BridgeImpl</param-value>
| </context-param>
|
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
|
| <servlet>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <url-pattern>/seam/resource/*</url-pattern>
| </servlet-mapping>
|
|
| <filter>
| <filter-name>Seam Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Filter</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
|
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>server</param-value>
| </context-param>
|
| <context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
|
| <context-param>
| <param-name>facelets.DEVELOPMENT</param-name>
| <param-value>false</param-value>
| </context-param>
|
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.seam</url-pattern>
| </servlet-mapping>
|
| <listener>
| <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
| </listener>
|
| <session-config>
| <session-timeout>30</session-timeout>
| </session-config>
|
| <welcome-file-list>
| <welcome-file>index.html</welcome-file>
| </welcome-file-list>
|
|
|
| </web-app>
|
And finally, the full stack trace when deploying:
stack trace:
| 09:01:40,366 ERROR [STDERR] org.jboss.portal.portlet.container.PortletInitializationException: The portlet SimpleSeamPortlet threw a
| runtime exception during init
| 09:01:40,366 ERROR [STDERR] at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:264)
| 09:01:40,366 ERROR [STDERR] at org.jboss.portal.portlet.impl.container.PortletApplicationContextImpl.startPortletApplication(Por
| tletApplicationContextImpl.java:135)
| 09:01:40,366 ERROR [STDERR] at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:15
| 1)
| 09:01:40,382 ERROR [STDERR] at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:96)
| 09:01:40,382 ERROR [STDERR] at org.jboss.portal.server.deployment.jboss.DeploymentContext.start(DeploymentContext.java:99)
| 09:01:40,382 ERROR [STDERR] at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.start(PortalDeploymentInfoCo
| ntext.java:211)
| 09:01:40,382 ERROR [STDERR] at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerDeployer.java:217)
| 09:01:40,382 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| 09:01:40,382 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| 09:01:40,382 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
| 09:01:40,382 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 09:01:40,382 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 09:01:40,382 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 09:01:40,382 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 09:01:40,382 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| 09:01:40,382 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 09:01:40,382 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.jav
| a:142)
| 09:01:40,382 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 09:01:40,382 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 09:01:40,382 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 09:01:40,382 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| 09:01:40,382 ERROR [STDERR] at $Proxy206.deploy(Unknown Source)
| 09:01:40,382 ERROR [STDERR] at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:259)
| 09:01:40,398 ERROR [STDERR] at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:53)
| 09:01:40,398 ERROR [STDERR] at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:15
| 9)
| 09:01:40,398 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
| 09:01:40,398 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 09:01:40,398 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 09:01:40,398 ERROR [STDERR] at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
| 09:01:40,398 ERROR [STDERR] at $Proxy209.handleNotification(Unknown Source)
| 09:01:40,398 ERROR [STDERR] at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadca
| sterSupport.java:127)
| 09:01:40,398 ERROR [STDERR] at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcast
| erSupport.java:108)
| 09:01:40,398 ERROR [STDERR] at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
| 09:01:40,398 ERROR [STDERR] at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:308)
| 09:01:40,398 ERROR [STDERR] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:482)
| 09:01:40,398 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
| 09:01:40,398 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 09:01:40,398 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 09:01:40,398 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 09:01:40,398 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 09:01:40,398 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| 09:01:40,398 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 09:01:40,398 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.jav
| a:142)
| 09:01:40,413 ERROR [STDERR] at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| 09:01:40,413 ERROR [STDERR] at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:23
| 8)
| 09:01:40,413 ERROR [STDERR] at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
| 09:01:40,413 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptor
| Support.java:188)
| 09:01:40,413 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| 09:01:40,413 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 09:01:40,413 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 09:01:40,413 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 09:01:40,413 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| 09:01:40,413 ERROR [STDERR] at $Proxy188.start(Unknown Source)
| 09:01:40,413 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| 09:01:40,413 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| 09:01:40,413 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| 09:01:40,413 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| 09:01:40,413 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
| 09:01:40,413 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 09:01:40,413 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 09:01:40,413 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 09:01:40,413 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 09:01:40,413 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| 09:01:40,413 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 09:01:40,429 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.jav
| a:142)
| 09:01:40,429 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 09:01:40,429 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 09:01:40,429 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 09:01:40,429 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| 09:01:40,429 ERROR [STDERR] at $Proxy9.deploy(Unknown Source)
| 09:01:40,429 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| 09:01:40,429 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| 09:01:40,429 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentSca
| nner.java:263)
| 09:01:40,429 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScann
| er.java:274)
| 09:01:40,429 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanne
| r.java:225)
| 09:01:40,429 ERROR [STDERR] Caused by: java.lang.ClassCastException: javax.portlet.faces.GenericFacesPortlet
| 09:01:40,429 ERROR [STDERR] at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:231)
| 09:01:40,429 ERROR [STDERR] ... 74 more
| 09:01:40,445 WARN [InstanceMetaData] The instance SimpleSeamPortletInstance will not be created because the component referenced is
| outside of the same web app portlets06simpleSeam.SimpleSeamPortlet
| 09:01:40,445 WARN [PortletAppDeployment] Failed to create instance SimpleSeamPortletInstance of portlet /portlets06simpleSeam.Simpl
| eSeamPortlet because portlet /portlets06simpleSeam.SimpleSeamPortlet is not available
|
Any help would be greatly appreciated...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118160#4118160
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118160
18 years, 3 months
[JBossWS] - SOAP Interceptor
by zeeshan.javeed
Hi All,
I am trying to intercept soap request. I have followed the instruction of @handler annotation but request never pass throught the Handler class. Anybody, having any idea...
here is the code.
in the start of the implementation class:
| @WebService(name = "webservice")
| @HandlerChain (name = "SoapHandler" , file = "WEB-INF/handler.xml")
handler.xml class is
| <?xml version="1.0" encoding="UTF-8"?>
|
| <handler-config>
| <handler-chain>
| <handler-chain-name>SoapHandler</handler-chain-name>
| <handler>
| <handler-name>testSOAPHandler</handler-name> <handler-class>my.webservice.impl.SOAPHandler</handler-class>
| </handler>
| </handler-chain>
| </handler-config>
|
|
and code for Soap handler class is :
|
| package my.webservice.impl;
|
| import javax.xml.namespace.QName;
| import org.jboss.ws.core.jaxws.handler.*;
|
| import javax.xml.rpc.handler.HandlerInfo;
| import javax.xml.rpc.handler.MessageContext;
|
| import org.apache.commons.logging.Log;
| import org.apache.commons.logging.LogFactory;
|
| /**
| *
| * @version $Revision: 1 $
| */
| @Revision("$Revision: 1 $")
| public class SOAPHandler extends GenericHandler
| {
| /**
| * Logger
| */
| private static final Log log = LogFactory.getLog(WipeSOAPHandler.class);
|
| /** SOAP headers */
| protected QName[] headers;
|
|
|
| /**
| * @see javax.xml.rpc.handler.GenericHandler#init(javax.xml.rpc.handler.HandlerInfo)
| */
| public void init(HandlerInfo info)
| {
| log.info("init: " + info);
| System.out.println("Init section");
| this.headers = info.getHeaders();
| }
|
|
| /**
| * @return
| * @see javax.xml.rpc.handler.GenericHandler#getHeaders()
| */
| public QName[] getHeaders()
| {
| return this.headers;
| }
|
| /**
| * @return
| * @see javax.xml.rpc.handler.GenericHandler#handleRequest(javax.xml.rpc.handler.MessageContext)
| */
| public boolean handleRequest(MessageContext context)
| {
| log.debug("+++> handleRequest");
|
| return true;
| }
|
| /**
| * @param context
| * @return
| * @see javax.xml.rpc.handler.GenericHandler#handleResponse(javax.xml.rpc.handler.MessageContext)
| *
| *
| *
| */
| public boolean handleResponse(MessageContext context)
| {
| log.debug("+++> handle SOAP response:");
|
|
| return true;
| }
|
|
| }
|
|
|
.....
I am not getting any help... plz help out...
Regards,
Zeeshan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118157#4118157
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118157
18 years, 3 months
[JBoss Seam] - I am having trouble simply getting the most basic test to wo
by larsabrasha
I am having trouble simply getting the most basic test to work--a single TestNG unit test extending SeamTest with a single method with Assert.assertTrue(true). That's it. No FacesContext simulation or anything remotely complex.
It is really frustrating to be having so much trouble with something so basic.
Thanks
Here is the stack trace of the error:
java.lang.RuntimeException: Unable to create a KernelInitializer based on the specified KernelConfig
|
| at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:156)
| at org.jboss.kernel.KernelFactory.assembleNewKernel(KernelFactory.java:99)
| at org.jboss.kernel.KernelFactory.newInstance(KernelFactory.java:67)
| at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.bootstrap(AbstractBootstrap.java:120)
| at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
| at org.jboss.embedded.Bootstrap.createKernel(Bootstrap.java:131)
| at org.jboss.embedded.Bootstrap.getInstance(Bootstrap.java:76)
| at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:10)
| at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:967)
| at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:892)
| at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
| 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:585)
| at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
| at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
| at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
| at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
| at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:165)
| at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
| at org.testng.TestRunner.runWorkers(TestRunner.java:678)
| at org.testng.TestRunner.privateRun(TestRunner.java:624)
| at org.testng.TestRunner.run(TestRunner.java:495)
| at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
| at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
| at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
| at org.testng.SuiteRunner.run(SuiteRunner.java:190)
| at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
| at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
| at org.testng.TestNG.run(TestNG.java:699)
| at org.testng.TestNG.privateMain(TestNG.java:824)
| at org.testng.TestNG.main(TestNG.java:802)
| Caused by: java.lang.AbstractMethodError: org.jboss.aop.microcontainer.integration.AOPJoinpointFacto
| ryBuilder.createJoinpointFactory(Lorg/jboss/reflect/spi/ClassInfo;Lorg/jboss/repository/spi/MetaData
| Context;)Lorg/jboss/joinpoint/spi/JoinpointFactory;
| at org.jboss.classadapter.plugins.BasicClassAdapter.getJoinpointFactory(BasicClassAdapter.java:85)
| at org.jboss.beans.info.plugins.AbstractBeanInfo.getJoinpointFactory(AbstractBeanInfo.java:140)
| at org.jboss.kernel.plugins.config.Configurator.findConstructor(Configurator.java:210)
| at org.jboss.kernel.plugins.config.Configurator.getConstructorJoinPoint(Configurator.java:194)
| at org.jboss.kernel.plugins.config.Configurator.instantiate(Configurator.java:92)
| at org.jboss.kernel.plugins.config.Configurator.instantiateAndConfigure(Configurator.java:68)
| at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.getImplementation(PropertyKernelCo
| nfig.java:149)
| at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.createKernelInitializer(PropertyKe
| rnelConfig.java:117)
| at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:150)
| ... 32 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118155#4118155
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118155
18 years, 3 months
[JBoss Seam] - Seam Interceptors
by Kragoth
Hey,
I am trying to make an Interceptor so I can do some injection of Spring beans by type.
However, for some reason my Interceptor never fires.
Here is my test code.
| package gekko.web.services;
|
| import org.jboss.seam.annotations.intercept.AroundInvoke;
| import org.jboss.seam.annotations.intercept.Interceptor;
| import org.jboss.seam.intercept.AbstractInterceptor;
| import org.jboss.seam.intercept.InvocationContext;
| import org.jboss.seam.log.LogProvider;
| import org.jboss.seam.log.Logging;
|
| @Interceptor
| public class GekkoSpringInjector extends AbstractInterceptor
| {
|
| private static final LogProvider log = Logging.getLogProvider(GekkoSpringInjector.class);
|
| @AroundInvoke
| public Object aroundInvoke(InvocationContext invocation) throws Exception
| {
| log.debug("********************************************");
| throw new Exception("THIS FIRED");
| // return null;
| }
|
| }
|
Now, obviously I'm missing something. Somehow I need to register this Interceptor, but where/how do I do this. Cause I don't want to have to add and @Interceptor annotation to EVERY class that will need this interceptor.
Could someone point me in the right direction. I've tried looking at the doco but nothing seems to make this work.
I know I've probly got some stupid mistake, but thanks for any help. :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118152#4118152
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118152
18 years, 3 months