Bug 1082560 - REST API - problems and exceptions when updating portal templates
Summary: REST API - problems and exceptions when updating portal templates
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Portal
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER01
: 6.2.0
Assignee: Lucas Ponce
QA Contact: Tomas Kyjovsky
URL:
Whiteboard:
Depends On: 1083054
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-31 10:37 UTC by mgottval
Modified: 2014-09-15 00:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
portal.zip (10.59 KB, application/zip)
2014-03-31 10:37 UTC, mgottval
no flags Details


Links
System ID Priority Status Summary Last Updated
JBoss Issue Tracker GTNPORTAL-3435 Major Resolved Import .zip REST API broken with EAP 6.3.0.Alpha1 2016-12-08 15:18:37 UTC

Description mgottval 2014-03-31 10:37:31 UTC
Created attachment 880675 [details]
portal.zip

Description of problem:

curl -i -H "Content-Type: application/zip" -u root:gtn -X PUT -T examples/portal.zip "http://localhost:8080/rest/private/managed-components/template/portal"

Running this command causes BufferOverflowException and portals are not updated:
java.nio.BufferOverflowException
	at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:357) [rt.jar:1.7.0_45]
	at org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:666) [jbossweb-7.4.0.Beta4.jar:7.4.0.Beta4]
	at org.apache.coyote.http11.Http11NioProcessor.commit(Http11NioProcessor.java:480) [jbossweb-7.4.0.Beta4.jar:7.4.0.Beta4]
....

Comment 2 Lucas Ponce 2014-03-31 12:17:34 UTC
It seems there is an issue in the NIO2 connector for EAP 6.3.0.

There is a workaround defined in the JIRA attached, is to change to JIO connector:

<subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false">
<connector name="http" protocol="org.apache.coyote.http11.Http11Protocol" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>

Comment 3 mgottval 2014-04-01 08:40:55 UTC
I successfully did the workaround changing the connector. The exception is no longer present. But anyway running the command 
curl -i -H "Content-Type: application/zip" -u root:gtn -X PUT -T examples/portal.zip "http://localhost:8080/rest/private/managed-components/template/portal"

only the mobile portal is updated. Classic portal stays without any change.

Comment 4 Lucas Ponce 2014-04-01 10:08:32 UTC
There is a missing attribute in branding classic template.

I'm going to send a fix for it.

Meanwhile, there is a workaround:

In file:

jpp-portal-6.2/gatein/extensions/jpp-branding-extension.ear/jpp-branding-extension.war/WEB-INF/conf/portal/portal/classic/portal.xml

Add a

<properties>
...
<entry key="template">classic</entry>
</properties>

To indicate that "classic" site has been created from "classic" template.

Thanks for reporting.
Lucas

Comment 7 mgottval 2014-05-20 08:45:46 UTC
Verified in JPP 6.2.ER2.

Comment 8 JBoss JIRA Server 2014-06-13 12:25:10 UTC
Lucas Ponce <ponce.ballesteros@gmail.com> updated the status of jira GTNPORTAL-3435 to Resolved


Note You need to log in before you can comment on or make changes to this bug.