You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by johnsas <jo...@sharklasers.com> on 2012/08/30 17:04:39 UTC
TransactionManager lost after restart
Hi,
When I perform a fresh Karaf start, all bundles are active and all blueprint
bundles are created.
After shutdown and restart the blueprint bundles referencing the following
OSGi-services can not be activated:
<reference id="transactionManager"
interface="javax.transaction.TransactionManager" />
<reference id="userTransaction"
interface="javax.transaction.UserTransaction" />
The karaf.log reveals the following:
2012-08-30 16:31:07,131 | DEBUG | lixDispatchQueue | brokerclient
| ? ? | 262 - org.aaaa.brokerclient -
1.0.0 | BundleEvent STARTED
2012-08-30 16:31:07,141 | DEBUG | rint Extender: 2 |
AbstractServiceReferenceRecipe | r.AbstractServiceReferenceRecipe 132 | 9
- org.apache.aries.blueprint - 0.3.2 | *Found initial references null for
OSGi service (objectClass=javax.transaction.UserTransaction)*2012-08-30
16:31:07,141 | DEBUG | rint Extender: 2 | AbstractServiceReferenceRecipe |
r.AbstractServiceReferenceRecipe 132 | 9 - org.apache.aries.blueprint -
0.3.2 | *Found initial references null for OSGi service
(objectClass=javax.transaction.TransactionManager)*
2012-08-30 16:31:07,141 | DEBUG | rint Extender: 2 | BlueprintContainerImpl
| container.BlueprintContainerImpl 554 | 9 - org.apache.aries.blueprint -
0.3.2 | Tracking service references: [userTransaction, transactionManager]
2012-08-30 16:31:07,141 | DEBUG | rint Extender: 2 | BlueprintContainerImpl
| container.BlueprintContainerImpl 248 | 9 - org.apache.aries.blueprint -
0.3.2 | Running blueprint container for bundle org.oparo.brokerclient in
state WaitForInitialReferences
2012-08-30 16:31:07,141 | INFO | rint Extender: 2 | BlueprintContainerImpl
| container.BlueprintContainerImpl 311 | 9 - org.apache.aries.blueprint -
0.3.2 | Bundle org.oparo.brokerclient is waiting for dependencies
[(objectClass=javax.transaction.TransactionManager),
(objectClass=javax.transaction.UserTransaction)]
2012-08-30 16:31:07,141 | DEBUG | rint Extender: 2 |
BlueprintEventDispatcher | ntainer.BlueprintEventDispatcher 123 | 9
- org.apache.aries.blueprint - 0.3.2 | Sending blueprint container event
BlueprintEvent[type=GRACE_PERIOD,
dependencies=[(objectClass=javax.transaction.TransactionManager),
(objectClass=javax.transaction.UserTransaction)]] for bundle
org.aaaa.brokerclient
2012-08-30 16:31:07,141 | DEBUG | nt Dispatcher: 1 | BlueprintListener
| raf.shell.osgi.BlueprintListener 85 | 21 - org.apache.karaf.shell.osgi -
2.2.8 | Blueprint app state changed to GracePeriod for bundle 262
It seems that the two OSGi-services can not be found, although they are
provided by the following bundle:
Apache Aries Transaction Manager (186)
--------------------------------------
Manifest-Version = 1.0
Bnd-LastModified = 1295780730980
Tool = Bnd-1.15.0
Built-By = zoe
Implementation-Version = 0.3
Build-Jdk = 1.6.0_22
Implementation-Title = Apache Aries
Created-By = Apache Maven Bundle Plugin
Bundle-Vendor = The Apache Software Foundation
Bundle-Activator = org.apache.aries.transaction.Activator
Bundle-Name = Apache Aries Transaction Manager
Bundle-DocURL = http://www.apache.org
Bundle-Description = Aries top-level parent pom
Bundle-SymbolicName = org.apache.aries.transaction.manager
Bundle-Version = 0.3.0
Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-ManifestVersion = 2
Export-Service =
javax.transaction.TransactionManager,
javax.transaction.TransactionSynchronizationRegistry,
javax.transaction.UserTransaction,
org.apache.geronimo.transaction.manager.RecoverableTransactionManager
After the grace period the bundles fail. The problem disappears when I
delete the bundle cache, but after another restart it appears again.
It seems that there is a problem with the service wiring but where?
Do you have an idea what could be wrong here?
John
--
View this message in context: http://karaf.922171.n3.nabble.com/TransactionManager-lost-after-restart-tp4025890.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: TransactionManager lost after restart
Posted by Guillaume Nodet <gn...@gmail.com>.
Verify that you don't have the javax.transaction package exported by two
different bundles.
In which case, your client bundle would wire to one or the other, and if
not wiring to the aries one, he would not be able to see the service, hence
the grace period and failure.
On Fri, Aug 31, 2012 at 8:51 AM, johnsas <jo...@sharklasers.com> wrote:
> Update:
>
> Apache Aries Transaction Manager (186) is started with bundle-level 30.
> My bundle (brokerclient) is started with bundle-level 80.
>
> When I start my bundle with bundle-level 30 it works.
>
> Do you have an idea why it behaves this way?
>
> John
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/TransactionManager-lost-after-restart-tp4025890p4025894.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
FuseSource, Integration everywhere
http://fusesource.com
Re: TransactionManager lost after restart
Posted by johnsas <jo...@sharklasers.com>.
Update:
Apache Aries Transaction Manager (186) is started with bundle-level 30.
My bundle (brokerclient) is started with bundle-level 80.
When I start my bundle with bundle-level 30 it works.
Do you have an idea why it behaves this way?
John
--
View this message in context: http://karaf.922171.n3.nabble.com/TransactionManager-lost-after-restart-tp4025890p4025894.html
Sent from the Karaf - User mailing list archive at Nabble.com.