configuring jms message size in weblogic
TRANSCRIPT
-
8/13/2019 Configuring JMS Message Size in WebLogic
1/9
13/7/29 java - Config uring JM S M essag e Size in WebLog ic: weblog ic.socket.MaxM essag eSizeExceededException - Stack Overflow
stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded 1/9
Tell me more
I currently have two clients (Producer/Consumer), and I am trying tosend a large file via JMS. I am
successfully producing and sending the file to the JMS Server without any problems. The problem is
when I try to consume the message, and I get the following exception:
Aug24,201211:25:37AM client.Client$1onException
SEVERE:Connectionto the Serverhas been lost,will retry in 30seconds.weblogic
weblogic.socket.MaxMessageSizeExceededException:Incomingmessage of size:'10
-
8/13/2019 Configuring JMS Message Size in WebLogic
2/9
13/7/29 java - Config uring JM S M essag e Size in WebLog ic: weblog ic.socket.MaxM essag eSizeExceededException - Stack Overflow
stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded 2/9
I believe this has to do with my MaxMessage size setting in WebLogic and not a code problem (but I
could of course be wrong). Here are my settigns for Maximum Message Size
I am not sure why I am getting this exception since the Maximum message size for this protocol is larger
than what the exception is claiming... Any thoughts?
I have also tried adding the server start argument -Dweblogic.MaxMessageSize=200000000, but to no
avail.
-
8/13/2019 Configuring JMS Message Size in WebLogic
3/9
13/7/29 java - Config uring JM S M essag e Size in WebLog ic: weblog ic.socket.MaxM essag eSizeExceededException - Stack Overflow
stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded 3/9
Here is some code of my where I set the MessageListener, and the message consumer itself.
-
8/13/2019 Configuring JMS Message Size in WebLogic
4/9
13/7/29 java - Config uring JM S M essag e Size in WebLog ic: weblog ic.socket.MaxM essag eSizeExceededException - Stack Overflow
stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded 4/9
+arg . o r ng ;
}else{
log2.severe(arg0.toString());
}
}
});
shutdownListener =newShutdownListener(connection,session,produc
connection.start();
log.info("Successfully connected to "+iProps.getURL());
returntrue;
}catch(JMSExceptionje){
log.severe("Could not connect to the WebLogic Server, will retry in
+je.getMessage());
try{
Thread.sleep(30000L);
}catch(InterruptedExceptione){
log.warning(e.toString());
}
returnsetClient(listener);
}catch(Exceptione){
log.severe("Could not connect to the WebLogic Server, will retry in
+e.toString());
try{
Thread.sleep(30000L);
}catch(InterruptedExceptionie){
log.warning(ie.toString());
}
returnsetClient(listener);
}
}
Here's the MessageListener:
-
8/13/2019 Configuring JMS Message Size in WebLogic
5/9
13/7/29 java - Config uring JM S M essag e Size in WebLog ic: weblog ic.socket.MaxM essag eSizeExceededException - Stack Overflow
stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded 5/9
publicclassConsumerListenerimplementsMessageListener{
privateLoggerlog;
privateFiledestination;
privateExecuteinstructions;
publicConsumerListener(Executeinstructions,Filedestination){
this.instructions =instructions;
this.destination =destination;
log =newMyLogger().getLogger("BPEL Client");
}
@Override
publicvoidonMessage(Messagearg0){
try{
if(arg0.getJMSRedelivered()){
log.severe("A re-delivered message has been received, and it has
+arg0.toString());
}else{ try{
if(arg0 instanceofTextMessage){
consumeMessage((TextMessage)arg0);
}elseif(arg0 instanceofBytesMessage){
consumeMessage((BytesMessage)arg0);
}else{
log.warning("Currently, only TextMessages and BytesMess
}
}catch(JMSExceptione){ log.severe(e.toString());
}catch(IOExceptione){
log.severe(e.toString());
catch Throwablet
java jms weblogic
http://stackoverflow.com/questions/tagged/weblogichttp://stackoverflow.com/questions/tagged/jmshttp://stackoverflow.com/questions/tagged/java -
8/13/2019 Configuring JMS Message Size in WebLogic
6/9
13/7/29 java - Config uring JM S M essag e Size in WebLog ic: weblog ic.socket.MaxM essag eSizeExceededException - Stack Overflow
stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded 6/9
Reid Mac
716 6 28
2 Answers
edited Aug 30 '12 at 15:29 asked Aug 24 '12 at 16:31
You can try to change your broadcast type in cluster..if it is already set to UNICAST then please ignore this.
kukkuOct 8 '12 at 11:56
I've already figured out the problem, I wasn't setting the -Dweblogic.MaxMessageSize on the Client applications,
it now works fine. Reid Mac Oct 8 '12 at 14:04
add comment (requires an accountwith 50 reputation)
You will also have to increase the Maximum Message Size from the WLS console as shown in the
screenshot for all the managed serve rs.
Afterwards perform a restart and the problem will be solved.
Furthermore there is a second alternative solution. According the Oracle Tuning WebLogic JMS Doc:
Tuning Me ssageMaximum Limitations
If the aggregate size of the messages pushed to a consumer is larger than the current protocol's
maximum message size (default size is 10 MB and is configured on a per WebLogic Server instance
basis using the console and on a per client basis using the Dweblogic.MaxMessageSize command line
property), the message delivery fails.
Setting Maximum Message Size on a Client
You may need to configure WebLogic clients in addition to the WebLogic Server instance, when
sending and receiving large messages. To set the maximum message size on a client, use the
following command line property:
-Dweblogic.MaxMessageSize
Note: This setting applies to all WebLogic Server network packets delivered to the client, not just JMS
related packets.
http://docs.oracle.com/cd/E11035_01/wls100/perform/jmstuning.htmlhttp://stackoverflow.com/help/privileges/commenthttp://stackoverflow.com/users/loginhttp://stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded#comment17280399_12113315http://stackoverflow.com/users/888059/reid-machttp://stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded#comment17279156_12113315http://stackoverflow.com/users/1728570/kukkuhttp://stackoverflow.com/posts/12113315/revisionshttp://stackoverflow.com/users/888059/reid-machttp://stackoverflow.com/users/888059/reid-mac -
8/13/2019 Configuring JMS Message Size in WebLogic
7/9
13/7/29 java - Config uring JM S M essag e Size in WebLog ic: weblog ic.socket.MaxM essag eSizeExceededException - Stack Overflow
stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded 7/9
Tolis Emmanouilidis
3,852 1 5 19
EDITED:
This issue can be resolved by following one or more of the below actions.
Configure the System Property -Dweblogic.MaxMessageSize
Increase the max message size using the WLS console for the admin and all the managed
servers. The steps in the WLS console are: server / Protocols / General
Increase the Maximum Message Size from WLS console. The steps in the WLS console are:Queue / Configuration / Threshholds and Quotas / Maximum Message Size
PROCEDUREfor applying the weblogic.MaxMessageSize Property
Keep a backup of the setDomainEnv files. Stop all the servers. Add the -
Dweblogic.MaxMessageSize=yourValue in each setDomainEnv file and more specifically in the
EXTRA_JAVA_PROPERTIES line. Afterwards start the ADMIN first and when the ADMIN is in status
RUNNING, then start the MANAGED servers.
I hope this helps.
edited Aug 30 '12 at 10:53 answered Aug 25 '12 at 6:12
Thanks for the response, though I have already tried both of these, and the problem still persists. What I don't
understand is why I can produce a large JMS message and put it on the queue, but I cannot consume the exact
same JMS message? Reid Mac Aug 27 '12 at 14:18
I have updated the post. Have you tried all the 3 available solutions and none of them resolves your issue? Haveyou configured the Max Message Size from the WLS console in your Admin Server and all the managed
servers? Thanks Tolis EmmanouilidisAug 27 '12 at 18:16
I have tried all 3 options, the only option I am not sure I am doing correctly is the System Property. I edited my
question with an image of where I am setting the property. Is this the correct place? I have tried restarting the
server after making the changes, but I am still receiving the same error. Reid Mac Aug 29 '12 at 14:34
It seems OK. Could you tell me the WLS version? Tolis EmmanouilidisAug 29 '12 at 14:48
http://stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded#comment16306462_12119676http://stackoverflow.com/users/1262066/tolis-emmanouilidishttp://stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded#comment16305992_12119676http://stackoverflow.com/users/888059/reid-machttp://stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded#comment16251726_12119676http://stackoverflow.com/users/1262066/tolis-emmanouilidishttp://stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded#comment16245962_12119676http://stackoverflow.com/users/888059/reid-machttp://stackoverflow.com/posts/12119676/revisionshttp://stackoverflow.com/users/1262066/tolis-emmanouilidishttp://stackoverflow.com/users/1262066/tolis-emmanouilidis -
8/13/2019 Configuring JMS Message Size in WebLogic
8/9
-
8/13/2019 Configuring JMS Message Size in WebLogic
9/9
13/7/29 java - Config uring JM S M essag e Size in WebLog ic: weblog ic.socket.MaxM essag eSizeExceededException - Stack Overflow
stackoverflow.com/questions/12113315/configuring-jms-message-size-in-weblogic-weblogic-socket-maxmessagesizeexceeded 9/9
Not the answer you're looking for? Browse other questions tagged java jms weblogic
or ask your own question.
http://stackoverflow.com/questions/askhttp://stackoverflow.com/questions/tagged/weblogichttp://stackoverflow.com/questions/tagged/jmshttp://stackoverflow.com/questions/tagged/java