[JBoss Web Services Users] - PolicyAttachment with custom assertions
by altes-kind
Hello,
I'm trying to implement a custom policy assertion with JBossWS. When I use @PolicyAttachment with my custom policy XML I get the log message "Unknown namespace:http://www.hfu.de/server/service/calculator/CalculatorPolicy...Assertion not supported".
Is the usage of PolicyAttachment limited to standard policies like WS-SecurityPolicy or is there anything wrong with my custom assertion?
2009-11-30 14:01:41,857 DEBUG [org.jboss.ws.extensions.policy.deployer.PolicyDeployer] (main) ####class org.apache.ws.policy.XorCompositeAssertion
| 2009-11-30 14:01:41,857 DEBUG [org.jboss.ws.extensions.policy.deployer.PolicyDeployer] (main) ####[org.apache.ws.policy.AndCompositeAssertion@aeb11d]
| 2009-11-30 14:01:41,858 DEBUG [org.jboss.ws.extensions.policy.deployer.PolicyDeployer] (main) alternative
| 2009-11-30 14:01:41,858 DEBUG [org.jboss.ws.extensions.policy.deployer.PolicyDeployer] (main) Unknown namespace:http://www.hfu.de/server/service/calculator/CalculatorPolicy...Assertion not supported
| 2009-11-30 14:01:41,858 DEBUG [org.jboss.ws.extensions.policy.deployer.PolicyDeployer] (main) Unsupported Alternative
| 2009-11-30 14:01:41,858 DEBUG [org.jboss.ws.extensions.policy.deployer.PolicyDeployer] (main) XorComposite zero element...Policy not supported
| 2009-11-30 14:01:41,858 WARN [org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder] (main) Policy Not supported:null
@Stateless
| @WebService(name = "Calculator", targetNamespace = "http://calculator.service.server.hfu.de/")
| @PolicyAttachment( { @Policy(policyFileLocation = "CalculatorPolicy.xml", scope = PolicyScopeLevel.WSDL_PORT) })
| public class Calculator implements CalculatorRemote, CalculatorLocal {
|
| public double add(double num1, double num2) {
| return num1 + num2;
| }
|
| }
<?xml version="1.0" encoding="UTF-8"?>
|
| <wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
| xmlns:cp="http://www.hfu.de/server/service/calculator/CalculatorPolicy"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
| <wsp:ExactlyOne>
| <wsp:All>
| <cp:maxNumber>10.0</cp:maxNumber>
| <cp:minNumber>0.0</cp:minNumber>
| </wsp:All>
| </wsp:ExactlyOne>
| </wsp:Policy>
Any help is appreciated.
altes-kind
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268073#4268073
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268073
15 years, 3 months
[Security] - Migrating to 5.1.0, "Invalid User"-Exception
by Gupta
We are currently in a process of migrating our AS from JBoss 4.2.1 to JBoss 5.1.0. We keep getting "Invalid User"-Exceptions thrown in our test classes due to thread issues with the JBoss implementation. Apparently (as far as wecan tell) it seem to do with the fact that we spawn a new thread in the beginning of each test case, where we do the log in.
In our main program (the non-test classes) however JBoss 5 works fine, since the log-in process in that case is made in the UI-thread (from the log-in dialog).
We've also figured it had to do with the SecurityInterceptors and tried to shut them down, without success. What about 'Subject.doAs'in the new JBoss 5, is it needed at all or is it handled by the interceptors in the proxy? If so, how may we control the interceptors?
Anyone who has a clue!?
Thanks in advance
/Gupta
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268064#4268064
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268064
15 years, 3 months
Re: [jboss-user] Connecting to Tomcat failed - JBoss Cluster with Apache mod_
by samk@twinix.com
See Thread at: http://www.techienuggets.com/Detail?tx=70276 Posted on behalf of a User
Hi,
I have a similar problem. Did you come up with a good solution?
Thx.
In Response To:
Hi all,
Our architecture consists of 2 JBoss 4.0.2.GA servers on Red Hat AS 4 UP7 and one Apache 2.0.52 node with mod_jk-ap20-1.2.19-1jpp_1rh on a Red Hat AS4 UP4.
We ran into this issue several month ago and we cannot find a solution yet - from the mod_jk.log:
[Mon Jan 19 14:10:58 2009] [11956:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:00 2009] [11517:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:04 2009] [11654:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:08 2009] [11515:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:10 2009] [11915:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:10 2009] [11915:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:12 2009] [11605:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:15 2009] [11938:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:15 2009] [11938:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:21 2009] [11787:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:21 2009] [11787:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:24 2009] [11902:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:24 2009] [11902:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:25 2009] [11844:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:25 2009] [11844:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:33 2009] [11608:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:37 2009] [11808:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:37 2009] [11808:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:41 2009] [11637:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:44 2009] [12009:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:44 2009] [12009:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:45 2009] [11533:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:47 2009] [11834:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:47 2009] [11834:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:49 2009] [11562:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:49 2009] [11562:59072] [error] ajp_service::jk_ajp_common.c (1879): (rllas02) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[Mon Jan 19 14:11:51 2009] [12003:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
workers.properties:
# Cluster members
worker.as01.host=10.2.xxx.xxx
worker.as01.port=8009
worker.as01.type=ajp13
worker.as02.host=10.2.xxx.xxx
worker.as02.port=8009
worker.as02.type=ajp13
worker.cluster01.type=lb
worker.cluster01.balanced_workers=as01,as02
worker.status.type=status
Only a restart of the two AS restores the correct operation.
I'll appreciate any help.
thanks in advance
Ezra Di Biase
15 years, 3 months
[Beginner's Corner] - Error using UnifiedInvoker
by maciekcom
Hi,
I've configured UnifiedInvoker for JNDI as dscribed here:
http://www.jboss.org/community/wiki/JNDIOverHTTPWithUnifiedInvoker
My jndi properties:
|
| java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=http://localhost:8180/unified-invoker/JNDIFactory
|
My web.xml:
<?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE web-app PUBLIC
| "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
| "http://java.sun.com/dtd/web-app_2_3.dtd">
|
| <web-app>
| <servlet>
| <servlet-name>JNDIFactory</servlet-name>
| <description>A servlet that exposes the JBoss JNDI Naming service stub
| through http. The return content is a serialized
| MarshalledValue containg the org.jnp.interfaces.Naming stub. This
| configuration handles requests for the standard JNDI naming service.
| </description>
| <servlet-class>org.jboss.invocation.http.servlet.NamingFactoryServlet</servlet-class>
| <init-param>
| <param-name>namingProxyMBean</param-name>
| <param-value>jboss:service=proxyfactory,type=unified,transport=servlet,target=naming</param-value>
| </init-param>
| <init-param>
| <param-name>proxyAttribute</param-name>
| <param-value>Proxy</param-value>
| </init-param>
| <load-on-startup>2</load-on-startup>
| </servlet>
| <servlet-mapping>
| <servlet-name>JNDIFactory</servlet-name>
| <url-pattern>/JNDIFactory/*</url-pattern>
| </servlet-mapping>
| </web-app>
My jboss-service.xml:
<?xml version="1.0" encoding="UTF-8"?>
| <server>
| <!-- Expose the Naming service interface via the UnifiedInvoker -->
| <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
| name="jboss:service=proxyfactory,type=unified,transport=servlet,target=naming">
| <attribute name="InvokerName">jboss:service=invoker,type=unified,transport=servlet</attribute>
| <attribute name="TargetName">jboss:service=Naming</attribute>
| <attribute name="JndiName"></attribute>
| <attribute name="ExportedInterface">org.jnp.interfaces.Naming</attribute>
| <attribute name="ClientInterceptors">
| <interceptors>
| <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
| <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
| <interceptor>org.jboss.naming.interceptors.ExceptionInterceptor</interceptor>
| <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
| </interceptors>
| </attribute>
| <depends>jboss:service=invoker,type=unified,transport=servlet</depends>
| </mbean>
|
| <!-- Unified invoker (based on remoting) -->
| <mbean code="org.jboss.invocation.unified.server.UnifiedInvoker"
| name="jboss:service=invoker,type=unified,transport=servlet">
| <depends>jboss:service=TransactionManager</depends>
| <depends>jboss.remoting:service=connector,transport=servlet</depends>
| </mbean>
|
| <mbean code="org.jboss.remoting.transport.Connector"
| name="jboss.remoting:service=connector,transport=servlet"
| display-name="Servlet transport Connector">
| <attribute name="Configuration">
| <config>
| <invoker transport="servlet">
| <attribute name="dataType" isParam="true">invocation</attribute>
| <attribute name="marshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationMarshaller</attribute>
| <attribute name="unmarshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationUnMarshaller</attribute>
| <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
| <attribute name="serverBindPort">8180</attribute>
| <attribute name="path">unified-invoker/ServerInvokerServlet</attribute>
| </invoker>
| <handlers>
| <handler subsystem="invoker">jboss:service=invoker,type=unified,transport=servlet</handler>
| </handlers>
| </config>
| </attribute>
| </mbean>
| </server>
When I'm trying to acces JNDI I got:
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker after 1 attempt(s)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:249)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:161)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
| at org.jboss.remoting.Client.invoke(Client.java:1724)
| at org.jboss.remoting.Client.invoke(Client.java:629)
| at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.invoke(UnifiedInvokerProxy.java:184)
| at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
| at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
| at org.jboss.naming.interceptors.ExceptionInterceptor.invoke(ExceptionInterceptor.java:57)
| ... 50 more
| Caused by: java.io.EOFException
| at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:580)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:369)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:231)
| ... 58 more
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268048#4268048
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268048
15 years, 3 months
[jBPM Users] - Re: How to signal subprocess?
by neshap
anonymous wrote : Thanks for your response, but you have a cast too : Execution into OpenExecution.
|
| Does someone know the diffrence between Execution, ExecutionImpl, OpenExecution, ProcessInstance? I'm a bit confused with all these concepts.
I'm a bit new to JBPM, but I'll try to give it a go.
It seems that casting has to be done (my opinion is better to cast it to interface than implementation). Judging from the javadoc, state of the Execution can be either active or locked. OpenExecution is Execution in active state only, and it gives you access to related objects in execution. ProcessInstance is one execution of a process definition, and it can have many concurrent executions (forks, subprocess).
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268044#4268044
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268044
15 years, 3 months