You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aries.apache.org by Tom <to...@yahoo.de> on 2011/06/15 19:23:06 UTC

TransactionManagerService.java: ArrayIndexOutOfBoundsException

Hi !

When running aries transaction manager with a configuration submitted via felix fileinstall and felix configadmin, the transactionmanager reports an ArrayIndexOutOfBoundsException:

------
*ERROR* [org.osgi.service.cm.ManagedServiceFactory, id=32, bundle=27]: Unexpected problem updating Configuration PID=org.apache.aries.transaction.6aa698a0-275f-4aca-acfd-c440569a7f73, factoryPID=org.apache.aries.transaction, bundleLocation=initial@reference:file:org.apache.aries.transaction.manager-0.3.jar/
java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Native Method)
	at org.apache.geronimo.transaction.manager.XidFactoryImpl.<init>(XidFactoryImpl.java:41)
	at org.apache.aries.transaction.TransactionManagerService.<init>(TransactionManagerService.java:86)
	at org.apache.aries.transaction.Activator.updated(Activator.java:81)
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1366)
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:104)
	at java.lang.Thread.run(Thread.java:662)
------


After replacing the call to XidFactoryImpl in TransactionManagerService.java
------
86c86
<         XidFactory xidFactory = new XidFactoryImpl(pid.getBytes());
---
>         XidFactory xidFactory = new XidFactoryImpl();
------
the problem disappears.

pid seems to be "org.apache.aries.transaction" - and is probably too long.

Modules used: (on top of osgi-3.6.1.R36x_v20100806.jar)
  osgi.services-3.2.100.v20100503.jar@1:start,\
  logback-core-0.9.28.jar@3:start,\
  logback-classic-0.9.28.jar@4:start,\
  slf4j-api-1.6.1.jar@5:start,\
  aries-blueprint-1.0.0-incubating-SNAPSHOT.jar@6:start,\
  jcl-over-slf4j-1.6.1.jar@7:start,\
  org.apache.felix.fileinstall-3.1.10.jar@start,\
  org.apache.felix.configadmin-1.2.8.jar@start,\
  org.apache.aries.transaction.manager-0.3.jar@start,\

FileInstall-Config:
./load/org.apache.aries.transaction-default.cfg
------
aries.transaction.howl.logFileDir=/some/directory/absolute/path/howl
aries.transaction.recoverable=true
------

Is this a bug or am I using it wrong somehow?
If needed, I can provide a .zip with working and not working sample including all files. (approx. 3.9meg)

Thanks in advance,
Tom