voyent
MessagePipeline.publish() Exception with ICEfaces Push Server 1.8.2  XML
Forum Index -> General Help
Author Message
rainwebs


Joined: 24/Jul/2007 00:00:00
Messages: 237
Offline


Since the change from 1.8.1 to 1.8.2 I get something like this during testing ICEcube (the Push Server is deployed in parallel on a Jetty 6.1.9):

Code:
Exception in thread "Timer-1" java.lang.OutOfMemoryError: Java heap space
         at java.util.Arrays.copyOf(Arrays.java:2882)
         at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
         at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
         at java.lang.StringBuffer.append(StringBuffer.java:224)
         at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:74)
         at java.util.logging.StreamHandler.publish(StreamHandler.java:179)
         at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
         at java.util.logging.Logger.log(Logger.java:458)
         at java.util.logging.Logger.doLog(Logger.java:480)
         at java.util.logging.Logger.logp(Logger.java:680)
         at org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:100)
         at org.apache.commons.logging.impl.Jdk14Logger.error(Jdk14Logger.java:148)
         at com.icesoft.net.messaging.MessagePipeline.publish(MessagePipeline.java:157)
         at com.icesoft.net.messaging.MessagePipeline.publish(MessagePipeline.java:159)
         at com.icesoft.net.messaging.MessagePipeline.publish(MessagePipeline.java:159)
 ...
 Caused by: java.io.FileNotFoundException: http://127.0.0.1:8080//block/message
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1303)
         at com.icesoft.net.messaging.http.HttpAdapter.publish(HttpAdapter.java:253)
         ... 758 more


I found not much about the MessagePipeline.publish(), but it looks like the Push Server could be the problem. Any hint how to fix this?

ICEfaces book . ICEcube . ICEfusion . ICEfaces Technical Blog Award
Overwhelmer

Joined: 25/Nov/2008 00:00:00
Messages: 15
Offline


You have to enlarge your java heap.

For doing that use -Xms128m -Xmx512m -XX:MaxPermSize=256m as java options.

rainwebs


Joined: 24/Jul/2007 00:00:00
Messages: 237
Offline


I used Maven/Jetty and this during my tests:

set MAVEN_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y -Xms512m -Xmx512M -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled

Seems to me that it is not a heap problem (alone), because using the same options with ICEfaces 1.8.1 works pretty well.

ICEfaces book . ICEcube . ICEfusion . ICEfaces Technical Blog Award
econtreras

Joined: 12/Oct/2009 00:00:00
Messages: 1
Offline


i have the same problem using icefaces 1.8.2 with push server 1.8.2
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


The Push Server and your application are using HTTP to try and communicate (rather than JMS) and there seems to be a problem with the URI.

Can you turn on debug level logging? The HttpAdapter.publish() method does have some logging statements that might shed some light on the problem.

ICEfaces attempts to detect and set the localAddress and localPort values automatically. Are they correct in this case (127.0.0.1 and 8080)? If not they can be set using context parameters:

com.icesoft.faces.localAddress
com.icesoft.faces.localPort

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
rainwebs


Joined: 24/Jul/2007 00:00:00
Messages: 237
Offline


@deryk Did you have a look at the 1st post. It shows a:

Code:
 Caused by: java.io.FileNotFoundException: http://127.0.0.1:8080//block/message


Is this the information you are looking for?

ICEfaces book . ICEcube . ICEfusion . ICEfaces Technical Blog Award
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


I saw that part. I guess the first thing is to ensure that URL can resolve on your machine. Are you running you app server using port 8080?

I thought the debugging might show why the // appears because it's obviously missing the context that should be there. Another thing to try would be to run it on Tomcat. Perhaps Jetty is providing something different than Tomcat as far as getting the context of the application.

Do you have this parameter specified?
com.icesoft.faces.blockingRequestHandler

Is there any logging when your app starts up that shows that the Push Server has been detected and is being used?

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
rainwebs


Joined: 24/Jul/2007 00:00:00
Messages: 237
Offline


I see. I have to have a deeper look at those details. I changed the release for all ICEfaces artefacts in my Maven pom.xml from 1.8.1 to 1.8.2. Everything else was kept. The 1.8.1 worked like a charm ;-). So, you may understand my surprise.

I try to have another look at it this weekend. This problem forced me to use 1.8.1 besides 1.8.2 in the ICEfaces book sources. We are right before publishing so I will not have time to get a pure 1.8.2 into the final release :-(.

Nevertheless, thanks for the tips.

ICEfaces book . ICEcube . ICEfusion . ICEfaces Technical Blog Award
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


Could you post your web.xml file? That might help speed things along. I realize it might not be in time for publishing but there still might be a regression we'd be interested in squashing.

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
rainwebs


Joined: 24/Jul/2007 00:00:00
Messages: 237
Offline


You can take the complete project if necessary, its available at Google Code now:

SVN Checkout
readme
pom.xml
web.xml

The project deploys the Push Server in parallel to the Maven Jetty. If you checkout the SVN and start the run.bat this is done automatically. You need an installed MySQL 5.1 for this (standard admin, password "icefaces"; can be changed at the end of the pom.xml) and have to start first-time-run.bat once before you use run.bat to initialize the database.

The project is based on the JSF artefact of AppFuse 2.0.2. So, you will find a lot of stuff that is not really necessary. But I tried to keep as much as possible of the AppFuse stuff. Because of this the project needs a complete Maven build before you can have access to all relevant stuff (AppFuse delivers some stuff online using its own Maven plugins).

Hint: you have to change the release number of the ICEfaces artefacts in the pom.xml to 1.8.2.

ICEfaces book . ICEcube . ICEfusion . ICEfaces Technical Blog Award
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team