I am a newbie to the wildfly-swarm. I was able to prep a basic JAX-RS application in swarm, and worked like a charm. But when I'd tried to introduce CDI to my app, everything went wrong. The Bean Injection is not working!. I'm getting NULLPointerException in places where I'd tried to invoke the bean methods. I'd tried all possible solutions, that I could find over web. But nothing worked. Following is my pom.xml config;
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.uss</groupId>
<artifactId>hatts-swarm</artifactId>
<version>0.0.1-M0</version>
<packaging>war</packaging>
<properties>
<version.wildfly.swarm>2016.12.1</version.wildfly.swarm>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<failOnMissingWebXml>false</failOnMissingWebXml>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>bom-all</artifactId>
<version>${version.wildfly.swarm}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<finalName>jax_cdi</finalName>
<plugins>
<plugin>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
<version>${version.wildfly.swarm}</version>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Java EE 7 dependency -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>jaxrs</artifactId>
<version>2016.12.1</version>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>jaxrs-cdi</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>weld</artifactId>
</dependency>
</dependencies>
</project>
and following is my Main class;
public class BootStrap {
/**
* #param args
*/
public static void main(String[] args) {
try {
Swarm swarm = new Swarm(true);
JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class, "jax_cdi_microprofile");
deployment.addClass(RESTEntryManager.class).addClass(HTML5Generator.class)
.addClass(HattsACKTestService.class)
.addAsWebInfResource(new StringAsset(new StringBuilder("<?xml version=\"1.0\"?>")
.append(" <beans bean-discovery-mode=\"all\" version=\"1.1\" ")
.append(" xmlns=\"http://xmlns.jcp.org/xml/ns/javaee\"")
.append(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"")
.append(" xsi:schemaLocation=\"http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd\"/>")
.toString()), "beans.xml")
.addAllDependencies();
swarm.start().deploy(deployment);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
and following is my JAX-RS resource declaration;
#Path("/handshake-test")
#Stateless
public class HattsACKTestService {
#Resource(lookup = "java:jboss/ee/concurrency/executor/default")
private ManagedExecutorService managedExecutorService;
#Inject
private Authenticator authenticator;
public HattsACKTestService() {
// INTENTIONALLY LEFT AS BLANK
}
#GET
public void handshake(#Suspended AsyncResponse asyncResponse) {
/*
* new Thread(() -> {
*
* HTML5Generator html5Generator = new HTML5Generatorg.Builder()
* .setPageTitle("HATTS Handshake Service Response").appendPageBody(
* "H1", "Handshake Initiated...") .build();
*
* asyncResponse.resume(html5Generator.getContentBuilder().toString());
*
* }).start();
*/
/*managedExecutorService.submit(() -> {
asyncResponse.resume("Hi World!!!.. This is Wildfly in CDI !!!");
});*/
asyncResponse.resume(authenticator.authenticate());
}
}
and following is the Authenticator bean;
#Stateless
public class Authenticator {
/**
*
*/
public Authenticator() {
// TODO Auto-generated constructor stub
}
public String authenticate() {
return "Authenticated !!";
}
}
Not even the ManagedExectorService is injected!. Could any one help me to sort this out ?
Updating with the latest Error got, after trying the solution mentioned by Ken
2017-01-08 20:31:01,290 ERROR [stderr] (main) java.lang.reflect.InvocationTargetException
2017-01-08 20:31:01,291 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2017-01-08 20:31:01,291 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2017-01-08 20:31:01,292 ERROR [stderr] (main) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2017-01-08 20:31:01,292 ERROR [stderr] (main) at java.lang.reflect.Method.invoke(Method.java:498)
2017-01-08 20:31:01,292 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:37)
2017-01-08 20:31:01,293 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.run(Main.java:44)
2017-01-08 20:31:01,293 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.main(Main.java:35)
2017-01-08 20:31:01,294 ERROR [stderr] (main) Caused by: org.wildfly.swarm.container.DeploymentException: WFSWARM0007: Deployment failed: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"hatts.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"hatts.war\".WeldStartService: Failed to start service
2017-01-08 20:31:01,294 ERROR [stderr] (main) Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Authenticator with qualifiers #Default
2017-01-08 20:31:01,294 ERROR [stderr] (main) at injection point [UnbackedAnnotatedField] #Inject private com.uss.hatts.rest.acktest.HattsACKTestService.authenticator
2017-01-08 20:31:01,294 ERROR [stderr] (main) at com.uss.hatts.rest.acktest.HattsACKTestService.authenticator(HattsACKTestService.java:0)
2017-01-08 20:31:01,294 ERROR [stderr] (main) "},"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"hatts.war\".WeldStartService"],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}
2017-01-08 20:31:01,295 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:280)
2017-01-08 20:31:01,295 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:95)
2017-01-08 20:31:01,295 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.deploy(Swarm.java:475)
2017-01-08 20:31:01,295 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.main(Swarm.java:612)
2017-01-08 20:31:01,295 ERROR [stderr] (main) ... 7 more
2017-01-08 20:31:01,296 ERROR [stderr] (main) Exception in thread "main" java.lang.reflect.InvocationTargetException
2017-01-08 20:31:01,296 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2017-01-08 20:31:01,301 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2017-01-08 20:31:01,303 ERROR [stderr] (main) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2017-01-08 20:31:01,304 ERROR [stderr] (main) at java.lang.reflect.Method.invoke(Method.java:498)
2017-01-08 20:31:01,304 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:37)
2017-01-08 20:31:01,304 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.run(Main.java:44)
2017-01-08 20:31:01,304 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.main(Main.java:35)
2017-01-08 20:31:01,305 ERROR [stderr] (main) Caused by: org.wildfly.swarm.container.DeploymentException: WFSWARM0007: Deployment failed: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"hatts.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"hatts.war\".WeldStartService: Failed to start service
2017-01-08 20:31:01,305 ERROR [stderr] (main) Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Authenticator with qualifiers #Default
2017-01-08 20:31:01,305 ERROR [stderr] (main) at injection point [UnbackedAnnotatedField] #Inject private com.uss.hatts.rest.acktest.HattsACKTestService.authenticator
2017-01-08 20:31:01,305 ERROR [stderr] (main) at com.uss.hatts.rest.acktest.HattsACKTestService.authenticator(HattsACKTestService.java:0)
2017-01-08 20:31:01,305 ERROR [stderr] (main) "},"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"hatts.war\".WeldStartService"],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}
2017-01-08 20:31:01,305 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:280)
2017-01-08 20:31:01,306 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:95)
2017-01-08 20:31:01,306 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.deploy(Swarm.java:475)
2017-01-08 20:31:01,306 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.main(Swarm.java:612)
2017-01-08 20:31:01,308 ERROR [stderr] (main) ... 7 more
Your Maven dependencies need to be:
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>jaxrs</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>cdi</artifactId>
</dependency>
weld was renamed to cdi a few releases ago, and jaxrs-cdi is no longer explicitly needed. It's brought in for you.
With what you have in a custom main(), I'd recommend not using one at all and just letting WF Swarm create your deployment for you.
Related
We are currently developing a quarkus based MicroService application using the following extensions:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-metrics</artifactId>
</dependency>
Depending on the deployment environment, the application needs a database connection, or either not. We have been playing around with several properties inside the application.properties to get this two deployment modes up and running, but unfortunately we are failing when using it without database. While starting the application, we always getting this exception:
2021-03-05 10:52:33,364 WARN [io.agr.pool] (agroal-11) Datasource '<default>': I/O-Fehler: The Network Adapter could not establish the connection
2021-03-05 10:52:33,365 DEBUG [io.agr.pool] (agroal-11) Cause: : java.sql.SQLRecoverableException: I/O-Fehler: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:801)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:782)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:704)
at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:390)
at oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:510)
at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:149)
at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:106)
at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:206)
at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:452)
at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:434)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at io.agroal.pool.util.PriorityScheduledExecutor.beforeExecute(PriorityScheduledExecutor.java:65)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:569)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:521)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:660)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:287)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1481)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:540)
... 15 more
Caused by: java.io.IOException: Operation timed out, socket connect lapse 75231 ms. /172.24.2.177 1526 0 1 true
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:229)
at oracle.net.nt.ConnOption.connect(ConnOption.java:172)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:508)
... 20 more
Caused by: java.net.ConnectException: Operation timed out
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Net.java:482)
at sun.nio.ch.Net.connect(Net.java:474)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:647)
at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
at oracle.net.nt.TimeoutSocketChannel.connect(TimeoutSocketChannel.java:108)
at oracle.net.nt.TimeoutSocketChannel.<init>(TimeoutSocketChannel.java:86)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:188)
... 22 more
Setting quarkus.datasource.jdbc.initial-size = 0 didn't helped.
Setting quarkus.datasource.jdbc = false leads to this build failure:
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.12.1.Final:build (default) on project avitech-aim-snw-svc: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#configurationDescriptorBuilding threw an exception: io.quarkus.runtime.configuration.ConfigurationException: The default datasource is not configured but the persistence unit '<default>' uses it.
[ERROR] at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.lambda$producePersistenceUnitDescriptorFromConfig$6(HibernateOrmProcessor.java:754)
[ERROR] at java.util.Optional.orElseThrow(Optional.java:290)
[ERROR] at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.producePersistenceUnitDescriptorFromConfig(HibernateOrmProcessor.java:753)
[ERROR] at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.handleHibernateORMWithNoPersistenceXml(HibernateOrmProcessor.java:686)
[ERROR] at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.configurationDescriptorBuilding(HibernateOrmProcessor.java:310)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] at java.lang.Thread.run(Thread.java:748)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] -> [Help 1]
Does anyone have any idea if such a use case is even achievable ?
So we are trying to backup our database using the following script:
public void backup() throws SQLException {
try {
log.info("Trying to connect with DB");
String sqlFilePath = "./Backup_" + LocalDateTime.now() + ".sql";
Query q = em.createNativeQuery(String.format("SCRIPT TO '%s'", sqlFilePath));
log.info(q.getResultList().toString());
}
catch (Exception e){
e.printStackTrace();
throw new SQLException();
}
}
This works flawlessly on linux, however our software needs to be able to run on Windows as well, however in windows I keep getting the following fileNotFoundException:
14:57:29,826 ERROR [stderr] (default task-21) Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.FileNotFoundException: .\Backup_2020-02-25T14:57:29.148621200.sql (The filename, directory name, or volume label syntax is incorrect)"; "./Backup_2020-02-25T14:57:29.148621200.sql"; SQL statement:
14:57:29,826 ERROR [stderr] (default task-21) BACKUP TO './Backup_2020-02-25T14:57:29.148621200.sql' [90031-193]
14:57:29,826 ERROR [stderr] (default task-21) at com.h2database.h2#1.4.193//org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
14:57:29,826 ERROR [stderr] (default task-21) at com.h2database.h2#1.4.193//org.h2.message.DbException.get(DbException.java:168)
14:57:29,827 ERROR [stderr] (default task-21) at com.h2database.h2#1.4.193//org.h2.message.DbException.convertIOException(DbException.java:330)
14:57:29,827 ERROR [stderr] (default task-21) at com.h2database.h2#1.4.193//org.h2.command.dml.BackupCommand.backupTo(BackupCommand.java:102)
14:57:29,827 ERROR [stderr] (default task-21) at com.h2database.h2#1.4.193//org.h2.command.dml.BackupCommand.update(BackupCommand.java:51)
14:57:29,827 ERROR [stderr] (default task-21) at com.h2database.h2#1.4.193//org.h2.command.CommandContainer.update(CommandContainer.java:98)
14:57:29,827 ERROR [stderr] (default task-21) at com.h2database.h2#1.4.193//org.h2.command.Command.executeUpdate(Command.java:258)
14:57:29,827 ERROR [stderr] (default task-21) at com.h2database.h2#1.4.193//org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:160)
14:57:29,828 ERROR [stderr] (default task-21) at com.h2database.h2#1.4.193//org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:146)
14:57:29,828 ERROR [stderr] (default task-21) at org.jboss.ironjacamar.jdbcadapters#1.4.17.Final//org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:537)
14:57:29,828 ERROR [stderr] (default task-21) at org.hibernate#5.3.13.Final//org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175)
14:57:29,828 ERROR [stderr] (default task-21) ... 107 more
14:57:29,828 ERROR [stderr] (default task-21) Caused by: java.io.FileNotFoundException: .\Backup_2020-02-25T14:57:29.148621200.sql (The filename, directory name, or volume label syntax is incorrect)
14:57:29,828 ERROR [stderr] (default task-21) at java.base/java.io.FileOutputStream.open0(Native Method)
14:57:29,828 ERROR [stderr] (default task-21) at java.base/java.io.FileOutputStream.open(FileOutputStream.java:292)
14:57:29,828 ERROR [stderr] (default task-21) at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
14:57:29,829 ERROR [stderr] (default task-21) at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:124)
14:57:29,829 ERROR [stderr] (default task-21) at com.h2database.h2#1.4.193//org.h2.store.fs.FilePathDisk.newOutputStream(FilePathDisk.java:290)
14:57:29,829 ERROR [stderr] (default task-21) at com.h2database.h2#1.4.193//org.h2.store.fs.FileUtils.newOutputStream(FileUtils.java:233)
14:57:29,829 ERROR [stderr] (default task-21) at com.h2database.h2#1.4.193//org.h2.command.dml.BackupCommand.backupTo(BackupCommand.java:67)
14:57:29,829 ERROR [stderr] (default task-21) ... 114 more
Any help would be much appreciated! :)
: cannot be used on Windows as a part of file name. You need to replace it with some allowed character, for example with LocalDateTime.now().toString().replace(':', '_') or with custom DateTimeFormatter.
I'm trying to using wildfly-swarm with project-stages.yml
src/main/resources/META-INF/persistence.xml
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<persistence-unit name="somePU" transaction-type="JTA">
<jta-data-source>someDS</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="javax.persistence.validation.mode" value="CALLBACK" />
</properties>
</persistence-unit>
</persistence>
src/main/resources/project-stages.yml
project:
stage: default
---
project:
stage: development
logger:
level: DEBUG
swarm:
jdbc:
driver: org.apache.derby.jdbc.EmbeddedDriver
ds:
name: someDS
connection:
url: jdbc:derby:memory:someDB;create=true
port:
offset: 200
---
project:
stage: integration
---
project:
stage: staging
---
project:
stage: production
mvn -Dswarm.project.stage=development -jar target/some-server-swarm.jar
2017-01-07 18:09:48,782 ERROR [stderr] (main) java.lang.reflect.InvocationTargetException
2017-01-07 18:09:48,782 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2017-01-07 18:09:48,782 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2017-01-07 18:09:48,783 ERROR [stderr] (main) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2017-01-07 18:09:48,783 ERROR [stderr] (main) at java.lang.reflect.Method.invoke(Method.java:498)
2017-01-07 18:09:48,783 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:37)
2017-01-07 18:09:48,783 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.run(Main.java:44)
2017-01-07 18:09:48,783 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.main(Main.java:35)
2017-01-07 18:09:48,784 ERROR [stderr] (main) Caused by: org.wildfly.swarm.container.DeploymentException: WFSWARM0007: Deployment failed: {"WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.datasources.someDS"],"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"some-server.war#somePU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.someDS]","jboss.persistenceunit.\"some-server.war#somePU\" is missing [jboss.naming.context.java.jboss.datasources.someDS]"]}
2017-01-07 18:09:48,784 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:280)
2017-01-07 18:09:48,784 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:95)
2017-01-07 18:09:48,784 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.deploy(Swarm.java:475)
2017-01-07 18:09:48,784 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.main(Swarm.java:612)
2017-01-07 18:09:48,784 ERROR [stderr] (main) ... 7 more
2017-01-07 18:09:48,784 ERROR [stderr] (main) Exception in thread "main" java.lang.reflect.InvocationTargetException
2017-01-07 18:09:48,785 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2017-01-07 18:09:48,785 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2017-01-07 18:09:48,785 ERROR [stderr] (main) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2017-01-07 18:09:48,785 ERROR [stderr] (main) at java.lang.reflect.Method.invoke(Method.java:498)
2017-01-07 18:09:48,785 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:37)
2017-01-07 18:09:48,785 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.run(Main.java:44)
2017-01-07 18:09:48,785 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.main(Main.java:35)
2017-01-07 18:09:48,785 ERROR [stderr] (main) Caused by: org.wildfly.swarm.container.DeploymentException: WFSWARM0007: Deployment failed: {"WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.datasources.someDS"],"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"some-server.war#somePU\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.someDS]","jboss.persistenceunit.\"some-server.war#somePU\" is missing [jboss.naming.context.java.jboss.datasources.someDS]"]}
2017-01-07 18:09:48,785 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:280)
2017-01-07 18:09:48,786 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:95)
2017-01-07 18:09:48,786 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.deploy(Swarm.java:475)
2017-01-07 18:09:48,786 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.main(Swarm.java:612)
2017-01-07 18:09:48,786 ERROR [stderr] (main) ... 7 more
I'm sharing my solution for others.
src/main/resources/project-stages.yml
As, simas_ch noted, How to create a datasource is enough to fix this part.
swarm:
datasources:
data-sources:
someDS:
driver-name: h2
connection-url: jdbc:h2:mem:someDB
src/main/resources/META-INF/persistence.xml
This part is always the most painful one. I had to do like this.
<jta-data-source>java:jboss/datasources/someDS</jta-data-source>
In a clean Camel project I add the following dependency:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jsonpath</artifactId>
<version>2.16.1</version>
</dependency>
When I run the project I get the below error. If I remove that dependency it works. I have tried this on two different projects and the same happens. Anything else that has to be added to the pom for jsonpath to work? It seems to complain for ASM?
[INFO] Using org.apache.camel.test.blueprint.Main to initiate a CamelContext
[INFO] Starting Camel ...
[mel.test.blueprint.Main.main()] Activator INFO Camel activator starting
[mel.test.blueprint.Main.main()] Activator INFO Camel activator started
[ Blueprint Extender: 1] BlueprintContainerImpl INFO Bundle INT001_GetPostcodeDataFromXXX/0.0.1.SNAPSHOT is waiting for namespace handlers [http://camel.apache.org/schema/blueprint]
EventDispatcher: Error during dispatch.
EventDispatcher: Error during dispatch.
EventDispatcher: Error during dispatch.
EventDispatcher: Error during dispatch.
EventDispatcher: Error during dispatch.
org.osgi.framework.ServiceException: Service factory exception: org/objectweb/asm/commons/AdviceAdapter
at org.apache.felix.connect.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:246)
at org.apache.felix.connect.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:178)
at org.apache.felix.connect.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:323)
at org.apache.felix.connect.PojoSRBundleContext.getService(PojoSRBundleContext.java:162)
at org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl.addingService(NamespaceHandlerRegistryImpl.java:113)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:864)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:894)
at org.apache.felix.connect.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:852)
at org.apache.felix.connect.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:775)
at org.apache.felix.connect.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:594)
at org.apache.felix.connect.PojoSR$1.serviceChanged(PojoSR.java:78)
at org.apache.felix.connect.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:130)
at org.apache.felix.connect.PojoSRBundleContext.registerService(PojoSRBundleContext.java:101)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerService(BlueprintContainerImpl.java:453)
at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:193)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:704)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:379)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/commons/AdviceAdapter
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.createProxyClass(ProxyClassLoader.java:146)
at org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:95)
at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:80)
at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)
at org.apache.aries.proxy.impl.AbstractProxyManager.createInterceptingProxy(AbstractProxyManager.java:53)
at org.apache.aries.blueprint.container.ServiceRecipe$TriggerServiceFactory.getService(ServiceRecipe.java:569)
at org.apache.felix.connect.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:242)
... 31 more
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.commons.AdviceAdapter
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 49 more
org.osgi.framework.ServiceException: Service factory exception: org/objectweb/asm/commons/AdviceAdapter
at org.apache.felix.connect.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:246)
at org.apache.felix.connect.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:178)
at org.apache.felix.connect.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:323)
at org.apache.felix.connect.PojoSRBundleContext.getService(PojoSRBundleContext.java:162)
at org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl.addingService(NamespaceHandlerRegistryImpl.java:113)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:864)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:894)
at org.apache.felix.connect.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:852)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/commons/AdviceAdapter
Edit:
After adding:
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>5.0.3</version>
<scope>runtime</scope>
</dependency>
It worked but doubt this is the correct way. The camel-component should get all the dependent jars.
I posted this on the Camel nabble forum and indeed it seems you need to add the asm dependency to get it to work.
http://camel.465427.n5.nabble.com/Error-with-Camel-component-camel-jsonpath-td5777201.html
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>5.0.3</version>
<scope>runtime</scope>
</dependency>
the pom.xml are about compile-time dependencies. You have a runtime error about a missing dependency (org.objectweb.asm). You should add it to your container.
In your stack traces : a new service is registered in a blueprint context. this service is then injected in another blueprint context. for this service, the blueprint container want to wrap it in a new proxy, and to create this kind of proxy, aries blueprint need org.objectweb.asm. i don't think this error is directly related to camel-jsonpath.
In my case, back when asm-commons with version 5.0.3 was used, I was still getting some error. As an altetrnative to previous answer, asm-all artifact can be used instead, since it includes other dependencies that in my scenario were breaking otherwise.
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-all</artifactId>
<scope>runtime</scope>
</dependency>
However, regarding deployment, it seems quite impossible to integrate the project using this dependency to Fabric8 (no errors on console log and containers do not start), so not sure if there is a better alternative with a sort of camel-jsonpath feature.
Hope it helps someone.
Hi I am new in automation testing
I am using:
Eclipse: Eclipse IDE for Java Developers
Version: Indigo Service Release 2
Build id: 20120216-1857
And apache maven version: apache-maven-3.0.4
I am facing problem to run automation script through maven and the error is:
D:\TestAutomation\MyTestProject_24>mvn install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for MyTestProject_24:MyTestProject_24:jar:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for org.sikuli:sikuli-java:jar should use a variable
instead of a hard-coded path C:\SikuliX\sikuli-java.jar # line 109, column 18
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missi
ng. # line 125, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your
build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MyTestProject24 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # MyTestProject_24 ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # MyTestProject_24 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) #MyTestProject_24 ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # MyTestProject_24 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) # MyTestProject_24 ---
[INFO] Surefire report directory: D:\TestAutomation\MyTestProject_24\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.531s
[INFO] Finished at: Mon Nov 17 11:41:00 IST 2014
[INFO] Final Memory: 7M/19M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project MyTestProject_24: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process
[ERROR] org.testng.TestNGException:
[ERROR] Cannot instantiate class WebConsoleTest.WebConsoleLoginTest
[ERROR] at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
[ERROR] at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
[ERROR] at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
[ERROR] at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
[ERROR] at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
[ERROR] at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
[ERROR] at org.testng.TestRunner.initMethods(TestRunner.java:409)
[ERROR] at org.testng.TestRunner.init(TestRunner.java:235)
[ERROR] at org.testng.TestRunner.init(TestRunner.java:205)
[ERROR] at org.testng.TestRunner.<init>(TestRunner.java:153)
[ERROR] at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:522)
[ERROR] at org.testng.SuiteRunner.init(SuiteRunner.java:157)
[ERROR] at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
[ERROR] at org.testng.TestNG.createSuiteRunner(TestNG.java:1273)
[ERROR] at org.testng.TestNG.createSuiteRunners(TestNG.java:1260)
[ERROR] at org.testng.TestNG.runSuitesLocally(TestNG.java:1114)
[ERROR] at org.testng.TestNG.run(TestNG.java:1031)
[ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:293)
[ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
[ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:91)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBoote
r.java:200)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] Caused by: java.lang.reflect.InvocationTargetException
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
57)
[ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm
pl.java:45)
[ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
[ERROR] at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
[ERROR] ... 22 more
[ERROR] Caused by: java.lang.NoClassDefFoundError: testlink/api/java/client/TestLinkAPIException
[ERROR] at WebConsoleTest.WebConsoleLoginTest.<init>(WebConsoleLoginTest.java:35)
[ERROR] ... 27 more
[ERROR] Caused by: java.lang.ClassNotFoundException: testlink.api.java.client.TestLinkAPIException
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
[ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
[ERROR] ... 28 more
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following arti
cles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
D:\TestAutomation\MyTestProject_24>
And POM.xml is:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>MyTestProject_24</groupId>
<artifactId>MyTestProject_24</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>MyTestProject24</name>
<dependencies>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium.grid</groupId>
<artifactId>selenium-grid-hub</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.28.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-testng</artifactId>
<version>2.17</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.28.0</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.8</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.46</version>
</dependency>
<dependency>
<groupId>net.schmizz</groupId>
<artifactId>sshj</artifactId>
<version>0.7.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>0.9.27</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>0.9.27</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>com.opera</groupId>
<artifactId>operadriver</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.sikuli</groupId>
<artifactId>sikuli-java</artifactId>
<version>1.0.1</version>
<scope>system</scope>
<systemPath>C:\SikuliX\sikuli-java.jar</systemPath>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.sikuli</groupId>
<artifactId>sikuli-core</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<groupId>eviware</groupId>
<artifactId>maven-soapui-plugin</artifactId>
<version>4.5.1</version>
<dependencies>
<dependency>
<groupId>br.eti.kinoshita</groupId>
<artifactId>testlink-java-api</artifactId>
<version>1.9.6-1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
To fix this issue, add the <version> tag as shown below:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
.
.
.
</pluginManagement>
</build>
Note - This version number I have extracted from the Maven log that you have provided.