| Summary: | RFE: Maven client should handle 301/302 redirects | ||
|---|---|---|---|
| Product: | [Retired] Zanata | Reporter: | Sean Flanigan <sflaniga> |
| Component: | Component-Maven | Assignee: | Sean Flanigan <sflaniga> |
| Status: | CLOSED UPSTREAM | QA Contact: | Ding-Yi Chen <dchen> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | unspecified | CC: | djansen, mkim, sflaniga, zanata-bugs |
| Target Milestone: | --- | Keywords: | screened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-07-31 01:51:08 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Sean Flanigan
2011-03-25 03:45:01 UTC
Assigning to Scrum product owner for prioritisation. Is thist still a problem with the newer versions? Thanks. This should work as of https://github.com/zanata/zanata-client/commit/8db9eb16e8effc648f847f688dc447e6856f254b client version: 3.1.3-SNAPSHOT (Java and Maven clients) NB: this will only work if the redirect is to an equivalent page. So if the REST URLs (eg http://zanata.example.com/zanata/rest/myrestservice) are simply directed to zanata's root context (eg http://zanata.example.com/) it won't help. Tested with Zanata version 3.2-SNAPSHOT (20131029-0042),
client version 3.1.3-SNAPSHOT
Step to reproduce:
1. Set the redirect
a. sudo mkdir /var/www/html/zanata
b. save following as /etc/httpd/conf.d/zanataTest.conf
<Directory "/var/www/html/zanata">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
c. Save following as /var/www/html/zanata/.htaccess
Redirect 301 /zanata/zp ZANATA_URL_WO_TRAILING_SLASH
Redirect 302 /zanata/zt ZANATA_URL_WO_TRAILING_SLASH
d. restart httpd
2. mvn -e zanata:put-project -Dzanata.defaultProjectType=podir -Dzanata.projectSlug=About -Dzanata.projectName=About -Dzanata.projectDesc=About -Dzanata.url=REDIRECTURL
Expected:
Success without error
Actual:
[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:3.1.3-SNAPSHOT:put-project (default-cli) on project null: Zanata mojo exception: javax.ws.rs.ProcessingException: Unable to find a MessageBodyReader of content-type text/html;charset=iso-8859-1 and type class org.zanata.rest.dto.VersionInfo -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:3.1.3-SNAPSHOT:put-project (default-cli) on project null: Zanata mojo exception
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Zanata mojo exception
at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:136)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.jboss.resteasy.spi.ReaderException: javax.ws.rs.ProcessingException: Unable to find a MessageBodyReader of content-type text/html;charset=iso-8859-1 and type class org.zanata.rest.dto.VersionInfo
at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:469)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:385)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:346)
at org.zanata.rest.client.ZanataProxyFactory.<init>(ZanataProxyFactory.java:88)
at org.zanata.client.commands.OptionsUtil.createRequestFactory(OptionsUtil.java:151)
at org.zanata.client.commands.ConfigurableCommand.<init>(ConfigurableCommand.java:43)
at org.zanata.client.commands.ConfigurableCommand.<init>(ConfigurableCommand.java:47)
at org.zanata.client.commands.PutProjectCommand.<init>(PutProjectCommand.java:25)
at org.zanata.maven.PutProjectMojo.initCommand(PutProjectMojo.java:73)
at org.zanata.maven.PutProjectMojo.initCommand(PutProjectMojo.java:13)
at org.zanata.maven.ConfigurableMojo.runCommand(ConfigurableMojo.java:143)
at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:134)
... 21 more
Caused by: javax.ws.rs.ProcessingException: Unable to find a MessageBodyReader of content-type text/html;charset=iso-8859-1 and type class org.zanata.rest.dto.VersionInfo
at org.jboss.resteasy.core.interception.ClientReaderInterceptorContext.throwReaderNotFound(ClientReaderInterceptorContext.java:39)
at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.getReader(AbstractReaderInterceptorContext.java:73)
at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:50)
at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59)
at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53)
at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:433)
... 32 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Reassigned.
Should this be fixed, or at least ON_DEV? I haven't had a chance to investigate the QA failure, so ASSIGNED is probably a little more accurate than ON_DEV. Sean, Is this fixed or are we still doing it? Can we close this bug? I don't think this is fixed, but we should not close it. One of these days, we'll have to change the URL for a Zanata server again, and we'll need redirects to be working already. Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-577 |