Deploying birt war in karaf - war

I have karaf 4.1.1 and birt runtime 4.5.0 on my server. I have problems deploying birt.war in karaf. My purpose is using birt report engine api in karaf to generete reports based on birt project files.
I instaled karaf war feature. But I'm unable to install birt. I tried to type in karaf shell:
bundle:install -s "C:\birt-runtime-4_5_0\birt.war?Bundle-SymbolicName=birt&Web-ContextPath=/sample"
I got:
org.osgi.framework.BundleException: Unable to cache bundle
Any suggestions?

Try to install your component using webbundle prefix.
Simply, tap the following command in your running Karaf instance:
bundle:install webbundle:file:///C:/birt-runtime-4_5_0/birt.war?Bundle-SymbolicName=birt&Web-ContextPath=/sample

Related

Run dotnet-sos, dotnet-dump, dotnet-gcdump for a self-contained .NET Core application on Linux

I have an Ubuntu 18.04 x64 Linux server running a bunch of .NET Core applications. All of them are published as self-contained applications and .NET Core versions vary between 2.1, 3.1 and 5.0. I don't have .NET Core runtime (let alone SDK) installed on the machine and do not want to install it.
I want to run tools such as dotnet-sos, dotnet-dump and dotnet-gcdump for a .NET Core 3.1 self-contained application. The linked pages provide direct download links for them, e.g. https://aka.ms/dotnet-sos/linux-x64. However, when I run the downloaded dotnet-sos tool it fails with
A fatal error occurred. The required library libhostfxr.so could not be found.
If this is a self-contained application, that library should exist in [/var/tmp/.net/MY_USERNAME/dotnet-sos/mrdxw5vu.czm/].
If this is a framework-dependent application, install the runtime in the global location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].
The .NET Core runtime can be found at:
- https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=ubuntu.18.04-x64
This happens even if the current working directory is my .NET application directory, which contains
libhostfxr.so. The error implies that running the tool for a self-contained application should be possible, but the file indeed does not exist in /var/tmp/.net/MY_USERNAME/dotnet-sos/mrdxw5vu.czm/. If I manually copy that file to the above directory it then fails with
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.1.0' was not found.
- No frameworks were found.
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=x64&rid=ubuntu.18.04-x64
How do I run such tools without installing the .NET runtime machine-wide? I can easily download the binaries from https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-3.1.14-linux-x64-binaries but where do I put them for the tool to find them?
Turns out the .NET SDK can be extracted to any directory and then used to install and run dotnet-dump and dotnet-gcdump like this:
curl -fsSL https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh | bash -s -- --no-path --install-dir ~/dotnet-sdk --channel 5.0
~/dotnet-sdk/dotnet tool install --tool-path ~/dotnet-sdk/tools dotnet-dump
DOTNET_ROOT=~/dotnet-sdk ~/dotnet-sdk/tools/dotnet-dump collect -p PID_TO_DUMP
(I did not manage to get SOS working in LLDB, however. "Installing" it works just as above, but it fails to load in LLDB.)

JBDS 11.3.0.GA - Fuse generated project doesn't work

I'm using JBDS 11.3.0.GA on Ubuntu 16.04 LTS. I'm generating a Fuse project for Fuse 7.1.0 on standalone Karaf platform, using the camel-spring-cxf-code-first template. The project generates correctly but, trying to run it as described by the ReadMe.txt file fails. For example, after installing the bundle as follows:
karaf#root()> install -s mvn:com.mycompany/camel-spring-cxf-code-first/1.0.0-SNAPSHOT
Bundle ID: 223
karaf#root()>
trying to go to http://localhost:8181/cxf/report/?wsdl (of course, after having replaced in the generated code 9292 by 8181) displays "No service was found." in the browser and shows the following in the log file:
16:33:36.209 WARN [XNIO-4 task-1] Can't find the the request for http://localhost:8181/cxf/report/'s Observe
meaning that the generated project is not valid.
Kind regards,
Nicolas
The deployment of this kind of projects is not working at the moment - see the following statement in the Readme.txt file.
Note: This project does not currently work. It has some issues. It is based
on the archetype.
I raised an issue for developers - https://issues.jboss.org/browse/FUSETOOLS-3177.

Self-contained deployment .NET Core app in Ubuntu

I wrote a test project using .NET Core and assembled the self-contained deployment for Ubuntu 16.04 as described here (see Self-contained deployment without third-party dependencies).
But when I run the app I get the following error:
An assembly specified in the application dependencies manifest (Test.deps.json) was not found:
package: 'runtime.linux-x64.Microsoft.NETCore.App', version: '2.0.0-preview2-25407-01'
path: 'runtimes/linux-x64/lib/netcoreapp2.0/Microsoft.CSharp.dll'
I am using .NET Core 2.0 Preview 2, VS2017 Preview.
I will be grateful for any help!
This is an old question, but I just ran across this when I was trying to run a .Net Core application on Linux and wanted to share the solution. If you are getting the error above, you are likely trying to execute the wrong binary. For those following along from scratch, follow these steps:
On Windows, open a command prompt in the directory of the project you want to run on Linux.
Build the project for Linux using dotnet publish -r linux-x64
I chose to target linux-x64, but you can target a specific runtime if you'd like. Runtime identifiers can be found here.
Copy the published files to the Linux workstation. Because the above command omitted the configuration flag -c, the configuration defaulted to debug. The published files will be in Debug\netcoreapp2.0\linux-x64\publish
Note: there will be binaries in Debug\netcoreapp2.0\linux-x64\ too. These are not the binaries you want to copy to your Linux workstation. If you run these binaries, you will get the error described in the OP. Copy all the files in the publish directory instead. Ignore whatever files might be in linux-x64.
On the Linux workstation, give execute permission to the binary file. My project was named ConsoleUI, so I used chmod 764 ConsoleUI
Execute the binary using ./ConsoleUI
Keep in mind that you will need to at least have the .Net Core runtime installed on your Linux workstation.

how to config task to run/debug C# console app in vscode

from //build, i see the coolness of running nodejs and asp net 5
i am trying to use vscode to run some basic C# console app. how should i config the task to build and run/debug it? is there any sample?
The yeoman aspnet generator has a ConsoleApplication template that will work in VSCode.
Install ASP.NET and DNX (according to your OS see the instructions here: https://code.visualstudio.com/Docs/ASPnet5)
Install yeoman dependencies and generate a yeoman aspnet project (choose Console Application)
npm install -g yo grunt-cli generator-aspnet bower
yo aspnet
cd to your project dir you just created and:
dnu restore
Now you can open the dir in VSCode. Open the command palette (command-shift-P) and type run
EDIT:
Note however that while mono-based C# debugging works in Linux and OSX, ASP.NET 5 debugging does not yet work in the preview version.

jhipster hot reload failed to register liquibase changelog directory

i just started using jhipster and face a problem already,
here's my development stack :
- os windows 7
- eclipse Juno
- maven 3.1
- latest node and npm
- mysql as db in ubuntu vm
and here's what i have done :
- generate jhipster "yo jhipster"
- convert it to maven project "mvn eclipse:eclipse"
- maven compile "mvn clean" & "mvn install"
- add jhipster-reload feature in eclipse run vm arguments
- and run the main class in eclipse "right click Application.java and run as java application"
- generate new entity yo jhipster:entity ala
- everything was pretty much generated for this new entity, only the liquibase changelog doesn't generated
- i try to recompile the maven from eclipse then i found the line below
[ERROR] io.github.jhipster.loaded.JHipsterFileSystemWatcher - Failed to register the directory 'target\classes\config\liquibase\changelog'
- AFAIK it seems to be the same bug here, but they says it's fixed
Thanks for anyone that could help this, i'm confused as what to do here as i'm new to jhipster, liquibase, hot reload concept, and the documentation or google search barely help as jhipster is relatively still young.
Do not use "mvn eclipse:eclipse" in jhipster projects.
Just import the project as existing Maven project.
See this.

Resources