You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Ghislain Nadeau (JIRA)" <ji...@apache.org> on 2013/09/28 16:18:03 UTC

[jira] [Created] (GERONIMO-6491) Blueprint managed transaction in error

Ghislain Nadeau created GERONIMO-6491:
-----------------------------------------

             Summary: Blueprint managed transaction in error
                 Key: GERONIMO-6491
                 URL: https://issues.apache.org/jira/browse/GERONIMO-6491
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: Aries, osgi, transaction manager
    Affects Versions: 3.0.1
            Reporter: Ghislain Nadeau
            Priority: Critical


I have a simple bundle which is only used to define entities and services to retrieve and save those objects. Here's his Blueprint:

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<blueprint 
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" 
xmlns:bptx="http://aries.apache.org/xmlns/transactions/v1.0.0" 
xmlns:bpjpa="http://aries.apache.org/xmlns/jpa/v1.0.0" 
xmlns:bpresref="http://www.ibm.com/appserver/schemas/8.0/blueprint/resourcereference">
	<bean id="inventoryImpl" class="org.jslain.bundle.webpersistence.InventoryImpl">
		<bptx:transaction 
			method="*"
			value="Required"
			/>
		<bpjpa:context 
			property="entityManager" 
			unitname="org.jslain.bundle.WebPersistence" />
	</bean>
	
	<service id="service_inventoryImpl" ref="inventoryImpl" interface="org.jslain.bundle.webapi.IInventory" />
</blueprint>
{code}

However, when starting i get the following error...
It looks like the container is expecting a constructor receiving wrong arguments for the proxy of my service. If i remove the transaction part, i starts well (but doesn't work at runetime, 'cause jpa needs a transaction)


{code}
2013-09-28 09:42:06,802 ERROR [BlueprintContainerImpl] Unable to start blueprint container for bundle org.jslain.bundle.WebPersistence
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to instantiate components
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:644)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.VerifyError: (class: org/jslain/bundle/webpersistence/$InventoryImpl57473856, method: <init> signature: (Ljava/lang/reflect/InvocationHandler;)V) Call to wrong initialization method
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
	at java.lang.Class.getConstructor0(Class.java:2714)
	at java.lang.Class.getConstructor(Class.java:1674)
	at org.apache.aries.proxy.impl.gen.ProxySubclassGenerator.newProxySubclassInstance(ProxySubclassGenerator.java:159)
	at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:81)
	at org.apache.aries.proxy.impl.AbstractProxyManager.createProxy(AbstractProxyManager.java:50)
	at org.apache.aries.blueprint.container.BeanRecipe.addInterceptors(BeanRecipe.java:688)
	at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:728)
	at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
	at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
	at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)
	... 10 more
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira