Hello Christian,
I have a bundle with uses both activemq-broker/activemq-client features
The Idea JB gave me, led me to try:
@Reference
public void setBrokerService(BrokerService brokerService}{}
My thinking here was that by the time this service reference was injected,
the activemq broker
Hello Peter,
Thanks for the quick reply. I came across this page indirectly that
commented on the instruction, but I only noticed the header section.
I tinkered with this locally and it seems to work as expected. I am still
very curious why conditional-package isn't covered as well as all the
Hello,
I am investigating the "Conditional-Package" instruction for OSGI bundles
via the MVN bundle plugin. It was brought to my attention by another member
of my team, who cannot find any documentation on this instruction.
I was wondering if anyone could comment on this feature and its typical
Thanks JB,
The second approach certainly feels the cleanest to me. I gave that a go and
found it couldn't be achieved due to both the broker and client bundles
exposing the same package:
*,org.apache.activemq.broker
So, sadly I can't get away with doing:
@Reference
public void
Hello,
I'm having a small issue where the ActiveMQ Service has not initialized in
time for a bundle I have developed. With our own bundles, we can resolve
ordering with declarative services, using @Reference, but I'm not sure how
to achieve the same with ActiveMQ. Basically, I want to make sure
No, I've checked that in the process list.
The only thing that's suspect is that we have a massive client bundle (that
could arguably broken). We've used declarative services to try and impose a
start up order. The client bundle in question holds all the jetty features
and the angular WAR, but
Hello Achim,
I know it's obvious it's being blocked, the problem is that there is nothing
else on the machine. I've checked the running processes and blocked ports.
This only occurs when using the wrapper-server to start/stop karaf and never
seems to occur when starting/stopping karaf manually.
Hello,
I'm currently having an issue with running karaf as a windows service.
Intermittently, I'm getting an exception during startup of the service (see
below). If I restart sometimes, it'll be fine, but other times, I get this
issue. This doesn't occur if I start karaf manually and stop it
Thanks pkmcculloch,
this solution seems to work much better for me and the installer has
everything it needs.
The only problem I have now is getting karaf to pick up the local repo.
I've tried two strategies, the first was to copy everything in the local
repo and put it into the system folder.
I'll give that a try, as long as there are no further requirements to pull in
anything over the net, the installer bit should be fine.
So the only other obstacle is getting all the features installed without
referring to paths on the build server. I'll see if the karaf-assembly fixes
this
I want to create a custom distro, but with the following requirements:
1. It needs to be runnable as a windows installer (so I need the wrapper).
2. I need all required files to that it can be run offline after being
installed on the customers machine.
--
Sent from:
The purpose of the CI build is to create an NSIS installer for the customer.
So, the installer contains karaf along with the service wrapper. The
Installer will put karaf in a standard place and kick off the service.
I've pretty much exhausted every approach on the karaf documentation and hit
Hello Alex,
I have disabled going to the remote repos on karaf which is fine so far.
The CI server will build all the required packages and execute a feature
install. The problem with the karaf-assembly task is that I need to use a
custom karaf. Basically in my artefact repo, I have a karaf
I'm still trying to get an offline installation of karaf working, which is
providing to be the stuff of nightmares. To get around this problem, I have
attempted download karaf on the CI server and execute a series of
feature:install commands.
The problem is that when karaf is installed on the
Thanks Christian,
I'll give that a try and let you know shortly.
I noticed that in blueprint, rather than setting DriverClassName for the
BasicDataSource, I had better success with defining a bean of type
org.h2.Driver and setting that as a property to setDriver.
This at least gets round the
Hello jb,
I create the DBCP2 visit blueprint and inject them into my Dad classes. I am
not using any of the pax features at the moment, but that may change later.
It's just a case of getting this working now as a proof of concept.
Stephen
--
View this message in context:
Hello,
I've got a question regarding DBCP2 & Karaf. When using DBCP2, I get a
driver not found error. If I use a straight Class.forName("org.h2.Driver")
it works as expected. I'm not looking to use fragments at the moment as I
need to get a working example quickly, but before I bin all the
Some further experiments have shown that the issue seems to be with the DBCP2
BasicDataSource.
When I use this within karaf, I get a jdbc driver not found, but if I
reference it directly using Class.forName("..blah..") and retrieve a
standard jdbc connection using the DriverManager. It works
Thanks for pointing me at this. I am still having trouble, but I will have
another go at it in the morning.
Just out of curiosity, why did you opt to expose the data source via
blueprint rather than the pax config approach? The reason I ask is that I
have not seen this approach used by anyone
As addendum, I currently have the following feature file:
http://karaf.apache.org/xmlns/features/v1.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.0.0
http://karaf.apache.org/xmlns/features/v1.0.0;>
Thanks for the link. That's odd about the runtime as my generated feature
fine has the h2 bundle and it's installed when the feature file is installed
into karat.
--
View this message in context:
In my pom I have org.h2
And my pom dependency has:
com.h2database
h2
1.3.174
However, I'm getting the following:
org.osgi.service.resolver.ResolutionException: Unable to resolve root:
missing requirement [root]
Hello Timothy,
Thanks for the quick reply.
The issue is that my manager is pushing me to be container agnostic and to
avoid tying myself to Karaf. Personally, I'd rather use pax-jdbc but I am
not permitted to do so and I agree about your comment regarding code smells
for tying to a specific jdbc
As addendum,
I am not using any data sources in karaf using pax-jdbc. The reason being I
require SQL Server support and opted to do a direct connection via a bundle.
--
View this message in context:
Hello,
This is probably a very trivial thing to solve, but I've tried different
things to and to avail.
Basically, I have a bundle which provides a data source using h2 for
testing.
Another bundle uses that authentication bundle to login/logout etc. The
calling bundle is throwing an exception
As addendum, I've read through this:
https://groups.google.com/forum/#!topic/ops4j/egGKedQovSM which was around
two years ago. I figure it's still an issue, but seems like people have
gotten round it easily enough.
Is there any problem with just using a direct sql connection via karaf
rather than
Hello JB,
Thanks for the quick response.
Yeah, I tried using
wrap:mvn:net.sourceforge.jtds/jtds/1.3.0 in my feature
file,
but I get the following:
missing requirement [org.ops4j.pax.jdbc.mssql/0.9.0] osgi.wiring.package;
filter:="(osgi.wiring.package=com.microsoft.sqlserver.jdbc)"]]]
Are
Hello,
Small question about pax-jdbc.
I need to support SQL Server and looking at
https://github.com/ops4j/org.ops4j.pax.jdbc I can see there is a
pax-jdbc-mssql feature. I've tried to install this with
pax-jdbc-mssql using the latest released
pax-jdbc-features (1.1.0), but I am getting the
Jack,
The logs clearly show that the database hasn't been created:
""localhost:5432:TEST" does not exist"
Try creating the schema in postgres then re-run.
--
View this message in context:
http://karaf.922171.n3.nabble.com/Hibernate-JPA-and-Karaf-4-tp4050569p4050661.html
Sent from the Karaf -
Jack,
See here:
https://ops4j1.jira.com/wiki/display/PAXJDBC/Create+DataSource+from+config
It's not username. The parameter is user.
--
View this message in context:
http://karaf.922171.n3.nabble.com/Hibernate-JPA-and-Karaf-4-tp4050569p4050658.html
Sent from the Karaf - User mailing list
Jack, the first error in the logs is the following:
org.ops4j.pax.jdbc.config - 1.0.0 | Unsupported property name: username
org.postgresql.util.PSQLException: Unsupported property name: username
Can you share your data source config?
--
View this message in context:
What you have done with the wrap:... is load the jdbc driver
into karaf, but the pax-jdbc-postgresql provides the capability to register
a postgres data source, so that's something different (at least to my
knowledge).
When you added this feature and deployed to karaf, was the data source
Just thought of something,
Do you have: pax-jdbc-postgresql in your feature file? I didn't see it in
the sample you uploaded?
My example uses h2 at the moment, but you'll need to load the specific
driver into karaf.
Then try re-running the command to confirm whether or not the data source is
Seems the error is being thrown by the Karaf Shell. I've never created any
shell commands, so I'm not sure if there is an issue with that. You could
try by making just a simple pojo with the entity manager injected and remove
any references to the karaf shell (including your maven manifest). This
Still unsure, I've seen the second error before, but I'm curious about the
IllegalArgumentException, can you attach the full log file? I'm not sure if
the two are related.
--
View this message in context:
http://karaf.922171.n3.nabble.com/Hibernate-JPA-and-Karaf-4-tp4050569p4050645.html
Sent
Hello Jack,
As I said previously, your namespace is referencing JPA 2, so you cannot use
the and tags in your xml (at least to my
knowledge). The key is in your log file:
*The matching wildcard is strict, but no declaration can be found for
element 'jpa:context'. *
To get round this problem,
Jack,
Your log file is chock full of errors!
Connection refused: connect, Could not transfer artifact
toshibacommerce-rma:toshibacommerce-rma-kar:xml:features:0.0.1-SNAPSHOT
from/to ops4j.sonatype.snapshots.deploy
(https://oss.sonatype.org/content/repositories/ops4j-snapshots/): Connect to
Hello Jack,
It might have been easier if you just committed the src rather than archive
it as a zip :)
A few things I noticed that might be causing you trouble:
If your using JPA 2, I don't think the
sections will work (they didn't for
Sounds like your using another version of JPA. Look at the xml schema in the
persistence.xml and check your using the jpa 2.0 namespace. If your using
jpa 1, then the code below won't work, you'll need to use the jpa 1.0
solution:
What errors are shown in karaf.log?
Warm
I came across this: https://issues.apache.org/jira/browse/ARIES-1711, so I
guess I need to create those wrappers :)
--
View this message in context:
http://karaf.922171.n3.nabble.com/Aries-JPA-annotationless-mappings-tp4050610p4050611.html
Sent from the Karaf - User mailing list archive at
Hello,
I have another small obstacle regarding a requirement for avoiding
annotations :(
I have a bundle which contains model classes, but I'm not allowed to use
annotations as they are to be left agnostic. The obviously way round this is
to go back to the old mappings.xml. I have an orm.xml in
Hello Jack,
I've commented on one your previous posts as this thread is growing arms and
legs now...
The repo was posted previously in the above comments.
Stephen
--
View this message in context:
http://karaf.922171.n3.nabble.com/Hibernate-JPA-and-Karaf-4-tp4050569p4050607.html
Sent from
Hello Jack,
I don't see anything in your example about creating a data source on karaf.
Have you defined a org.ops4j.datasource-.cfg for karaf?
Take a look at https://github.com/desolate-planet/osgi-jpa-demo this is just
a simple demo I created to get past my issue.
A few things to try, once
Christian Schneider had kindly updated my code with the solution. My original
setup had two problems:
1. The wrong provider was used,
I should have used org.hibernate.jpa.HibernatePersistenceProvider rather
than the ejb provider (or
remove the provider completely as I only have one).
As addendum, I checked the headers for the Aries JPA Container (see below).
The output shows
javax.persistence;version="[1.1,3)" in red, so your theory about a missing
requirement seems valid, I'm just not sure what's missing/conflicted.
Bundle-Activator =
Hello JB,
Apologies for the delay, I ended up just creating a project from scratch
minus the sensitive work code while mirroring the configuration. With this
project, I've duplicated the error I am getting.
Project: https://github.com/desolate-planet/osgi-jpa-demo
So, when adding the feature
Thanks for the info Tim,
The issue with this is that my company have strict rules over what we use
and I had a hard enough time convincing them to use aries blueprint over the
programmatic tracker api, so given my time limit, I don't think I'll be
successfully getting any new tech added.
I'm
Thanks jbonofre,
Looking at the sample, the main key differences I can see if your using
openjpa and the jpa 1.0.0 spec.
I tried using the 5.2.9 of hibernate as well as add org.hibernate.jpa to my
import packages. I still shows the same log entry:
waiting for dependencies
This is the only other useful source of info the the problem I'm having:
https://github.com/cschneider/Karaf-Tutorial/issues/22
Seems that upgrading hibernate to 5.2.9 might work. I'll need to give it a
try. I'll let you know how I get on...
--
View this message in context:
javassist.util.proxy,
*
The generated manifest looks like this:
Manifest-Version: 1.0
Bnd-LastModified: 1496749271882
Build-Jdk: 1.8.0_121
Built-By: smunro
Bundle-Blueprint: OSGI-INF/blueprint/blueprint.xml
Bundle-Des
Updated blueprint:
http://www.osgi.org/xmlns/blueprint/v1.0.0;
xmlns:jpa="http://aries.apache.org/xmlns/jpa/v2.0.0;
xmlns:tx="http://aries.apache.org/xmlns/transactions/v2.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
Thanks jbonofre,
I've updated the blueprint to have the following:
With the updated schema refs. The bundle is still not starting, and is now
stuck in a grace period:
org.desolateplanet.sgs-ui.auth/0.0.9.SNAPSHOT is waiting for dependencies
jpa | 2.3.0| | Started |
enterprise-4.0.8
| OSGi Persistence Container
hibernate| 3.3.2.GA | | Started |
enterprise-4.0.8
| Hibernate 3.x JPA persistence engine support
hibernate| 4.3.6.Final |
Hello jbonofre,
Thanks for the swift reply. Not sure if this answers your question, but I
have the following feature running:
hibernate | 4.3.6.Final | x| Started
enterprise-4.0.8 | Hibernate 4.3.x JPA persistence engine support
And my feature file has
Hello,
I am trying to get JPA & Hibernate working in a OSGI bundle, deployed on
Karaf 4.0.8.
Regardless of what tutorials or guides I follow, I am met with the following
log entry:
org.desolateplanet.authentication-db-impl/0.0.9.SNAPSHOT is waiting for
namespace handlers
Hi,
I have an osgi bundle, which uses apache cxf-jaxrs. While this works ok, I
have noticed an entry in the logs which indicates the bundle is not cleaning
up itself when being stopped (see below)
Is there any suggested way to get around this or is it just a bug I need to
live with for the
Hello,
I'm looking at using Apache Shiro for an OSGI project, deployed on Karaf
4.0.8.
I tried to install the shiro feature file: feature:repo-add
mvn:org.apache.shiro/shiro-features/1.2.1/xml/features and it failed with an
error (see below)
I've not found much in the way of documentation for
Ok,
turns out that I was missing something rather obvious. Our pom file already
has a copy-resources maven goal setup, which targets webapp/build (generated
angular content is placed here by another plugin). So anything above this
level was not being placed into the WAR file. I just added another
Thanks for the links Achim :)
As mentioned previously, I tried to use the programmatic approach to
bootstrapping a CXF-JAXRS service within a bundle activator and it worked
fine. It's not apocalyptic if I go down this road, but I'd like to have
declarative control with the address.
I think it's
Thanks for the swift reply and the information.
Sadly, I tried as you suggested and removed the activator and it's
definition in the maven plugin. Even after changing my type to JAR. I still
had the missing configuration error.
What I did in the past was simply created a standard OSGI bundle
Looking at this further, the getResources method in the code seems unable to
find a "configuration" for whatever blueprint file name I use (I've tried
renaming the file and the error will use what ever name I give it).
Is there an underlying problem with using the WAR type with blueprint or am
I
Hello,
I realise this topic has been raised in the past for an older version of
karaf, but even after following the steps in that advice given, I am still
unable to get past karaf throwing a FileNotFoundException.
Essentially, I have a run-of-the-mill angular web app and some noddy
servlets,
Hello,
I have a small question regarding the use of the embedded activemq feature
for karaf. When installing this, an activemq.xml file is placed in the /etc
folder.
In my OSGI project, I want to make use of the embedded activemq, with
additional features such as mqtt and enable anonymous
Thanks for the rapid response and information.
I don't underestimate the complexity of leaving camel out, I have used JMS &
Camel, but that was for a complex EIS with multiple disparate systems, this
is much simpler.
I've never used MQTT in activemq nor have I had to use activemq via karaf,
and
Hello,
I am a small issue (possible down to my lack of knowledge of Karaf) around
accessing a BrokerService (activemq component).
Following the activemq cookbook, I had installed the jms , activemq-broker &
activemq-components, and I noticed a configuration (spring) file was created
after doing
Thanks for the swift reply,
I've suggested my team use 4.0.8 for the moment as we cannot use snapshot or
any intermediary builds. It has to be a final released build sadly.
Thank for you shedding light on this issue, from the past JIRAs I have read,
I can see ActiveMQ support is something of a
Hello,
I'm trying to put together a guide on installing multiple osgi bundles for
my team and one solution I would like to explore is using the features.xml
file.
All the guides on-line have made reference to a features:addUrl command.
When entering this, I'm informed the features command does
Hello,
I apologise if this post is a reheat of previous posts, but briefly scanning
them didn't reveal any solution and some of them go back a long while and I
was wondering if there was a final solution to this problem.
Essentially, I've installed Karaf 4.1.0 and proceeded to add the latest
68 matches
Mail list logo