WARNING in Glassfish about JMS - glassfish

I have recently installed the latest Glassfish open source version and configure it but I have problem with JMS and now my 2 Glassfish servers have problem (whereas before installing new GF server, it was working on the previous GF server). So I think there is probably conflict between these 2 servers.
When I try to use JMS, I receive these logs :
[#|2013-03-20T14:10:00.015+0100|FINE|glassfish3.1.2|javax.jms.ConnectionFactory.mqjmsra|_ThreadID=152;_ThreadName=Thread-2;ClassName=com.sun.messaging.jms.ra.DirectConnectionFactory;MethodName=createConnection;|MQJMSRA_DCF1101: createConnection():|#]
[#|2013-03-20T14:10:00.015+0100|FINE|glassfish3.1.2|javax.jms.ConnectionFactory.mqjmsra|_ThreadID=152;_ThreadName=Thread-2;ClassName=com.sun.messaging.jms.ra.DirectConnectionFactory;MethodName=createConnection;|MQJMSRA_DCF1101: createConnection(u,p):username=guest|#]
[#|2013-03-20T14:10:00.015+0100|FINE|glassfish3.1.2|javax.jms.Connection.mqjmsra|_ThreadID=152;_ThreadName=Thread-2;ClassName=com.sun.messaging.jms.ra.DirectConnection;MethodName=createSession;|MQJMSRA_DC1101: connectionId=7032438472106962688:createSession():isTransacted=false:acknowledgeMode=1|#]
[#|2013-03-20T14:10:00.015+0100|FINE|glassfish3.1.2|javax.jms.Session.mqjmsra|_ThreadID=152;_ThreadName=Thread-2;ClassName=com.sun.messaging.jms.ra.DirectSession;MethodName=close;|MQJMSRA_DS1101: sessionId=7032438472122322689:close()|#]
[#|2013-03-20T14:10:00.015+0100|FINE|glassfish3.1.2|javax.jms.Connection.mqjmsra|_ThreadID=152;_ThreadName=Thread-2;ClassName=com.sun.messaging.jms.ra.DirectConnection;MethodName=close;|MQJMSRA_DC1101: connectionId=7032438472106962688:close():|#]
[#|2013-03-20T14:10:00.046+0100|FINE|glassfish3.1.2|javax.jms.Connection.mqjmsra|_ThreadID=152;_ThreadName=Thread-2;ClassName=com.sun.messaging.jms.ra.DirectConnection;MethodName=_unsetClientID;|MQJMSRA_DC1101: connectionId=7032438472106962688:_unsetClientID():|#]
[#|2013-03-20T14:10:06.796+0100|FINE|glassfish3.1.2|javax.jms.ConnectionFactory.mqjmsra|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.messaging.jms.ra.DirectConnectionFactory;MethodName=createConnection;|MQJMSRA_DCF1101: createConnection():|#]
[#|2013-03-20T14:10:06.796+0100|FINE|glassfish3.1.2|javax.jms.ConnectionFactory.mqjmsra|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.messaging.jms.ra.DirectConnectionFactory;MethodName=createConnection;|MQJMSRA_DCF1101: createConnection(u,p):username=guest|#]
[#|2013-03-20T14:10:06.796+0100|FINE|glassfish3.1.2|javax.jms.Connection.mqjmsra|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.messaging.jms.ra.DirectConnection;MethodName=setExceptionListener;|MQJMSRA_DC1101: connectionId=7032438472106962688:setExceptionListener()|#]
[#|2013-03-20T14:10:06.796+0100|WARNING|glassfish3.1.2|javax.jms.Connection.mqjmsra|_ThreadID=42;_ThreadName=Thread-2;|MQJMSRA_DC2001: Unsupported:setExceptionListener():inACC=false:connectionId=7032438472106962688|#]
[#|2013-03-20T14:10:06.796+0100|FINE|glassfish3.1.2|javax.jms.Connection.mqjmsra|_ThreadID=42;_ThreadName=Thread-2;ClassName=com.sun.messaging.jms.ra.DirectConnection;MethodName=_unsetClientID;|MQJMSRA_DC1101: connectionId=7032438472106962688:_unsetClientID():|#]
I didn't find anything on Google...anybody to help me ?

The cause was a Java library deployed in ${GLASSFISH_HOME}/glassfish/domains/domain1/lib in Milestone state. Gone back to the latest release solved the problem.

Related

Delayed messages not appearing in queue while using rabbitmq_delayed_message_exchange

I was trying to use this plugin and it seemed pretty simple and effective. I was able to create the exchange but when i am publishing a request, if there is a non zero x-delay value, i am unable to see the message being passed on the queue.(works fine with x-delay equals 0)
I am using pika and python; the following command was used to create the exchange:
channel.exchange_declare( exchange="central_exchange", exchange_type='x-delayed-message', passive=False, durable=False, auto_delete=False, internal=False, arguments=args )
for publishing the message:
channel.basic_publish(
exchange="central_exchange",
routing_key="my_queue",
body=message,
properties=pika.BasicProperties(headers={"x-delay": 5000})
)
Thanks for your help!
Looking at the logs, the plugin trying to run erlang files which were throwing errors.
It seems this plugin only supports Erlang/OTP 18.0 or later.
The standalone version of rabbitmq was bundled with erlang 17.5. had to install it using homebrew, updated erlang, now working like a charm!!
All thanks to michaelklishin (writer of plugin) for his help :)

RabbitMQ management returns 500 when trying to list queues

I've just installed Erlang 19.0, then Rabbitmq Server 3.6.3. OS - Windows 10. Then I installed rabbitmq_management plugin, then I started rabbitmq-server. I can successfully login into management console. The problem is when I go to Queues I get as error:
Got response code 500 with body {"error":"JSON encode error:
{bad_term,#{error_logger => true,kill => true,size =>
0}}","reason":"While encoding: \n[{total_count,1},\n {item_count,1},\n
{filtered_count,1},\n {page,1},\n {page_size,100},\n {page_count,1},\n
{items,\n [[{memory,22048},\n {reductions,6633},\n
{reductions_details,[{rate,0.0}]},\n {messages,0},\n
{messages_details,[{rate,0.0}]},\n {messages_ready,0},\n
{messages_ready_details,[{rate,0.0}]},\n
{messages_unacknowledged,0},\n
{messages_unacknowledged_details,[{rate,0.0}]},\n
{idle_since,<<\"2016-07-08 20:55:04\">>},\n
{consumer_utilisation,''},\n {policy,''},\n
{exclusive_consumer_tag,''},\n {consumers,1},\n
{recoverable_slaves,''},\n {state,running},\n {reductions,6633},\n
{garbage_collection,\n [{max_heap_size,#{error_logger => true,kill =>
true,size => 0}},\n {min_bin_vheap_size,46422},\n
{min_heap_size,233},\n {fullsweep_after,65535},\n {minor_gcs,3}]},\n
{messages_ram,0},\n {messages_ready_ram,0},\n
{messages_unacknowledged_ram,0},\n {messages_persistent,0},\n
{message_bytes,0},\n {message_bytes_ready,0},\n
{message_bytes_unacknowledged,0},\n {message_bytes_ram,0},\n
{message_bytes_persistent,0},\n {head_message_timestamp,''},\n
{disk_reads,0},\n {disk_writes,0},\n {backing_queue_status,\n
{struct,\n [{mode,default},\n {q1,0},\n {q2,0},\n
{delta,[delta,undefined,0,undefined]},\n {q3,0},\n {q4,0},\n
{len,0},\n {target_ram_count,infinity},\n {next_seq_id,0},\n
{avg_ingress_rate,0.0},\n {avg_egress_rate,0.0},\n
{avg_ack_ingress_rate,0.0},\n {avg_ack_egress_rate,0.0}]}},\n
{node,'rabbit#DESKTOP-330SD1I'},\n {arguments,{struct,[]}},\n
{exclusive,false},\n {auto_delete,false},\n {durable,true},\n
{vhost,<<\"/\">>},\n {name,<<\"queue1\">>}]]}]"}
If I remove from myself a privilegy to access "/" virtual host error disappears, but no queues are shown, which I suppose is wrong, because I have a running application which sends and reveives messages.
Here is the closest question to my, but those solution doesn't help.
P.S. I don't even hope somebody help me, I just wanted to post this question so at least this error can be googled.
there are some known issues with Erlang 19, discussed in the RMQ Google Group, here.
In other words, 3.6.3 effectively isn't Erlang 19.0-compatible:
you'll need to install a prior version of Erlang, until RMQ can be re-built to support the changes in Erlang 19
I've installed Erlang OTP 18.0 and RabbitMq 3.6.3 management console started to work fine. Before I tried to use OTP 19.0 and I got errors during browsing web-console.
I upgraded RabbitMQ to 3.6.5 and the error got resolved. It is now working with Erlang 19.0.

java.lang.NoClassDefFoundError: Could not initialize class org.apache.activemq.util.IdGenerator

I am trying to use ActiveMQ 5.10.0 with SoapUI 4.6 and Hermes 1.14. I get the error below when I try and add a queue. I presume Hermes can't find the type IdGenerator in any of the loaded jars. Which are:
activemq-client-5.10.0.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar
geronimo-jms_1.1_spec-1.1.1.jar
Does anyone know where this class is defined? I looked for activemq-util.jar in the binary distribution but I did not find such a file.
Error:
java.lang.NoClassDefFoundError: Could not initialize class org.apache.activemq.util.IdGenerator
at org.apache.activemq.ActiveMQConnectionFactory.getClientIdGenerator(ActiveMQConnectionFactory.java:969)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:363)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:331)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:303)
at org.apache.activemq.ActiveMQConnectionFactory.createQueueConnection(ActiveMQConnectionFactory.java:260)
at hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:147)
at hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:92)
at hermes.impl.jms.ConnectionSharedManager.reconnect(ConnectionSharedManager.java:81)
at hermes.impl.jms.ConnectionSharedManager.connect(ConnectionSharedManager.java:91)
at hermes.impl.jms.ConnectionSharedManager.getConnection(ConnectionSharedManager.java:104)
at hermes.impl.jms.ConnectionSharedManager.getObject(ConnectionSharedManager.java:142)
at hermes.impl.jms.ThreadLocalSessionManager.connect(ThreadLocalSessionManager.java:190)
at hermes.impl.jms.ThreadLocalSessionManager.getSession(ThreadLocalSessionManager.java:570)
at hermes.impl.jms.AbstractSessionManager.getDestination(AbstractSessionManager.java:460)
at hermes.impl.DefaultHermesImpl.getDestination(DefaultHermesImpl.java:367)
at hermes.browser.tasks.BrowseDestinationTask.invoke(BrowseDestinationTask.java:141)
at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
at java.lang.Thread.run(Unknown Source)
This is very old but in case anyone else is trying to get this spun up... don't use the built in HermesJMS that comes with SoapUI. Apparently there's a bug in it that doesn't play nice with ActiveMQ v5.8 and following [I tried 5.11 & 5.13 and had the issue. The cheating fix is to install the standalone [I had to get it from sourceforge].
The sourceforge jar is installed with [assuming version 1.14]: java -jar hermes-installer-1.14.jar
Once installed you can tie this version to soapui or launch it with the bat/sh file. I still had issues with ActiveMQ version 5.13 but version 5.11 worked for me.
The IdGenerator class is located in the activemq-client jar. Here is the result of a search in the source tree:
/activemq-client/src/main/java/org/apache/activemq/util/IdGenerator.java
There's been no recent changes so I'd guess that the error is misleading and that it's actually some other missing dependency that's being loaded when the class is created. Is there more information in the log or a 'caused by exception' ?
For whom it may interest. This is kind of common issue I come accross from time to time. I call it jar version incompatibility. I was getting exception in title and other funny exceptions when using latest (but not actively developed) hermes 1.14 and currently latest Apache Active MQ 5.14. I've found out after a long struggle that it is fixed by using an older version of Active MQ - like 5.3.

Java 7 Migration - New JBoss Serialization-related exception

I'm trying to upgrade an application to Java 7 from Java 6 and I'm getting a new exception that isn't present when running the application under Java 6.
Here's the first section of the stack trace:
java.lang.ClassCastException: java.lang.String cannot be cast to org.jboss.serial.finalcontainers.IntegerContainer
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readInt(DataContainer.java:1044)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:310)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
at org.jboss.serial.persister.RegulrObjectPersister.defaultRead(RegularObjectPersister.java:273)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
at org.jboss.serial.persister.ObjectInputStreamProxy.readObjectOverride(ObjectInputStreamProxy.java:68)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:364)
at java.util.ArrayList.readObject(ArrayList.java:733)
at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source)
I found this JBoss bug, which is supposedly fixed...
https://issues.jboss.org/browse/JBSER-128
but the version it's fixed in (1.0.6.FINAL) hasn't been released yet:
https://issues.jboss.org/browse/JBSER
Has anybody run into this that could suggest a workaround?
The application runs in JBoss 6.0.0.
PS I am aware that JBoss 6 is past its EOL and not tested with Java 7.
Well, you could build the release yourself from the tag in the SVN repo. Or if you're really trusting (or want to do a quick experiment) download the binary I built (here, won't promise they stay online though).
Just replace all occurrences of the jar in the JBoss distribution and don't forget to enable the fix with system property
-Dorg.jboss.serial.sync_binary_formats=true
As highlighted here
https://issues.jboss.org/browse/JBSER-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
Anyhow for me this worked for Vectors at least (there's other potential problems, but not being able to transfer CCHashMaps I'll survive ;) ).
I found a workaround solution for my problem. Since Java 7 changed the serialization behavior of Vector, I changed to ArrayList (which did not change) and the problem has been resolved.
Hope this helps somebody out there struggling with the same issue.

Glassfish needs restart after deploy with ICEFaces

i have a strange problem. I have an ICEFaces(1.8.2) + Facelets application im working on and every time i make a change to it and deploy i must restart Glassfish(2.1.1) else i get a "java.lang.ClassCastException" on my entities. The error message is :
java.lang.ClassCastException: za.co.africanpulse.rms.frontend.domain.Menuheader cannot be cast to za.co.africanpulse.rms.frontend.domain.Menuheader
If i restart Glassfish as said above all is ok... but this is getting kinda irratating. I dont quite know what exactly you would like me to post so that my problem is easier identified / understood. Anyways any help will be most appreciated.
Many many thanks
You should probably open an issue with the GlassFish project: https://glassfish.dev.java.net/servlets/ProjectIssues.
StackOverflow isn't really designed to be a bug reporting/analysis tool.
That said... someone might have run into this and you could 'Get Lucky'...
Edit 1:
For example, this query: http://www.google.com/search?q=glassfish+icefaces+facelet+classcastexception
Netted this hit: http://seamframework.org/Community/HelpOnSeam220ICEfaces181AndGlassfish21
which looks like it may be useful.
When the web.xml servlet version is below 2.5 and jsf is still at 1.1 specified in the faces-config.xml then strange persistence related issues will arise. In my case entities could not be cast to themselves..???
After changing servlet version and jsf version i could successfully inject EntityManagers into my DAOs...