[jira] Commented: (SLING-215) NPE in servlet resolving
[ https://issues.apache.org/jira/browse/SLING-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12564675#action_12564675 ] Felix Meschberger commented on SLING-215: - This is probably an issue in org.apache.sling.servlet.resolver.helper.PathSupport.getScriptBaseName, where the condition (HttpConstants.METHOD_GET.equalsIgnoreCase(methodName) || HttpConstants.METHOD_HEAD.equalsIgnoreCase(methodName) extension != null extension.length() 0) is check and the baseName is intended to be set to the extension name unless the extension name is null or empty. It looks like a evaluation order issue in that the || part must be correctly parenthesized: ((HttpConstants.METHOD_GET.equalsIgnoreCase(methodName) || HttpConstants.METHOD_HEAD.equalsIgnoreCase(methodName)) extension != null extension.length() 0) WDYT ? NPE in servlet resolving Key: SLING-215 URL: https://issues.apache.org/jira/browse/SLING-215 Project: Sling Issue Type: Bug Components: ServletResolver Reporter: Carsten Ziegeler When invoking a path without extension like http://localhost:8080/sling1/cms/siteadmin (sling1 is the webapp context, and cms/siteadmin is a node in the repository) I get the following error java.lang.NullPointerException java.lang.String.startsWith(String.java:1252) java.lang.String.startsWith(String.java:1281) org.apache.sling.servlet.resolver.SlingServletResolver.getServletAt(SlingServletResolver.java:339) org.apache.sling.servlet.resolver.SlingServletResolver.resolveServlet(SlingServletResolver.java:145) org.apache.sling.core.impl.request.RequestData.init(RequestData.java:156) org.apache.sling.core.impl.SlingMainServlet.service(SlingMainServlet.java:249) org.apache.sling.core.impl.SlingMainServlet.service(SlingMainServlet.java:172) org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90) org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:109) org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:75) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.sling.launcher.webapp.SlingServlet.service(SlingServlet.java:194) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SLING-215) NPE in servlet resolving
[ https://issues.apache.org/jira/browse/SLING-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger resolved SLING-215. - Resolution: Fixed Fix Version/s: 2.0.0 Fixed as proposed in Rev. 617368. Please close if this resolves your issue. Thanks. NPE in servlet resolving Key: SLING-215 URL: https://issues.apache.org/jira/browse/SLING-215 Project: Sling Issue Type: Bug Components: ServletResolver Reporter: Carsten Ziegeler Assignee: Felix Meschberger Fix For: 2.0.0 When invoking a path without extension like http://localhost:8080/sling1/cms/siteadmin (sling1 is the webapp context, and cms/siteadmin is a node in the repository) I get the following error java.lang.NullPointerException java.lang.String.startsWith(String.java:1252) java.lang.String.startsWith(String.java:1281) org.apache.sling.servlet.resolver.SlingServletResolver.getServletAt(SlingServletResolver.java:339) org.apache.sling.servlet.resolver.SlingServletResolver.resolveServlet(SlingServletResolver.java:145) org.apache.sling.core.impl.request.RequestData.init(RequestData.java:156) org.apache.sling.core.impl.SlingMainServlet.service(SlingMainServlet.java:249) org.apache.sling.core.impl.SlingMainServlet.service(SlingMainServlet.java:172) org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90) org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:109) org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:75) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.sling.launcher.webapp.SlingServlet.service(SlingServlet.java:194) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-215) NPE in servlet resolving
[ https://issues.apache.org/jira/browse/SLING-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler closed SLING-215. -- Works perfectly. Thanks! NPE in servlet resolving Key: SLING-215 URL: https://issues.apache.org/jira/browse/SLING-215 Project: Sling Issue Type: Bug Components: ServletResolver Reporter: Carsten Ziegeler Assignee: Felix Meschberger Fix For: 2.0.0 When invoking a path without extension like http://localhost:8080/sling1/cms/siteadmin (sling1 is the webapp context, and cms/siteadmin is a node in the repository) I get the following error java.lang.NullPointerException java.lang.String.startsWith(String.java:1252) java.lang.String.startsWith(String.java:1281) org.apache.sling.servlet.resolver.SlingServletResolver.getServletAt(SlingServletResolver.java:339) org.apache.sling.servlet.resolver.SlingServletResolver.resolveServlet(SlingServletResolver.java:145) org.apache.sling.core.impl.request.RequestData.init(RequestData.java:156) org.apache.sling.core.impl.SlingMainServlet.service(SlingMainServlet.java:249) org.apache.sling.core.impl.SlingMainServlet.service(SlingMainServlet.java:172) org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90) org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:109) org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:75) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.sling.launcher.webapp.SlingServlet.service(SlingServlet.java:194) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (SLING-216) NPE during unregistering servlets
NPE during unregistering servlets -- Key: SLING-216 URL: https://issues.apache.org/jira/browse/SLING-216 Project: Sling Issue Type: Bug Components: ServletResolver Reporter: Carsten Ziegeler Some NPE's occur during shutdown when the registered servlets are unregistered. One problem is that the component context is set to null in deactivate before destroyAllServlets is invoked (the context is needed to destroy the servlet). Another problem could be that deactivate is called before the unbind method for the servlet? This is the stack trace: 01.02.2008 09:26:28 *ERROR* o.a.s.s.resolver: [org.apache.sling.servlet.resolver.SlingServletResolver] DependencyManager : exception while invoking unbindServlet() (java.lang.NullPointerException) java.lang.NullPointerException at org.apache.sling.servlet.resolver.SlingServletResolver.destroyServlet(SlingServletResolver.java:576) at org.apache.sling.servlet.resolver.SlingServletResolver.unbindServlet(SlingServletResolver.java:500) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.felix.scr.impl.DependencyManager.invokeUnbindMethod(DependencyManager.java:973) at org.apache.felix.scr.impl.DependencyManager.unbind(DependencyManager.java:695) at org.apache.felix.scr.impl.ImmediateComponentManager.disposeImplementationObject(ImmediateComponentManager.java:302) at org.apache.felix.scr.impl.ImmediateComponentManager.deleteComponent(ImmediateComponentManager.java:151) at org.apache.felix.scr.impl.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:469) at org.apache.felix.scr.impl.AbstractComponentManager.disableInternal(AbstractComponentManager.java:486) at org.apache.felix.scr.impl.AbstractComponentManager.disposeInternal(AbstractComponentManager.java:516) at org.apache.felix.scr.impl.AbstractComponentManager.dispose(AbstractComponentManager.java:197) at org.apache.felix.scr.impl.ImmediateComponentManager.dispose(ImmediateComponentManager.java:121) at org.apache.felix.scr.impl.BundleComponentActivator.dispose(BundleComponentActivator.java:258) at org.apache.felix.scr.impl.Activator.disposeComponents(Activator.java:251) at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:177) at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:690) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:619) at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:532) at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3568) at org.apache.felix.framework.Felix._stopBundle(Felix.java:1955) at org.apache.felix.framework.Felix.stopBundle(Felix.java:1920) at org.apache.felix.framework.Felix._updateBundle(Felix.java:1757) at org.apache.felix.framework.Felix.updateBundle(Felix.java:1719) at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:372) at org.apache.sling.osgi.console.web.internal.core.InstallAction$2.doRun(InstallAction.java:242) at org.apache.sling.osgi.console.web.internal.core.InstallAction$InstallHelper.run(InstallAction.java:278) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Website: excuse our mess
Hi, As several of our website's pages contain obsolete information, I suggest adding a note at the top of each page to indicate its status. See the following pages for what I mean: http://cwiki.apache.org/confluence/display/SLING/Index (excuse our mess box) http://cwiki.apache.org/confluence/display/SLING/Discover+Sling+in+15+minutes (up to date) http://cwiki.apache.org/confluence/display/SLING/Architecture (out of date) I'm tied with other stuff today so I won't review more pages right now, but if other wiki authors can do that for their pages it'd be cool. -Bertrand
[jira] Created: (SLING-217) Scripting Resolver bundle compiled with JDK 6 may produce NoSuchMethodError
Scripting Resolver bundle compiled with JDK 6 may produce NoSuchMethodError --- Key: SLING-217 URL: https://issues.apache.org/jira/browse/SLING-217 Project: Sling Issue Type: Improvement Components: Scripting Reporter: Felix Meschberger Assignee: Felix Meschberger Fix For: 2.0.0 Sometimes a NoSuchMethodError is thrown in the DefaultSlingScript.verifyBindings method when filling the javax.servlet.SimpleBindings object for the script evaluation. This happens, if the scripting/resolver bundle is compiled with JDK 1.6, that is the generic SimpleBindings class contained in JDK 1.6. This causes the put method to be bound to the parameters (String, Object) while the BSF 3 SimpleBindings class from the scripting/api bundle used in a JDK 1.5 environment has a put method taking (Object, Object). Now, one fix of course is to make sure, the scripting/resolver bundler is compiled with JDK 1.5 instead of JDK 1.6. Another solution could be to use the scripting/api bundle (or the BSF 3 library) on the boot class path for the compilation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: We need a recommended Maven settings page
On Feb 1, 2008 10:59 AM, Jukka Zitting [EMAIL PROTECTED] wrote: ...I think it's enough to just make sure that the build works with a normal Maven installation with the default settings. If you customize Maven yourself, it's IMHO up to you to resolve any issue that causes... Ok, agreed and thanks for the clarification! So maybe we need a page explaining this, recommending that people use mvn help:effective-settings to check that they have no local settings. Note that, on unixish systems, mvn -s /dev/null disables any local settings - dunno if there's a Windows equivalent that works in all cases? -Bertrand
We need a recommended Maven settings page
Hi, Yesterday a friend reported being unable to build Sling as the 1.2.0 version of the maven-bundle-plugin is not available at http://maven2.mirrors.skynet.be/pub/maven2/org/apache/felix/maven-bundle-plugin/ That was after I told my friend it's very easy, just follow the 'discover Sling in 15 minutes' instructions... Seems like the mirroring of Maven repositories is not working as it should, so maybe we should have a website page about recommended Maven settings to build Sling? I know Carsten and Felix know much more than me about Maven, so maybe you guys could suggest something? Like use ant maybe? -Bertrand (just kidding on that last one, happy with Maven but it needs the right settings ;-)
Re: We need a recommended Maven settings page
Hi, On Feb 1, 2008 11:50 AM, Bertrand Delacretaz [EMAIL PROTECTED] wrote: Yesterday a friend reported being unable to build Sling as the 1.2.0 version of the maven-bundle-plugin is not available at http://maven2.mirrors.skynet.be/pub/maven2/org/apache/felix/maven-bundle-plugin/ The Maven mirror guide [1] says: Note : The official Maven 2 repository is at http://repo1.maven.org/maven2, the following mirrors may not have the same contents and we don't support them in any way, although we try to keep info in this page accurate. Seems like the mirroring of Maven repositories is not working as it should, so maybe we should have a website page about recommended Maven settings to build Sling? I think it's enough to just make sure that the build works with a normal Maven installation with the default settings. If you customize Maven yourself, it's IMHO up to you to resolve any issue that causes... [1] http://maven.apache.org/guides/mini/guide-mirror-settings.html BR, Jukka Zitting
[jira] Closed: (SLING-217) Scripting Resolver bundle compiled with JDK 6 may produce NoSuchMethodError
[ https://issues.apache.org/jira/browse/SLING-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger closed SLING-217. --- Resolution: Fixed Modified the pom of the scripting/resolver project in Rev. 617428. Using the dependency plugin the BSF 3 API is copied to a local folder and referred to in the compiler configuration to place the BSF API library in front of the standard JDK runtime library. This seems to do the trick Scripting Resolver bundle compiled with JDK 6 may produce NoSuchMethodError --- Key: SLING-217 URL: https://issues.apache.org/jira/browse/SLING-217 Project: Sling Issue Type: Improvement Components: Scripting Reporter: Felix Meschberger Assignee: Felix Meschberger Fix For: 2.0.0 Sometimes a NoSuchMethodError is thrown in the DefaultSlingScript.verifyBindings method when filling the javax.servlet.SimpleBindings object for the script evaluation. This happens, if the scripting/resolver bundle is compiled with JDK 1.6, that is the generic SimpleBindings class contained in JDK 1.6. This causes the put method to be bound to the parameters (String, Object) while the BSF 3 SimpleBindings class from the scripting/api bundle used in a JDK 1.5 environment has a put method taking (Object, Object). Now, one fix of course is to make sure, the scripting/resolver bundler is compiled with JDK 1.5 instead of JDK 1.6. Another solution could be to use the scripting/api bundle (or the BSF 3 library) on the boot class path for the compilation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: Discover Sling in 15 minutes
Hi Carsten, thanks, but there's a different problem now (see below). I thought that maybe just the tests fail, but mvn jetty:run does not work either: [INFO] Searching repository for plugin with prefix: 'jetty'. [INFO] org.apache.maven.plugins: checking for updates from central [INFO] org.codehaus.mojo: checking for updates from central [INFO] artifact org.apache.maven.plugins:maven-jetty-plugin: checking for update s from central [INFO] [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not exist o r no valid version could be found Can I try anything else? Thanks a lot Michael 2008-02-01 15:44:12.609::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2008-02-01 15:44:12.656::INFO: jetty-6.1.1rc1 2008-02-01 15:44:12.812::INFO: Extract jar:file:/C:/dev/launchpad/launchpad/lau nchpad-webapp/target/org.apache.sling.launchpad.webapp- 2.0.0-incubator-SNAPSHOT. war!/ to C:\DOCUME~1\mmarth\LOCALS~1\Temp\Jetty_0_0_0_0_8080_org.apache.sling.la unchpad.webapp-2.0.0-incubator-SNAPSHOT.war__org_apache_sling_launchpad_webapp-2 _0_0-incubator-SNAPSHOT__ybspfb\webapp 2008-02-01 15:44: 21.921:/org.apache.sling.launchpad.webapp-2.0.0-incubator-SNAPS HOT:INFO: sling: Servlet sling initialized 2008-02-01 15:44:21.921::INFO: Extract jar:file:/C:/dev/launchpad/launchpad/lau nchpad-webapp/target/jetty6x/cargocpc.war!/ to C:\DOCUME~1\mmarth\LOCALS~1\Temp\ Jetty_0_0_0_0_8080_cargocpc.war__cargocpc__xflgf3\webapp 2008-02-01 15:44:22.515::INFO: Started SelectChannelConnector @ 0.0.0.0:8080 [INFO] [beddedLocalContainer] Jetty 6.x Embedded started on port [8080] [INFO] [surefire:test {execution: surefire-integration-test}] [INFO] Surefire report directory: C:\dev\launchpad\launchpad\launchpad-webapp\ta rget\surefire-reports --- T E S T S --- Running org.apache.sling.launchpad.webapp.integrationtest.PropertyRenderingTest log4j:WARN No appenders could be found for logger ( org.apache.commons.httpclient .HttpClient). log4j:WARN Please initialize the log4j system properly. Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 6, Failures: 6, Errors: 0, Skipped: 0, Time elapsed: 10.078 sec F AILURE! Running org.apache.sling.launchpad.webapp.integrationtest.JsonRenderingTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 7, Failures: 7, Errors: 0, Skipped: 0, Time elapsed: 0.125 sec FA ILURE! Running org.apache.sling.launchpad.webapp.integrationtest.IncludeTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec FA ILURE! Running org.apache.sling.launchpad.webapp.integrationtest.GetWithSuffixTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.14 sec FAI LURE! Running org.apache.sling.launchpad.webapp.integrationtest.UploadFileTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec FA ILURE! Running org.apache.sling.launchpad.webapp.integrationtest.ujax.PostServletOrderT est Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.14 sec FAI LURE! Running org.apache.sling.launchpad.webapp.integrationtest.NodetypeRenderingTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 6, Failures: 6, Errors:
Re: Discover Sling in 15 minutes
Hmm, that's strange, it seems mvn can't find the jetty plugin. You could try mvn org.mortbay.jetty:mvn-jetty-plugin:6.1.5:run instead Carsten Michael Marth wrote: Hi Carsten, thanks, but there's a different problem now (see below). I thought that maybe just the tests fail, but mvn jetty:run does not work either: [INFO] Searching repository for plugin with prefix: 'jetty'. [INFO] org.apache.maven.plugins: checking for updates from central [INFO] org.codehaus.mojo: checking for updates from central [INFO] artifact org.apache.maven.plugins:maven-jetty-plugin: checking for update s from central [INFO] [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not exist o r no valid version could be found Can I try anything else? Thanks a lot Michael 2008-02-01 15:44:12.609::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2008-02-01 15:44:12.656::INFO: jetty-6.1.1rc1 2008-02-01 15:44:12.812::INFO: Extract jar:file:/C:/dev/launchpad/launchpad/lau nchpad-webapp/target/org.apache.sling.launchpad.webapp- 2.0.0-incubator-SNAPSHOT. war!/ to C:\DOCUME~1\mmarth\LOCALS~1\Temp\Jetty_0_0_0_0_8080_org.apache.sling.la unchpad.webapp-2.0.0-incubator-SNAPSHOT.war__org_apache_sling_launchpad_webapp-2 _0_0-incubator-SNAPSHOT__ybspfb\webapp 2008-02-01 15:44: 21.921:/org.apache.sling.launchpad.webapp-2.0.0-incubator-SNAPS HOT:INFO: sling: Servlet sling initialized 2008-02-01 15:44:21.921::INFO: Extract jar:file:/C:/dev/launchpad/launchpad/lau nchpad-webapp/target/jetty6x/cargocpc.war!/ to C:\DOCUME~1\mmarth\LOCALS~1\Temp\ Jetty_0_0_0_0_8080_cargocpc.war__cargocpc__xflgf3\webapp 2008-02-01 15:44:22.515::INFO: Started SelectChannelConnector @ 0.0.0.0:8080 [INFO] [beddedLocalContainer] Jetty 6.x Embedded started on port [8080] [INFO] [surefire:test {execution: surefire-integration-test}] [INFO] Surefire report directory: C:\dev\launchpad\launchpad\launchpad-webapp\ta rget\surefire-reports --- T E S T S --- Running org.apache.sling.launchpad.webapp.integrationtest.PropertyRenderingTest log4j:WARN No appenders could be found for logger ( org.apache.commons.httpclient ..HttpClient). log4j:WARN Please initialize the log4j system properly. Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 6, Failures: 6, Errors: 0, Skipped: 0, Time elapsed: 10.078 sec F AILURE! Running org.apache.sling.launchpad.webapp.integrationtest.JsonRenderingTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 7, Failures: 7, Errors: 0, Skipped: 0, Time elapsed: 0.125 sec FA ILURE! Running org.apache.sling.launchpad.webapp.integrationtest.IncludeTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec FA ILURE! Running org.apache.sling.launchpad.webapp.integrationtest.GetWithSuffixTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.14 sec FAI LURE! Running org.apache.sling.launchpad.webapp.integrationtest.UploadFileTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec FA ILURE! Running org.apache.sling.launchpad.webapp.integrationtest.ujax.PostServletOrderT est Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.14 sec FAI LURE! Running org.apache.sling.launchpad.webapp.integrationtest.NodetypeRenderingTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling
Re: Discover Sling in 15 minutes
Just update from svn and try again :) It works now... Carsten Michael Marth wrote: Guys, just tried to do the 15 minutes tutorial, but I get a compilation error (mvn clean install) - see below. I use C:\dev\launchpadmvn -version Maven version: 2.0.7 Java version: 1.5.0_13 Does anybody have an idea? The error looks strange to me. Also tried to delete my mvn repo, but no success either. thanks for pointers Cheers Michael [INFO] - --- [INFO] Building Sling - ScriptResolver implementation [INFO]task-segment: [clean, install] [INFO] - --- [INFO] [clean:clean] [INFO] Deleting directory C:\dev\launchpad\scripting\resolver\target [INFO] [enforcer:enforce {execution: enforce-java}] [INFO] [dependency:copy {execution: get-bsf3-api}] [INFO] Configured Artifact: org.apache.bsf:bsf-api:3.0-beta2:jar [INFO] Copying bsf-api-3.0-beta2.jar to C:\dev\launchpad\scripting\resolver\targ et\dependency\bsf-api.jar [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Compiling 8 source files to C:\dev\launchpad\scripting\resolver\target\cl asses [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\DefaultSlingScript.java:[76,22] type java.util.Dictionary does not ta ke parameters C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\DefaultSlingScript.java:[192,22] type java.util.Enumeration does not take parameters C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\helper\OnDemandReader.java:[23,16] package java.nio does not exist C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\helper\OnDemandReader.java:[70,20] cannot find symbol symbol : class CharBuffer location: class org.apache.sling.scripting.resolver.impl.helper.OnDemandReader C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\helper\OnDemandReader.java:[70,15] read(char[]) is already defined in org.apache.sling.scripting.resolver.impl.helper.OnDemandReader C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\SlingScriptAdapterFactory.java:[75,16] type java.util.List does not t ake parameters C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\SlingScriptAdapterFactory.java:[77,16] type java.util.List does not t ake parameters C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\SlingScriptAdapterFactory.java:[83,17] type java.lang.Class does not take parameters C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\helper\OnDemandWriter.java:[44,5] cannot find symbol symbol : class Override location: class org.apache.sling.scripting.resolver.impl.helper.OnDemandWriter C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\helper\OnDemandWriter.java:[51,5] cannot find symbol symbol : class Override location: class org.apache.sling.scripting.resolver.impl.helper.OnDemandWriter On 1/29/08, Gert Vanthienen [EMAIL PROTECTED] wrote: Bernard, An 'svn up;mvn clean install' fixed the issue. Thank you for the fast reponse, Gert Bertrand Delacretaz wrote: On Jan 29, 2008 3:16 PM, Gert Vanthienen [EMAIL PROTECTED] wrote: ...I ran into a problem when executing the 'curl ...' command to add a first node of content: Method POST not supported (405)... When running this? curl -Fsling:resourceType=foo/bar -Ftitle=some title http://admin:[EMAIL PROTECTED]:8080/content/mynode As the Sling modules start asynchronously, what might happen is that they're not ready yet. But startup shouldn't take more than a few seconds on a decent system. If retrying doesn't help, have a look at the log created under launchpad-webapp/target/logs/error.log, and if any errors are reported. I've just added the info about that log file to the wiki page. -Bertrand -- Carsten Ziegeler [EMAIL PROTECTED]
[jira] Reopened: (SLING-217) Scripting Resolver bundle compiled with JDK 6 may produce NoSuchMethodError
[ https://issues.apache.org/jira/browse/SLING-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler reopened SLING-217: The change does not work on Mac OS X as rt.jar is not available. I reverted the change for now; Scripting Resolver bundle compiled with JDK 6 may produce NoSuchMethodError --- Key: SLING-217 URL: https://issues.apache.org/jira/browse/SLING-217 Project: Sling Issue Type: Improvement Components: Scripting Reporter: Felix Meschberger Assignee: Felix Meschberger Fix For: 2.0.0 Sometimes a NoSuchMethodError is thrown in the DefaultSlingScript.verifyBindings method when filling the javax.servlet.SimpleBindings object for the script evaluation. This happens, if the scripting/resolver bundle is compiled with JDK 1.6, that is the generic SimpleBindings class contained in JDK 1.6. This causes the put method to be bound to the parameters (String, Object) while the BSF 3 SimpleBindings class from the scripting/api bundle used in a JDK 1.5 environment has a put method taking (Object, Object). Now, one fix of course is to make sure, the scripting/resolver bundler is compiled with JDK 1.5 instead of JDK 1.6. Another solution could be to use the scripting/api bundle (or the BSF 3 library) on the boot class path for the compilation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: Discover Sling in 15 minutes
Guys, just tried to do the 15 minutes tutorial, but I get a compilation error (mvn clean install) - see below. I use C:\dev\launchpadmvn -version Maven version: 2.0.7 Java version: 1.5.0_13 Does anybody have an idea? The error looks strange to me. Also tried to delete my mvn repo, but no success either. thanks for pointers Cheers Michael [INFO] - --- [INFO] Building Sling - ScriptResolver implementation [INFO]task-segment: [clean, install] [INFO] - --- [INFO] [clean:clean] [INFO] Deleting directory C:\dev\launchpad\scripting\resolver\target [INFO] [enforcer:enforce {execution: enforce-java}] [INFO] [dependency:copy {execution: get-bsf3-api}] [INFO] Configured Artifact: org.apache.bsf:bsf-api:3.0-beta2:jar [INFO] Copying bsf-api-3.0-beta2.jar to C:\dev\launchpad\scripting\resolver\targ et\dependency\bsf-api.jar [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Compiling 8 source files to C:\dev\launchpad\scripting\resolver\target\cl asses [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Compilation failure C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\DefaultSlingScript.java:[76,22] type java.util.Dictionary does not ta ke parameters C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\DefaultSlingScript.java:[192,22] type java.util.Enumeration does not take parameters C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\helper\OnDemandReader.java:[23,16] package java.nio does not exist C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\helper\OnDemandReader.java:[70,20] cannot find symbol symbol : class CharBuffer location: class org.apache.sling.scripting.resolver.impl.helper.OnDemandReader C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\helper\OnDemandReader.java:[70,15] read(char[]) is already defined in org.apache.sling.scripting.resolver.impl.helper.OnDemandReader C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\SlingScriptAdapterFactory.java:[75,16] type java.util.List does not t ake parameters C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\SlingScriptAdapterFactory.java:[77,16] type java.util.List does not t ake parameters C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\SlingScriptAdapterFactory.java:[83,17] type java.lang.Class does not take parameters C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\helper\OnDemandWriter.java:[44,5] cannot find symbol symbol : class Override location: class org.apache.sling.scripting.resolver.impl.helper.OnDemandWriter C:\dev\launchpad\scripting\resolver\src\main\java\org\apache\sling\scripting\res olver\impl\helper\OnDemandWriter.java:[51,5] cannot find symbol symbol : class Override location: class org.apache.sling.scripting.resolver.impl.helper.OnDemandWriter On 1/29/08, Gert Vanthienen [EMAIL PROTECTED] wrote: Bernard, An 'svn up;mvn clean install' fixed the issue. Thank you for the fast reponse, Gert Bertrand Delacretaz wrote: On Jan 29, 2008 3:16 PM, Gert Vanthienen [EMAIL PROTECTED] wrote: ...I ran into a problem when executing the 'curl ...' command to add a first node of content: Method POST not supported (405)... When running this? curl -Fsling:resourceType=foo/bar -Ftitle=some title http://admin:[EMAIL PROTECTED]:8080/content/mynode As the Sling modules start asynchronously, what might happen is that they're not ready yet. But startup shouldn't take more than a few seconds on a decent system. If retrying doesn't help, have a look at the log created under launchpad-webapp/target/logs/error.log, and if any errors are reported. I've just added the info about that log file to the wiki page. -Bertrand -- Michael Marth, http://dev.day.com
Re: Discover Sling in 15 minutes
no joy either :( Michael Downloading: http://repo1.maven.org/maven2/org/mortbay/jetty/mvn-jetty-plugin/6. 1.5/mvn-jetty-plugin-6.1.5.pom Downloading: http://repo.dev.day.com/central/org/mortbay/jetty/mvn-jetty-plugin/ 6.1.5/mvn-jetty-plugin-6.1.5.pom [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: org.mortbay.jetty ArtifactId: mvn-jetty-plugin Version: 6.1.5 Reason: Unable to download the artifact from any repository org.mortbay.jetty:mvn-jetty-plugin:pom:6.1.5 from the specified remote repositories: central (http://repo1.maven.org/maven2) On 2/1/08, Carsten Ziegeler [EMAIL PROTECTED] wrote: Hmm, that's strange, it seems mvn can't find the jetty plugin. You could try mvn org.mortbay.jetty:mvn-jetty-plugin:6.1.5:run instead Carsten Michael Marth wrote: Hi Carsten, thanks, but there's a different problem now (see below). I thought that maybe just the tests fail, but mvn jetty:run does not work either: [INFO] Searching repository for plugin with prefix: 'jetty'. [INFO] org.apache.maven.plugins: checking for updates from central [INFO] org.codehaus.mojo: checking for updates from central [INFO] artifact org.apache.maven.plugins:maven-jetty-plugin: checking for update s from central [INFO] [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not exist o r no valid version could be found Can I try anything else? Thanks a lot Michael 2008-02-01 15:44:12.609::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2008-02-01 15:44:12.656::INFO: jetty-6.1.1rc1 2008-02-01 15:44:12.812::INFO: Extract jar:file:/C:/dev/launchpad/launchpad/lau nchpad-webapp/target/org.apache.sling.launchpad.webapp- 2.0.0-incubator-SNAPSHOT. war!/ to C:\DOCUME~1\mmarth\LOCALS~1\Temp\Jetty_0_0_0_0_8080_org.apache.sling.la unchpad.webapp-2.0.0-incubator-SNAPSHOT.war__org_apache_sling_launchpad_webapp-2 _0_0-incubator-SNAPSHOT__ybspfb\webapp 2008-02-01 15:44: 21.921:/org.apache.sling.launchpad.webapp-2.0.0-incubator-SNAPS HOT:INFO: sling: Servlet sling initialized 2008-02-01 15:44:21.921::INFO: Extract jar:file:/C:/dev/launchpad/launchpad/lau nchpad-webapp/target/jetty6x/cargocpc.war!/ to C:\DOCUME~1\mmarth\LOCALS~1\Temp\ Jetty_0_0_0_0_8080_cargocpc.war__cargocpc__xflgf3\webapp 2008-02-01 15:44:22.515::INFO: Started SelectChannelConnector @ 0.0.0.0:8080 [INFO] [beddedLocalContainer] Jetty 6.x Embedded started on port [8080] [INFO] [surefire:test {execution: surefire-integration-test}] [INFO] Surefire report directory: C:\dev\launchpad\launchpad\launchpad-webapp\ta rget\surefire-reports --- T E S T S --- Running org.apache.sling.launchpad.webapp.integrationtest.PropertyRenderingTest log4j:WARN No appenders could be found for logger ( org.apache.commons.httpclient ..HttpClient). log4j:WARN Please initialize the log4j system properly. Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 6, Failures: 6, Errors: 0, Skipped: 0, Time elapsed: 10.078sec F AILURE! Running org.apache.sling.launchpad.webapp.integrationtest.JsonRenderingTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 7, Failures: 7, Errors: 0, Skipped: 0, Time elapsed: 0.125sec FA ILURE! Running org.apache.sling.launchpad.webapp.integrationtest.IncludeTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.016sec FA ILURE! Running org.apache.sling.launchpad.webapp.integrationtest.GetWithSuffixTest Checking if the required Sling services are started... Checking if the required Sling services are started... Checking if the required Sling services are started... Tests run: 3, Failures: 3, Errors: 0,
[jira] Commented: (SLING-217) Scripting Resolver bundle compiled with JDK 6 may produce NoSuchMethodError
[ https://issues.apache.org/jira/browse/SLING-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12564788#action_12564788 ] Felix Meschberger commented on SLING-217: - cool .. What is the default runtime library used in Mac OS X? Scripting Resolver bundle compiled with JDK 6 may produce NoSuchMethodError --- Key: SLING-217 URL: https://issues.apache.org/jira/browse/SLING-217 Project: Sling Issue Type: Improvement Components: Scripting Reporter: Felix Meschberger Assignee: Felix Meschberger Fix For: 2.0.0 Sometimes a NoSuchMethodError is thrown in the DefaultSlingScript.verifyBindings method when filling the javax.servlet.SimpleBindings object for the script evaluation. This happens, if the scripting/resolver bundle is compiled with JDK 1.6, that is the generic SimpleBindings class contained in JDK 1.6. This causes the put method to be bound to the parameters (String, Object) while the BSF 3 SimpleBindings class from the scripting/api bundle used in a JDK 1.5 environment has a put method taking (Object, Object). Now, one fix of course is to make sure, the scripting/resolver bundler is compiled with JDK 1.5 instead of JDK 1.6. Another solution could be to use the scripting/api bundle (or the BSF 3 library) on the boot class path for the compilation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (SLING-218) TagHandlerPool reuses tags, so need to initialize attributes in sling IncludeTagHandler
TagHandlerPool reuses tags, so need to initialize attributes in sling IncludeTagHandler --- Key: SLING-218 URL: https://issues.apache.org/jira/browse/SLING-218 Project: Sling Issue Type: Bug Reporter: Tobias Bocanegra the TagHandlerPool reuses tag handlers. but the sling include tag handler is not aware of that. the problem is that the setters of the attributes are not called if not indicated in the jsp tag. eg: sling:include resource=%= resource % / sling:include path=/foo/bar/ would cause the 2nd include to use the same resource as the 1st one, since the 'setResource(null)' is not called. in order to prevent this, i recommend either to drop the pool or fix the include tag by initializing the variables in the setPageContext(PageContext). another question: is this tag pool thread safe? from the look at the compiled java code of the jsp, there is only 1 pool per user. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: SLING-154, ScriptableNode access to Properties and JCR methods, how?
Hi Bertrand, The simplest way might be to require the use of node.getPath() instead of node.path, and use javascript property names for content access only, not for JCR getters. I completely agree to that solution. I think I have a strong bias for using node.propname for accessing the properties and the node.childnodename for child nodes. One of the reasons to resolve the issue this way is that this would allow compatibility between ujax (jst) and .esp when it comes to content access. (especially if we would introduce a currentNode on the server side aswell) I think accessing the original Node methods with node.getPath, node.getSession() is perfectly acceptable. regards, david
Re: Discover Sling in 15 minutes
Bertrand Delacretaz wrote: On Feb 1, 2008 4:23 PM, Carsten Ziegeler [EMAIL PROTECTED] wrote: ...You could try mvn org.mortbay.jetty:mvn-jetty-plugin:6.1.5:run instead.. that'd be mvn org.mortbay.jetty:maven-jetty-plugin:6.1.5:run Yepp, sorry for the typo. Carsten -- Carsten Ziegeler [EMAIL PROTECTED]
[jira] Commented: (SLING-217) Scripting Resolver bundle compiled with JDK 6 may produce NoSuchMethodError
[ https://issues.apache.org/jira/browse/SLING-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12564792#action_12564792 ] Carsten Ziegeler commented on SLING-217: Well, it seems that it is /System/Library/Frameworks/JavaVM.framework/Classes/classes.jar (java home points to a different directory tree) Scripting Resolver bundle compiled with JDK 6 may produce NoSuchMethodError --- Key: SLING-217 URL: https://issues.apache.org/jira/browse/SLING-217 Project: Sling Issue Type: Improvement Components: Scripting Reporter: Felix Meschberger Assignee: Felix Meschberger Fix For: 2.0.0 Sometimes a NoSuchMethodError is thrown in the DefaultSlingScript.verifyBindings method when filling the javax.servlet.SimpleBindings object for the script evaluation. This happens, if the scripting/resolver bundle is compiled with JDK 1.6, that is the generic SimpleBindings class contained in JDK 1.6. This causes the put method to be bound to the parameters (String, Object) while the BSF 3 SimpleBindings class from the scripting/api bundle used in a JDK 1.5 environment has a put method taking (Object, Object). Now, one fix of course is to make sure, the scripting/resolver bundler is compiled with JDK 1.5 instead of JDK 1.6. Another solution could be to use the scripting/api bundle (or the BSF 3 library) on the boot class path for the compilation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-217) Scripting Resolver bundle compiled with JDK 6 may produce NoSuchMethodError
[ https://issues.apache.org/jira/browse/SLING-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12564891#action_12564891 ] Felix Meschberger commented on SLING-217: - Ok, the Sun compiler has another - albeit non-standard - flag: -Xbootclasspath/p:, which allows prepending classes to the default boot class path. So, this configuration works on my linux (and probably also on win) box: configuration compilerArgument-Xbootclasspath/p:${project.build.directory}/dependency/bsf-api.jar/compilerArgument /configuration Can you please verify, whether this also works on Mac ? Thanks. Scripting Resolver bundle compiled with JDK 6 may produce NoSuchMethodError --- Key: SLING-217 URL: https://issues.apache.org/jira/browse/SLING-217 Project: Sling Issue Type: Improvement Components: Scripting Reporter: Felix Meschberger Assignee: Felix Meschberger Fix For: 2.0.0 Sometimes a NoSuchMethodError is thrown in the DefaultSlingScript.verifyBindings method when filling the javax.servlet.SimpleBindings object for the script evaluation. This happens, if the scripting/resolver bundle is compiled with JDK 1.6, that is the generic SimpleBindings class contained in JDK 1.6. This causes the put method to be bound to the parameters (String, Object) while the BSF 3 SimpleBindings class from the scripting/api bundle used in a JDK 1.5 environment has a put method taking (Object, Object). Now, one fix of course is to make sure, the scripting/resolver bundler is compiled with JDK 1.5 instead of JDK 1.6. Another solution could be to use the scripting/api bundle (or the BSF 3 library) on the boot class path for the compilation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: SLING-154, ScriptableNode access to Properties and JCR methods, how?
Hi all, You know, I don't really care what we do (here). But, we should not start discussing this over and over. Once we decided it would be a good idea to do the mapping the JavaScript way, that is getters are turned into (read-only) properties. To prevent the collisions, that Bertrand mentioned, we agreed to insert synthetic objects (properties, children). Now, I am perfectly fine going back to not having the methods be properties and access properties and child nodes as properties of the node - which is equally natural, of course. But then, we should finally keep it one way or the other, ok ? BTW: If a node has a child node and property with the same name, the node is returned and not the property. And of course, this mechanism will most probably not easily support SNS, which should not be used anyway ;-) What do others thinkg ? Regards Felix Am Freitag, den 01.02.2008, 15:27 +0100 schrieb David Nuescheler: Hi Bertrand, The simplest way might be to require the use of node.getPath() instead of node.path, and use javascript property names for content access only, not for JCR getters. I completely agree to that solution. I think I have a strong bias for using node.propname for accessing the properties and the node.childnodename for child nodes. One of the reasons to resolve the issue this way is that this would allow compatibility between ujax (jst) and .esp when it comes to content access. (especially if we would introduce a currentNode on the server side aswell) I think accessing the original Node methods with node.getPath, node.getSession() is perfectly acceptable. regards, david
[jira] Commented: (SLING-213) ujax post servlet should respond with status page instead of default redirect
[ https://issues.apache.org/jira/browse/SLING-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12564900#action_12564900 ] Felix Meschberger commented on SLING-213: - Cannot continue until the correct behaviour after a successfull POST is resolved. See the dev mailing list for more information. http://markmail.org/message/karoj6hiwtca3n3x ujax post servlet should respond with status page instead of default redirect - Key: SLING-213 URL: https://issues.apache.org/jira/browse/SLING-213 Project: Sling Issue Type: Improvement Components: microsling Reporter: Tobias Bocanegra Assignee: Felix Meschberger Attachments: ujax_post.r616964-1.patch it is desirable that the ujax post serlvet responds with a status page rather than with a default redirect. this allows clients (javascript+formpost or ajax based) to react better on the modifications. will provide a patch for the post servlet that responds with that status page. the old redirect behavior can still be achieved by sending a ujax:redirect=* input parameter. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-168) Add fileupload to ujax post servlet
[ https://issues.apache.org/jira/browse/SLING-168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tobias Bocanegra closed SLING-168. -- Add fileupload to ujax post servlet --- Key: SLING-168 URL: https://issues.apache.org/jira/browse/SLING-168 Project: Sling Issue Type: Improvement Components: microsling Reporter: Tobias Bocanegra Assignee: Bertrand Delacretaz Attachments: fileupload-r612570.patch currently uploaded files are handled like 'normal' fields and their value is read via the MultipartPostParameter's getString(). the result is that the properties get the string content of the uploaded files. i think this is not what people want. i suggest to implement a default behaviour that creates an 'nt:file' subnode for that uploaded file if the parent node is a nt:folder, or create a nt:resource otherwise. form action=/home/tripod/profile method=post enctype=multipart/form-data input type=file name=./portrait / /form results in : + home + tripod [nt:folder] + portrait [nt:file] + jcr:content [nt:resource] - jcr:data (data of uploaded file) or: + home + tripod [nt:unstructured] + portrait [nt:resource] - jcr:data (data of uploaded file) if the name is not specified, i.e. has an /* suffix, the name of the uploaded file is used for node creation. if the file is not uploaded at all, the node is not deleted. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-158) NPE in SlingIOProvider if resource does not exist
[ https://issues.apache.org/jira/browse/SLING-158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tobias Bocanegra closed SLING-158. -- NPE in SlingIOProvider if resource does not exist - Key: SLING-158 URL: https://issues.apache.org/jira/browse/SLING-158 Project: Sling Issue Type: Bug Components: JSP Reporter: Tobias Bocanegra Assignee: Felix Meschberger for example when resolving a tag library: Caused by: java.lang.NullPointerException at org.apache.sling.scripting.jsp.SlingIOProvider.getInputStream(SlingIOProvider.java:96) at org.apache.sling.scripting.jsp.jasper.compiler.TagLibraryInfoImpl.getResourceAsStream(TagLibraryInfoImpl.java:120) at org.apache.sling.scripting.jsp.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:155) at org.apache.sling.scripting.jsp.jasper.compiler.Parser.parseTaglibDirective(Parser.java:420) at org.apache.sling.scripting.jsp.jasper.compiler.Parser.parseDirective(Parser.java:476) at org.apache.sling.scripting.jsp.jasper.compiler.Parser.parseElements(Parser.java:1426) at org.apache.sling.scripting.jsp.jasper.compiler.Parser.parse(Parser.java:133) Suggested patch: Index: src/main/java/org/apache/sling/scripting/jsp/SlingIOProvider.java === --- src/main/java/org/apache/sling/scripting/jsp/SlingIOProvider.java (revision 612138) +++ src/main/java/org/apache/sling/scripting/jsp/SlingIOProvider.java (working copy) @@ -93,6 +93,9 @@ throws FileNotFoundException, IOException { try { Resource resource = getResourceInternal(fileName); +if (resource == null) { +throw new FileNotFoundException(Cannot find + fileName); +} InputStream stream = resource.adaptTo(InputStream.class); if (stream == null) { throw new FileNotFoundException(Cannot find + fileName); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-180) ujax post servlet: add @DefaultValue hint for empty strings
[ https://issues.apache.org/jira/browse/SLING-180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tobias Bocanegra closed SLING-180. -- ujax post servlet: add @DefaultValue hint for empty strings --- Key: SLING-180 URL: https://issues.apache.org/jira/browse/SLING-180 Project: Sling Issue Type: Improvement Components: microsling Reporter: Tobias Bocanegra Attachments: launchpad-r614568.patch [from http://comments.gmane.org/gmane.comp.apache.sling.devel/1909] the current ujax post servlet writes back all eligible input values to their respective properties. if the input values are empty strings, properties with empty strings are created. i think this behavior is not always desired. absent properties might mean something different than properties with empty strings (null vs. ). i can imagine the opposite, too. where applications want all properties to be filled in. this problem is even more important when dealing with non-string properties. e.g. a number input which is not filled in, does not automatically mean '0'. there are several ways how to control this behavior: 1) do not include 'empty' values in the post. this requires some javascript preprocessing of the form which removes the empty inputs or mangles their names (i.e. removing the 'saveprefix'). 2) ignore empty strings for non-existent, non-mandatory properties. this way, no superfluous properties are created. but the application must be aware of the fact that empty values might not create the properties. if a property is already set, sending an empty string would of course not remove the property but modify its value. 3) treat empty strings as 'null' value this means, that empty strings do not create empty properties and delete existing (non-mandatory) properties. I think all the above could be handled with a default value hint: ./[EMAIL PROTECTED] = -- treat them as empty strings (1). ./[EMAIL PROTECTED] = ujax:ignore -- ignore them (2) ./[EMAIL PROTECTED] = ujax:null -- remove them (3) where the first would remain the default behavior. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-202) osgi install action deletes temp file before it gets installed
[ https://issues.apache.org/jira/browse/SLING-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tobias Bocanegra closed SLING-202. -- osgi install action deletes temp file before it gets installed -- Key: SLING-202 URL: https://issues.apache.org/jira/browse/SLING-202 Project: Sling Issue Type: Bug Components: Console Reporter: Tobias Bocanegra Assignee: Felix Meschberger Fix For: 2.0.0 sometimes it happens that when uploading a new bundle it just doesn't get installed. this problem occurs more often when i'm using for example curl to upload it. i think the problem is that the request-thread deletes the file before the install thread gets hold of it. when i remove the tmpFile.delete finally block, it works just fine. Index: console-web/src/main/java/org/apache/sling/osgi/console/web/internal/core/InstallAction.java === --- console-web/src/main/java/org/apache/sling/osgi/console/web/internal/core/InstallAction.java (revision 615347) +++ console-web/src/main/java/org/apache/sling/osgi/console/web/internal/core/InstallAction.java (working copy) @@ -99,10 +99,9 @@ } // install the bundle now -File tmpFile = null; try { // copy the data to a file for better processing -tmpFile = File.createTempFile(install, .tmp); +File tmpFile = File.createTempFile(install, .tmp); bundleItem.write(tmpFile); bundleLocation = inputstream: + bundleItem.getName(); @@ -110,10 +109,6 @@ } catch (Exception e) { getLog().log(LogService.LOG_ERROR, Problem accessing uploaded bundle file, e); -} finally { -if (tmpFile != null) { -tmpFile.delete(); -} } return true; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (SLING-194) use default format for JSON resource loader
[ https://issues.apache.org/jira/browse/SLING-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tobias Bocanegra updated SLING-194: --- Attachment: loader-xjson.r616687.patch providing patch for Loader that implements content loading from default json serialized content. currently uses special extension: .xjson use default format for JSON resource loader Key: SLING-194 URL: https://issues.apache.org/jira/browse/SLING-194 Project: Sling Issue Type: Improvement Components: Repository Reporter: Tobias Bocanegra Attachments: loader-xjson.r616687.patch the current org.apache.sling.jcr.resource.internal.loader.JsonReader has a pretty simple format for loading content from the bundles into the repository. the pain is that if you already have repository content, you can't create just a JSON dump and put it in the resource. suggest to change the JsonReader to accept a JSON dump as provided by a JSON content export by the default servlet. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-205) launcher/app and launchpad/launchpad-webapp delete 'sling' directory when invoking from sling-builder
[ https://issues.apache.org/jira/browse/SLING-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tobias Bocanegra closed SLING-205. -- launcher/app and launchpad/launchpad-webapp delete 'sling' directory when invoking from sling-builder - Key: SLING-205 URL: https://issues.apache.org/jira/browse/SLING-205 Project: Sling Issue Type: Bug Reporter: Tobias Bocanegra Assignee: Carsten Ziegeler Attachments: lp-webapp-it-fix.patch Original Estimate: 0h Remaining Estimate: 0h the clean plugin does not correctly handle relative paths in the additional fileset configuration and uses them PWD relative. the launcher/app and the launchpad-webapp have an additional fileset config to delete the 'sling' working directory. when invoking a mvn clean inside the builder removes the 'sling' code directory if those modules are not excluded from build. the fix is to add the ${basedir} explicitly in the config: Index: launcher/app/pom.xml === --- launcher/app/pom.xml(revision 615464) +++ launcher/app/pom.xml(working copy) @@ -61,7 +61,7 @@ configuration filesets fileset -directorysling/directory +directory${basedir}/sling/directory /fileset /filesets /configuration Index: launchpad/launchpad-webapp/pom.xml === --- launchpad/launchpad-webapp/pom.xml (revision 615464) +++ launchpad/launchpad-webapp/pom.xml (working copy) @@ -79,7 +79,7 @@ configuration filesets fileset - directorysling/directory + directory${basedir}/sling/directory /fileset /filesets /configuration -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: SLING-213 vs. SLING-126
hi, i've discussed this with david extensively and since he was the inventor of the ujax (former rjax) protocol he thinks now that the proposal to use the referer as default redirect is not useful. it was also david that proposed the html response which is of a format that it is human (browser response), machine (xml) and dhtml (javascript) readable. i think it would be great to apply the patch of SLING-213 and forget about the referer stuff of SLING-126. regards, toby On 2/1/08, Felix Meschberger [EMAIL PROTECTED] wrote: Hi all, I am trying to apply the patch of SLING-213 [1], which conains a rewrite of the ujax POST servlet. There is just one issue with this patch, which I would like to sort out on the list. This patch changes the response behaviour of the POST requests as follows: * The default response is a status 200 response containing a list of changes in HTML format * Setting the ujax:redirect request parameter to * causes a 302 (temporary redirect) to the modified/created node * Setting ujax:redirect to an URL causes a 302 (temporary redirect) to the given URL This setting collides, with what was intended by SLING-126 [2], where a redirect to the Referer URL was postulated. I would now like to resolve this issue of the response to a POST request. Can you please enlighten me on that front ? My personal opinion would be to get redirected to the Referer by default (this is the standard GUI case, probably), with an option to redirect to a possibly newly created node (ujax:redirect is *) or - in the Ajax case - get a machine readable response, JSON that is. WDYT ? Regards Felix [1] http://issues.apache.org/jira/browse/SLING-213 [1] http://issues.apache.org/jira/browse/SLING-126 -- - [EMAIL PROTECTED] --- Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel T +41 61 226 98 98, F +41 61 226 98 97 --- http://www.day.com ---