Please Comment, Subscribe and Click Bell🔔🔔🔔 Icon for More Updates. To learn software course from our experts please register here for online training: goo.gl/HIB0wL
Sir,while executing this first application it's showing error can you tell what is the problem Jul 01, 2017 10:58:43 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from file [C:\Users\small b\eclipse-workspace\IOCProject1.SetterInjection\src\com t\cfgs\applicationContext.xml] Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from file [C:\Users\small b\eclipse-workspace\IOCProject1.SetterInjection\src\com t\cfgs\applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 10; cvc-complex-type.2.3: Element 'beans' cannot have character [children], because the type's content type is element-only. at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304) at org.springframework.beans.factory.xml.XmlBeanFactory.(XmlBeanFactory.java:79) at org.springframework.beans.factory.xml.XmlBeanFactory.(XmlBeanFactory.java:67) at com.nt.test.SetterInjectionTest.main(SetterInjectionTest.java:20) Caused by: org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 10; cvc-complex-type.2.3: Element 'beans' cannot have character [children], because the type's content type is element-only. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidComplexType(Unknown Source) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidType(Unknown Source) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processElementContent(Unknown Source) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:429) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391) ... 5 more
why Type casting is necessary if i say "generator=(WishMessageGenerator) factory.getBean("wish");" this will run perfectly why have you taken Object obj then type cast it in to WishMessageGenerator?
Thank u sir. But I have one basic doubt. U r saying container can use the constructor for creating the object. But generally constructor can be used for initialize the object. Then I confused usage of constructor here. Can u clarify it. Please any one can reply...
whenever object is created.., its constructor will be called. You can put some initialisation code there. As the same suggests.., constructor is used to construct the object no matter you put anything to initialise or not.
I am not imported XmlBeanFactory it's showing error can you explaim what is the problem in my program Exception in thread "main" java.lang.Error: Unresolved compilation problem: XmlBeanFactory cannot be resolved to a type at com.nt.test.SetterInjectionTest.main(SetterInjectionTest.java:19)
Please Comment, Subscribe and Click Bell🔔🔔🔔 Icon for More Updates. To learn software course from our experts please register here for online training: goo.gl/HIB0wL
Please ans my question
I got clarity from this video.thanks sir
you r great man.thanq sir.keep doing #great job.
jeetarani kamar hi
very clear explanation sir....u r great I am following all your videos..... please upload more videos on spring and hibernate..
That's really helpful..Thank you sir....
Well delivered and well edited
such a cool man .,,u sir
nice and excellent explanation
thanks a lot sir.
or Bhuvi kya haal h...Wicket bahut le rha h aajkal... #ChakDeFatte
Sir,while executing this first application it's showing error
can you tell what is the problem
Jul 01, 2017 10:58:43 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from file [C:\Users\small b\eclipse-workspace\IOCProject1.SetterInjection\src\com
t\cfgs\applicationContext.xml]
Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from file [C:\Users\small b\eclipse-workspace\IOCProject1.SetterInjection\src\com
t\cfgs\applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 10; cvc-complex-type.2.3: Element 'beans' cannot have character [children], because the type's content type is element-only.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
at org.springframework.beans.factory.xml.XmlBeanFactory.(XmlBeanFactory.java:79)
at org.springframework.beans.factory.xml.XmlBeanFactory.(XmlBeanFactory.java:67)
at com.nt.test.SetterInjectionTest.main(SetterInjectionTest.java:20)
Caused by: org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 10; cvc-complex-type.2.3: Element 'beans' cannot have character [children], because the type's content type is element-only.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidComplexType(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidType(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processElementContent(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:429)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
... 5 more
in applicationContext.xml ==> you have to add xsd schema line (as taken with the help of pdf 26:12
)
Excellent....
why Type casting is necessary if i say "generator=(WishMessageGenerator) factory.getBean("wish");" this will run perfectly why have you taken Object obj then type cast it in to WishMessageGenerator?
Comment is what...???
:p really loved the session
And if it is done throu land injection then ...called what sir? U r gre8
awesome sir
Awesome..
Could you please upload all modules of spring videos?
If download all modules of spring videos how to come classes students,madam
How to get spring application in our desktop can anyone tell please
Thank u sir. But I have one basic doubt. U r saying container can use the constructor for creating
the object. But generally constructor can be used for
initialize the object.
Then I confused usage of constructor here. Can u clarify it. Please any one can reply...
whenever object is created.., its constructor will be called. You can put some initialisation code there. As the same suggests.., constructor is used to construct the object no matter you put anything to initialise or not.
hello nataraj,I am unable find spring 4.2.x in the google.If it possible anybody help with the download link.
Thanks
thank u sir
I am not imported XmlBeanFactory
it's showing error
can you explaim what is the problem in my program
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
XmlBeanFactory cannot be resolved to a type at com.nt.test.SetterInjectionTest.main(SetterInjectionTest.java:19)
you have to add==> spring-beans jar
i already added spring-beans.jar file
can you provide your mobile number
give me the link to download spring core jar files
I need the full video. How to get it. kindly suggest
attend class..
Why it is printed name of raja
You are not define that name
Xclnt Xplanation.