Dan,

I think this error has got nothing to do with running with Java 2 security
on.  See TUSCANY-2272 for a reference to the spec that says the lifecycle
methods must be public.

++Vamsi

On Wed, May 7, 2008 at 1:05 AM, Dan Becker <[EMAIL PROTECTED]> wrote:

> Vamsavardhana Reddy wrote:
>
> > I have created a JIRA TUSCANY-2296 describing the problem.  I have also
> > posted a patch file that will help understand the problem better.
> >
> > On Tue, May 6, 2008 at 8:42 PM, Kevin Williams <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Thanks for your contribution to the vtest bucket for @Init and
> > > @Destroy annotations.  Can you say why you do not use the SCADomain
> > > APIs to configure the domain and locate services from the test client?
> > >  I would like to keep this pattern consistent throughout the entire
> > > suite.
> > >
> >
> This is a somewhat related question. I am running the sample-store service
> via the given Launch class. With Java 2 security off, the example runs as
> intended. With Java 2 security on, there is a ContributionResolveException.
>  It seems that the @Init implementation scope is added to a protected
> method, not public.
>
> Here is the first part of the stack trace that I print out using a bit of
> extra debug code in JavaImplementationProcessor.resolve method.
>
> JavaImplementationProcessor.resolve
> error=org.apache.tuscany.sca.implementation.java.introspect.impl.IllegalInitException:
> Initializer must be a public method. Invalid annotation @Init found on
> protected void services.ShoppingCartImpl.init()
> org.apache.tuscany.sca.implementation.java.introspect.impl.IllegalInitException:
> Initializer must be a public method. Invalid annotation @Init found on
> protected void services.ShoppingCartImpl.init()
>        at
> org.apache.tuscany.sca.implementation.java.introspect.impl.InitProcessor.visitMethod(InitProcessor.java:57)
>        at
> org.apache.tuscany.sca.implementation.java.impl.JavaClassIntrospectorImpl.introspectClass(JavaClassIntrospectorImpl.java:99)
>        at
> org.apache.tuscany.sca.implementation.java.impl.JavaImplementationFactoryImpl.createJavaImplementation(JavaImplementationFactoryImpl.java:53)
>        at
> org.apache.tuscany.sca.implementation.java.xml.JavaImplementationProcessor.resolve(JavaImplementationProcessor.java:152)
>        at
> org.apache.tuscany.sca.implementation.java.xml.JavaImplementationProcessor.resolve(JavaImplementationProcessor.java:1)
>        at
> org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcessorExtensionPoint.java:287)
>        at
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:116)
>        at
> org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveImplementation(BaseAssemblyProcessor.java:271)
>        at
> org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:903)
>        at
> org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:1)
>
>
> I've checked the SCA_JavaAnnotationsAndAPIs_V100 specification, but I see
> no mention that this API be public. What say the SCA experts? Should these
> implementation scoped methods be public? Or do you think there should be
> more privileged blocks to allow this to run with security on? Or other?
>
> --
> Thanks, Dan Becker
>

Reply via email to