You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "massive.boisson" <ma...@gmail.com> on 2006/10/31 13:33:14 UTC

receiving async exception when not appropriate

Hi,

I am using AMQs securty with ssl authorization and authentication features
provided by recent changes to AMQ 4.1. So I am in fact using what Sepand and
my collegue ngcutura have done recently. 

When I send a message to queue that I have no privilages to neither create
nor write to (the queue does not even exist to begin with), the call to
amqProducer.send(myDest, jmsMessage) passes successfully! 
I only get exception throught exception listener. Obviously this is a big
problem for me, because my program continiues to function as if all is ok,
loosing the data from the message that it thought it sent. 

The url my clien connects to is:
failover:(ssl://localhost:61616)?soTimeout=10000&connectionTimeout=0&trace=false&jms.closeTimeout=15000&jms.useAsyncSend=false&jms.copyMessageOnSend=false&jms.optimizeAcknowledge=false&wireFormat.maxInactivityDuration=30000&wireFormat.stackTraceEnabled=true&wireFormat.tightEncodingEnabled=true

Well long, but it does say: jms.useAsyncSend=false!

The async exception I get is:
javax.jms.JMSException: User KB is not authorized to write to:
queue://APPLICATIONS
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
	at
org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1487)
	at
org.apache.activemq.ActiveMQConnection$2.run(ActiveMQConnection.java:1460)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.SecurityException: User KB is not authorized to write
to: queue://APPLICATIONS
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at
org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.createThrowable(BaseDataStreamMarshaller.java:216)
	at
org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.tightUnmarsalThrowable(BaseDataStreamMarshaller.java:176)
	at
org.apache.activemq.openwire.v2.ConnectionErrorMarshaller.tightUnmarshal(ConnectionErrorMarshaller.java:69)
	at
org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:349)
	at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
	at java.lang.Thread.run(Unknown Source)


Any ideas what is going on? I looked for the similar bug on the JIRA, but
found none. 

Is this intended behaviour?

--MB


-- 
View this message in context: http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7093182
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: receiving async exception when not appropriate

Posted by "massive.boisson" <ma...@gmail.com>.


Hiram Chirino wrote:
> 
>> So if it is correct, my problem still remains, but I defined it wrong
>> because of my ignorance - even session.commit() does not raise the
>> exception.
> 
> I think your on to something here now.  I think we need to enhance our
> broker so that it keeps track  of any errors that occurred that were
> part of a transaction and the force that transaction to fail on the
> commit.  Patches would be welcomed or even a raised jira issue :)
> 
> Regards,
> Hiram
> 
> Blog: http://hiramchirino.com
> 
> 
Well thank you for understanding me! And James for helping clarify what I
was saying.

I raised JIRA at the beggining - 
https://issues.apache.org/activemq/browse/AMQ-1022
https://issues.apache.org/activemq/browse/AMQ-1022 . It describes only the
specific problem I discovered with privileges.

I raised another issue just now, which specifies the generalized problem you
described here -  https://issues.apache.org/activemq/browse/AMQ-1043
https://issues.apache.org/activemq/browse/AMQ-1043 .

You are of course free to delete any of them if you think they are
redundant.

Fixing the problem could be too much for me, both because of my technical
knowledge and time. I will talk to my supervisors and see what they think.
Although it probobly will be the quickest way to solve the problem. I'll let
you know what I can do.

Regards,

--MB
-- 
View this message in context: http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7336057
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: receiving async exception when not appropriate

Posted by Hiram Chirino <hi...@hiramchirino.com>.
On 11/13/06, massive.boisson <ma...@gmail.com> wrote:
>
> Well I read a part of book, jms spec and amq docs... and I think I get what
> you are saying - persistent transacted messages are send asynchronously :)
>
> But session.commit() is synchronous - it has to wait for all sends withing
> that transaction to get to broker, and then for broker to write them to db,
> and only then does it return to client. This is what I did not find anywhere
> stated specifically. But it is correct?

correct.

>
> So if it is correct, my problem still remains, but I defined it wrong
> because of my ignorance - even session.commit() does not raise the
> exception.
>

I think your on to something here now.  I think we need to enhance our
broker so that it keeps track  of any errors that occurred that were
part of a transaction and the force that transaction to fail on the
commit.  Patches would be welcomed or even a raised jira issue :)

> I'll restate once more: I have a transacted persistent sent to an
> unauthorized queue. Send passes without exception. session.commit() passes
> without exception. But I get an asynchronous exception through
> ExceptionListener? Still the same problem from my point of view.
>
> Any ideas? Do you guys think this is indeed a problem?
>
> Thanks a lot,
>
> --MB
>
>
> massive.boisson wrote:
> >
> > which I am.
> >
> > I'm sending messages transactionially to persistent queues. And you are
> > saying this happens asynchonously regardless of  useAsyncSend flag.
> >
> >
> >
> > James.Strachan wrote:
> >>
> >> On 11/12/06, massive.boisson <ma...@gmail.com> wrote:
> >>>
> >>> Hiram, thanks. I am not sure I follow what you are saying 100%, but I am
> >>> using persistant messaging, and am using jms.useAsyncSend=false. Thus, I
> >>> am
> >>> pretty sure my messages are sent synchronously, right?
> >>
> >> Unless you are using a transaction.
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7325664
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Re: receiving async exception when not appropriate

Posted by "massive.boisson" <ma...@gmail.com>.
Well I read a part of book, jms spec and amq docs... and I think I get what
you are saying - persistent transacted messages are send asynchronously :) 

But session.commit() is synchronous - it has to wait for all sends withing
that transaction to get to broker, and then for broker to write them to db,
and only then does it return to client. This is what I did not find anywhere
stated specifically. But it is correct?

So if it is correct, my problem still remains, but I defined it wrong
because of my ignorance - even session.commit() does not raise the
exception. 

I'll restate once more: I have a transacted persistent sent to an
unauthorized queue. Send passes without exception. session.commit() passes
without exception. But I get an asynchronous exception through
ExceptionListener? Still the same problem from my point of view.

Any ideas? Do you guys think this is indeed a problem?

Thanks a lot,

--MB


massive.boisson wrote:
> 
> which I am.
> 
> I'm sending messages transactionially to persistent queues. And you are
> saying this happens asynchonously regardless of  useAsyncSend flag.
> 
> 
> 
> James.Strachan wrote:
>> 
>> On 11/12/06, massive.boisson <ma...@gmail.com> wrote:
>>>
>>> Hiram, thanks. I am not sure I follow what you are saying 100%, but I am
>>> using persistant messaging, and am using jms.useAsyncSend=false. Thus, I
>>> am
>>> pretty sure my messages are sent synchronously, right?
>> 
>> Unless you are using a transaction.
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7325664
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: receiving async exception when not appropriate

Posted by "massive.boisson" <ma...@gmail.com>.
which I am.

I'm sending messages transactionially to persistent queues. And you are
saying this happens asynchonously regardless of  useAsyncSend flag.



James.Strachan wrote:
> 
> On 11/12/06, massive.boisson <ma...@gmail.com> wrote:
>>
>> Hiram, thanks. I am not sure I follow what you are saying 100%, but I am
>> using persistant messaging, and am using jms.useAsyncSend=false. Thus, I
>> am
>> pretty sure my messages are sent synchronously, right?
> 
> Unless you are using a transaction.
> 
> 

-- 
View this message in context: http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7319783
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: receiving async exception when not appropriate

Posted by James Strachan <ja...@gmail.com>.
On 11/12/06, massive.boisson <ma...@gmail.com> wrote:
>
> Hiram, thanks. I am not sure I follow what you are saying 100%, but I am
> using persistant messaging, and am using jms.useAsyncSend=false. Thus, I am
> pretty sure my messages are sent synchronously, right?

Unless you are using a transaction.

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: receiving async exception when not appropriate

Posted by "massive.boisson" <ma...@gmail.com>.
Hiram, thanks. I am not sure I follow what you are saying 100%, but I am
using persistant messaging, and am using jms.useAsyncSend=false. Thus, I am
pretty sure my messages are sent synchronously, right?


Hiram Chirino wrote:
> 
> are you sending a non persistent message or a message within a
> transaction?
> 
> If you are, then those messages are sent async.  The
> jms.useAsyncSend=true option is only used to relax the JMS requirement
> that persistent messages be sent sync.
> 
> Regards,
> Hiram
> 
> On 10/31/06, massive.boisson <ma...@gmail.com> wrote:
>>
>> Hi,
>>
>> I am using AMQs securty with ssl authorization and authentication
>> features
>> provided by recent changes to AMQ 4.1. So I am in fact using what Sepand
>> and
>> my collegue ngcutura have done recently.
>>
>> When I send a message to queue that I have no privilages to neither
>> create
>> nor write to (the queue does not even exist to begin with), the call to
>> amqProducer.send(myDest, jmsMessage) passes successfully!
>> I only get exception throught exception listener. Obviously this is a big
>> problem for me, because my program continiues to function as if all is
>> ok,
>> loosing the data from the message that it thought it sent.
>>
>> The url my clien connects to is:
>> failover:(ssl://localhost:61616)?soTimeout=10000&connectionTimeout=0&trace=false&jms.closeTimeout=15000&jms.useAsyncSend=false&jms.copyMessageOnSend=false&jms.optimizeAcknowledge=false&wireFormat.maxInactivityDuration=30000&wireFormat.stackTraceEnabled=true&wireFormat.tightEncodingEnabled=true
>>
>> Well long, but it does say: jms.useAsyncSend=false!
>>
>> The async exception I get is:
>> javax.jms.JMSException: User KB is not authorized to write to:
>> queue://APPLICATIONS
>>         at
>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
>>         at
>> org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1487)
>>         at
>> org.apache.activemq.ActiveMQConnection$2.run(ActiveMQConnection.java:1460)
>>         at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>>         at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>>         at java.lang.Thread.run(Unknown Source)
>> Caused by: java.lang.SecurityException: User KB is not authorized to
>> write
>> to: queue://APPLICATIONS
>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
>> Source)
>>         at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
>> Source)
>>         at java.lang.reflect.Constructor.newInstance(Unknown Source)
>>         at
>> org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.createThrowable(BaseDataStreamMarshaller.java:216)
>>         at
>> org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.tightUnmarsalThrowable(BaseDataStreamMarshaller.java:176)
>>         at
>> org.apache.activemq.openwire.v2.ConnectionErrorMarshaller.tightUnmarshal(ConnectionErrorMarshaller.java:69)
>>         at
>> org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:349)
>>         at
>> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
>>         at
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
>>         at java.lang.Thread.run(Unknown Source)
>>
>>
>> Any ideas what is going on? I looked for the similar bug on the JIRA, but
>> found none.
>>
>> Is this intended behaviour?
>>
>> --MB
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7093182
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Regards,
> Hiram
> 
> Blog: http://hiramchirino.com
> 
> 

-- 
View this message in context: http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7306436
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: receiving async exception when not appropriate

Posted by Hiram Chirino <hi...@hiramchirino.com>.
are you sending a non persistent message or a message within a transaction?

If you are, then those messages are sent async.  The
jms.useAsyncSend=true option is only used to relax the JMS requirement
that persistent messages be sent sync.

Regards,
Hiram

On 10/31/06, massive.boisson <ma...@gmail.com> wrote:
>
> Hi,
>
> I am using AMQs securty with ssl authorization and authentication features
> provided by recent changes to AMQ 4.1. So I am in fact using what Sepand and
> my collegue ngcutura have done recently.
>
> When I send a message to queue that I have no privilages to neither create
> nor write to (the queue does not even exist to begin with), the call to
> amqProducer.send(myDest, jmsMessage) passes successfully!
> I only get exception throught exception listener. Obviously this is a big
> problem for me, because my program continiues to function as if all is ok,
> loosing the data from the message that it thought it sent.
>
> The url my clien connects to is:
> failover:(ssl://localhost:61616)?soTimeout=10000&connectionTimeout=0&trace=false&jms.closeTimeout=15000&jms.useAsyncSend=false&jms.copyMessageOnSend=false&jms.optimizeAcknowledge=false&wireFormat.maxInactivityDuration=30000&wireFormat.stackTraceEnabled=true&wireFormat.tightEncodingEnabled=true
>
> Well long, but it does say: jms.useAsyncSend=false!
>
> The async exception I get is:
> javax.jms.JMSException: User KB is not authorized to write to:
> queue://APPLICATIONS
>         at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
>         at
> org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1487)
>         at
> org.apache.activemq.ActiveMQConnection$2.run(ActiveMQConnection.java:1460)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.SecurityException: User KB is not authorized to write
> to: queue://APPLICATIONS
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
>         at java.lang.reflect.Constructor.newInstance(Unknown Source)
>         at
> org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.createThrowable(BaseDataStreamMarshaller.java:216)
>         at
> org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.tightUnmarsalThrowable(BaseDataStreamMarshaller.java:176)
>         at
> org.apache.activemq.openwire.v2.ConnectionErrorMarshaller.tightUnmarshal(ConnectionErrorMarshaller.java:69)
>         at
> org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:349)
>         at
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
>         at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
>         at java.lang.Thread.run(Unknown Source)
>
>
> Any ideas what is going on? I looked for the similar bug on the JIRA, but
> found none.
>
> Is this intended behaviour?
>
> --MB
>
>
> --
> View this message in context: http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7093182
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Re: receiving async exception when not appropriate

Posted by "massive.boisson" <ma...@gmail.com>.
Thanks for reply, I guess it's only because of the usual promptness of team
ActiveMQ, that I was so confused with lack of reply. 



nmittler wrote:
> 
> What exactly do you expect to happen when you send to a queue that you're
> not authorized to send on?  I don't think it's acceptable to throw an
> exception from within the send() method, because that would require
> waiting
> for the broker to respond to the message before proceeding - essentially
> making the model RPC rather than messaging.
> 
Hm, as I am using persistent queues and transacted sync sends, don't I have
to wait for it to be written anyway? I don't think this makes it RPC model.


nmittler wrote:
> 
> So if you don't want to lose the data in the message, you'll have to know
> what destinations you have write permissions on before sending.
> 
As a workarround I could do this, but I don't know how. My queues are
created dynamically, and permissons are given dynamically, and thus I cannot
know this unless there is a dynamic way to check. And I have not been able
to find one?

Another possible workarround would be if feature I requested some time ago
would be implented:  https://issues.apache.org/activemq/browse/AMQ-751
https://issues.apache.org/activemq/browse/AMQ-751 . Essentially it would
allow onException method to receive the offending message as well. 

But primarily, I still think persistent transacted synch send to a queue
should fail if I dont have write privileges for that queue. No?!

I've been using jms for only 4 months, so I am by no means an expert. Let me
know if I am talking nonsense.

Thanks a lot and regards, 

--MB
-- 
View this message in context: http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7306428
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: receiving async exception when not appropriate

Posted by Nathan Mittler <na...@gmail.com>.
After reading your JIRA issue a little closer, it looks like this is a
different problem ...  so don't bother testing out that buid.

What exactly do you expect to happen when you send to a queue that you're
not authorized to send on?  I don't think it's acceptable to throw an
exception from within the send() method, because that would require waiting
for the broker to respond to the message before proceeding - essentially
making the model RPC rather than messaging.

So if you don't want to lose the data in the message, you'll have to know
what destinations you have write permissions on before sending.

Does this make sense?

Regards,
Nate

On 11/12/06, Nathan Mittler <na...@gmail.com> wrote:
>
> Hi,
> Appologies that no one has responded - the AMQ developer community is a
> busy bunch and as a result, an occasional e-mail gets dropped in the shuffle
> :(.
>
> The good news is that others have been raising this problem as well.  I
> took a crack at a fix from the latest trunk build (as of yesterday).  The
> tarball is here:
>
> http://people.apache.org/~nmittler/<http://people.apache.org/%7Enmittler/>apache-activemq-4.2-incubator-SNAPSHOT.tar.gz
>
> <http://people.apache.org/%7Enmittler/apache-activemq-4.2-incubator-SNAPSHOT.tar.gz>
>
> Please give it a try and let me know how it goes.
>
> Thanks,
> Nate
>
> On 11/12/06, massive.boisson <ma...@gmail.com> wrote:
> >
> >
> > Dear good people of ActiveMQ, I am begging you for any comment on this
> > problem. It's been 2 weeks since I raised JIRA  (
> > https://issues.apache.org/activemq/browse/AMQ-1022
> > https://issues.apache.org/activemq/browse/AMQ-1022 ).
> >
> > Any thoughts?
> >
> > Thanks,
> >
> > --MB
> >
> >
> > massive.boisson wrote:
> > >
> > > Hi All,
> > >
> > > can somebody please comment on this.
> > > Am I getting something wrong (ie this is working as it should) or is
> > this
> > > a real problem?
> > >
> > > Please, somebody let me know,
> > >
> > > Thanks
> > >
> > > --MB
> > >
> > >
> > >
> > >
> > > massive.boisson wrote:
> > >>
> > >> I have raised an JIRA issue for this -
> > >> http://issues.apache.org/activemq/browse/AMQ-1022 .
> > >> I think this is a real problem.
> > >>
> > >> I can provide more information for whoever is interested in this, for
> > >> example the tests that I used, activemq.xml file.....
> > >>
> > >> --MB
> > >>
> > >>
> > >>
> > >>
> > >> massive.boisson wrote:
> > >>>
> > >>> I tried to test this with ActiveMQ 4.0.1 and regular security
> > settings
> > >>> as per page: http://incubator.apache.org/activemq/security.html, and
> > I
> > >>> received the same results as in previous attempt - I receive asynch
> > >>> exception after send executes without exception as if message has
> > been
> > >>> indeed sent.
> > >>>
> > >>> Any ideas what's going on?
> > >>>
> > >>> --MB
> > >>>
> > >>>
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7301211
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
> >
>

Re: receiving async exception when not appropriate

Posted by Nathan Mittler <na...@gmail.com>.
Hi,
Appologies that no one has responded - the AMQ developer community is a busy
bunch and as a result, an occasional e-mail gets dropped in the shuffle :(.


The good news is that others have been raising this problem as well.  I took
a crack at a fix from the latest trunk build (as of yesterday).  The tarball
is here:

http://people.apache.org/~nmittler/
apache-activemq-4.2-incubator-SNAPSHOT.tar.gz<http://people.apache.org/%7Enmittler/apache-activemq-4.2-incubator-SNAPSHOT.tar.gz>

Please give it a try and let me know how it goes.

Thanks,
Nate

On 11/12/06, massive.boisson <ma...@gmail.com> wrote:
>
>
> Dear good people of ActiveMQ, I am begging you for any comment on this
> problem. It's been 2 weeks since I raised JIRA  (
> https://issues.apache.org/activemq/browse/AMQ-1022
> https://issues.apache.org/activemq/browse/AMQ-1022 ).
>
> Any thoughts?
>
> Thanks,
>
> --MB
>
>
> massive.boisson wrote:
> >
> > Hi All,
> >
> > can somebody please comment on this.
> > Am I getting something wrong (ie this is working as it should) or is
> this
> > a real problem?
> >
> > Please, somebody let me know,
> >
> > Thanks
> >
> > --MB
> >
> >
> >
> >
> > massive.boisson wrote:
> >>
> >> I have raised an JIRA issue for this -
> >> http://issues.apache.org/activemq/browse/AMQ-1022.
> >> I think this is a real problem.
> >>
> >> I can provide more information for whoever is interested in this, for
> >> example the tests that I used, activemq.xml file.....
> >>
> >> --MB
> >>
> >>
> >>
> >>
> >> massive.boisson wrote:
> >>>
> >>> I tried to test this with ActiveMQ 4.0.1 and regular security settings
> >>> as per page: http://incubator.apache.org/activemq/security.html, and I
> >>> received the same results as in previous attempt - I receive asynch
> >>> exception after send executes without exception as if message has been
> >>> indeed sent.
> >>>
> >>> Any ideas what's going on?
> >>>
> >>> --MB
> >>>
> >>>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7301211
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: receiving async exception when not appropriate

Posted by "massive.boisson" <ma...@gmail.com>.
Dear good people of ActiveMQ, I am begging you for any comment on this
problem. It's been 2 weeks since I raised JIRA  (
https://issues.apache.org/activemq/browse/AMQ-1022
https://issues.apache.org/activemq/browse/AMQ-1022 ).

Any thoughts?

Thanks,

--MB


massive.boisson wrote:
> 
> Hi All,
> 
> can somebody please comment on this. 
> Am I getting something wrong (ie this is working as it should) or is this
> a real problem?
> 
> Please, somebody let me know,
> 
> Thanks
> 
> --MB
> 
> 
> 
> 
> massive.boisson wrote:
>> 
>> I have raised an JIRA issue for this -
>> http://issues.apache.org/activemq/browse/AMQ-1022. 
>> I think this is a real problem. 
>> 
>> I can provide more information for whoever is interested in this, for
>> example the tests that I used, activemq.xml file..... 
>> 
>> --MB
>> 
>> 
>> 
>> 
>> massive.boisson wrote:
>>> 
>>> I tried to test this with ActiveMQ 4.0.1 and regular security settings
>>> as per page: http://incubator.apache.org/activemq/security.html, and I
>>> received the same results as in previous attempt - I receive asynch
>>> exception after send executes without exception as if message has been
>>> indeed sent.
>>> 
>>> Any ideas what's going on?
>>> 
>>> --MB
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7301211
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: receiving async exception when not appropriate

Posted by "massive.boisson" <ma...@gmail.com>.
Hi All,

can somebody please comment on this. 
Am I getting something wrong (ie this is working as it should) or is this a
real problem?

Please, somebody let me know,

Thanks

--MB




massive.boisson wrote:
> 
> I have raised an JIRA issue for this -
> http://issues.apache.org/activemq/browse/AMQ-1022. 
> I think this is a real problem. 
> 
> I can provide more information for whoever is interested in this, for
> example the tests that I used, activemq.xml file..... 
> 
> --MB
> 
> 
> 
> 
> massive.boisson wrote:
>> 
>> I tried to test this with ActiveMQ 4.0.1 and regular security settings as
>> per page: http://incubator.apache.org/activemq/security.html, and I
>> received the same results as in previous attempt - I receive asynch
>> exception after send executes without exception as if message has been
>> indeed sent.
>> 
>> Any ideas what's going on?
>> 
>> --MB
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7220114
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: receiving async exception when not appropriate

Posted by "massive.boisson" <ma...@gmail.com>.
I have raised an JIRA issue for this -
http://issues.apache.org/activemq/browse/AMQ-1022. 
I think this is a real problem. 

I can provide more information for whoever is interested in this, for
example the tests that I used, activemq.xml file..... 

--MB




massive.boisson wrote:
> 
> I tried to test this with ActiveMQ 4.0.1 and regular security settings as
> per page: http://incubator.apache.org/activemq/security.html, and I
> received the same results as in previous attempt - I receive asynch
> exception after send executes without exception as if message has been
> indeed sent.
> 
> Any ideas what's going on?
> 
> --MB
> 
> 

-- 
View this message in context: http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7133214
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: receiving async exception when not appropriate

Posted by "massive.boisson" <ma...@gmail.com>.
I tried to test this with ActiveMQ 4.0.1 and regular security settings as per
page: http://incubator.apache.org/activemq/security.html, and I received the
same results as in previous attempt - I receive asynch exception after send
executes without exception as if message has been indeed sent.

Any ideas what's going on?

--MB


massive.boisson wrote:
> 
> Hi,
> 
> I am using AMQs securty with ssl authorization and authentication features
> provided by recent changes to AMQ 4.1. So I am in fact using what Sepand
> and my collegue ngcutura have done recently. 
> 
> When I send a message to queue that I have no privilages to neither create
> nor write to (the queue does not even exist to begin with), the call to
> amqProducer.send(myDest, jmsMessage) passes successfully! 
> I only get exception throught exception listener. Obviously this is a big
> problem for me, because my program continiues to function as if all is ok,
> loosing the data from the message that it thought it sent. 
> 
> The url my clien connects to is:
> failover:(ssl://localhost:61616)?soTimeout=10000&connectionTimeout=0&trace=false&jms.closeTimeout=15000&jms.useAsyncSend=false&jms.copyMessageOnSend=false&jms.optimizeAcknowledge=false&wireFormat.maxInactivityDuration=30000&wireFormat.stackTraceEnabled=true&wireFormat.tightEncodingEnabled=true
> 
> Well long, but it does say: jms.useAsyncSend=false!
> 
> The async exception I get is:
> javax.jms.JMSException: User KB is not authorized to write to:
> queue://APPLICATIONS
> 	at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
> 	at
> org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1487)
> 	at
> org.apache.activemq.ActiveMQConnection$2.run(ActiveMQConnection.java:1460)
> 	at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> 	at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> 	at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.SecurityException: User KB is not authorized to write
> to: queue://APPLICATIONS
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
> 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
> 	at
> org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.createThrowable(BaseDataStreamMarshaller.java:216)
> 	at
> org.apache.activemq.openwire.v2.BaseDataStreamMarshaller.tightUnmarsalThrowable(BaseDataStreamMarshaller.java:176)
> 	at
> org.apache.activemq.openwire.v2.ConnectionErrorMarshaller.tightUnmarshal(ConnectionErrorMarshaller.java:69)
> 	at
> org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:349)
> 	at
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
> 	at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:136)
> 	at java.lang.Thread.run(Unknown Source)
> 
> 
> Any ideas what is going on? I looked for the similar bug on the JIRA, but
> found none. 
> 
> Is this intended behaviour?
> 
> --MB
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/receiving-async-exception-when-not-appropriate-tf2545596.html#a7105036
Sent from the ActiveMQ - User mailing list archive at Nabble.com.