[EJB 3.0] - Exception recieving problem
by voidhawc
Hopefully someone has had to deal with this before.
I'm deploying two EAR files (isolated) that can only communicate through the remote interface. In order to enforce this I have set the JBoss Isolated and CallByValue options to true.
When standard operating procedure happens things are normal. Entities serialize nicely and all is well with the world.
On most methods in the remote interface there are multiple exceptions that can be thrown, each in a certain instance. However when they get back to the other EAR the catch blocks won't/can't recognise them. All are annonated with @ApplicationException and everything compiles okay. I have tried both including and excluding the exceptions from the client jar in the calling EAR to no affect.
I am also unable to cast the exceptions to the correct class.
Any help would be appreciated.
Thanks, Grant
The stack trace of the exception is below.
| 13:41:36,684 ERROR [STDERR] au.gov.deh.ieda.bus.pitem.pd.exceptions.PimInvalidSearchTermException: Valid taxon must be greater than zero
| 13:41:36,684 ERROR [STDERR] at au.gov.deh.ieda.bus.pitem.pd.managers.QueryManagerBean.searchForSpecies(QueryManagerBean.java:539)
| 13:41:36,684 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 13:41:36,684 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 13:41:36,700 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 13:41:36,700 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 13:41:36,700 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| 13:41:36,700 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| 13:41:36,700 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| 13:41:36,700 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 13:41:36,700 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| 13:41:36,700 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 13:41:36,715 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| 13:41:36,715 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 13:41:36,715 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| 13:41:36,715 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
| 13:41:36,715 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 13:41:36,715 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| 13:41:36,715 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 13:41:36,715 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| 13:41:36,731 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 13:41:36,731 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
| 13:41:36,731 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 13:41:36,731 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| 13:41:36,731 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 13:41:36,731 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| 13:41:36,731 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 13:41:36,731 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
| 13:41:36,747 ERROR [STDERR] at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:55)
| 13:41:36,747 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 13:41:36,747 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
| 13:41:36,747 ERROR [STDERR] at $Proxy234.searchForSpecies(Unknown Source)
| 13:41:36,747 ERROR [STDERR] at au.gov.deh.ieda.bus.pitem.pd.test.TestQueryManager.testSearchTaxonBad(TestQueryManager.java:193)
| 13:41:36,747 ERROR [STDERR] at au.gov.deh.ieda.bus.pitem.pd.test.TestQueryManager.testSearchs(TestQueryManager.java:91)
| 13:41:36,747 ERROR [STDERR] at au.gov.deh.ieda.bus.pitem.pd.test.TestQueryManager.doTests(TestQueryManager.java:74)
| 13:41:36,747 ERROR [STDERR] at au.gov.deh.ieda.sys.generic.test.TestBase.runTests(TestBase.java:42)
| 13:41:36,762 ERROR [STDERR] at org.apache.jsp.pages.testpdQueryManager_jsp._jspService(testpdQueryManager_jsp.java:89)
| 13:41:36,762 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| 13:41:36,762 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| 13:41:36,762 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
| 13:41:36,762 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| 13:41:36,762 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| 13:41:36,762 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| 13:41:36,762 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| 13:41:36,778 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 13:41:36,778 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 13:41:36,778 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 13:41:36,778 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 13:41:36,778 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| 13:41:36,778 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| 13:41:36,778 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| 13:41:36,778 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| 13:41:36,793 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| 13:41:36,793 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| 13:41:36,793 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| 13:41:36,793 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| 13:41:36,793 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| 13:41:36,793 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| 13:41:36,793 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| 13:41:36,809 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| 13:41:36,809 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974392#3974392
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974392
19 years, 7 months
[JBossWS] - Can't resolve WARN [WSSecurityHandler] Cannot obtain securi
by summer.hill
Hi,
I am trying samples in the jbossws 1.0.2 samples pack for a jsr181ejb endpoint. No matter how many times I have looked at the configuration for the server security, I just cannot get rid of this error message.
Here is my jboss-wsse-server.xml file (same as samples)
|
| <?xml version="1.0" encoding="UTF-8" ?>
| <jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
| <key-store-file>META-INF/wsse.keystore</key-store-file>
| <key-store-password>jbossws</key-store-password>
| <trust-store-file>META-INF/wsse.truststore</trust-store-file>
| <trust-store-password>jbossws</trust-store-password>
| <config>
| <sign type="x509v3" alias="wsse" />
| <requires>
| <signature />
| </requires>
| </config>
| </jboss-ws-security>
|
|
Here is the ejb code (the same as the samples):
|
| package org.jboss.test.ws.samples.jsr181ejb;
|
| import javax.annotation.security.RolesAllowed;
| import javax.ejb.Remote;
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebService;
| import javax.jws.WebParam;
| import javax.jws.WebResult;
| import javax.jws.HandlerChain;
| import javax.jws.soap.SOAPBinding;
|
| import org.jboss.annotation.ejb.RemoteBinding;
| import org.jboss.annotation.security.SecurityDomain;
| import org.jboss.ws.annotation.PortComponent;
|
| /**
| * Test the JSR-181 annotation: javax.jws.WebService
| *
| * @author Thomas.Diesler(a)jboss.org
| * @since 29-Apr-2005
| */
|
| // standard JSR181 annotations
| @WebService(name = "EndpointInterface", targetNamespace = "http://org.jboss.ws/samples/jsr181ejb", serviceName = "TestService")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
|
| // standard EJB3 annotations
| @Remote(EJB3RemoteInterface.class)
| @RolesAllowed("friend")
| @Stateless
|
| // jboss propriatary annotations
| @RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")
| @PortComponent(authMethod="BASIC", transportGuarantee="NONE")
| @SecurityDomain("JBossWS")
| @HandlerChain(file = "resource://config/ServerHandlers.xml", name = "SecureHandlerChain")
| public class EJB3Bean01 implements EJB3RemoteInterface
| {
| @WebMethod
| public String echo(String input)
| {
| return "received: " + input;
| }
| }
|
|
And here is the ServerHandlers.xml file (same as samples)
|
| <?xml version="1.0" encoding="UTF-8"?>
| <handler-config>
| <handler-chain>
| <handler-chain-name>SecureHandlerChain</handler-chain-name>
| <!--<handler>
| <handler-name>DeepInboundHandler</handler-name>
| <handler-class>org.jboss.test.ws.samples.jsr181ejb.DeepInboundHandler</handler-class>
| </handler>-->
| <handler>
| <handler-name>WSSecurityHandlerInbound</handler-name>
| <handler-class>org.jboss.ws.wsse.WSSecurityHandlerInbound</handler-class>
| </handler>
| </handler-chain>
| </handler-config>
|
|
I have full jboss debugging turned on, but there is no hint as to what the problem with the configuration might be. How can I get a better error message?
Thanks
James
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974389#3974389
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974389
19 years, 7 months
[JBoss Seam] - Seam Remoting & Javascript
by pdpantages
Hello Seamers, I have another question.
I have been having some problems with seam remoting and I wanted to back off and
try a simple test to start.
I have run the example progress bar application on my server and it works as
expected.
I wanted to then see if I could run a simple poller, so I started
out with the progress bar javascript...
I removed the remote call, & var declaration and the src statement for
seam/remoting/interface.js?progressBarAction, resulting in the code
below. I have defined a button to start it off.
I am just trying to see if the getProgress() function will run after
the 1000 timeout & then reschedule itself.
But... I only see first alert "Query Progress" but that is it. The
getProgress() function is never run, not even once. Somehow the timeout is being cancelled? I get no msgs in the javascript console.
Thank you, in advance, for any ideas... PdP
|
| <script type="text/javascript" src="/client/seam/remoting/resource/remote.js">
| <!--
| // This space intentionally left blank
| //-->
| </script>
|
| <script type="text/javascript">
| //<![CDATA[
|
| Seam.Remoting.setDebug(true);
| // don't display the loading indicator
| Seam.Remoting.displayLoadingMessage = function() {};
| Seam.Remoting.hideLoadingMessage = function() {};
|
| // var progressBarAction = Seam.Component.getInstance("progressBarAction");
|
| function queryProgress() {
| alert("Query Progress");
| setTimeout("getProgress()", 1000);
| }
|
| function getProgress() {
| alert("Get Progress");
| queryProgress();
| }
|
| //function progressCallback(progress) {
| //progressBar.setPosition(progress.percentComplete);
| //if (progress.percentComplete < 100)
| //queryProgress();
| //}
|
| // ]]>
| </script>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974386#3974386
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974386
19 years, 7 months