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

Konrad Windszus edited comment on SLING-4674 at 4/28/15 4:12 PM:
-----------------------------------------------------------------

Actually the slingstart-maven-plugin runs Sling in a new JVM therefore just 
starting the Maven process with debug options doesn't help. I couldn't find a 
parameter which would allow to start Sling itself in debug mode 
(https://github.com/apache/sling/blob/trunk/tooling/maven/slingstart-maven-plugin/src/main/java/org/apache/sling/maven/slingstart/run/LauncherCallable.java#L136).
 Maybe you can give me some hint on how to achieve that (and also add it to the 
readme.txt).

One thing that changed with the slingstart-maven-plugin is the port. It used to 
be 8080 (which is also the default port used when triggering individual tests). 
Could you use that port also with slingstart-maven-plugin?
Currently just triggering mvn test on the integration-test module leads to 
{code}
....
Running 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletImportTest
Checking if the required Sling services are started (timeout 62 seconds)...
(base URLs=http://localhost:8080 and http://localhost:8080; servlet context=)
{code}

Unfortunately the timeout doesn't seem to work here. 


was (Author: kwin):
Ok, I wasn't aware of the fact, that there is no forking involved when Sling is 
started. I will make that more clear in the readme.

One thing that changed with the slingstart-maven-plugin is the port. It used to 
be 8080 (which is also the default port used when triggering individual tests). 
Probably it would be good to remove the default port completely and fail with a 
good error message whenever {{mvn test}} is executed on 
launchpad.integration-tests.
Currently it rather is 
{code}
....
Running 
org.apache.sling.launchpad.webapp.integrationtest.servlets.post.PostServletImportTest
Checking if the required Sling services are started (timeout 62 seconds)...
(base URLs=http://localhost:8080 and http://localhost:8080; servlet context=)
{code}

Also I never run into the timeout of 62 seconds. 

> Launchpad Testing: Running mvn launchpad:run leads to errors
> ------------------------------------------------------------
>
>                 Key: SLING-4674
>                 URL: https://issues.apache.org/jira/browse/SLING-4674
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Launchpad Testing 7
>            Reporter: Konrad Windszus
>            Assignee: Carsten Ziegeler
>             Fix For: Launchpad Testing 7
>
>
> Running {{mvn launchpad:run}} as advised in the README.txt leads to the 
> following error:
> {code}
> [INFO] Scanning for projects...
> [INFO] 
> [INFO] Using the builder 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder
>  with a thread count of 1
> [INFO]                                                                        
>  
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Building Apache Sling Launchpad Testing 7-SNAPSHOT
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-launchpad-plugin:2.3.0:run (default-cli) @ 
> org.apache.sling.launchpad.testing ---
> [INFO] Using bundle list file from 
> /Users/kwindszus/.m2/repository/org/apache/sling/org.apache.sling.launchpad/7/org.apache.sling.launchpad-7-bundlelist.xml
> [INFO] HTTP server port: 8080
> [ERROR] Failed to Start OSGi framework
> org.osgi.framework.BundleException: Uncaught Instantiation Issue: 
> java.lang.ArrayIndexOutOfBoundsException: -1
>       at org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:251)
>       at 
> org.apache.sling.maven.projectsupport.RunMojo$2.<init>(RunMojo.java:76)
>       at 
> org.apache.sling.maven.projectsupport.RunMojo.startSling(RunMojo.java:76)
>       at 
> org.apache.sling.maven.projectsupport.AbstractLaunchpadStartingMojo.executeWithArtifacts(AbstractLaunchpadStartingMojo.java:207)
>       at 
> org.apache.sling.maven.projectsupport.AbstractUsingBundleListMojo.execute(AbstractUsingBundleListMojo.java:179)
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>       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:108)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
>       at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
>       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:483)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
>       at java.util.ArrayList.elementData(ArrayList.java:403)
>       at java.util.ArrayList.get(ArrayList.java:416)
>       at 
> org.apache.felix.framework.BundleImpl.getCurrentModule(BundleImpl.java:1046)
>       at 
> org.apache.felix.framework.BundleImpl.getSymbolicName(BundleImpl.java:863)
>       at 
> org.apache.sling.launchpad.base.impl.SlingFelix.getSymbolicName(SlingFelix.java:32)
>       at org.apache.felix.framework.Felix.toString(Felix.java:1012)
>       at org.apache.felix.framework.Logger.doLog(Logger.java:128)
>       at org.apache.felix.framework.Logger._log(Logger.java:181)
>       at org.apache.felix.framework.Logger.log(Logger.java:114)
>       at 
> org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:201)
>       at org.apache.felix.framework.Felix.<init>(Felix.java:374)
>       at 
> org.apache.sling.launchpad.base.impl.SlingFelix.<init>(SlingFelix.java:39)
>       at 
> org.apache.sling.launchpad.base.impl.Sling.createFramework(Sling.java:358)
>       at org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:227)
>       ... 25 more
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 4.298 s
> [INFO] Finished at: 2015-04-28T11:36:49+01:00
> [INFO] Final Memory: 22M/234M
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Java VM is shutting down
> {code}
> It happens with Maven 3.2.1 (Java 1.8.0_05) on Mac OS X.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to