[JBossWS] - JBossWS 2.0 CR2
by Ganton
Should we post potential issues about 2.0.0.CR2 here ?
I was testing a very simple WS (Stateful EJB SEI), and
it does not show up under JBoss 5.0.0.Beta1.
Here is the important stuff:
application.xml
<?xml version="1.0" encoding="UTF-8"?>
| <application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
| <display-name>Test50</display-name>
| <description>Test50</description>
| <module>
| <ejb>test50.jar</ejb>
| </module>
| </application>
|
jboss-app.xml
<!DOCTYPE jboss-app
| PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">
| <jboss-app>
| <loader-repository>
| test50:app=ejb3
| </loader-repository>
| </jboss-app>
Service Endpoint (Interface class matches)
/**
| *
| */
| package com.company.test50;
|
| import javax.ejb.Stateful;
| import javax.ejb.Stateless;
| import javax.jws.WebService;
| import javax.jws.WebMethod;
| import javax.jws.soap.SOAPBinding;
| import java.util.*;
|
| /**
| * @author Owner
| *
| */
| @WebService(name="TestWSService", targetNamespace="http://com.company.test50")
| @SOAPBinding(style=SOAPBinding.Style.DOCUMENT)
| @Stateful
| public class TestWSServerBean implements TestWSServer
| {
| private Collection<TestEntity> entities;
|
| @WebMethod
| public Collection<TestEntity> getEntities()
| {
| return entities;
| }
|
| @WebMethod
| public void addEntity(TestEntity add)
| {
| entities.add(add);
| }
|
| @WebMethod
| public TestEntity getEntity(int id)
| {
| return null;
| }
|
| @WebMethod
| public void updateEntity(TestEntity updated)
| {
|
| }
|
| @WebMethod
| public void deleteEntity(int id)
| {
|
| }
| }
|
Any ideas ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988579#3988579
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988579
19Â years, 5Â months
[ANN] HJB (HTTP JMS Bridge) 0.9.1 released
by Tim Emiola
HJB <http://hjb.berlios.de>, the HTTP JMS Bridge, provides a REST
<http://en.wikipedia.org/wiki/REST> version of the JMS
<http://java.sun.com/products/jms> API.
This REST API allows programs in languages other than Java to access
**ANY** messaging systems that provide a JMS interface. E.g, PyHJB
<http://hjb.python-hosting.com>, the python client for HJB includes a
demo using python to access JBoss Messaging, in addition to 3 other
JMS systems.
HJB 0.9.0 was released last week, but HJB 0.9.1 has been released very
quickly afterwards to fix an important bug.
The important features in these 0.9.x releases are:
** 0.9.1 **
* fixed an error that prevented recursive listing from working
* added the ability to configure HJB's runtime system parameters from
the java servlet config XML file
* added the /collect command (Collect From) for consumers and
subscribers. This allows clients to collect several messages from HJB
in one HTTP request
* changed the output of the /list commands so that it looks more like
the output of 'ls -lR' when recursively listing
** 0.9.0 **
* started recording the creation time of the JMS objects created by
HJB for use in listing reports
* added the ability to list JMS sessions, connections, connection
factories and providers
* JMS connection errors are written to a unique log file per JMS connection
* added an /errors command for JMS connections to allow clients to
retrieve the JMS connection error logs
* the large HJBConnection class has been refactored, all session
handling has been moved to a new class HJBSession
* major changes are recorded in a changelog which can be accessed
online via the svn repository here:
<http://svn.berlios.de/wsvn/hjb/trunk/ChangeLog?op=file&rev=0&sc=0>
19Â years, 5Â months
[JBoss Seam] - Seam exception handling failing
by zzzz8
I've had a short history and issue in getting Seam exception handling working for me. It's important because I truly want to get this working since I would really want to handle exceptions the Seam way. I previously had issues that I thought might be due to Tiles eating the exceptions, so I switched to Facelets. Unfortunately, I'm seeing similar problems right now - i.e. the user is not redirected to the specified exception handling page.
My current configuration is JBoss AS 4.0.5, Seam 1.1 CR1, and Facelets 1.1.11.
Here is the stack trace I receive (the normal Tomcat stack trace) in the logs:
2006-11-25 14:15:11,406 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myapp].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
| java.lang.IllegalArgumentException: exception invoking: retrieveStatus
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:112)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1759)
| at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1647)
| at org.jboss.seam.Component.getInstance(Component.java:1590)
| at org.jboss.seam.Component.getInstance(Component.java:1567)
| at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:45)
| at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
| at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
| at javax.faces.component.UIData.getValue(UIData.java:1019)
| at javax.faces.component.UIData.createDataModel(UIData.java:785)
| at javax.faces.component.UIData.getDataModel(UIData.java:765)
| at javax.faces.component.UIData.getRowCount(UIData.java:191)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:210)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:123)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:234)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:554)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: com.mycompany.connection.ConnectionException
| at com.mycompany.beans.status.StatusBean.retrieveStatus(StatusBean.java:78)
| 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.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:51)
| 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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
| 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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:51)
| 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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49)
| 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.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
| at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
| at $Proxy522.retrieveStatus(Unknown Source)
| at com.mycompany.beans.status.StatusLocal$$FastClassByCGLIB$$72d42c54.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:69)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
| 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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:78)
| at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
| at com.mycompany.beans.status.StatusLocal$$EnhancerByCGLIB$$3d25fd73.retrieveStatus(<generated>)
| 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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| ... 49 more
Here's a snippet from my faces-config.xml:
<application>
| <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
| </application>
|
| <lifecycle>
| <phase-listener>
| org.jboss.seam.jsf.TransactionalSeamPhaseListener
| </phase-listener>
| </lifecycle>
Here's a snippet from my web.xml:
<context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
|
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>client</param-value>
| </context-param>
|
| <context-param>
| <param-name>facelets.DEVELOPMENT</param-name>
| <param-value>false</param-value>
| </context-param>
|
| <context-param>
| <param-name>facelets.LIBRARIES</param-name>
| <param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
| </context-param>
|
| <filter>
| <filter-name>Seam Exception Filter</filter-name>
| <filter-class>
| org.jboss.seam.servlet.SeamExceptionFilter
| </filter-class>
| </filter>
|
| <filter>
| <filter-name>Seam Redirect Filter</filter-name>
| <filter-class>
| org.jboss.seam.servlet.SeamRedirectFilter
| </filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Exception Filter</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
|
| <filter-mapping>
| <filter-name>Seam Redirect Filter</filter-name>
| <url-pattern>*.faces</url-pattern>
| </filter-mapping>
|
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
|
| <listener>
| <listener-class>
| org.apache.myfaces.webapp.StartupServletContextListener
| </listener-class>
| </listener>
|
| <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>*.faces</url-pattern>
| </servlet-mapping>
Here's a snippet from my components.xml:
<component name="org.jboss.seam.core.init">
| <property name="debug">false</property>
| <property name="jndiPattern">myapp/#{ejbName}/local</property>
| </component>
Here's my exceptions.xml:
<exceptions>
| <exception
| class="com.mycompany.connection.ConnectionException">
| <redirect view-id="/ois.xhtml">
| Failure
| </redirect>
| <end-conversation />
| </exception>
| <exception>
| <redirect view-id="/ois.xhtml">Unexpected failure</redirect>
| <end-conversation />
| </exception>
| </exceptions>
In terms of my code, I just simplified it (for testing) so that if the retrieveStatus method is called, it just throws an exception:
@Stateful
@Name("statusData")
public class StatusBean implements StatusLocal {
@DataModel("status")
private List status = null;
@Create
@Factory("status")
public final void retrieveStatus() throws ConnectionException {
throw new ConnectionException();
}
@Remove
@Destroy
public final void destroy() {
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988575#3988575
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988575
19Â years, 5Â months