[JBoss JIRA] (WFLY-3262) WebServiceRef injection without explicit wsdl file fails during Servlet initialization
by Alessio Soldano (JIRA)
[ https://issues.jboss.org/browse/WFLY-3262?page=com.atlassian.jira.plugin.... ]
Alessio Soldano commented on WFLY-3262:
---------------------------------------
Thanks for the investigation Rebecca. Honestly, I don't think the web metadata created for a EJB3 WS endpoint should be different (load on startup or not) depending on the existence of webservicerefs in servlets being loaded on startup. Perhaps we could see if we can have a more verbose error message clarifying that the wsdl requested for the ws refs was not available at the time the refs are being injected, possibly because the refs are being resolved before the referenced service has been started.
This said, the user can make the endpoint servlet start on load in the case of POJO WS endpoints. That's not possible atm for EJB3 based endpoints; so a new feature request JIRA could be created for adding a configuration option to achieve that. An idea could be to have a boolean flag in the @WebContext annotation.
> WebServiceRef injection without explicit wsdl file fails during Servlet initialization
> --------------------------------------------------------------------------------------
>
> Key: WFLY-3262
> URL: https://issues.jboss.org/browse/WFLY-3262
> Project: WildFly
> Issue Type: Bug
> Components: Web Services
> Affects Versions: 8.1.0.CR1
> Reporter: Matus Abaffy
> Assignee: R Searls
> Fix For: 9.0.0.CR1
>
>
> Reproducer test available at https://github.com/bafco/wildfly/commits/wsServletInjection
> I have the following servlet
> {code}
> @WebServlet(/*..., */ loadOnStartup = 1)
> public class ServletLoadOnStartup extends HttpServlet {
> @WebServiceRef(value = EndpointService.class)
> private EndpointInterface endpoint1;
> //...
> {code}
> (It is located in the package org.jboss.as.test.integration.ws.serviceref. There you can find more info about the other classes.)
> And i get the following exception:
> {code}
> org.jboss.arquillian.container.spi.client.container.DeploymentException: Cannot deploy: ws-servlet-test.war
> ...
> Caused by: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./ws-servlet-test" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./ws-servlet-test: javax.servlet.ServletException: UT010013: Could not instantiate ServletLoadOnStartup
> Caused by: javax.servlet.ServletException: UT010013: Could not instantiate ServletLoadOnStartup
> Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
> Caused by: java.lang.RuntimeException: JBAS011875: Resource lookup for injection failed: env/org.jboss.as.test.integration.ws.serviceref.ServletLoadOnStartup/endpoint1
> Caused by: javax.naming.NamingException: JBAS011878: Failed to lookup env/org.jboss.as.test.integration.ws.serviceref.ServletLoadOnStartup/endpoint1 [Root exception is org.jboss.wsf.spi.WSFException: Cannot create service]
> Caused by: org.jboss.wsf.spi.WSFException: Cannot create service
> Caused by: java.lang.reflect.InvocationTargetException
> Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
> Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
> Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://localhost:8080/ws-servlet-test/EndpointService/EJB3Bean?wsdl'.: java.io.FileNotFoundException: http://localhost:8080/ws-servlet-test/EndpointService/EJB3Bean?wsdl
> Caused by: java.io.FileNotFoundException: http://localhost:8080/ws-servlet-test/EndpointService/EJB3Bean?wsdl"}}
> {code}
> If I change loadOnStartup parameter to -1, everything works fine, i.e. servlet gets instantiated and WS is injected correctly. Therefore, I suppose this is a bug.
> Another workaround exists - adding wsdl file to the deployment archive and using the 'wsdlLocation' parameter in @WebServiceRef (as can be seen in ServiceRefSevletTestCase).
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 9 months
[JBoss JIRA] (JGRP-1893) ENCRYPT: Thread safety issues during key changes
by Tero Leppikangas (JIRA)
[ https://issues.jboss.org/browse/JGRP-1893?page=com.atlassian.jira.plugin.... ]
Tero Leppikangas commented on JGRP-1893:
----------------------------------------
Hi.
Sorry for the previous comment, the fix for JGRP-1880 was not the real reason. The trace log just fills up with stacktraces from UDP since the setTimeToLive throws IOException with "not implemented" from all nodes in my test. The real reason was that all parts of my own code was not compatible with 3.5. I will do more testing and create pull requests when I feel that things are ok from my point of view.
> ENCRYPT: Thread safety issues during key changes
> ------------------------------------------------
>
> Key: JGRP-1893
> URL: https://issues.jboss.org/browse/JGRP-1893
> Project: JGroups
> Issue Type: Bug
> Reporter: Tero Leppikangas
> Assignee: Bela Ban
>
> For symmetric encryption, ENCRYPT has members with shared state: secret key, version and ciphers. In order for to provide consistent state between different threads accessing these members, they should be synchronized.
> I have implemented one solution by wrapping the state in separate object which can be found here:
> https://github.com/tepitebson/JGroups/tree/ENCRYPT_Thread_safety
> I also have replaced the WeakHashMap holding the previous keys with Cache in google's guava library so my solution probably is not suitable for an official solution.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 9 months
[JBoss JIRA] (WFLY-3651) permissions.xml is not used
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFLY-3651?page=com.atlassian.jira.plugin.... ]
Tomaz Cerar reassigned WFLY-3651:
---------------------------------
Assignee: David Lloyd (was: Stefan Guilhen)
> permissions.xml is not used
> ---------------------------
>
> Key: WFLY-3651
> URL: https://issues.jboss.org/browse/WFLY-3651
> Project: WildFly
> Issue Type: Bug
> Components: Security Manager
> Affects Versions: 8.1.0.Final
> Environment: Fedora 20, jdk1.7.0_60
> Reporter: Ondrej Kotek
> Assignee: David Lloyd
> Priority: Blocker
> Attachments: permissions-bug-1.0-SNAPSHOT.war
>
>
> With security manager turned on, an application cannot use permissions allowed by permissions.xml configuration -- against EE 7 specification.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 9 months
[JBoss JIRA] (WFLY-3651) permissions.xml is not used
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFLY-3651?page=com.atlassian.jira.plugin.... ]
Tomaz Cerar commented on WFLY-3651:
-----------------------------------
You cannot have
set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager=default
set JAVA_OPTS=%JAVA_OPTS% -Djava.security.policy=/tmp/test.policy
as part of your startup scripts, as this way you are overriding server's security manager and hence permissions.xml cannot work. only thing needed to enable security manager in wildfly is to add -scrmgr to jboss-modules parameters.
> permissions.xml is not used
> ---------------------------
>
> Key: WFLY-3651
> URL: https://issues.jboss.org/browse/WFLY-3651
> Project: WildFly
> Issue Type: Bug
> Components: Security Manager
> Affects Versions: 8.1.0.Final
> Environment: Fedora 20, jdk1.7.0_60
> Reporter: Ondrej Kotek
> Assignee: Stefan Guilhen
> Priority: Blocker
> Attachments: permissions-bug-1.0-SNAPSHOT.war
>
>
> With security manager turned on, an application cannot use permissions allowed by permissions.xml configuration -- against EE 7 specification.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 9 months
[JBoss JIRA] (WFLY-4001) Virtual host in jboss-web.xml doesn't work
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFLY-4001?page=com.atlassian.jira.plugin.... ]
Tomaz Cerar commented on WFLY-4001:
-----------------------------------
Yes for having listener --> vhost you need to define extra server, as separate servers have their own listeners and can have multiple vhosts defined for them.
This is analogs to how apache, nginx, iis,... servers do it.
In AS7 we didn't actually have this feature, there all vhosts ware accessible trough all listeners(connectors).
With some really ugly config hacks added later that allowed you to limit what vhost can be accessed by connector.
> Virtual host in jboss-web.xml doesn't work
> ------------------------------------------
>
> Key: WFLY-4001
> URL: https://issues.jboss.org/browse/WFLY-4001
> Project: WildFly
> Issue Type: Task
> Components: Web (Undertow)
> Affects Versions: 9.0.0.Alpha1
> Reporter: Jim Ma
> Assignee: Tomaz Cerar
> Attachments: host.war
>
>
> Define the following configuration for undertow subsystem and deploy the attached host.war with virtual host "vhost2" metada in jboss-web.xml.
> {code:xml}
> <subsystem xmlns="urn:jboss:domain:undertow:2.0">
> <buffer-cache name="default"/>
> <server name="default-server">
> <http-listener name="default" socket-binding="http"/>
> <host name="default-host" alias="localhost">
> <location name="/" handler="welcome-content"/>
> <filter-ref name="server-header"/>
> <filter-ref name="x-powered-by-header"/>
> </host>
> </server>
> <server name="undertow-server2">
> <http-listener name="listener2" socket-binding="http2"/>
> <host name="vhost2" alias="localhost4">
> <location name="/" handler="welcome-content2"/>
> <filter-ref name="server-header"/>
> <filter-ref name="x-powered-by-header"/>
> </host>
> </server>
> <servlet-container name="default">
> <jsp-config/>
> </servlet-container>
> <handlers>
> <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
> <file name="welcome-content2" path="${jboss.home.dir}/welcome-content2"/>
> </handlers>
> <filters>
> <response-header name="server-header" header-name="Server" header-value="WildFly/9"/>
> <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
> </filters>
> </subsystem>
> {code}
> Deploy is failed with error message :
> 14:37:27,092 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "host.war")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [
> "jboss.undertow.deployment.default-server.vhost2./host is missing [jboss.undertow.server.default-server.vhost2]",
> "jboss.undertow.deployment.default-server.vhost2./host.UndertowDeploymentInfoService is missing [jboss.undertow.server.default-server.vhost2]"
> ]}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 9 months
[JBoss JIRA] (WFLY-3651) permissions.xml is not used
by Alex Hinrichs (JIRA)
[ https://issues.jboss.org/browse/WFLY-3651?page=com.atlassian.jira.plugin.... ]
Alex Hinrichs commented on WFLY-3651:
-------------------------------------
I've reproduced the issue on Win 7, JDK 1.8.0_25, Wildfly 8.1.0 Final, Wildfly 9.0.0 Alpha 1:
- clean installation of JDK and Wildfly
- JAVA_OPTS:
set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager=default
set JAVA_OPTS=%JAVA_OPTS% -Djava.security.policy=/tmp/test.policy
set JAVA_OPTS=%JAVA_OPTS% -Djboss.home.dir=/tmp/wildfly-8.1.0.Final
set JAVA_OPTS=%JAVA_OPTS% -Djboss.server.home.dir=/tmp/wildfly-8.1.0.Final
- attached WAR deployed by copying it to folder "deployments"
- test.policy does NOT grant PropertyPermission/java.home/read to WAR
- request on /JSMCheckServlet returns: Java Security Manager is enabled
- request on /SysPropServlet returns: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "java.home" "read")
- in WAR: META-INF/permissions.xml contains:
<permission>
<class-name>java.util.PropertyPermission</class-name>
<name>*</name>
<actions>read,write</actions>
</pemission>
As soon as I turn on the JVM security manager because of EE7 spec EE.6.2.2.6 IMHO the permissions.xml should be checked at deploy time, the given permission should be tested and this WAR should NOT be deployed!
I also tested with other permissions (AllPermissions, ...) and permissions in jboss-permissions.xml with the same result. Seems that permissions given in (jboss-)permissions.xml are not checked at deploy time.
> permissions.xml is not used
> ---------------------------
>
> Key: WFLY-3651
> URL: https://issues.jboss.org/browse/WFLY-3651
> Project: WildFly
> Issue Type: Bug
> Components: Security Manager
> Affects Versions: 8.1.0.Final
> Environment: Fedora 20, jdk1.7.0_60
> Reporter: Ondrej Kotek
> Assignee: Stefan Guilhen
> Priority: Blocker
> Attachments: permissions-bug-1.0-SNAPSHOT.war
>
>
> With security manager turned on, an application cannot use permissions allowed by permissions.xml configuration -- against EE 7 specification.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 9 months