dcm4chee dcm4jboss ejb build fail build.xml - dcm4che

I build Ant file build.xml but it fail and appear error:
{BUILD FAILED
Projects\source\dcm4jboss-all\dcm4jboss-ejb\build.xml:145: taskdef A class needed by class xdoclet.modules.ejb.EjbDocletTask cannot be found: xjavadoc/ant/XJavadocTask.
File build.properties:
#javac options
javac.debug=on
javac.deprecation=off
javac.optimize=on
javac.source=1.5
javac.target=1.5
#Override with your dcm4che-1.4.x dist location
dcm4che14.home= D:\Works\Projects\source\dcm4che14
#Override with your XDoclet dist location
xdoclet.home= D:/Works/Projects/Pacs/Buildpath/xdoclet1.2.3
#Override with your Cactus dist location
cactus.home=D:/Works/Projects/Pacs/Buildpath/cactus-1.8.1-bin
#Override with your JBoss dist location
jboss.home= D:/Works/Projects/Pacs/Buildpath/jboss-4.2.3.GA
}
Question:
what happend?
how to solve it?

You can try some way below:
Try to edit PATH for JAVA_HOME to jdk6
Add Xdoclet library to your project/lib
Try a clean build
Redownload source from dcm4che and copy xdoclet,... to {user.home}, do not change build.xml
Hope this help

Related

How to use MicroProfile ConfigProperty injection from a microprofile-config.properties file in Open Liberty test using ShrinkWrap + Arquillian?

Problem
I added a microprofile-config.properties file to the Liberty "Testing microservices with the Arquillian managed container" guide sample, but my microprofile-config.properties isn't picked up by my test.
Symptom
> Exception : io.smallrye.config.inject.ConfigException: SRCFG02000:
> Failed to Inject #ConfigProperty for key serviceName into
> io.openliberty.guides.system.AppConfig.serviceName since the config
> property could not be found in any config source at
> io.smallrye.config.inject.ConfigExtension.validate(ConfigExtension.java:183)
> at
> io.openliberty.microprofile.config.internal.extension.OLSmallRyeConfigExtension.validate(OLSmallRyeConfigExtension.java:65)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ...
Starting point
git clone https://github.com/openliberty/guide-arquillian-managed.git; cd finish
microprofile-config.properties
Path: src/main/resources/META-INF/microprofile-config.properties
serviceName=myService
Bean to inject into: AppConfig.java
#ApplicationScoped
public class AppConfig {
#Inject #ConfigProperty(name="serviceName")
private String serviceName;
...
}
Liberty server config (server.xml)
<featureManager>
<feature>restfulWS-3.0</feature>
<feature>jsonb-2.0</feature>
<feature>jsonp-2.0</feature>
<feature>cdi-3.0</feature>
<feature>mpConfig-3.0</feature>
<!--Enable the following features to run tests with Arquillian managed container-->
<feature>localConnector-1.0</feature>
<feature>servlet-5.0</feature>
</featureManager>
You need to specifically package the microprofile-config.properties file in the ShrinkWrap package like:
.addAsManifestResource(new File("src/main/resources/META-INF", "microprofile-config.properties"))
More completely in the context of this sample it would look like:
WebArchive archive = ShrinkWrap.create(WebArchive.class, WARNAME)
.addAsManifestResource(new File("src/main/resources/META-INF", "microprofile-config.properties"))
.addPackages(true, "io.openliberty.guides.system");
Explanation:
Since the sample uses ShrinkWrap to package the application test deployment, the microprofile-config.properties must be programmatically added to the ShrinkWrap deployment. It doesn't become part of the package by virtue of being in src/main/resources (like it becomes part of a standard Maven WAR package built by the maven-war-plugin).

Error while Building (compile) wixproj using MSBuild api 15.9.20

I'm using wix in a project and i have a specific need :
Build wixproj using MSBuild from c#.
For that i'm using MSBuild api as folowing :
static void Main(string[] args)
{
string toolsPath = ToolLocationHelper.GetPathToBuildToolsFile("msbuild.exe", ToolLocationHelper.CurrentToolsVersion);
ProjectCollection projectCollection = new ProjectCollection();
projectCollection.AddToolset(new Toolset(ToolLocationHelper.CurrentToolsVersion, Path.GetDirectoryName(toolsPath), projectCollection, string.Empty));
Project project = projectCollection.LoadProject("TestWix.wixproj");
var result = project.Build(new ConsoleLogger());
Console.ReadKey();
}
And i get this error :
C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets(1988,5): error MSB4127: The "GenerateCompileWithObjectPath" task could not be instantiated from the assembly "C:\Program Files (x86)\WiX Toolset v3.11\bin\WixTasks.dll". Please verify the task assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework. Unable to cast object of type 'Microsoft.Tools.WindowsInstallerXml.Build.Tasks.GenerateCompileWithObjectPath' to type 'Microsoft.Build.Framework.ITask'.
But when i use msbuild command line it's work fine.
Do you have any idea please ?
Thank you in advance.

Ignite configuration with absolute path

I downloaded Ignite 2.5.0 (I use maven dependences in Eclipse on a Mac for my Java class), and I tried to start Ignite with a configuration file given with an absolute path:
public static void main(String [] args) throws Exception {
try (Ignite ignite = Ignition.start("/Users/ahajnal/Documents/git/ignite/target/classes/default-config.xml")) {}
}
but I got exception:
Exception in thread "main" class org.apache.ignite.IgniteException: Failed to find configuration in: file:/Users/ahajnal/Documents/git/ignite/target/classes/default-config.xml
at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:990)
at org.apache.ignite.Ignition.start(Ignition.java:355)
at hu.sztaki.lpds.ml.ignite.WekaIgnite.main(WekaIgnite.java:82)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to find configuration in: file:/Users/ahajnal/Documents/git/ignite/target/classes/default-config.xml
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:116)
at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:98)
at org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:744)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:945)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:854)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:724)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:693)
at org.apache.ignite.Ignition.start(Ignition.java:352)
... 1 more
The config file is there:
$ cat /Users/ahajnal/Documents/git/ignite/target/classes/default-config.xml
<?xml version="1.0" encoding="UTF-8"?>...
and:
new File("/Users/ahajnal/Documents/git/ignite/target/classes/default-config.xml").exists() is true
According to docs this path can be absolute.
What am I doing wrong?
Thank you.
I think, the problem is that default-config.xml file has only abstract IgniteConfiguration. This is the case in the default configuration file in examples.
Check, if the configuration bean's definition has abstract=true parameter, and remove it if it does.
P.S.
Creating Ignite as a resource of a try block is a pretty bad idea, since the node will stop right after execution of the try block is finished.

Gitlab CI pipeline SonarQube msbuild error ArgumentNullException: Value cannot be null

Is anyone familiar with this error and how to solve it? I'm using Sonarqube Scanner 2.3.1 and msbuild 12.0. The project is 4.5 framework.
Time Elapsed 00:00:39.12
$ SonarQube.Scanner.MSBuild.exe end
SonarQube Scanner for MSBuild 2.3.1
Default properties file was found at C:\SonarQube\bin\SonarQube.Analysis.xml
Loading analysis properties from C:\SonarQube\bin\SonarQube.Analysis.xml
sonar.verbose=true was specified - setting the log verbosity to 'Debug'
Post-processing started.
11:00:26.108 Using environment variables to determine the download directory...
11:00:26.188 11:00:26.188 sonar.verbose=true was specified - setting the log verbosity to 'Debug'
11:00:26.191 Loading the SonarQube analysis config from F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube\conf\SonarQubeAnalysisConfig.xml
11:00:26.191 Not running under TeamBuild
11:00:26.191 Analysis base directory: F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube
Build directory:
Bin directory: F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube\bin
Config directory: F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube\conf
Output directory: F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube\out
Config file: F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube\conf\SonarQubeAnalysisConfig.xml
Generating SonarQube project properties file to F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube\out\sonar-project.properties
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
at SonarQube.Common.ListPropertiesProvider.TryGetProperty(String key, Property& property)
at SonarQube.Common.AggregatePropertiesProvider.TryGetProperty(String key, Property& property)
at SonarQube.Common.AggregatePropertiesProvider.GetAllProperties()
at SonarScanner.Shim.PropertiesFileGenerator.GetAnalysisProperties(AnalysisConfig config)
at SonarScanner.Shim.PropertiesFileGenerator.GenerateFile(AnalysisConfig config, ILogger logger, IRoslynV1SarifFixer fixer)
at SonarScanner.Shim.SonarScannerWrapper.Execute(AnalysisConfig config, IEnumerable`1 userCmdLineArguments, ILogger logger)
at SonarQube.TeamBuild.PostProcessor.MSBuildPostProcessor.InvokeSonarScanner(IAnalysisPropertyProvider cmdLineArgs, AnalysisConfig config)
at SonarQube.TeamBuild.PostProcessor.MSBuildPostProcessor.Execute(String[] args, AnalysisConfig config, ITeamBuildSettings settings)
at SonarQube.Bootstrapper.BootstrapperClass.PostProcess()
at SonarQube.Bootstrapper.BootstrapperClass.Execute()
at SonarQube.Bootstrapper.Program.Execute(String[] args, ILogger logger)
at SonarQube.Bootstrapper.Program.Main(String[] args)
ERROR: Job failed: exit status 3762504530
The problem is caused by the property called sonar.analysis.mode being set equal to "issues".
issues mode should never be used manually as it is used only by tools.
set your sonar.analysis.mode=[preview/publish]
(publish is default so you don't have to set the property at all if that's what you want.)

Log4j2 Annotation getting errors from Intellij

When using Log4j2 in Intellij for a groovy/gradle project, log shows up red as if the injection is not working. Gradle runs and builds but every file in IntelliJ shows errors which is annoying.
dependencies
compile 'org.codehaus.groovy:groovy-all:2.4.4'
compile 'org.apache.logging.log4j:log4j-api:2.5'
compile 'org.apache.logging.log4j:log4j-core:2.5'
Source
import groovy.util.logging.Log4j2
#Log4j2
class TestLog4j2 {
public static void log(String message) {
log.error(message)
log from log.error is displayed in red and displays error, cannot resolve symbol 'log'
The log4j2.xml file is in the classpath and works.
#Log4j and even #Slf4j both work
Using IntelliJ 15.03 Build IU-143.1821
Project is using Groovy 2.4.4 and Gradle 2.3
Thoughts anyone?
I was getting this error when using groovy's #Log4j2 annotation.
The solution was to exclude the following module in gradle:
configurations.all {
exclude module: 'log4j-to-slf4j'
}