java.lang.ClassNotFoundException: org.eclipse.equinox.launcher.WebStartMain - eclipse-plugin

I try to launch my RCP-project with jnlp. So i implemented a small e4-RCP project. Starting with the product doesn't cause any problem. The application supposedly works just fine. I installed a tomcat server running at localhost:8080, this also starts very well. Than i wrote a jnlp file for the app. exported and signed the jar. When i try to start the app. as http://localhost:8080/webstart.jnlp i get the exception:
java.lang.ClassNotFoundException: org.eclipse.equinox.launcher.WebStartMain
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at de.checkpoint.webstart.WebstartLauncher.main(WebstartLauncher.java:9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Thread.java:748)
Having said all all of that, here is my main:
package de.checkpoint.webstart;
import org.eclipse.equinox.launcher.WebStartMain;
public class WebstartLauncher {
public static void main(String[] args) {
WebStartMain.main(args);
}
}
Here is my jnlp file:
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/" href="webstart.jnlp">
<information>
<title>Jnlp Webstart Test</title>
<vendor>Boris Nguema B.</vendor>
<homepage href="http://localhost:8080/" />
<description>Testing Webstart</description>
</information>
<security>
<all-permissions/>
</security>
<!-- <property name="eclipse.product" value="de.checkpoint.product"/> -->
<!-- <property name="osgi.frameworkParentClassloader" value="current"/> -->
<!-- <property name="jnlp.osgi.parentClassloader" value="current"/> -->
<resources>
<j2se version="1.8+" />
<jar href="de.checkpoint.start_1.0.0.201711041646.jar" />
</resources>
<application-desc main-class="de.checkpoint.webstart.WebstartLauncher" />
</jnlp>
Can anyone tells me, what am I missing?

I am not sure if you already found out the problem,but equinox launcher do not have those lines in the manifest:
Permissions: all-permissions
Codebase: *
Trusted-Only: true
you need to add them and sign.

Related

How do I use a Citrus mail endpoint in an Arquillian test on JEE server

I have a Java webapp where a REST call triggers a mail sent through a javax.mail.Session. The application is deployed as a .war archive that I want to test inside a JBoss EAP 7.2 server.
I am using Arquillian 1.5.0.Final and Citrus Framework version 2.8.0. My build system is Gradle 5.x and everything is using a Java 8 runtime.
I would like to create a Citrus mail endpoint and use Arquillian to provide this inside the JEE container. My experience with these frameworks is limited to a few days, so I'm starting with a sample application to gain more knowledge:
I have the following working against a simple web endpoint (The HelloServlet from https://guides.gradle.org/building-java-web-applications/):
#RunWith(Arquillian.class)
public class HelloServletTest {
#CitrusFramework
private Citrus citrusFramework;
#ArquillianResource
private URL baseUri;
private String serviceUri;
#Deployment(testable = false)
public static WebArchive createDeployment() {
final WebArchive war = ShrinkWrap.create(WebArchive.class)
.addClass(HelloServlet.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
// [...]
return war;
}
#Before
public void setUp() throws Exception {
serviceUri = new URL(baseUri, "hello").toExternalForm();
}
#Test
#CitrusTest
public void smokeTest(#CitrusResource TestDesigner designer) throws InterruptedException {
System.err.println("ServiceURI: " + serviceUri);
designer.send(serviceUri)
.message(new HttpMessage("?name=Jacob")
.method(HttpMethod.POST));
designer.receive(serviceUri).message(new HttpMessage("").status(HttpStatus.OK));
citrusFramework.run(designer.getTestCase());
}
}
I use #Deployment(testable=false) as this example runs a client-side test. However, my end goal is to use Citrus inside the container so my understanding is that I need to have #Deployment(testable=true). But when I run the test with testable=true a NPE is thrown:
java.lang.NullPointerException
at com.consol.citrus.annotations.CitrusAnnotations.injectAll(CitrusAnnotations.java:61)
at com.consol.citrus.arquillian.enricher.CitrusTestEnricher.enrich(CitrusTestEnricher.java:57)
at org.jboss.arquillian.junit.RulesEnricher.enrichInstances(RulesEnricher.java:85)
at org.jboss.arquillian.junit.RulesEnricher.enrichStatement(RulesEnricher.java:77)
[...]
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:128)
at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:114)
[...]
at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.fireCustomLifecycle(EventTestRunnerAdaptor.java:159)
at org.jboss.arquillian.junit.Arquillian$7.evaluate(Arquillian.java:273)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
[...]
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
[...]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.lang.Thread.run(Thread.java:748)
My arquillian.xml is
<?xml version="1.0" encoding="UTF-8"?>
<arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<defaultProtocol type="Servlet 3.0"/>
<engine>
<property name="deploymentExportPath">build/deployments</property>
</engine>
<container qualifier="wildfly-managed" default="true">
</container>
<extension qualifier="citrus">
<property name="autoPackage">false</property>
<property name="citrusVersion">2.8.0</property>
</extension>
</arquillian>
My citrus-context.xml is
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:citrus-mail="http://www.citrusframework.org/schema/mail/config"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.citrusframework.org/schema/mail/config http://www.citrusframework.org/schema/mail/config/citrus-mail-config.xsd">
<!-- Mail server mock -->
<citrus-mail:server id="mailServer"
auto-start="true"
port="2222"/>
</beans>
My questions are:
Does my approach make sense? Is it feasible to use Citrus and Arquillian in this way?
Is the NPE exception to be expected or am I missing some dependency or configuration?

Struts login Error submit onclicked environment:tomcat8 IDE:java9 Jquery UI draggable not scrolling the sortable container

i have a struts logindemo ,tomcat is started, but when i click the submit button , i do get a ERROR result
LoginAction.java
package com.actions;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.forms.UserForm;
public class LoginAction extends Action {
#Override
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
// TODO Auto-generated method stub
UserForm userform = (UserForm) form;
System.out.println("username:" + userform.getUsername());
System.out.println("password:" + userform.getPassword());
return null;
}
}
UserForm.java
package com.forms;
import org.apache.struts.action.ActionForm;
public class UserForm extends ActionForm {
/**
*
*/
private static final long serialVersionUID = 1L;
private String username;
private String password;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
login.jsp
<%# page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="/strutslogindemo/login.do" method="post">
user:<input type="text" name="username"></br>
pass:<input type="password" name="password"></br>
<input type="submit" value="submit">
</form>
</body>
</html>
struts-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<struts-config>
<form-beans>
<form-bean name="userForm" type="com.forms.UserForm"></form-bean>
</form-beans>
<action-mappings>
<action path="/login" name="userForm" type="com.actions.LoginAction">
<forward name="ok" path="/WEB-INF/ok.jsp"></forward>
<forward name="err" path="/WEB-INF/err.jsp"></forward>
</action>
</action-mappings>
</struts-config>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>
console err message
[INFO] ActionServlet - Loading chain catalog from jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%208.0/webapps/strutslogindemo/WEB-INF/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml
[ERROR] Digester - Begin event threw exception <java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")>java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
at java.base/java.security.AccessControlContext.checkPermission(Unknown Source)
at java.base/java.security.AccessController.checkPermission(Unknown Source)
at java.base/java.lang.SecurityManager.checkPermission(Unknown Source)
at java.base/java.lang.Class.checkMemberAccess(Unknown Source)
at java.base/java.lang.Class.getDeclaredMethods(Unknown Source)
at org.apache.commons.beanutils.MappedPropertyDescriptor.internalGetMethod(MappedPropertyDescriptor.java:348)
at org.apache.commons.beanutils.MappedPropertyDescriptor.getMethod(MappedPropertyDescriptor.java:390)
at org.apache.commons.beanutils.MappedPropertyDescriptor.<init>(MappedPropertyDescriptor.java:124)
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:925)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:933)
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:830)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:433)
at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:252)
at org.apache.commons.digester.Rule.begin(Rule.java:175)
at org.apache.commons.digester.Digester.startElement(Digester.java:1453)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1827)
at org.apache.commons.chain.config.ConfigParser.parse(ConfigParser.java:190)
at org.apache.struts.action.ActionServlet.initChain(ActionServlet.java:1687)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:350)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:293)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:290)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:325)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:176)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:124)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1215)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1140)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Unknown Source)
[ERROR] ActionServlet - Exception loading resources <org.xml.sax.SAXParseException; systemId: jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%208.0/webapps/strutslogindemo/WEB-INF/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml; lineNumber: 33; columnNumber: 24; Error at line 33 char 24: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")>org.xml.sax.SAXParseException; systemId: jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%208.0/webapps/strutslogindemo/WEB-INF/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml; lineNumber: 33; columnNumber: 24; Error at line 33 char 24: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
at org.apache.commons.digester.Digester.createSAXException(Digester.java:3181)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:3207)
at org.apache.commons.digester.Digester.startElement(Digester.java:1456)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1827)
at org.apache.commons.chain.config.ConfigParser.parse(ConfigParser.java:190)
at org.apache.struts.action.ActionServlet.initChain(ActionServlet.java:1687)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:350)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:293)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:290)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:325)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:176)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:124)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1215)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1140)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
at java.base/java.security.AccessControlContext.checkPermission(Unknown Source)
at java.base/java.security.AccessController.checkPermission(Unknown Source)
at java.base/java.lang.SecurityManager.checkPermission(Unknown Source)
at java.base/java.lang.Class.checkMemberAccess(Unknown Source)
at java.base/java.lang.Class.getDeclaredMethods(Unknown Source)
at org.apache.commons.beanutils.MappedPropertyDescriptor.internalGetMethod(MappedPropertyDescriptor.java:348)
at org.apache.commons.beanutils.MappedPropertyDescriptor.getMethod(MappedPropertyDescriptor.java:390)
at org.apache.commons.beanutils.MappedPropertyDescriptor.<init>(MappedPropertyDescriptor.java:124)
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:925)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:933)
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:830)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:433)
at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:252)
at org.apache.commons.digester.Rule.begin(Rule.java:175)
at org.apache.commons.digester.Digester.startElement(Digester.java:1453)
... 48 more
[ERROR] ActionServlet - Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency. <javax.servlet.ServletException: org.xml.sax.SAXParseException; systemId: jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%208.0/webapps/strutslogindemo/WEB-INF/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml; lineNumber: 33; columnNumber: 24; Error at line 33 char 24: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")>javax.servlet.ServletException: org.xml.sax.SAXParseException; systemId: jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%208.0/webapps/strutslogindemo/WEB-INF/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml; lineNumber: 33; columnNumber: 24; Error at line 33 char 24: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
at org.apache.struts.action.ActionServlet.initChain(ActionServlet.java:1691)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:350)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:293)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:290)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:325)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:176)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:124)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1215)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1140)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException; systemId: jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%208.0/webapps/strutslogindemo/WEB-INF/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml; lineNumber: 33; columnNumber: 24; Error at line 33 char 24: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
at org.apache.commons.digester.Digester.createSAXException(Digester.java:3181)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:3207)
at org.apache.commons.digester.Digester.startElement(Digester.java:1456)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1827)
at org.apache.commons.chain.config.ConfigParser.parse(ConfigParser.java:190)
at org.apache.struts.action.ActionServlet.initChain(ActionServlet.java:1687)
... 32 more
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
at java.base/java.security.AccessControlContext.checkPermission(Unknown Source)
at java.base/java.security.AccessController.checkPermission(Unknown Source)
at java.base/java.lang.SecurityManager.checkPermission(Unknown Source)
at java.base/java.lang.Class.checkMemberAccess(Unknown Source)
at java.base/java.lang.Class.getDeclaredMethods(Unknown Source)
at org.apache.commons.beanutils.MappedPropertyDescriptor.internalGetMethod(MappedPropertyDescriptor.java:348)
at org.apache.commons.beanutils.MappedPropertyDescriptor.getMethod(MappedPropertyDescriptor.java:390)
at org.apache.commons.beanutils.MappedPropertyDescriptor.<init>(MappedPropertyDescriptor.java:124)
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:925)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:933)
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:830)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:433)
at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:252)
at org.apache.commons.digester.Rule.begin(Rule.java:175)
at org.apache.commons.digester.Digester.startElement(Digester.java:1453)
... 48 more
2月 06, 2018 1:03:23 上午 org.apache.catalina.core.ApplicationContext log
信息: Marking servlet action as unavailable
2月 06, 2018 1:03:23 上午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Allocate exception for servlet action
javax.servlet.UnavailableException: org.xml.sax.SAXParseException; systemId: jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%208.0/webapps/strutslogindemo/WEB-INF/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml; lineNumber: 33; columnNumber: 24; Error at line 33 char 24: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:402)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:293)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:290)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:325)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:176)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:124)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1215)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1140)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Unknown Source)
Login image
enter image description here
ERROR image
enter image description here
eclipse path image
enter image description here
chain-config.xml
<?xml version="1.0" ?>
<!--
$Id: chain-config.xml 481833 2006-12-03 17:32:52Z niallp $
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This file contains definitions of the standard Chain Of Responsibility
chains that emulate Struts 1.2 processing functionality. These chains
are defined in a catalog named "struts" so that the application can
use the default catalog for its own purposes, without any potential for
name clashes.
$Id: chain-config.xml 481833 2006-12-03 17:32:52Z niallp $
-->
<catalog name="struts">
<define name="lookup"
className="org.apache.commons.chain.generic.LookupCommand"/>
<!-- ========== Servlet Complete Request Chain ========================= -->
<chain name="servlet-standard">
<!-- Establish exception handling filter -->
<command
className="org.apache.struts.chain.commands.ExceptionCatcher"
catalogName="struts"
exceptionCommand="servlet-exception"/>
<lookup
catalogName="struts"
name="process-action"
optional="false"/>
<lookup
catalogName="struts"
name="process-view"
optional="false"/>
</chain>
<!-- ========== Action Processing chain ======================== -->
<chain name="process-action">
<!--
This chain attempts to emulate (most of) the standard request
processing in the standard org.apache.struts.action.RequestProcessor
class, by performing the corresponding tasks in individual Commands
that are composable. The following list defines a cross reference
between the processXxx methods and the Commands that perform the
corresponding functionality:
processMultipart Integrated into servlet and legacy classes
processPath SelectAction (which also does processMapping)
processException ExceptionCatcher / ExceptionHandler
processLocale SelectLocale
processContent SetContentType
processNoCache RequestNoCache
processPreprocess LookupCommand with optional="true". Multiple
occurrences of this can easily be added, to
support additional processing hooks at any
point in the chain without modifying the
standard definition.
processCachedMessages RemoveCachedMessages
processMapping SelectAction (which also does processPath)
processRoles AuthorizeAction
processActionForm CreateActionForm
processPopulate PopulateActionForm
processValidate ValidateActionForm / SelectInput
processForward SelectForward
processInclude SelectInclude / PerformInclude
processActionCreate CreateAction
processActionPerform ExecuteAction
-->
<!-- Look up optional preprocess command -->
<lookup
catalogName="struts"
name="servlet-standard-preprocess"
optional="true"/>
<!-- Identify the Locale for this request -->
<command
className="org.apache.struts.chain.commands.servlet.SelectLocale"/>
<!-- Set (if needed) the URI of the original request -->
<command
className="org.apache.struts.chain.commands.servlet.SetOriginalURI"/>
<!-- Set (if needed) no cache HTTP response headers -->
<command
className="org.apache.struts.chain.commands.servlet.RequestNoCache"/>
<!-- Set (if needed) the HTTP response content type -->
<command
className="org.apache.struts.chain.commands.servlet.SetContentType"/>
<!-- Remove messages cached in the Session -->
<command
className="org.apache.struts.chain.commands.RemoveCachedMessages"/>
<!-- Identify the ActionConfig for this request -->
<command
className="org.apache.struts.chain.commands.servlet.SelectAction"/>
<!-- Authorize the selected ActionConfig for this request -->
<command
className="org.apache.struts.chain.commands.servlet.AuthorizeAction"/>
<!-- Create (if needed) the ActionForm for this request -->
<command
className="org.apache.struts.chain.commands.CreateActionForm"/>
<!-- Populate the ActionForm for this request -->
<command
className="org.apache.struts.chain.commands.servlet.PopulateActionForm"/>
<!-- Validate the ActionForm for this request -->
<command
className="org.apache.struts.chain.commands.servlet.ValidateActionForm"/>
<!-- Select the appropriate ForwardConfig for return to input page -->
<command
className="org.apache.struts.chain.commands.servlet.SelectInput"/>
<!-- Lookup and execute a chain command if the current ActionConfig is
so-configured. -->
<command
className="org.apache.struts.chain.commands.ExecuteCommand"/>
<!-- Select the appropriate ForwardConfig for action mappings that only
have an ActionForward -->
<command
className="org.apache.struts.chain.commands.servlet.SelectForward"/>
<!-- Select the include uri (if any) for the current action mapping -->
<command
className="org.apache.struts.chain.commands.SelectInclude"/>
<!-- Perform the include (if needed) -->
<command
className="org.apache.struts.chain.commands.servlet.PerformInclude"/>
<!-- Create (if needed) the Action for this request -->
<command
className="org.apache.struts.chain.commands.servlet.CreateAction"/>
<!-- Execute the Action for this request -->
<command
className="org.apache.struts.chain.commands.servlet.ExecuteAction"/>
</chain>
<!-- ========== View Processing chain ======================== -->
<chain name="process-view">
<!-- Lookup and execute a chain command if the current ForwardConfig is
so-configured. -->
<command
className="org.apache.struts.chain.commands.ExecuteForwardCommand"/>
<!-- Follow the returned ForwardConfig (if any) -->
<command
className="org.apache.struts.chain.commands.servlet.PerformForward"/>
</chain>
<!-- ========== Servlet Exception Handler Chain ======================== -->
<chain name="servlet-exception">
<!--
This chain is designed to be invoked (by o.a.s.c.ExceptionCatcher)
if an unhandled exception is thrown by any subsequent command
in a processing chain (including the one that invokes a Struts
action). The standard definition of this chain supports the
exception mapping of Struts 1.1, but can be replaced in order
to handle exceptions differently.
-->
<!-- Execute the configured exception handler (if any) -->
<command
className="org.apache.struts.chain.commands.servlet.ExceptionHandler"/>
<!-- Follow the returned ForwardConfig (if any) -->
<command
className="org.apache.struts.chain.commands.servlet.PerformForward"/>
</chain>
</catalog>

Selenium Java (ATUReporter)- Getting java.lang.NullPointerException error while running the testng suite with ATUReporter

I am getting java.lang.NullPointerException error while running my project which has Testng framework configured with ATUReporter
Things I have done:
Added the ATU jars in the project
Added the #Listeners({ ATUReportsListener.class, ConfigurationListener.class, MethodListener.class }) in my baseclass
Added the line System.setProperty("atu.reporter.config", "path\\ATU.properties");
Added this line to my testng file:
<listeners>
<listener class-name="atu.testng.reports.listeners.ATUReportsListener" />
<listener class-name="atu.testng.reports.listeners.ConfigurationListener" />
<listener class-name="atu.testng.reports.listeners.MethodListener" />
</listeners>
My ATU.properties file also is in the correct directory as mentioned in the Systemproperty line.
Please suggest !
Base class Sample:
#Listeners({ ATUReportsListener.class, ConfigurationListener.class, MethodListener.class })
public class test {
{
System.setProperty("atu.reporter.config", "path\\ATU.properties");
}
#Test(priority=0)
public void login()
{
OpenUrltest();
}
}
Error StackTrace:
java.lang.IllegalStateException: java.lang.NullPointerException
at atu.testng.reports.listeners.ATUReportsListener.onStart(Unknown Source)
at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:210)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1284)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1209)
at org.testng.TestNG.runSuites(TestNG.java:1124)
at org.testng.TestNG.run(TestNG.java:1096)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)
Caused by: java.lang.NullPointerException
at atu.testng.reports.utils.Directory.init(Unknown Source)
at atu.testng.reports.utils.Directory.verifyRequiredFiles(Unknown Source)
... 12 more
The error occured because the ATU Reports directory was manually created for the output reports generation. After deleting this directory the error got wiped out clean, so i think ATU autocreates this directory when you try to run the suite for the 1st time.

Arquillian managed container : Server not detected

So I "installed" Arquillian in my jboss project. I used managed container. The server is starting up when I launch my test class. I increased the timeout to 120s instead of 60s to be sure. The problem is that once the server is launched (an i can navigate in the web application), the test is never launched...
On the JUnit tab nothing is happening until the 120s are over and then I get a timeout as if the server that was started is not detected.
Once this error occured, the server is shutdown, so there is has to be a link right ?
Did anyone had the same error ?
Thanks
CODE:
this is the container in arquilian.xml
<container qualifier="jbossas-managed" default="true">
<configuration>
<property name="jbossHome">C:\Developpement\jboss-as-7.1.3.Final</property>
<property name="startupTimeoutInSeconds">120</property>
<property name="javaVmArguments">-server -Xms64m -Xmx6g -XX:MaxPermSize=1024m -Dorg.jboss.as.logging.per-deployment=false -Djava.util.Arrays.useLegacyMergeSort=true -Xrunjdwp:transport=dt_socket,address=8180,server=y,suspend=y</property>
<property name="managementPort">8180</property>
<property name="allowConnectingToRunningServer">true</property>
</configuration>
I use this in my pom file:
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-managed</artifactId>
<version>7.1.3.Final</version>
<exclusions>
<exclusion>
<groupId>google-collections</groupId>
<artifactId>google-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<version>1.2.1.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<version>1.0.4.Final</version>
</dependency>
This is my test file:
#RunWith(Arquillian.class)
public class BasculeTest {
private static final int COMPLETE = 0;
private static final int MONTH_INCREMENTATION = 1;
private static final int BASCULE = 2;
private static final int YEAR_INCREMENTATION = 3;
// #Inject CompteursCongesUpdate compteursCongesUpdate;
#Deployment
public static Archive<?> createTestArchive() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war").addClass(CompteursCongesUpdate.class)
.addAsWebInfResource("test-persistence.xml", "classes/META-INF/persistence.xml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
return war;
}
#Test
public void testBascule() {
System.out.println("------------------------------- Début TEST -------------------------------");
try {
// compteursCongesUpdate.updateCompteursConges(new Date(), MONTH_INCREMENTATION);
// System.out.println("test +" +compteursCongesUpdate);
System.out.println("--------");
} catch (Exception e) {
e.printStackTrace();
Assert.fail("Une exception a ete levee");
}
Assert.fail("Not yet implemented");
}
}
What I can do now is start the server normally (without executing the test class with junit) and afterwards execute the test class, once the server is runnng. Then I get a new error from log4j: nosuchfielderror: NO_FORMAT
java.lang.NoSuchFieldError: NO_FORMAT
at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:106)
at org.apache.log4j.Category.forcedLog(Category.java:118)
at org.apache.log4j.Category.log(Category.java:288)
at org.jboss.logging.Log4jLogger.doLogf(Log4jLogger.java:48)
at org.jboss.logging.Logger.debugf(Logger.java:565)
at org.jboss.as.arquillian.protocol.jmx.JMXProtocolPackager.generateArquillianServiceArchive(JMXProtocolPackager.java:112)
at org.jboss.as.arquillian.protocol.jmx.JMXProtocolPackager.generateDeployment(JMXProtocolPackager.java:101)
at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.buildTestableDeployments(DeploymentGenerator.java:193)
at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.createTestableDeployments(DeploymentGenerator.java:148)
at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.generateDeployment(DeploymentGenerator.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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.createSuiteContext(TestContextHandler.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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.createClassContext(TestContextHandler.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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)

Problem with Tapestry 5.2.4 & Selenium Tests

I am some problems since this morning with my Selenium Test.
I created a Selenium Test Class :
public class IEPatchSeleniumTest extends SeleniumTestCase{
#Test
public void testTypingXSSCode() {
open("/Index");
}
}
I configured my testng.xml like that :
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Kawwa Tests" verbose="1">
<test name="Integration Tests" enabled="true">
<parameter name="tapestry.web-app-folder" value="src/test/app0"/>
<packages>
<package name="net.mm.tapestry.security.integration" />
</packages>
</test>
</suite>
And my Maven-surefire-plugin declaration looks like :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/conf/testng.xml</suiteXmlFile>
</suiteXmlFiles>
<argLine>-Xmx500m -XX:MaxPermSize=256m</argLine>
</configuration>
</plugin>
But when I ran my tests suite, i have got 2 errors :
<test-method status="FAIL" signature="testStartup(org.testng.ITestContext, org.testng.xml.XmlTest)" name="testStartup" is-config="true" duration-ms="0" depends-on-groups="beforeStartup" started-at="2011-02-04T13:46:02Z" finished-at="2011-02-04T13:46:02Z">
<exception class="org.testng.TestNGException">
<message>
<![CDATA[
Method testStartup requires 2 parameters but 0 were supplied in the #Configuration annotation.]]>
</message>
<full-stacktrace>
<![CDATA[org.testng.TestNGException:
Method testStartup requires 2 parameters but 0 were supplied in the #Configuration annotation.
at org.testng.internal.Parameters.checkParameterTypes(Parameters.java:147)
at org.testng.internal.Parameters.createParameters(Parameters.java:96)
at org.testng.internal.Parameters.createParameters(Parameters.java:289)
at org.testng.internal.Parameters.createConfigurationParameters(Parameters.java:70)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:135)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
at org.testng.TestRunner.beforeRun(TestRunner.java:501)
at org.testng.TestRunner.run(TestRunner.java:469)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
at org.testng.SuiteRunner.run(SuiteRunner.java:198)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
at org.testng.TestNG.run(TestNG.java:708)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
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.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
]]>
</full-stacktrace>
</exception>
</test-method>
<test-method status="FAIL" signature="indicateTestMethodName(java.lang.reflect.Method)" name="indicateTestMethodName" is-config="true" duration-ms="0" started-at="2011-02-04T13:46:02Z" finished-at="2011-02-04T13:46:02Z">
<params>
<value>
<![CDATA[public void net.mm.tapestry.security.integration.IEPatchSeleniumTest.testTypingXSSCode()]]>
</value>
</params>
<exception class="java.lang.NullPointerException">
<full-stacktrace>
<![CDATA[java.lang.NullPointerException
at org.apache.tapestry5.test.SeleniumTestCase.indicateTestMethodName(SeleniumTestCase.java:292)
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.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:427)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:617)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:885)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
at org.testng.TestRunner.runWorkers(TestRunner.java:712)
at org.testng.TestRunner.privateRun(TestRunner.java:582)
at org.testng.TestRunner.run(TestRunner.java:477)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
at org.testng.SuiteRunner.run(SuiteRunner.java:198)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
at org.testng.TestNG.run(TestNG.java:708)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
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.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
]]>
</full-stacktrace>
</exception>
</test-method>
Anyone had these problems before? Which solution did you choose ?
Thanks a lot.
Check the version of TestNG that is being set in your pom.xml. :)