You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Ravi Singareddy (JIRA)" <ji...@apache.org> on 2017/02/05 07:49:41 UTC

[jira] [Commented] (SLING-6448) Not able to upload file when sling running as war file using curl

    [ https://issues.apache.org/jira/browse/SLING-6448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15853157#comment-15853157 ] 

Ravi Singareddy commented on SLING-6448:
----------------------------------------

Starting Launchpad using jar file
started sling launchpad using following command
>> java –jar target\org.apache.sling.launchpad-9-SNAPSHOT.jar 
>> Logged into http://localhost:8080/system/console/bundles  
Bundle information: 145 bundles in total - all 145 bundles active
_________________________________________________________

Starting Launchpad using war file
started sling launchpad using following command
>> mvn jetty:run-war 
>> Logged into http://localhost:8080/system/console/bundles  
Bundle information: 142 bundles in total, 126 bundles active, 4 active fragments, 12 bundles installed
Looks like 12 bundles are in installed state and are not active.

87	 
Apache Geronimo Bundles: jstl-1.2org.apache.geronimo.bundles.jstl
1.2.0.1		Installed

130	 
Apache Sling JSP Tag Libraryorg.apache.sling.scripting.jsp.taglib
2.2.6	sling	Installed

134	 
Apache Sling Scripting HTL JavaScript Use Providerorg.apache.sling.scripting.sightly.js.provider
1.0.18	sling	Installed	 
 
 
 
136	 
Apache Sling Scripting HTL Read-Eval-Print Loop Environmentorg.apache.sling.scripting.sightly.repl
1.0.4	sling	Installed	 
 
 
 
135	 
Apache Sling Scripting HTL Sling Models Use Providerorg.apache.sling.scripting.sightly.models.provider
1.0.6	sling	Installed	

129	 
Apache Sling Scripting JSP Supportorg.apache.sling.scripting.jsp
2.2.7.SNAPSHOT	sling	Installed

141	 
Apache Sling XSS Protection Bundleorg.apache.sling.xss
1.0.16	sling	Installed

73	 
Composum Core Consolecom.composum.core.console
1.6.0	composum,core	Installed


72	 
Composum Core Sling APIcom.composum.core.commons
1.6.0	composum,core	Installed	 
 
 
 
75	 
Composum Package Managercom.composum.core.pckgmgr
1.6.0	composum,core	Installed	 
 
 
 
76	 
Composum User Managmenentcom.composum.core.usermgnt
1.6.0	composum,core	Installed	

Because 12 Bundles are in installed state, lauchpad running using war is not working properly.



> Not able to upload file when sling running as war file using curl
> -----------------------------------------------------------------
>
>                 Key: SLING-6448
>                 URL: https://issues.apache.org/jira/browse/SLING-6448
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Builder 9
>         Environment: Windows, Apache 
>            Reporter: Ravi Singareddy
>
> Here are steps followed
> 1) Checked out code from svn
> svn co http://svn.apache.org/repos/asf/sling/trunk sling
> 2) cd sling
> 3) cd launchpad/builder
> 4) mvn --update-snapshots clean install
> 5) mvn jetty:run-war
> (please note I have add jetty dependency in pom.xml to run above command)
> I have used curl to upload file
> >> curl -u admin:admin http://localhost:8080/content/test.html --upload-file test.html
> is giving following error: PUT 405 Error
> d:\curl-7.52.1-win64-mingw\bin\curl.exe -u admin:admin http://localhost:8080/content/test.html --upload-file test.html
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html>
> <head>
> <title>405 Method PUT not supported</title>
> </head>
> <body>
> <h1>Method PUT not supported (405)</h1>
> <p>The requested URL /content/test.html resulted in an error in Apache Sling
>  Core Default Servlet.</p>
> <h3>Request Progress:</h3>
> <pre>
>       0 TIMER_START{Request Processing}
>       2 COMMENT timer_end format is {&lt;elapsed microseconds&gt;,&lt;timer name
> &gt;} &lt;optional message&gt;
>      10 LOG Method=PUT, PathInfo=null
>      21 TIMER_START{handleSecurity}
>    2418 TIMER_END{2395,handleSecurity} authenticator org.apache.sling.auth.core.
> impl.SlingAuthenticator@68556f8e returns true
>    3517 TIMER_START{ResourceResolution}
>    3925 TIMER_END{406,ResourceResolution} URI=/content/test.html resolves to
>  Resource=NonExistingResource, path=/content/test.html
>    3936 LOG Resource Path Info: SlingRequestPathInfo: path=&apos;/content/landin
> g.html&apos;, selectorString=&apos;null&apos;, extension=&apos;html&apos;, suf
> fix=&apos;null&apos;
>    3936 TIMER_START{ServletResolution}
>    3941 TIMER_START{resolveServlet(/content/test.html)}
>    4367 TIMER_END{423,resolveServlet(/content/test.html)} Using servlet Apac
> he Sling Core Default Servlet
>    4371 TIMER_END{434,ServletResolution} URI=/content/test.html handled by S
> ervlet=Apache Sling Core Default Servlet
>    4378 LOG Applying Requestfilters
>    4385 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
>    4392 LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTr
> ackerLogFilter
>    4397 LOG Applying Componentfilters
>    4409 TIMER_START{Apache Sling Core Default Servlet#0}
>    4425 LOG Applying Error filters
>    4428 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
>    4433 TIMER_START{handleError:status=405}
>    4577 TIMER_END{143,handleError:status=405} Using handler org.apache.sling.ser
> vlets.resolver.internal.defaults.DefaultErrorHandlerServlet
>    5111 TIMER_END{5109,Request Processing} Dumping SlingRequestProgressTracker E
> ntries
> </pre>
> <hr>
> <address>ApacheSling/2.6 (jetty/9.3.12.v20160915, Java HotSpot(TM) 64-Bit Server
>  VM 1.8.0_102, Windows 8 6.2 amd64)</address>
> </body>
> </html>
> _______________________________________________
> But If start sling using executable jar able to upload the file using curl.
> java -Xmx4g -Xms4g -Dsling.home=\var\sling -Dsling.run.modes=oak -jar target\org.apache.sling.launchpad-9-SNAPSHOT.jar start
> Thanks
> Ravi



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)