[servicemix-user] Spring Toolkit Tutorial with ServiceMix 2.0

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[servicemix-user] Spring Toolkit Tutorial with ServiceMix 2.0

Mark-25
Hi,

I am trying to build JBI components following the Spring Client Toolkit
tutorial on the ServiceMix web site. When I drop the component installer
zip files into the installer directory, getting serveral errors on the
console (on Windows).

Is this tutorial still valid for ServiceMix 2.0 release? Thanks for your
help.

Here is the error log.

[WARN] AutoDeploymentService - Directory: install: Automatic install of
..\insta
ll\myFirstComponent-1.0-jbi-installer.zip failed
<java.lang.RuntimeException: Un
able to parse the jbi.xml>java.lang.RuntimeException: Unable to parse the
jbi.xm
l
        at
org.servicemix.client.DescriptorFactory.getDescriptor(DescriptorFacto
ry.java:61)
        at
org.servicemix.client.ClientEndPointRegistry.loadServiceUnitServices(
ClientEndPointRegistry.java:314)
        at
org.servicemix.client.ClientEndPointRegistry.loadComponentServices(Cl
ientEndPointRegistry.java:298)
        at
org.servicemix.client.SpringComponentLifeCycle.init(SpringComponentLi
feCycle.java:130)
        at
org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContai
ner.java:887)
        at
org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContai
ner.java:838)
        at
org.servicemix.jbi.framework.InstallerMBeanImpl.install(InstallerMBea
nImpl.java:131)
        at
org.servicemix.jbi.framework.InstallationService.install(Installation
Service.java:263)
        at
org.servicemix.jbi.framework.AutoDeploymentService.updateArchive(Auto
DeploymentService.java:184)
        at
org.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoDeployme
ntService.java:512)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
va:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
So
urce)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Line
3 in XML document from URL
[file:/C:/servicemix-2.0/bin/../wdir/defaultJBI/compo
nents/myFirstComponent/installation/META-INF/jbi.xml] is invalid; nested
excepti
on is org.xml.sax.SAXParseException: Document root element "jbi", must
match DOC
TYPE root "null".
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:169)
        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
        at
org.springframework.context.support.AbstractXmlApplicationContext.loa
dBeanDefinitions(AbstractXmlApplicationContext.java:113)
        at
org.springframework.context.support.AbstractXmlApplicationContext.loa
dBeanDefinitions(AbstractXmlApplicationContext.java:81)
        at
org.springframework.context.support.AbstractRefreshableApplicationCon
text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
        at
org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:268)
        at
org.springframework.context.support.FileSystemXmlApplicationContext.<
init>(FileSystemXmlApplicationContext.java:83)
        at
org.springframework.context.support.FileSystemXmlApplicationContext.<
init>(FileSystemXmlApplicationContext.java:68)
        at
org.springframework.context.support.FileSystemXmlApplicationContext.<
init>(FileSystemXmlApplicationContext.java:59)
        at
org.servicemix.client.DescriptorFactory.getDescriptor(DescriptorFacto
ry.java:56)
        ... 12 more
Caused by: org.xml.sax.SAXParseException: Document root element "jbi",
must matc
h DOCTYPE root "null".
        at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unkno
wn Source)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
 Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
Sourc
e)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanR
ootElementHook(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:161)
        ... 22 more




Thanks,

Mark

Technical Services
Sirvisetti Systems
347 Plainfield Avenue
Edison NJ 08817
Tel:(866) 985-2200 Ext 1106
Fax:(732) 985-4448
http://www.sirvisetti.com
http://autostream.sirvisetti.com


----------------------------------------------------------------------
This email has been sent by Sirvisetti Systems. If you believe this email
has reached you in error or if you no longer wish to receive email updates
from Sirvisetti Systems, reply to this email with Remove in the Subject
line. We regret for the inconvenience caused.




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] Spring Toolkit Tutorial with ServiceMix 2.0

Guillaume Nodet-3
This may a problem with validation.
You may try with the old version of spring
http://dist.codehaus.org/servicemix/jars/spring-1.2.2-dev-2.jar
or you may try to modify the code of
org.servicemix.client.DescriptorFactory#getDescriptor with this one

    public static Descriptor getDescriptor(String installRoot) {
        Descriptor root = null;
        File descriptor = new File(installRoot + META_INF, DESCRIPTOR_FILE);
        log.debug("Checking for descriptor " +
descriptor.getAbsolutePath());
        if (descriptor.exists()) {
            try {
               
Thread.currentThread().setContextClassLoader(Descriptor.class.getClassLoader());
                FileSystemXmlApplicationContext context = new
FileSystemXmlApplicationContext("file:///"
                        + descriptor.getAbsolutePath(),
                        Arrays.asList(new Object[] { new
XBeanProcessor()}));
                root = (Descriptor) context.getBean("jbi");
                log.debug("Parsed descriptor " + root);
            } catch (Throwable e) {
                throw new RuntimeException("Unable to parse the
jbi.xml", e);
            }
        } else {
            throw new RuntimeException("Descriptor file: " + descriptor
+ " doesn't exist");
        }
        return root;
    }

Make sure you use the
org.xbean.spring.context.FileSystemXmlApplicationContext and not the
spring one.
This should work.

Cheers,
Guillaume Nodet

Mark wrote:

>Hi,
>
>I am trying to build JBI components following the Spring Client Toolkit
>tutorial on the ServiceMix web site. When I drop the component installer
>zip files into the installer directory, getting serveral errors on the
>console (on Windows).
>
>Is this tutorial still valid for ServiceMix 2.0 release? Thanks for your
>help.
>
>Here is the error log.
>
>[WARN] AutoDeploymentService - Directory: install: Automatic install of
>..\insta
>ll\myFirstComponent-1.0-jbi-installer.zip failed
><java.lang.RuntimeException: Un
>able to parse the jbi.xml>java.lang.RuntimeException: Unable to parse the
>jbi.xm
>l
>        at
>org.servicemix.client.DescriptorFactory.getDescriptor(DescriptorFacto
>ry.java:61)
>        at
>org.servicemix.client.ClientEndPointRegistry.loadServiceUnitServices(
>ClientEndPointRegistry.java:314)
>        at
>org.servicemix.client.ClientEndPointRegistry.loadComponentServices(Cl
>ientEndPointRegistry.java:298)
>        at
>org.servicemix.client.SpringComponentLifeCycle.init(SpringComponentLi
>feCycle.java:130)
>        at
>org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContai
>ner.java:887)
>        at
>org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContai
>ner.java:838)
>        at
>org.servicemix.jbi.framework.InstallerMBeanImpl.install(InstallerMBea
>nImpl.java:131)
>        at
>org.servicemix.jbi.framework.InstallationService.install(Installation
>Service.java:263)
>        at
>org.servicemix.jbi.framework.AutoDeploymentService.updateArchive(Auto
>DeploymentService.java:184)
>        at
>org.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoDeployme
>ntService.java:512)
>        at
>org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
>va:291)
>        at
>EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>So
>urce)
>        at java.lang.Thread.run(Thread.java:595)
>Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
>Line
>3 in XML document from URL
>[file:/C:/servicemix-2.0/bin/../wdir/defaultJBI/compo
>nents/myFirstComponent/installation/META-INF/jbi.xml] is invalid; nested
>excepti
>on is org.xml.sax.SAXParseException: Document root element "jbi", must
>match DOC
>TYPE root "null".
>        at
>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
>nDefinitions(XmlBeanDefinitionReader.java:169)
>        at
>org.springframework.beans.factory.support.AbstractBeanDefinitionReade
>r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
>        at
>org.springframework.beans.factory.support.AbstractBeanDefinitionReade
>r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
>        at
>org.springframework.context.support.AbstractXmlApplicationContext.loa
>dBeanDefinitions(AbstractXmlApplicationContext.java:113)
>        at
>org.springframework.context.support.AbstractXmlApplicationContext.loa
>dBeanDefinitions(AbstractXmlApplicationContext.java:81)
>        at
>org.springframework.context.support.AbstractRefreshableApplicationCon
>text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>        at
>org.springframework.context.support.AbstractApplicationContext.refres
>h(AbstractApplicationContext.java:268)
>        at
>org.springframework.context.support.FileSystemXmlApplicationContext.<
>init>(FileSystemXmlApplicationContext.java:83)
>        at
>org.springframework.context.support.FileSystemXmlApplicationContext.<
>init>(FileSystemXmlApplicationContext.java:68)
>        at
>org.springframework.context.support.FileSystemXmlApplicationContext.<
>init>(FileSystemXmlApplicationContext.java:59)
>        at
>org.servicemix.client.DescriptorFactory.getDescriptor(DescriptorFacto
>ry.java:56)
>        ... 12 more
>Caused by: org.xml.sax.SAXParseException: Document root element "jbi",
>must matc
>h DOCTYPE root "null".
>        at
>org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
>known Source)
>        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
>        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>Source)
>        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>Source)
>        at
>org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unkno
>wn Source)
>        at
>org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
> Source)
>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
>Sourc
>e)
>        at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
>t(Unknown Source)
>        at
>org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanR
>ootElementHook(Unknown Source)
>        at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
>Dispatcher.dispatch(Unknown Source)
>        at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
>known Source)
>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
>        at
>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
>nDefinitions(XmlBeanDefinitionReader.java:161)
>        ... 22 more
>
>
>
>
>Thanks,
>
>Mark
>
>Technical Services
>Sirvisetti Systems
>347 Plainfield Avenue
>Edison NJ 08817
>Tel:(866) 985-2200 Ext 1106
>Fax:(732) 985-4448
>http://www.sirvisetti.com
>http://autostream.sirvisetti.com
>
>
>----------------------------------------------------------------------
>This email has been sent by Sirvisetti Systems. If you believe this email
>has reached you in error or if you no longer wish to receive email updates
>from Sirvisetti Systems, reply to this email with Remove in the Subject
>line. We regret for the inconvenience caused.
>
>
>
>
>
>
>  
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] Spring Toolkit Tutorial with ServiceMix 2.0

Craig Walls
In reply to this post by Mark-25

I had a similar question last night when I tried the tutorial...but I
didn't get as far as Mark. I stopped when I ran the "eclipse" goal in
Maven and saw this:

[snoopy:~/projects/smtutorial/myFirstComponent] wallsc% maven eclipse
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0.2

Attempting to download servicemix-1.0.jar.
491K downloaded
Attempting to download servicemix-client-1.0.jar.
22K downloaded
build:start:


It seems that it's downloading ServiceMix 1.0. Is there a newer version
of the plugin that uses ServiceMix 2.0?

Thanks,
Craig



Mark wrote:

>Hi,
>
>I am trying to build JBI components following the Spring Client Toolkit
>tutorial on the ServiceMix web site. When I drop the component installer
>zip files into the installer directory, getting serveral errors on the
>console (on Windows).
>
>Is this tutorial still valid for ServiceMix 2.0 release? Thanks for your
>help.
>
>Here is the error log.
>
>[WARN] AutoDeploymentService - Directory: install: Automatic install of
>..\insta
>ll\myFirstComponent-1.0-jbi-installer.zip failed
><java.lang.RuntimeException: Un
>able to parse the jbi.xml>java.lang.RuntimeException: Unable to parse the
>jbi.xm
>l
>        at
>org.servicemix.client.DescriptorFactory.getDescriptor(DescriptorFacto
>ry.java:61)
>        at
>org.servicemix.client.ClientEndPointRegistry.loadServiceUnitServices(
>ClientEndPointRegistry.java:314)
>        at
>org.servicemix.client.ClientEndPointRegistry.loadComponentServices(Cl
>ientEndPointRegistry.java:298)
>        at
>org.servicemix.client.SpringComponentLifeCycle.init(SpringComponentLi
>feCycle.java:130)
>        at
>org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContai
>ner.java:887)
>        at
>org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContai
>ner.java:838)
>        at
>org.servicemix.jbi.framework.InstallerMBeanImpl.install(InstallerMBea
>nImpl.java:131)
>        at
>org.servicemix.jbi.framework.InstallationService.install(Installation
>Service.java:263)
>        at
>org.servicemix.jbi.framework.AutoDeploymentService.updateArchive(Auto
>DeploymentService.java:184)
>        at
>org.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoDeployme
>ntService.java:512)
>        at
>org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
>va:291)
>        at
>EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>So
>urce)
>        at java.lang.Thread.run(Thread.java:595)
>Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
>Line
>3 in XML document from URL
>[file:/C:/servicemix-2.0/bin/../wdir/defaultJBI/compo
>nents/myFirstComponent/installation/META-INF/jbi.xml] is invalid; nested
>excepti
>on is org.xml.sax.SAXParseException: Document root element "jbi", must
>match DOC
>TYPE root "null".
>        at
>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
>nDefinitions(XmlBeanDefinitionReader.java:169)
>        at
>org.springframework.beans.factory.support.AbstractBeanDefinitionReade
>r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
>        at
>org.springframework.beans.factory.support.AbstractBeanDefinitionReade
>r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
>        at
>org.springframework.context.support.AbstractXmlApplicationContext.loa
>dBeanDefinitions(AbstractXmlApplicationContext.java:113)
>        at
>org.springframework.context.support.AbstractXmlApplicationContext.loa
>dBeanDefinitions(AbstractXmlApplicationContext.java:81)
>        at
>org.springframework.context.support.AbstractRefreshableApplicationCon
>text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>        at
>org.springframework.context.support.AbstractApplicationContext.refres
>h(AbstractApplicationContext.java:268)
>        at
>org.springframework.context.support.FileSystemXmlApplicationContext.<
>init>(FileSystemXmlApplicationContext.java:83)
>        at
>org.springframework.context.support.FileSystemXmlApplicationContext.<
>init>(FileSystemXmlApplicationContext.java:68)
>        at
>org.springframework.context.support.FileSystemXmlApplicationContext.<
>init>(FileSystemXmlApplicationContext.java:59)
>        at
>org.servicemix.client.DescriptorFactory.getDescriptor(DescriptorFacto
>ry.java:56)
>        ... 12 more
>Caused by: org.xml.sax.SAXParseException: Document root element "jbi",
>must matc
>h DOCTYPE root "null".
>        at
>org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
>known Source)
>        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
>        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>Source)
>        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>Source)
>        at
>org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unkno
>wn Source)
>        at
>org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
> Source)
>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
>Sourc
>e)
>        at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
>t(Unknown Source)
>        at
>org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanR
>ootElementHook(Unknown Source)
>        at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
>Dispatcher.dispatch(Unknown Source)
>        at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
>known Source)
>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
>        at
>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
>nDefinitions(XmlBeanDefinitionReader.java:161)
>        ... 22 more
>
>
>
>
>Thanks,
>
>Mark
>
>Technical Services
>Sirvisetti Systems
>347 Plainfield Avenue
>Edison NJ 08817
>Tel:(866) 985-2200 Ext 1106
>Fax:(732) 985-4448
>http://www.sirvisetti.com
>http://autostream.sirvisetti.com
>
>
>----------------------------------------------------------------------
>This email has been sent by Sirvisetti Systems. If you believe this email
>has reached you in error or if you no longer wish to receive email updates
>from Sirvisetti Systems, reply to this email with Remove in the Subject
>line. We regret for the inconvenience caused.
>
>
>
>
>
>  
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] Spring Toolkit Tutorial with ServiceMix 2.0

Guillaume Nodet-3
ServiceMix client toolkit does not rely on ServiceMix container, just on
some classes that are defined
in SM.  I'll try to update it asap.

Guillaume

Craig Walls wrote:

>
> I had a similar question last night when I tried the tutorial...but I
> didn't get as far as Mark. I stopped when I ran the "eclipse" goal in
> Maven and saw this:
>
> [snoopy:~/projects/smtutorial/myFirstComponent] wallsc% maven eclipse
> __  __
> |  \/  |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|  v. 1.0.2
>
> Attempting to download servicemix-1.0.jar.
> 491K downloaded
> Attempting to download servicemix-client-1.0.jar.
> 22K downloaded
> build:start:
>
>
> It seems that it's downloading ServiceMix 1.0. Is there a newer
> version of the plugin that uses ServiceMix 2.0?
>
> Thanks,
> Craig
>
>
>
> Mark wrote:
>
>> Hi,
>>
>> I am trying to build JBI components following the Spring Client Toolkit
>> tutorial on the ServiceMix web site. When I drop the component installer
>> zip files into the installer directory, getting serveral errors on the
>> console (on Windows).
>>
>> Is this tutorial still valid for ServiceMix 2.0 release? Thanks for your
>> help.
>>
>> Here is the error log.
>>
>> [WARN] AutoDeploymentService - Directory: install: Automatic install of
>> ..\insta
>> ll\myFirstComponent-1.0-jbi-installer.zip failed
>> <java.lang.RuntimeException: Un
>> able to parse the jbi.xml>java.lang.RuntimeException: Unable to parse
>> the
>> jbi.xm
>> l
>>        at
>> org.servicemix.client.DescriptorFactory.getDescriptor(DescriptorFacto
>> ry.java:61)
>>        at
>> org.servicemix.client.ClientEndPointRegistry.loadServiceUnitServices(
>> ClientEndPointRegistry.java:314)
>>        at
>> org.servicemix.client.ClientEndPointRegistry.loadComponentServices(Cl
>> ientEndPointRegistry.java:298)
>>        at
>> org.servicemix.client.SpringComponentLifeCycle.init(SpringComponentLi
>> feCycle.java:130)
>>        at
>> org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContai
>> ner.java:887)
>>        at
>> org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContai
>> ner.java:838)
>>        at
>> org.servicemix.jbi.framework.InstallerMBeanImpl.install(InstallerMBea
>> nImpl.java:131)
>>        at
>> org.servicemix.jbi.framework.InstallationService.install(Installation
>> Service.java:263)
>>        at
>> org.servicemix.jbi.framework.AutoDeploymentService.updateArchive(Auto
>> DeploymentService.java:184)
>>        at
>> org.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoDeployme
>> ntService.java:512)
>>        at
>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
>> va:291)
>>        at
>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> So
>> urce)
>>        at java.lang.Thread.run(Thread.java:595)
>> Caused by:
>> org.springframework.beans.factory.BeanDefinitionStoreException:
>> Line
>> 3 in XML document from URL
>> [file:/C:/servicemix-2.0/bin/../wdir/defaultJBI/compo
>> nents/myFirstComponent/installation/META-INF/jbi.xml] is invalid; nested
>> excepti
>> on is org.xml.sax.SAXParseException: Document root element "jbi", must
>> match DOC
>> TYPE root "null".
>>        at
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
>> nDefinitions(XmlBeanDefinitionReader.java:169)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReade
>> r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanDefinitionReade
>> r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
>>        at
>> org.springframework.context.support.AbstractXmlApplicationContext.loa
>> dBeanDefinitions(AbstractXmlApplicationContext.java:113)
>>        at
>> org.springframework.context.support.AbstractXmlApplicationContext.loa
>> dBeanDefinitions(AbstractXmlApplicationContext.java:81)
>>        at
>> org.springframework.context.support.AbstractRefreshableApplicationCon
>> text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>>        at
>> org.springframework.context.support.AbstractApplicationContext.refres
>> h(AbstractApplicationContext.java:268)
>>        at
>> org.springframework.context.support.FileSystemXmlApplicationContext.<
>> init>(FileSystemXmlApplicationContext.java:83)
>>        at
>> org.springframework.context.support.FileSystemXmlApplicationContext.<
>> init>(FileSystemXmlApplicationContext.java:68)
>>        at
>> org.springframework.context.support.FileSystemXmlApplicationContext.<
>> init>(FileSystemXmlApplicationContext.java:59)
>>        at
>> org.servicemix.client.DescriptorFactory.getDescriptor(DescriptorFacto
>> ry.java:56)
>>        ... 12 more
>> Caused by: org.xml.sax.SAXParseException: Document root element "jbi",
>> must matc
>> h DOCTYPE root "null".
>>        at
>> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
>> known Source)
>>        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
>> Source)
>>        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>> Source)
>>        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>> Source)
>>        at
>> org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unkno
>> wn Source)
>>        at
>> org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
>> Source)
>>        at
>> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
>> Sourc
>> e)
>>        at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
>> t(Unknown Source)
>>        at
>> org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanR
>> ootElementHook(Unknown Source)
>>        at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
>> Dispatcher.dispatch(Unknown Source)
>>        at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
>> known Source)
>>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)
>>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)
>>        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>>        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>> Source)
>>        at
>> javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
>>        at
>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
>> nDefinitions(XmlBeanDefinitionReader.java:161)
>>        ... 22 more
>>
>>
>>
>>
>> Thanks,
>>
>> Mark
>>
>> Technical Services
>> Sirvisetti Systems
>> 347 Plainfield Avenue
>> Edison NJ 08817
>> Tel:(866) 985-2200 Ext 1106
>> Fax:(732) 985-4448
>> http://www.sirvisetti.com
>> http://autostream.sirvisetti.com
>>
>>
>> ----------------------------------------------------------------------
>> This email has been sent by Sirvisetti Systems. If you believe this
>> email
>> has reached you in error or if you no longer wish to receive email
>> updates
>> from Sirvisetti Systems, reply to this email with Remove in the Subject
>> line. We regret for the inconvenience caused.
>>
>>
>>
>>
>>
>>  
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [servicemix-user] Spring Toolkit Tutorial with ServiceMix 2.0

Mark-25
In reply to this post by Guillaume Nodet-3
Old version of Spring did not help. ServiceMix ESB does not even come up.
I tried keeping both 1.2-dev and 1.2.5 jars and 1.2-dev alone in the lib
directory. Both cases it didn't come up.

I will try modifying the source as suggested and report back.

Here is the console log.

C:\servicemix-2.0.1\bin>servicemix
ServiceMix ESB: 2.0.1

Loading ServiceMix from servicemix.xml on the CLASSPATH
[INFO] XBeanXmlBeanDefinitionReader - Loading XML bean definitions from
class pa
th resource [servicemix.xml]
[WARN] XBeanXmlBeanDefinitionParser - Could not find resource:
META-INF/services
/org/springframework/config/http/xbean.org/schemas/spring/1.0/beans
[WARN] XBeanXmlBeanDefinitionParser - Could not find resource:
META-INF/services
/org/springframework/config/http/servicemix.org/config/1.0/sm:container
[WARN] XBeanXmlBeanDefinitionParser - Could not find resource:
META-INF/services
/org/springframework/config/http/servicemix.org/config/1.0/sm:activationSpecs
[WARN] XBeanXmlBeanDefinitionParser - Could not find resource:
META-INF/services
/org/springframework/config/http/xbean.org/schemas/spring/1.0/bean
[WARN] XBeanXmlBeanDefinitionParser - Could not find resource:
META-INF/services
/org/springframework/config/http/xbean.org/schemas/spring/1.0/bean
[WARN] XBeanXmlBeanDefinitionParser - Could not find resource:
META-INF/services
/org/springframework/config/http/xbean.org/schemas/spring/1.0/bean
[WARN] XBeanXmlBeanDefinitionParser - Could not find resource:
META-INF/services
/org/springframework/config/http/xbean.org/schemas/spring/1.0/property
[WARN] XBeanXmlBeanDefinitionParser - Could not find resource:
META-INF/services
/org/springframework/config/http/xbean.org/schemas/spring/1.0/bean
[WARN] XBeanXmlBeanDefinitionParser - Could not find resource:
META-INF/services
/org/springframework/config/http/xbean.org/schemas/spring/1.0/property
[WARN] XBeanXmlBeanDefinitionParser - Could not find resource:
META-INF/services
/org/springframework/config/http/xbean.org/schemas/spring/1.0/bean
[WARN] XBeanXmlBeanDefinitionParser - Could not find resource:
META-INF/services
/org/springframework/config/http/xbean.org/schemas/spring/1.0/property
Exception in thread "main" java.lang.NoSuchMethodError:
org.springframework.bean
s.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(Lorg/w3c
/dom/Element;Z)Lorg/springframework/beans/factory/config/BeanDefinitionHolder;
        at
org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.parseBeanD
efinitionElement(XBeanXmlBeanDefinitionParser.java:625)
        at
org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.parseBeanF
romExtensionElement(XBeanXmlBeanDefinitionParser.java:129)
        at
org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.parseBeanD
efinitions(XBeanXmlBeanDefinitionParser.java:597)
        at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:204)
        at
org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.registerBe
anDefinitions(XBeanXmlBeanDefinitionReader.java:78)
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:162)
        at
org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:99)
        at
org.springframework.context.support.AbstractXmlApplicationContext.loa
dBeanDefinitions(AbstractXmlApplicationContext.java:123)
        at
org.xbean.spring.context.ClassPathXmlApplicationContext.loadBeanDefin
itions(ClassPathXmlApplicationContext.java:170)
        at
org.springframework.context.support.AbstractRefreshableApplicationCon
text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:87)
        at
org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:262)
        at
org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassP
athXmlApplicationContext.java:158)
        at
org.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassP
athXmlApplicationContext.java:48)
        at org.servicemix.Main.main(Main.java:50)

> This may a problem with validation.
> You may try with the old version of spring
> http://dist.codehaus.org/servicemix/jars/spring-1.2.2-dev-2.jar
> or you may try to modify the code of
> org.servicemix.client.DescriptorFactory#getDescriptor with this one
>
>     public static Descriptor getDescriptor(String installRoot) {
>         Descriptor root = null;
>         File descriptor = new File(installRoot + META_INF,
> DESCRIPTOR_FILE); log.debug("Checking for descriptor " +
> descriptor.getAbsolutePath());
>         if (descriptor.exists()) {
>             try {
>
> Thread.currentThread().setContextClassLoader(Descriptor.class.getClassLoader());
>                 FileSystemXmlApplicationContext context = new
> FileSystemXmlApplicationContext("file:///"
>                         + descriptor.getAbsolutePath(),
>                         Arrays.asList(new Object[] { new
> XBeanProcessor()}));
>                 root = (Descriptor) context.getBean("jbi");
>                 log.debug("Parsed descriptor " + root);
>             } catch (Throwable e) {
>                 throw new RuntimeException("Unable to parse the
> jbi.xml", e);
>             }
>         } else {
>             throw new RuntimeException("Descriptor file: " + descriptor
> + " doesn't exist");
>         }
>         return root;
>     }
>
> Make sure you use the
> org.xbean.spring.context.FileSystemXmlApplicationContext and not the
> spring one.
> This should work.
>
> Cheers,
> Guillaume Nodet
>
> Mark wrote:
>
>>Hi,
>>
>>I am trying to build JBI components following the Spring Client Toolkit
>> tutorial on the ServiceMix web site. When I drop the component
>> installer zip files into the installer directory, getting serveral
>> errors on the console (on Windows).
>>
>>Is this tutorial still valid for ServiceMix 2.0 release? Thanks for
>> your help.
>>
>>Here is the error log.
>>
>>[WARN] AutoDeploymentService - Directory: install: Automatic install of
>> ..\insta
>>ll\myFirstComponent-1.0-jbi-installer.zip failed
>><java.lang.RuntimeException: Un
>>able to parse the jbi.xml>java.lang.RuntimeException: Unable to parse
>> the jbi.xm
>>l
>>        at
>>org.servicemix.client.DescriptorFactory.getDescriptor(DescriptorFacto
>> ry.java:61)
>>        at
>>org.servicemix.client.ClientEndPointRegistry.loadServiceUnitServices(
>> ClientEndPointRegistry.java:314)
>>        at
>>org.servicemix.client.ClientEndPointRegistry.loadComponentServices(Cl
>> ientEndPointRegistry.java:298)
>>        at
>>org.servicemix.client.SpringComponentLifeCycle.init(SpringComponentLi
>> feCycle.java:130)
>>        at
>>org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContai
>> ner.java:887)
>>        at
>>org.servicemix.jbi.container.JBIContainer.activateComponent(JBIContai
>> ner.java:838)
>>        at
>>org.servicemix.jbi.framework.InstallerMBeanImpl.install(InstallerMBea
>> nImpl.java:131)
>>        at
>>org.servicemix.jbi.framework.InstallationService.install(Installation
>> Service.java:263)
>>        at
>>org.servicemix.jbi.framework.AutoDeploymentService.updateArchive(Auto
>> DeploymentService.java:184)
>>        at
>>org.servicemix.jbi.framework.AutoDeploymentService$2.run(AutoDeployme
>> ntService.java:512)
>>        at
>>org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.ja
>> va:291)
>>        at
>>EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown So
>>urce)
>>        at java.lang.Thread.run(Thread.java:595)
>>Caused by:
>> org.springframework.beans.factory.BeanDefinitionStoreException: Line
>>3 in XML document from URL
>>[file:/C:/servicemix-2.0/bin/../wdir/defaultJBI/compo
>>nents/myFirstComponent/installation/META-INF/jbi.xml] is invalid;
>> nested excepti
>>on is org.xml.sax.SAXParseException: Document root element "jbi", must
>> match DOC
>>TYPE root "null".
>>        at
>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
>> nDefinitions(XmlBeanDefinitionReader.java:169)
>>        at
>>org.springframework.beans.factory.support.AbstractBeanDefinitionReade
>> r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:125)
>>        at
>>org.springframework.beans.factory.support.AbstractBeanDefinitionReade
>> r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:141)
>>        at
>>org.springframework.context.support.AbstractXmlApplicationContext.loa
>> dBeanDefinitions(AbstractXmlApplicationContext.java:113)
>>        at
>>org.springframework.context.support.AbstractXmlApplicationContext.loa
>> dBeanDefinitions(AbstractXmlApplicationContext.java:81)
>>        at
>>org.springframework.context.support.AbstractRefreshableApplicationCon
>> text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>>        at
>>org.springframework.context.support.AbstractApplicationContext.refres
>> h(AbstractApplicationContext.java:268)
>>        at
>>org.springframework.context.support.FileSystemXmlApplicationContext.<
>> init>(FileSystemXmlApplicationContext.java:83)
>>        at
>>org.springframework.context.support.FileSystemXmlApplicationContext.<
>> init>(FileSystemXmlApplicationContext.java:68)
>>        at
>>org.springframework.context.support.FileSystemXmlApplicationContext.<
>> init>(FileSystemXmlApplicationContext.java:59)
>>        at
>>org.servicemix.client.DescriptorFactory.getDescriptor(DescriptorFacto
>> ry.java:56)
>>        ... 12 more
>>Caused by: org.xml.sax.SAXParseException: Document root element "jbi",
>> must matc
>>h DOCTYPE root "null".
>>        at
>>org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
>> known Source)
>>        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
>> Source) at
>> org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>>Source)
>>        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
>>Source)
>>        at
>>org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unkno
>> wn Source)
>>        at
>>org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
>> Source)
>>        at
>> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
>>Sourc
>>e)
>>        at
>>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
>> t(Unknown Source)
>>        at
>>org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanR
>> ootElementHook(Unknown Source)
>>        at
>>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
>> Dispatcher.dispatch(Unknown Source)
>>        at
>>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
>> known Source)
>>        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source) at
>> org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown
>> Source) at org.apache.xerces.parsers.DOMParser.parse(Unknown
>> Source) at
>> org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
>> Source) at
>> javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
>> at
>>org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
>> nDefinitions(XmlBeanDefinitionReader.java:161)
>>        ... 22 more
>>
>>
>>
>>
>>Thanks,
>>
>>Mark
>>
>>Technical Services
>>Sirvisetti Systems
>>347 Plainfield Avenue
>>Edison NJ 08817
>>Tel:(866) 985-2200 Ext 1106
>>Fax:(732) 985-4448
>>http://www.sirvisetti.com
>>http://autostream.sirvisetti.com
>>
>>
>>----------------------------------------------------------------------
>> This email has been sent by Sirvisetti Systems. If you believe this
>> email has reached you in error or if you no longer wish to receive
>> email updates from Sirvisetti Systems, reply to this email with Remove
>> in the Subject line. We regret for the inconvenience caused.
>>
>>
>>
>>
>>
>>
>>


Thanks,

Mark

Technical Services
Sirvisetti Systems
347 Plainfield Avenue
Edison NJ 08817
Tel:(866) 985-2200 Ext 1106
Fax:(732) 985-4448
http://www.sirvisetti.com
http://autostream.sirvisetti.com


----------------------------------------------------------------------
This email has been sent by Sirvisetti Systems. If you believe this email
has reached you in error or if you no longer wish to receive email updates
from Sirvisetti Systems, reply to this email with Remove in the Subject
line. We regret for the inconvenience caused.




Loading...