[JBoss JIRA] (ARQ-1304) Create test ApplicationContext through factory method.
by Jakub Narloch (JIRA)
[ https://issues.jboss.org/browse/ARQ-1304?page=com.atlassian.jira.plugin.s... ]
Jakub Narloch updated ARQ-1304:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
Pushed upstream: Pushed upstream: https://github.com/arquillian/arquillian-extension-spring/commit/c1cb0ff9...
> Create test ApplicationContext through factory method.
> ------------------------------------------------------
>
> Key: ARQ-1304
> URL: https://issues.jboss.org/browse/ARQ-1304
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Extension - Spring
> Affects Versions: spring_1.0.0.Beta1
> Reporter: Jakub Narloch
> Assignee: Jakub Narloch
> Fix For: spring_1.0.0.next
>
>
> Current version brings the concept of custom classes, which allows to define the concreate class that will be used to instantiate the ApplicationContext. Maybe it would be good idea to give the user full control on how the ApplicationContext will be created, so he can not only use some specialized implementation but would be also able to configure it correctly.
> On the code level this would be achive by 'scaning' for static method that will be responsible for creating the ApplicationContext instance e.g.:
> {code}
> @SpringApplicationContext ApplicationContext [method_name]() {}
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (ARQ-1393) Unable to deploy ROOT.war to Tomcat remote and managed containers
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1393?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen resolved ARQ-1393.
--------------------------------
Assignee: Ian Brandt
Resolution: Done
pushed upstream https://github.com/arquillian/arquillian-container-tomcat/commit/f60a32c3...
> Unable to deploy ROOT.war to Tomcat remote and managed containers
> -----------------------------------------------------------------
>
> Key: ARQ-1393
> URL: https://issues.jboss.org/browse/ARQ-1393
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Tomcat Containers
> Affects Versions: tomcat_1.0.0.CR4
> Reporter: Ian Brandt
> Assignee: Ian Brandt
> Fix For: tomcat_1.0.0.Final
>
>
> Tomcat treats ROOT.war as special in that it signifies the webapp for the empty string (i.e. root) context path. The current {{CommonTomcatManager}} implementation attempts to deploy ROOT.war to the Tomcat Manager with the command "/deploy?path=/ROOT". A first run like this to a clean Tomcat installation fails as follows:
> {noformat}
> java.lang.RuntimeException: The server command (/text/deploy?path=%2FROOT) failed with content (FAIL - Failed to deploy application at context path /ROOT).
> at org.jboss.arquillian.container.tomcat.CommonTomcatManager.processResponse(CommonTomcatManager.java:274)
> at org.jboss.arquillian.container.tomcat.CommonTomcatManager.execute(CommonTomcatManager.java:227)
> at org.jboss.arquillian.container.tomcat.CommonTomcatManager.deploy(CommonTomcatManager.java:94)
> at org.jboss.arquillian.container.tomcat.managed_7.TomcatManagedContainer.deploy(TomcatManagedContainer.java:206)
> at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)
> at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)
> at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
> at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)
> 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:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.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:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
> 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:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
> 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:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)
> at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)
> at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)
> at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)
> at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)
> 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:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)
> 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:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
> 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:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
> 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:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
> at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> {noformat}
> Subsequent runs fail on a collision, as the prior undeploy command for "/ROOT" was a no-op:
> {noformat}
> SEVERE: Error deploying web application archive /Applications/Development/apache-tomcat-7.0.40/webapps/ROOT.war
> java.lang.IllegalArgumentException: addChild: Child name '' is not unique
> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:887)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:542)
> at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1462)
> 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:597)
> at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
> at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:762)
> at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1445)
> at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:677)
> at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:435)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> at java.lang.Thread.run(Thread.java:680)
> {noformat}
> The respective deploy and undeploy commands for ROOT.war need to be "/deploy?path=/" and "/undeploy?path=/".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (ARQGRA-308) Should throw exception if page fragment not instantiable
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-308?page=com.atlassian.jira.plugin... ]
Jan Papousek commented on ARQGRA-308:
-------------------------------------
Graphene executes a few enrichers and each of them has loops over fields of the test class. The enricher detect from the field type whether the enrichment should be performed or shouldn't be. Explanation why the Page Fragment Enricher doesn't throw an exception is simple -> the field class is final, so the enrichment of the field is skipped (and maybe there is another enricher which is able to handle it).
I suggest to log WARN instead of throwing an exception.
Btw. the code which checks whether the field should be enriched or not by the Page Fragment Enricher is:
{code}
protected final boolean isPageFragmentClass(Class<?> clazz) {
// check whether it isn't interface or final class
if (Modifier.isInterface(clazz.getModifiers()) || Modifier.isFinal(clazz.getModifiers())
|| Modifier.isAbstract(clazz.getModifiers())) {
return false;
}
Class<?> outerClass = clazz.getDeclaringClass();
// check whether there is an empty constructor
if (outerClass == null || Modifier.isStatic(clazz.getModifiers())) {
return ReflectionHelper.hasConstructor(clazz);
// check whether there is an empty constructor with outer class
} else {
return ReflectionHelper.hasConstructor(clazz, outerClass);
}
}
{code}
(from https://github.com/arquillian/arquillian-graphene/blob/master/graphene-we...)
> Should throw exception if page fragment not instantiable
> --------------------------------------------------------
>
> Key: ARQGRA-308
> URL: https://issues.jboss.org/browse/ARQGRA-308
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.0.0.Alpha4
> Reporter: Bernard Labno
>
> If page fragment is inner final class then it's not injected into field annotated with @FindBy and no exception is thrown.
> Graphene should throw exception that desired class cannot be instantiated.
> Right now user spends lots of time debugging and wondering if the selector is wrong. It's hard to find out that it's the "final" word to be blamed here:
> public static final class InvitedSupplier
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months
[JBoss JIRA] (ARQGRA-308) Should throw exception if page fragment not instantiable
by Bernard Labno (JIRA)
Bernard Labno created ARQGRA-308:
------------------------------------
Summary: Should throw exception if page fragment not instantiable
Key: ARQGRA-308
URL: https://issues.jboss.org/browse/ARQGRA-308
Project: Arquillian Graphene
Issue Type: Bug
Affects Versions: 2.0.0.Alpha4
Reporter: Bernard Labno
If page fragment is inner final class then it's not injected into field annotated with @FindBy and no exception is thrown.
Graphene should throw exception that desired class cannot be instantiated.
Right now user spends lots of time debugging and wondering if the selector is wrong. It's hard to find out that it's the "final" word to be blamed here:
public static final class InvitedSupplier
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 6 months