almost there : uri confusion

Poster Content
nk4um User
Posts: 22
March 25, 2005 08:33it was the basepath
thanks guys, I set the basepath to ffcpl://oracleaq and now it works !
I am so delighted that I finally can integrate oracle aq in a framework only in 1 day of work ! It also provided me more insight in the system.

thanks,

Henk
Like · Post Reply
nk4um User
Posts: 22
March 25, 2005 08:29it was the basepath
Hi, thanks guys, it was the basepath. I''ve set it to ffcpl:/oracleaq and now it works perfectly.
You can''t imagine how delighted I am that I can transparantly use oracle aq in a framework !
It only took me a day of mainly copy/paste.

greetz,

Henk
Like · Post Reply
nk4um Moderator
Posts: 901
March 24, 2005 21:08Look before you leap...
On closer inspection your rewrite rule is not quite right. You have

match: ffcpl:/oracleaq/(.*)
to: active:mapper+operator@ffcpl:/resources/links.xml+operand@ffcpl:$1

which for a URI ffcpl:/oracleaq/mypath/resource creates an operand URI

ffcpl:mypath/resource

What you really need, to make the links resolve, is ffcpl:/mypath/resoure (the slash makes it a valid absolute URI).

So try...

match:ffcpl:/oracleaq/(.*)
to:active:mapper+operator@ffcpl:/resources/links.xml+operand@ffcpl:/$1

Hope this helps.
Like · Post Reply
nk4um Moderator
Posts: 901
March 24, 2005 20:58Basepath
Actually it looks like you''re rewrite rule is moving the path from ffcpl:/oracleaq/ to ffcpl:/

You might need an attribute: basepath="ffcpl:/" on your links root.
Like · Post Reply
nk4um Administrator
Posts: 607
March 24, 2005 15:31
Just to make the exception easier to read; the styling of XML isn''t perfect yet though :-( :
<ex>
  <id>Exception during request processing</id>
  <message>whilst waiting for result...</message>
  <requestid>[SOURCE aq-queue-transport:message_queue2+header@var%3Aheader+properties@var%3Aproperties+body@var%3Abody in urn:be:kmi_irm:labo:netkernel:aq:oracleaq-fulcrum as com.ten60.netkernel.urii.IURAspect]</requestid>
  <stack>
    <level>org.ten60.netkernel.layer1.nkf.impl.NKFHelperImpl.issueSubRequest() line:224</level>
    <level>be.kmi_irm.labo.netkernel.aq.AQTransport.dispatchRequest() line:339</level>
    <level>be.kmi_irm.labo.netkernel.aq.AQTransport.onMessage() line:280</level>
    <level>oracle.jms.AQjmsConsumer.notifyConsumer() line:714</level>
  </stack>
  <ex>
    <id>Unhandled Exception</id>
    <message>in org.ten60.docxter2.MapperAccessor</message>
    <requestid>[SOURCE active:mapper+operator@ffcpl:/resources/links.xml+operand@ffcpl:/queue/message_queue2+header@var%3Aheader+properties@var%3Aproperties+body@var%3Abody in urn:org:ten60:netkernel:ext:xrl as com.ten60.netkernel.urii.IURAspect]</requestid>
    <stack>
      <level>org.ten60.netkernel.xml.xahelper.XAccessor.requestAsync() line:94</level>
      <level>com.ten60.netkernel.scheduler.Scheduler.stateRequestRepresentation() line:420</level>
      <level>com.ten60.netkernel.scheduler.Scheduler.processRequest() line:235</level>
      <level>com.ten60.netkernel.scheduler.Scheduler.processRequest() line:207</level>
    </stack>
    <ex>
      <id>Not found</id>
      <message>/queue/message_queue2 not found</message>
      <requestid>/queue/message_queue2</requestid>
      <stack>
        <level>org.ten60.docxter2.MapperAccessor.notFoundContent() line:166</level>
        <level>org.ten60.docxter2.MapperAccessor.source() line:100</level>
        <level>org.ten60.netkernel.xml.xahelper.XAccessor.requestAsync() line:86</level>
        <level>com.ten60.netkernel.scheduler.Scheduler.stateRequestRepresentation() line:420</level>
      </stack>
    </ex>
  </ex>
</ex>


What you have done looks right. The only thing you haven''t shown is what your basepath attribute on the root element in the links.xml file is? It should be
basepath="ffcpl:/oracleaq/" To match the base of the URI in your rewrite rule.

Tony
Like · Post Reply
nk4um User
Posts: 22
March 24, 2005 15:18almost there : uri confusion
Hi,

I coded a new transport that connects to an Oracle AQ Queue. It actually works ! That is : it receives a message. From then on, I have a problem with calling the right service. I copied 95% of the jms transport and ActiveMQ fulcrum for my own oracleAQ transport and dito fulcrum.

First the error :
<id>Exception during request processing</id> <message>whilst waiting for result...</message> <requestid>[SOURCE aq-queue-transport:message_queue2+header@var%3Aheader+properties@var%3Aproperties+body@var%3Abody in urn:be:kmi_irm:labo:netkernel:aq:oracleaq-fulcrum as com.ten60.netkernel.urii.IURAspect]</requestid> <stack> <level>org.ten60.netkernel.layer1.nkf.impl.NKFHelperImpl.issueSubRequest() line:224</level> <level>be.kmi_irm.labo.netkernel.aq.AQTransport.dispatchRequest() line:339</level> <level>be.kmi_irm.labo.netkernel.aq.AQTransport.onMessage() line:280</level> <level>oracle.jms.AQjmsConsumer.notifyConsumer() line:714</level> </stack> <ex> <id>Unhandled Exception</id> <message>in org.ten60.docxter2.MapperAccessor</message> <requestid>[SOURCE active:mapper+operator@ffcpl:/resources/links.xml+operand@ffcpl:/queue/message_queue2+header@var%3Aheader+properties@var%3Aproperties+body@var%3Abody in urn:org:ten60:netkernel:ext:xrl as com.ten60.netkernel.urii.IURAspect]</requestid> <stack> <level>org.ten60.netkernel.xml.xahelper.XAccessor.requestAsync() line:94</level> <level>com.ten60.netkernel.scheduler.Scheduler.stateRequestRepresentation() line:420</level> <level>com.ten60.netkernel.scheduler.Scheduler.processRequest() line:235</level> <level>com.ten60.netkernel.scheduler.Scheduler.processRequest() line:207</level> </stack> <ex> <id>Not found</id> <message>/queue/message_queue2 not found</message> <requestid>/queue/message_queue2</requestid> <stack> <level>org.ten60.docxter2.MapperAccessor.notFoundContent() line:166</level> <level>org.ten60.docxter2.MapperAccessor.source() line:100</level> <level>org.ten60.netkernel.xml.xahelper.XAccessor.requestAsync() line:86</level> <level>com.ten60.netkernel.scheduler.Scheduler.stateRequestRepresentation() line:420</level> </stack> </ex> </ex> </ex>

the relevant part of module.xml of the fulcrum :

<export>
<uri>
<match>ffcpl:/oracleaq/.*</match>
</uri>
<class/>
</export>
<rewrite>
</rewrite>
<mapping>
<rewrite>
<match>aq-(queue|topic)-transport:(.*)</match>
<to> active:mapper+operator@ffcpl:/resources/links.xml+operand@ffcpl:/oracleaq/$1/$2</to>
</rewrite>
<rewrite>
<match>ffcpl:/oracleaq/(.*)</match> <to>active:mapper+operator@ffcpl:/resources/links.xml+operand@ffcpl:$1</to>
</rewrite>
<this>
<match>ffcpl:/resources/.*</match>
<match>ffcpl:/etc/OAQConfig.xml</match>

What I understand is that a call to aq-queue-message_queue2 arrives,
it gets rewritten to ffcpl:/oracleaq/queue/message_queue2, this is then handled by this module (it matches ffcp:/oracleaq/.*) and after that it is mapped via links.xml to the proper script. Right ?

My links.xml :
<link>
<ext>/queue/message_queue2</ext>
<int>active:beanshell+operator@ffcpl:/resources/receive.bs</int>
<args>body,header,properties</args>
</link>

hmmm, it works in the activemq fulcrum, but here it does not.
What am I missing ?

Henk
Like · Post Reply