0.97 version validation errors

Anonymous
2010-07-20
2013-05-23
  • Anonymous - 2010-07-20

    By using one-jar version 0.96 , I am getting StringOutOfBoundException when I am using bean validation (issue with clazz.getResource in 0.96 version) but by using latest one jar 0.97 version I can overcome this error but other issue is when I am running latest one jar version I am getting InvalidArgumentException on InvalidXml whereas xml is valid, can I skip this validation on latest one jar version, please advise

     
  • Anonymous - 2010-07-20

    i am getting error as follows

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
    ng bean with name 'persistenceUnitManager' defined in URL [jar:file:/batchups
    ert-stockitems.jar!/lib/business.jar!/business-spring-contex
    t.xml]: Invocation of init method failed; nested exception is java.lang.IllegalA
    rgumentException: Invalid XML in persistence unit from URL [jar:file:/batchupser
    t-stockitems.jar!/lib/business.jar!/META-INF/persistence.xml
    ]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1401)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFactory.java:450)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
    ject(AbstractBeanFactory.java:290)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
    y.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
    an(AbstractBeanFactory.java:287)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:189)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.
    preInstantiateSingletons(DefaultListableBeanFactory.java:557)
            at org.springframework.context.support.AbstractApplicationContext.finish
    BeanFactoryInitialization(AbstractApplicationContext.java:842)
            at org.springframework.context.support.AbstractApplicationContext.refres
    h(AbstractApplicationContext.java:416)
            at org.springframework.context.support.ClassPathXmlApplicationContext.<i
    nit>(ClassPathXmlApplicationContext.java:139)
            at org.springframework.context.support.ClassPathXmlApplicationContext.<i
    nit>(ClassPathXmlApplicationContext.java:83)
            at merlin.utility.batchupsertstockitem.BatchStockItemUpsertService.main(
    BatchStockItemUpsertService.java:40)
            … 6 more
    Caused by: java.lang.IllegalArgumentException: Invalid XML in persistence unit f
    rom URL [jar:file:/batchupsert-stockitems.jar!/lib/business.jar!/META-
    INF/persistence.xml]
            at org.springframework.orm.jpa.persistenceunit.PersistenceUnitReader.rea
    dPersistenceUnitInfos(PersistenceUnitReader.java:150)
            at org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitMan
    ager.readPersistenceUnitInfos(DefaultPersistenceUnitManager.java:303)
            at org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitMan
    ager.preparePersistenceUnitInfos(DefaultPersistenceUnitManager.java:275)
            at org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitMan
    ager.afterPropertiesSet(DefaultPersistenceUnitManager.java:260)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBean
    Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398)
            … 18 more
    Caused by: org.xml.sax.SAXParseException: schema_reference.4: Failed to read sch
    ema document 'jar:file:/batchupsert-stockitems.jar!/lib/hibernate-entitymanager-
    3.4.0.GA.jar!/org/hibernate/ejb/persistence_1_0.xsd', because 1) could not find
    the document; 2) the document could not be read; 3) the root element of the docu
    ment is not <xsd:schema>.
            at com.sun.org.apache.xerces.internal.uti
    l.ErrorHandlerWrapper.createSAX
    ParseException(ErrorHandlerWrapper.java:195)
            at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Err
    orHandlerWrapper.java:131)
            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
    XMLErrorReporter.java:384)
            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
    XMLErrorReporter.java:318)
            at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.repo
    rtSchemaErr(XSDHandler.java:2541)
            at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.repo
    rtSchemaError(XSDHandler.java:2528)
            at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getS
    chemaDocument(XSDHandler.java:1825)
            at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.pars
    eSchema(XSDHandler.java:531)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema
    (XMLSchemaLoader.java:552)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.processJAX
    PSchemaSource(XMLSchemaLoader.java:713)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema
    (XMLSchemaLoader.java:550)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSch
    emaGrammar(XMLSchemaValidator.java:2436)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleS
    tartElement(XMLSchemaValidator.java:1781)
            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startEl
    ement(XMLSchemaValidator.java:705)
            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scan
    StartElement(XMLNSDocumentScannerImpl.java:400)
            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSCo
    ntentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3103)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$Prolog
    Driver.next(XMLDocumentScannerImpl.java:922)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
    MLDocumentScannerImpl.java:648)
            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next
    (XMLNSDocumentScannerImpl.java:140)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:808)
            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:737)
            at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
    java:119)
            at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.
    java:235)
            at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Doc
    umentBuilderImpl.java:284)
            at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
            at org.springframework.orm.jpa.persistenceunit.PersistenceUnitReader.val
    idateResource(PersistenceUnitReader.java:186)
            at org.springframework.orm.jpa.persistenceunit.PersistenceUnitReader.rea
    dPersistenceUnitInfos(PersistenceUnitReader.java:137)
            … 23 more

     
  • P. Simon Tuffs

    P. Simon Tuffs - 2010-07-20

    Please attach an example project that demonstrates the problem to this tracker.  Without this it will be difficult to know if I'm looking at the same problem that you have found. 

    -simon.

     
  • Anonymous - 2010-07-20

    can i attach jar file or zip file in thispost

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks