> I would to get some clarification on the following definitions;
>
> Case 1:
>
> <channel name="post.channel"
> class="org.jpos.iso.channel.PostChannel"
> packager="org.jpos.iso.packager.PostPackager" logger="Q2">
> <property name="packager-config" value="cfg/postpack.xml" /
> </channel>
>
> Case 2:
>
> <channel name="JM.channel"
> class="JMChannel"
> packager="org.jpos.iso.packager.GenericPackager" logger="Q2">
> <property name="packager-config" value="cfg/iso87ascii-binary-
> bitmap.xml" />
> </channel>
>
> Would I be right to say that the above two channels are both based on
> GenericPackager definitions??
No, not at all.
The case 1 is using :-
packager="org.jpos.iso.packager.PostPackager"
leaving the property :-
<property name="packager-config" value="cfg/postpack.xml" />
ignored.
Case 2 is actually using :-
packager="org.jpos.iso.packager.GenericPackager"
so take the property "packager-config" into account.
>
> I get some errors which I
> failed to interprete. Are the errors due to the fact that postpack.xml
> has some nested definition for field 127?
The exception output below really has nothing to do with the
definitions above.
>
> New Case 2:
> <channel name="JM.channel"
> class="JMChannel"
> packager="org.jpos.iso.packager.GenericPackager" logger="Q2">
> <property name="packager-config" value="cfg/postpack.xml" />
> </channel>
Now you have a *new* case 2 - which *is* using a GenericPackager with
postpack.xml!?
>
> See errors below;
The following trace shows a deployed ui component trying to ask the
NameRegistrar for a component named 'postilion' - giving a name of
'server.postillion'.
You have not shown us a server deployment - do you have one? What is
it's name attribute?
> org.jpos.util.NameRegistrar$NotFoundException: server.postilion
Above, the name that could not be found.
[Exception stack snip]
> at org.jpos.q2.ui.UI.startService(UI.java:76)
> at org.jpos.q2.QBeanSupport.start(QBeanSupport.java:96)
Above, a q2 ui component being started.
>
> How then should I define my channel and ISOServer to use
> GenericPackager together with postpack.xml?
Your server deployment needs to exist (and be deployed) at the time the
ui component is deployed and asks the NameRegistrar for a server called
postilion
Please practise reading Exception stack traces...
... here it holds enough information for you to see that the server is
the missing component - not any Channel - perhaps it failed to deploy,
or has not been deployed at the time the ui looks for it?
--
Mark
>
> However, I still don't understand why my server fails to start, if I
> define it with a GenericPackager and postpack.xml as the config file.
> meanwhile if the config file is iso87ascii-binary- bitmap.xml, then
> it works.
If the server fails to start, then that explains the :-
"
org.jpos.util.NameRegistrar$NotFoundException: server.postilion
at org.jpos.util.NameRegistrar.get(NameRegistrar.java:109)
at org.jpos.ui.factory.ISOMeterFactory.create
"
exception that you reported and I attempted to explain, the server is
not running so will not be registered with the NameRegistrar
For us to understand why the server is failing to start, we need to see
the log entries issued from server as it fails to start.
> The only difference is see between these two cofig files is that
> iso87ascii-binary-bitmap.xml doesn't define field 127 as a nested
> field while postpack.xml does.
I can only go on the detail posted...
... please provide any messages issued from the server as you deploy it
(when it doesn't 'work').
Consider deploying *just* the server to minimise the amount of logging
data you need to look through.
--
Mark
So the dtd you are using, states that "validator" is a #REQUIRED token
of a isofieldpackager, I suspect therefore you have changed something
(perhaps inadvertently) - this I recall you have done before.
Are you intentionally using any of the 'Validating' components in jPOS
at all? You have made no mention you are in any of the posts to date.
Please show us the DOCTYPE from your postpack.xml file, as well as the
content of the file it mentions...
As an example, the *base* postpack.xml file starts with:-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE isopackager SYSTEM "genericpackager.dtd">
Here I would like to see the location and contents of the file
genericpackager.dtd.
In your case I think the DOCTYPE or the file, or the content of the dtd
have been changed by you? Let's see.
P.S. the dtd file would normally be in jpos/cfg/packager...
--
Mark