aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Burgazzoli (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ARIES-1023) Construct a persistence unit with parameters
Date Thu, 07 Mar 2013 07:38:16 GMT
Luca Burgazzoli created ARIES-1023:
--------------------------------------

             Summary: Construct a persistence unit with parameters
                 Key: ARIES-1023
                 URL: https://issues.apache.org/jira/browse/ARIES-1023
             Project: Aries
          Issue Type: Bug
          Components: JPA
            Reporter: Luca Burgazzoli



According to http://aries.apache.org/modules/jpaproject.html it should be possible to construct
a persistence unit with properties supplied in the OSGi blueprint.xml instead of hard-coding
them in the persistence.xml but it does not seem to work:


The bean definition:

<bean id="con_managed_data_service"
       class="lb.examples.karaf.jpa.openjpa.data.ContainerManagedDataService">
    <jpa:context unitname="OPENJPA_PU_JTA" property="entityManager">
        <map>
            <property name="openjpa.Log" value="DefaultLevel=TRACE"/>
        </map>
    </jpa:context>
    <tx:transaction method="*" value="Required"/>
</bean>

And the error:

2013-03-07 08:30:57,884 | ERROR | BlueprintContainerImpl           | blueprint.container.BlueprintContainerImpl
| org.apache.aries.blueprint.core | Unable to start blueprint container for bundle jpa-openjpa
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate xml
        at org.apache.aries.blueprint.parser.Parser.validate(Parser.java:288)[7:org.apache.aries.blueprint.core:1.0.1]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:304)[7:org.apache.aries.blueprint.core:1.0.1]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
        at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_17]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_17]
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_17]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_17]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_17]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_17]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_17]
        at java.lang.Thread.run(Thread.java:722)[:1.7.0_17]
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found
starting with element 'map'. One of '{"http://aries.apache.org/xmlns/jpa/v1.1.0":map}' is
expected.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)[:1.7.0_17]
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)[:1.7.0_17]
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)[:1.7.0_17]
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)[:1.7.0_17]
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)[:1.7.0_17]
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:453)[:1.7.0_17]
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3232)[:1.7.0_17]
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1791)[:1.7.0_17]
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)[:1.7.0_17]
        at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.beginNode(DOMValidatorHelper.java:277)[:1.7.0_17]
        at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:244)[:1.7.0_17]
        at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:190)[:1.7.0_17]
        at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:109)[:1.7.0_17]
        at javax.xml.validation.Validator.validate(Unknown Source)[:2.1.0]
        at org.apache.aries.blueprint.parser.Parser.validate(Parser.java:285)[7:org.apache.aries.blueprint.core:1.0.1]
        ... 11 more


--
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

Mime
View raw message