[ 
https://issues.apache.org/jira/browse/SLING-3660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu reopened SLING-3660:
------------------------------------


This has caused the ContentImportTest to fail:

{code}java.lang.reflect.InvocationTargetException
        at 
org.apache.sling.ide.eclipse.ui.internal.ImportRepositoryContentAction.run(ImportRepositoryContentAction.java:92)
        at 
org.apache.sling.ide.test.impl.ContentImportTest.importFilesAndFoldersRespectsVltFilters(ContentImportTest.java:125)
        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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
        at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
        at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
        at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at 
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
        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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
        at 
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
        at 
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
        at 
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:123)
        at 
org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:86)
        at 
org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.runTests(AbstractUITestApplication.java:44)
        at 
org.eclipse.e4.ui.internal.workbench.swt.E4Testable$1.run(E4Testable.java:72)
        at java.lang.Thread.run(Thread.java:744)
Caused by: org.eclipse.core.runtime.CoreException: Server not started, please 
start server first.
        at 
org.apache.sling.ide.eclipse.core.ServerUtil.getConnectedRepository(ServerUtil.java:132)
        at 
org.apache.sling.ide.eclipse.ui.internal.ImportRepositoryContentAction.run(ImportRepositoryContentAction.java:90)
        ... 40 more{code}

I'll follow-up with a fix for the tests.

> Refine 'connected' state of a (vlt) repository, cache node types after 
> disconnection properly
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-3660
>                 URL: https://issues.apache.org/jira/browse/SLING-3660
>             Project: Sling
>          Issue Type: Improvement
>          Components: IDE
>            Reporter: Stefan Egli
>            Assignee: Stefan Egli
>             Fix For: Sling Eclipse IDE 1.0.0
>
>
> Currently the ServerUtil.getDefaultRepository always returns a valid 
> repository with which you can do getNodeTypeRegistry() and that in turn 
> connects to the server and loads the node types. This seemed convenient.
> But the problem is, it doesn't give the user any control when to connect to 
> the server and when not. And it will result in connection errors at places 
> where the user maybe didn't intend or know that a connection would be done.
> Hence a new, simpler schema:
>  * when the server is stopped, no 'repository connection' is being 
> established, including for the node type registry
>  ** hence, with a stopped server, the node type registry can be null - hence 
> some actions require adjustments for that situation
>  * when the server is started ('connected to'), the repository is connected 
> and the node type registry loaded
>  ** at this stage the node type registry can be used for various actions, 
> including code completion, property type display
>  * when the server is stopped again, the node type registry is cached and 
> still provided to the various actions (without any server interaction going 
> on though)
> This should be more intuitive and make initial content-browsing in 'offline 
> mode' simpler



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to