camelot-test-maven-plugin: config not found! Paths=[] - plugins

I'm trying to execute camelot-test:run goal on Camelot-based multimodule project where one of the modules is using camelot-test-maven-plugin:
$ mvn clean compile camelot-test:run
.... (a lot of output)
org.springframework.beans.factory.BeanInitializationException: Cannot initialize plugins system: config not found! Paths=[]
at ru.yandex.qatools.camelot.core.impl.GenericPluginsEngine.loadConfigs(GenericPluginsEngine.java:391)[camelot-core-2.1.12.jar:]
at ru.yandex.qatools.camelot.core.impl.GenericPluginsEngine.getConfigs(GenericPluginsEngine.java:149)[camelot-core-2.1.12.jar:]
at ru.yandex.qatools.camelot.core.impl.GenericPluginsEngine.getPluginsMap(GenericPluginsEngine.java:231)[camelot-core-2.1.12.jar:]
at ru.yandex.qatools.camelot.core.impl.ProcessingEngineImpl$1.onCamelContextStarted(ProcessingEngineImpl.java:86)[camelot-core-2.1.12.jar:]
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1987)[camel-core-2.13.2.jar:2.13.2]
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1851)[camel-core-2.13.2.jar:2.13.2]
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1683)[camel-core-2.13.2.jar:2.13.2]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[camel-core-2.13.2.jar:2.13.2]
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1651)[camel-core-2.13.2.jar:2.13.2]
...and so on and so forth
How can I fix this issue?

You should launch camelot-test-maven-plugin directly from the submodule directory, containing camelot.xml. The fact is that you cannot use it from the root module directory. This behaviour is typical for the similar maven plugins (like jetty-maven-plugin).

Related

Create g8 Template From a Git Remote Project

I have a sbt g8 template that I customized for my projects and this is located as one of the sub project in a multi module scala sbt project which is assigned to my organization. For example.,
main-project
- projec1
- sbt-template-project.g8
- some-other-project
The main-project is available in my git repo and I would like to know how I can create a project from the sbt-template-project? I tried the following, but it says "Template Not Found":
sbt new file:https://github.com/my-organization/main-project/tree/master/sbt-template-project.g8
I also tried:
sbt new file:https://github.com/my-organization/main-project/sbt-template-project.g8
I also tried:
sbt new https://github.com/my-organization/main-project/sbt-template-project.g8
What is the correct way to generate the project out of the template?
EDIT: I even tried the following:
sbt new my-organization/main-project -d sbt-template-project-g8
Even that is failing with the message "Template not found"
Your flow is basically not supported - see: http://www.foundweekends.org/giter8/template.html - Giter8 (and sbt new) support only GitHub repositories where the template in either in the root directory or in src/main/g8.
Your best option is to git clone it manually and then call sbt new passing path to the subdirectory:
git clone https://github.com/my-organization/main-project tmp-template-dir
sbt new file://tmp-template-dir/sbt-template-project.g8
rm -rf tmp-template-dir
It is important that the directory name end with .g8.

Remoting in spring: es.interop.dto.NameDto cannot be cast to es.interop.dto.NameDto

I have a Multi-Project gradle + spring-boot configuration. There is a ":interop" project that contains common classes and there are other two projects, ":backend" and ":frontend" that include this other project as dependency, like this:
compile project(":interop")
I execute an RMI call from ":frontend" to ":backend". If I execute .gradlew build and run the resulting jars from command line I get no error. But if I run them directly in eclipse I get the following error in ":frontend":
java.lang.ClassCastException: es.interop.dto.NameDto cannot be cast to es.interop.dto.NameDto
There are only two copy of NameDto.class in file system.
$ find ~ -name NameDto.class
./interop/bin/es/interop/dto/NameDto.class
./interop/build/classes/main/es/interop/dto/NameDto.class
The .classpath includes the project as:
$ grep interop frontend/.classpath
<classpathentry kind="src" path="/interop"/>
Any glues are welcome.
edit The service definition is:
public interface NameService {
List<NameDto> findAll();
NameDto create(String value);
}
edit I am using Dev-Tools. It is causing the problems:
compile("org.springframework.boot:spring-boot-devtools:1.3.0.RELEASE")
I found that Dev-Tools reloads always on startup, even without changing the code once started. In this reload, probably, bytecode of NameDto is modified in backend and frontend so two different versions classes appear.
Removing Dev-Tools dependency worked for me.
Looking for a better answer in Dev-Tools docs it seems that using Dev-Tools in addition to a java-agent such as JRebel or SpringLoaded prevents reload on start and, therefore, it should work.

cmake to eclipse project conversion issue

I am trying to create an eclipse project from a cmake project .
I used the following command
cmake -G "Eclipse CDT4 - Unix Makefiles" ./`
it gives the following error
CMake Error at CMakeLists.txt:119 (find_package):
By not providing "FindGlib.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Glib", but
CMake did not find one.
Could not find a package configuration file provided by "Glib" (requested
version 2.28) with any of the following names:
GlibConfig.cmake
glib-config.cmake
Add the installation prefix of "Glib" to CMAKE_PREFIX_PATH or set
"Glib_DIR" to a directory containing one of the above files. If "Glib"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
I have glib installed . actually it couldn't resolve the path i guess. wherever find is there in cmake file , it is giving the smiler errors. please i suggest a way out, i badly need to load this project in cmake. Thanks.
Here is line 119 where error message is pointing
find_package(Glib 2.28 REQUIRED)
include_directories(${Glib_INCLUDE_DIRS})
list(APPEND LIBS ${Glib_LIBRARIES})
add_definitions(${Glib_DEFINITIONS})
When you call find_package(MyPackage) in a CMake file, it tries to find a FindMyPackage.cmake configuration in its system path (/usr/share/cmake-2.8/Modules on my Ubuntu box), or in the directory you did specify as CMAKE_MODULE_PATH).
The solution to your problem is to create a directory for modules in your source tree (e.g. CMakeModules), put in it a FindGlib.cmake file that you can find using Google, and add
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
in your CMakeLists.txt before the actual call to find_package.
(your problem is not related to the Eclipse generator, you could remove that from the title of the question).

netbeans cannot open shared library during RUN comm

everything worked fine but I've just tried to run my CUDA programs on Linux Ubuntu 12.10 in NetBeans and I get error:
dist/Debug/GNU-Linux-x86/my_cuda_1: error while loading shared
libraries: libcudart.so.5.0: cannot open shared object file: No such
file or directory
RUN FAILED (exit value 127, total time: 191ms)
the projects can build: compile + link without problems, I can also run it from commandline but if I try run it from NetBeans I get this error.
I was able to run it few minutes ago, what might happened?
I have added file my_lib to ld.so.conf.d containing such text:
/usr/local/cuda-5.0/lib64:/lib
/usr/lib
/usr/lib64
can it be a link issue libcudart.so.5.0 -> licudart.so?
there are two libs in cuda/lib libcudart.so.5.0 (link) and libcudart.so (link) and libcudart.so.5.0.35 (shared lib)
why it complains about .so.5.0? mayve link like:
sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so
is necessary
it is related to link to shared library I think
root#comp:# echo $LD_LIBRARY_PATH
/usr/lib/nvidia-current:/usr/local/cuda-5.0/lib::/usr/local/cuda-5.0/lib64:/lib
isn't this :: a problem? seems that No because I changed this and still same error. I specify PATHS, I run ldconfig, I put exports in the .bashrc, still nothing.
the reason is that I cannot load these libraries if program is started from NetBeans GUI, however I start NetBeans as root always
add to the Project -> Properties -> Run -> Environment
Name: LD_LIBRARY_PATH
Value:
$LD_LIBRARY_PATH:/usr/lib/nvidia-current:/usr/local/cuda-5.0/lib:/usr/local/cuda-5.0/lib64:/lib
Thank you all. I don't know what happened before as it worked just fine.

Why would Eclipse not be able to include a file when running a PHPUnit test?

I have the following class and unit test in a PHP project in Eclipse:
I know my unit test works as I can run it at the command line:
Now I want to run this test from Eclipse. I set up PHP Unit in Eclipse like this:
However, when I run the PHPUnit tests:
It tells me that it can't include the class file:
/usr/bin/php -c /var/folders/UA/UAv38snBHd0QMgEPMCmM9U+++TM/-Tmp-/zend_debug/session4910937990995915704.tmp -d asp_tags=off /Applications/eclipse/plugins/org.phpsrc.eclipse.pti.tools.phpunit_0.5.0.R20101103000000/php/tools/phpunit.php --log-junit /var/folders/UA/UAv38snBHd0QMgEPMCmM9U+++TM/-Tmp-/pti_phpunit/phpunit.xml /Volumes/data/domains/et/extjslayout/phpunittest/tests
PHP Warning: include_once(../Product.php): failed to open stream: No such file or directory in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 3
PHP Warning: include_once(): Failed opening '../Product.php' for inclusion (include_path='/usr/local/PEAR') in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 3
PHP Fatal error: Class 'Product' not found in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 9
Why would PHPUnit be able to find the class when run from the command line but not when run from Eclipse?
When you start something from the command line, the "current directory" has a well-defined meaning: It's the directory where you started the command.
In Eclipse, what is the "current directory"? It's probably the directory from which you started Eclipse or maybe the folder in which Eclipse is installed.
I haven't used PHP in Eclipse before but for other languages, I can set the current directory in the launch config somewhere. If that doesn't work, define a variable which points to your project and then use absolute paths (using that variable as a starting point).
Have same problem. Found only solution by creating tests with internal PHPUnit wizard like at this screenshot:
Source: HowTo create a Test Case Class from a PHP Class
But following investigate show that your test case file should contain reference to tested code for example like this: require_once 'C:\Apache2\htdocs\jobeet\src\Ibw\JobeetBundle\Utils\Jobeet.php';
Other experiments with plugin config not bringing luck. So in my opinion PHPUnit from PHP Tools not well developed plugin. Consider using MakeGood plugin as better alternative.