Invalid jms.xml

Hi!

I'm trying to update Ciphermail from version 4.8.0 to the latest 5.0.2.
Since we use Exim, and the DEB-Packages require Postfix, I downloaded the TAR.GZ files.
I extracted them and started djigzo.
Unfortunately it does not start and in james.wrapper.log I see these errors:

07 Jun 2021 10:00:21 | INFO Loading XML bean definitions from file [/opt/djigzo/conf/spring/jms.xml] (org.springframework.beans.factory.xml.XmlBeanDefinitionReader) [Phoenix-Monitor]
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component named "djigzo" failed to pass through the Parameterizing stage. (Reason: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean
definitions from relative location [jms.xml]
Offending resource: file [/opt/djigzo/conf/spring/djigzo.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from file [/opt/djigzo/conf/spring/jms.xml] is invalid; nested exception is org.xml.sax.SAXPar
seException; systemId: http://activemq.apache.org/schema/core/activemq-core.xsd; lineNumber: 1; columnNumber: 50; White spaces are required between publicId and systemId.).
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:226)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)
        at org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:260)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKernel.java:295)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(DefaultKernel.java:376)
        at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:357)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:542)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:535)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(DefaultEmbeddor.java:520)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(DefaultEmbeddor.java:509)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(DefaultEmbeddor.java:268)
        at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:198)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [jms.xml]

The file jms.xml is the original one from the TAR.GZ and, as I checked, from the DEB-Packages, too.

Can someone help me?

Thanks a lot
Luca

Hi,

never seen this error before.

The xsd file should be read from the jar file. It could be that it
tries to load if from the url.

What happens if you try to load it with wget?

wget http://activemq.apache.org/schema/core/activemq-core.xsd

Kind regards,

Martijn Brinkers

···

On Mon, 2021-06-07 at 09:29 +0000, None via Users wrote:

Hi!

I'm trying to update Ciphermail from version 4.8.0 to the latest
5.0.2.
Since we use Exim, and the DEB-Packages require Postfix, I downloaded
the TAR.GZ files.
I extracted them and started djigzo.
Unfortunately it does not start and in james.wrapper.log I see these
errors:

07 Jun 2021 10:00:21 | INFO Loading XML bean definitions from file
[/opt/djigzo/conf/spring/jms.xml] (org.springframework.beans.facto
ry.xml.XmlBeanDefinitionReader) [Phoenix-Monitor]
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException:
Component named "djigzo" failed to pass through the Parameterizing
stage. (Reason:
org.springframework.beans.factory.parsing.BeanDefinitionParsingExcept
ion: Configuration problem: Failed to import bean
definitions from relative location [jms.xml]
Offending resource: file [/opt/djigzo/conf/spring/djigzo.xml]; nested
exception is
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
: Line 1 in XML document from file [/opt/djigzo/conf/spring/jms.xml]
is invalid; nested exception is org.xml.sax.SAXPar
seException; systemId:
http://activemq.apache.org/schema/core/activemq-core.xsd; lineNumber:
1; columnNumber: 50; White spaces are required between publicId and
systemId.).
        at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail
(LifecycleHelper.java:354)
        at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.star
tup(LifecycleHelper.java:226)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.s
tartup(DefaultApplication.java:530)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.d
oRunPhase(DefaultApplication.java:478)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.r
unPhase(DefaultApplication.java:409)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.s
tart(DefaultApplication.java:180)
        at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUt
il.java:260)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Def
aultKernel.java:295)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplicat
ion(DefaultKernel.java:376)
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(
DefaultDeployer.java:357)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:542)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
ile(DefaultEmbeddor.java:535)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployF
iles(DefaultEmbeddor.java:520)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployD
efaultApplications(DefaultEmbeddor.java:509)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute
(DefaultEmbeddor.java:268)
        at
org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:198)
        at java.lang.Thread.run(Thread.java:748)
Caused by:
org.springframework.beans.factory.parsing.BeanDefinitionParsingExcept
ion: Configuration problem: Failed to import bean definitions from
relative location [jms.xml]

The file jms.xml is the original one from the TAR.GZ and, as I
checked, from the DEB-Packages, too.

Can someone help me?

Thanks a lot
Luca

Hi Martijn,

If I try to get the file, I can get it. No errors on wget...

Maybe should I try to extract from a JAR (which?) and save it somewhere on my server?

Thanks
Luca

Check whether you have the following jars in the lib dir

lib/activemq-broker-5.16.0.jar
lib/activemq-client-5.16.0.jar
lib/activemq-jaas-5.16.0.jar
lib/activemq-kahadb-store-5.16.0.jar
lib/activemq-protobuf-1.1.jar
lib/activemq-spring-5.16.0.jar

The xsd file is stored in activemq-spring-5.16.0.jar and this will be
used

Kind regards,

Martijn

···

On Wed, 2021-06-09 at 06:08 +0000, Luca Bertoncello via Users wrote:

Hi Martijn,

If I try to get the file, I can get it. No errors on wget...

Maybe should I try to extract from a JAR (which?) and save it
somewhere on my server?

--
CipherMail email encryption
Email encryption with support for S/MIME,
OpenPGP, PDF Messenger and Webmail Messenger

Hi Martijn,

yes, I have these files.
I checked activemq-spring-5.16.0.jar but I just found activemq.xsd, not activemq-core.xsd.
If I download activemq-core.xsd from activemq.apache.org and compare it with activemq.xsd, I see, they are very different...

Any suggestion?

Thanks
Luca

Hi again,

Maybe do I use a wrong Java-Version?
Currently, on the old version of Ciphermail, I use JDK 1.8.
Is it the same for the new version, too, or do I need to update the JDK?

Thanks
Luca

I don't think the issue is caused by the JDK. It should work with JDK8
and 10.

For some reason the xsd file cannot be found. It should be read from
the activemq-spring-5.16.0.jar file.

Can you try the following

1. extract the file activemq.xsd from activemq-spring-5.16.0.jar and
place it somewhere on the file system accessible by the ciphermail
back-end.

2. Edit the file jms.xml

Change the schema location to load directly from the file

    xsi:schemaLocation=
        "Index of /schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
         Index of /schema/core
file:///home/martijn/temp/activemq.xsd">

Replace home/martijn/temp with the correct path for your system

Now try to start the back-end

Kind regards,

Martijn

···

--
CipherMail email encryption
Email encryption with support for S/MIME,
OpenPGP, PDF Messenger and Webmail Messenger

On Tue, 2021-06-15 at 07:07 +0000, Luca Bertoncello via Users wrote:

Hi again,

Maybe do I use a wrong Java-Version?
Currently, on the old version of Ciphermail, I use JDK 1.8.
Is it the same for the new version, too, or do I need to update the
JDK?

Thanks
Luca

Hi Martijn,

thank you for your answer.
Unfortunately it does not work... :frowning:

15 Jun 2021 14:23:09 | INFO Loading XML bean definitions from file [/opt/djigzo/conf/spring/jms.xml] (org.springframework.beans.factory.xml.XmlBeanDefinitionReader) [Phoenix-Monitor]
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component named "djigzo" failed to pass through the Parameterizing stage. (Reason: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [jms.xml]
Offending resource: file [/opt/djigzo/conf/spring/djigzo.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://activemq.apache.org/schema/core\]
Offending resource: file [/opt/djigzo/conf/spring/jms.xml]
).
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
        at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:226)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
        at org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)
        at org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:260)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKernel.java:295)
        at org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(DefaultKernel.java:376)
        at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:357)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:542)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:535)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(DefaultEmbeddor.java:520)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(DefaultEmbeddor.java:509)
        at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(DefaultEmbeddor.java:268)
        at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:198)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [jms.xml]

I extracted activemq.xsd into /opt/djigzo/ and changed my jms.xml as following:

<beans xmlns="http://www.springframework.org/schema/beans&quot;
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
    xmlns:amq="http://activemq.apache.org/schema/core&quot;
    xsi:schemaLocation=
        "http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
         http://activemq.apache.org/schema/core /opt/djigzo/activemq.xsd">

Any other idea?

Thanks
Luca