You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by neelam <ne...@emc.com> on 2017/06/28 07:06:37 UTC

Need a way to configure org.apache.activemq.SERIALIZABLE_PACKAGES property in client

Hi,

I have recently upgraded activemq to 5.14.5 from 5.6.0  and after the
upgrade I see below errors in my client logs:

28 Jun 2017 11:22:17,221-[AWT-EventQueue-2] ERROR
com.powerup.configmgr.client.messaging.JMSMessagingManager  - Failed to
build body from content. Serializable class not available to broker. Reason:
java.lang.ClassNotFoundException: Forbidden class
com.powerup.configmgr.eventframework.events.ui.GenericUIEvent! This class is
not trusted to be serialized as ObjectMessage payload. Please take a look at
http://activemq.apache.org/objectmessage.html for more information on how to
configure trusted classes.

As per http://activemq.apache.org/objectmessage.html I should set wild card
value for org.apache.activemq.SERIALIZABLE_PACKAGES property or use
setTrustedPackages to configure the trusted packages. But in my client I
don't use the ConnectionFactory and use jnlp file instead. I tried setting
the property as below in my jnlp file but it doesn't work. 

<property name="jnlp.org.apache.activemq.SERIALIZABLE_PACKAGES" value="*"/>

Let me know is there any other way I can set this value in the client.

Regards
Neelam




--
View this message in context: http://activemq.2283324.n4.nabble.com/Need-a-way-to-configure-org-apache-activemq-SERIALIZABLE-PACKAGES-property-in-client-tp4727985.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Need a way to configure org.apache.activemq.SERIALIZABLE_PACKAGES property in client

Posted by neelam <ne...@emc.com>.
Thanks for the replies. I added a System property and it worked. As wild card
entry is not the correct way to, I will be adding only the required
packages. 

Regards
Neelam



--
View this message in context: http://activemq.2283324.n4.nabble.com/Need-a-way-to-configure-org-apache-activemq-SERIALIZABLE-PACKAGES-property-in-client-tp4727985p4728096.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Need a way to configure org.apache.activemq.SERIALIZABLE_PACKAGES property in client

Posted by Tim Bain <tb...@alumni.duke.edu>.
Oh, one other thing: be sure you understand that by using the wildcard
setting, you're intentionally opening a significant vulnerability in your
system, probably just because you don't want to do a half an hour of work
now and a little additional maintenance down the line. You (and your
organization) get to make that tradeoff if you want, but make sure you do
it with full understanding of the risk you're choosing to take.

Tim

On Jun 28, 2017 7:44 PM, "Tim Bain" <tb...@alumni.duke.edu> wrote:

> How are you constructing your clients, if not via the ConnectionFactory?
> (Clearly you're not actually doing JNLP *instead of* using a
> ConnectionFactory, as they're unrelated technologies that can't be swapped
> for one another, so it would help to know what you're actually using
> instead.)
>
> I'd recommend you confirm that your JNLP setting really is taking effect,
> by having your app issue a System.getProperty() against that key. If you
> don't get "*" back, the problem is in JNLP or your use of it, not the
> ActiveMQ client code. If you do get the right value back, then the
> underlying problem might be (I'm purely speculating here) some race
> condition between the JNLP initialization code and the ActiveMQ code that
> reads the property, but if that was a problem I'd think lots of other users
> of JNLP would be complaining about the same problem.
>
> One other thing: make sure your browser isn't caching an old version of
> the JNLP file from before you added the property. On the one project where
> I've used JNLP, I think we had problems with exactly that, and had to set
> cache control headers to prevent it from being cached.
>
> Tim
>
> On Jun 28, 2017 1:24 AM, "neelam" <ne...@emc.com> wrote:
>
>> Hi,
>>
>> I have recently upgraded activemq to 5.14.5 from 5.6.0  and after the
>> upgrade I see below errors in my client logs:
>>
>> 28 Jun 2017 11:22:17,221-[AWT-EventQueue-2] ERROR
>> com.powerup.configmgr.client.messaging.JMSMessagingManager  - Failed to
>> build body from content. Serializable class not available to broker.
>> Reason:
>> java.lang.ClassNotFoundException: Forbidden class
>> com.powerup.configmgr.eventframework.events.ui.GenericUIEvent! This
>> class is
>> not trusted to be serialized as ObjectMessage payload. Please take a look
>> at
>> http://activemq.apache.org/objectmessage.html for more information on
>> how to
>> configure trusted classes.
>>
>> As per http://activemq.apache.org/objectmessage.html I should set wild
>> card
>> value for org.apache.activemq.SERIALIZABLE_PACKAGES property or use
>> setTrustedPackages to configure the trusted packages. But in my client I
>> don't use the ConnectionFactory and use jnlp file instead. I tried setting
>> the property as below in my jnlp file but it doesn't work.
>>
>> <property name="jnlp.org.apache.activemq.SERIALIZABLE_PACKAGES"
>> value="*"/>
>>
>> Let me know is there any other way I can set this value in the client.
>>
>> Regards
>> Neelam
>>
>>
>>
>>
>> --
>> View this message in context: http://activemq.2283324.n4.nab
>> ble.com/Need-a-way-to-configure-org-apache-activemq-SERIALIZ
>> ABLE-PACKAGES-property-in-client-tp4727985.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>

Re: Need a way to configure org.apache.activemq.SERIALIZABLE_PACKAGES property in client

Posted by Tim Bain <tb...@alumni.duke.edu>.
How are you constructing your clients, if not via the ConnectionFactory?
(Clearly you're not actually doing JNLP *instead of* using a
ConnectionFactory, as they're unrelated technologies that can't be swapped
for one another, so it would help to know what you're actually using
instead.)

I'd recommend you confirm that your JNLP setting really is taking effect,
by having your app issue a System.getProperty() against that key. If you
don't get "*" back, the problem is in JNLP or your use of it, not the
ActiveMQ client code. If you do get the right value back, then the
underlying problem might be (I'm purely speculating here) some race
condition between the JNLP initialization code and the ActiveMQ code that
reads the property, but if that was a problem I'd think lots of other users
of JNLP would be complaining about the same problem.

One other thing: make sure your browser isn't caching an old version of the
JNLP file from before you added the property. On the one project where I've
used JNLP, I think we had problems with exactly that, and had to set cache
control headers to prevent it from being cached.

Tim

On Jun 28, 2017 1:24 AM, "neelam" <ne...@emc.com> wrote:

> Hi,
>
> I have recently upgraded activemq to 5.14.5 from 5.6.0  and after the
> upgrade I see below errors in my client logs:
>
> 28 Jun 2017 11:22:17,221-[AWT-EventQueue-2] ERROR
> com.powerup.configmgr.client.messaging.JMSMessagingManager  - Failed to
> build body from content. Serializable class not available to broker.
> Reason:
> java.lang.ClassNotFoundException: Forbidden class
> com.powerup.configmgr.eventframework.events.ui.GenericUIEvent! This class
> is
> not trusted to be serialized as ObjectMessage payload. Please take a look
> at
> http://activemq.apache.org/objectmessage.html for more information on how
> to
> configure trusted classes.
>
> As per http://activemq.apache.org/objectmessage.html I should set wild
> card
> value for org.apache.activemq.SERIALIZABLE_PACKAGES property or use
> setTrustedPackages to configure the trusted packages. But in my client I
> don't use the ConnectionFactory and use jnlp file instead. I tried setting
> the property as below in my jnlp file but it doesn't work.
>
> <property name="jnlp.org.apache.activemq.SERIALIZABLE_PACKAGES"
> value="*"/>
>
> Let me know is there any other way I can set this value in the client.
>
> Regards
> Neelam
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Need-a-way-to-configure-org-apache-activemq-
> SERIALIZABLE-PACKAGES-property-in-client-tp4727985.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Need a way to configure org.apache.activemq.SERIALIZABLE_PACKAGES property in client

Posted by jkorab <ja...@gmail.com>.
Hi,

From reading that rode, it looks as though your consumer does not have the
GenericUIEvent on its classpath. Can you confirm?

Jakub

On Wed, Jun 28, 2017 at 8:06 AM, neelam [via ActiveMQ] <
ml+s2283324n4727985h15@n4.nabble.com> wrote:

> Hi,
>
> I have recently upgraded activemq to 5.14.5 from 5.6.0  and after the
> upgrade I see below errors in my client logs:
>
> 28 Jun 2017 11:22:17,221-[AWT-EventQueue-2] ERROR
> com.powerup.configmgr.client.messaging.JMSMessagingManager  - Failed to
> build body from content. Serializable class not available to broker.
> Reason: java.lang.ClassNotFoundException: Forbidden class
> com.powerup.configmgr.eventframework.events.ui.GenericUIEvent! This class
> is not trusted to be serialized as ObjectMessage payload. Please take a
> look at http://activemq.apache.org/objectmessage.html for more
> information on how to configure trusted classes.
>
> As per http://activemq.apache.org/objectmessage.html I should set wild
> card value for org.apache.activemq.SERIALIZABLE_PACKAGES property or use
> setTrustedPackages to configure the trusted packages. But in my client I
> don't use the ConnectionFactory and use jnlp file instead. I tried setting
> the property as below in my jnlp file but it doesn't work.
>
> <property name="jnlp.org.apache.activemq.SERIALIZABLE_PACKAGES"
> value="*"/>
>
> Let me know is there any other way I can set this value in the client.
>
> Regards
> Neelam
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://activemq.2283324.n4.nabble.com/Need-a-way-to-
> configure-org-apache-activemq-SERIALIZABLE-PACKAGES-
> property-in-client-tp4727985.html
> To unsubscribe from ActiveMQ - User, click here
> <http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2341805&code=amFrdWIua29yYWIubGlzdHNAZ21haWwuY29tfDIzNDE4MDV8LTY2MDk5MDU5MA==>
> .
> NAML
> <http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://activemq.2283324.n4.nabble.com/Need-a-way-to-configure-org-apache-activemq-SERIALIZABLE-PACKAGES-property-in-client-tp4727985p4727992.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Need a way to configure org.apache.activemq.SERIALIZABLE_PACKAGES property in client

Posted by neelam <ne...@emc.com>.
It's there in the classpath.

Regards



--
View this message in context: http://activemq.2283324.n4.nabble.com/Need-a-way-to-configure-org-apache-activemq-SERIALIZABLE-PACKAGES-property-in-client-tp4727985p4728048.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.