felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Phillips" <lcphill...@praxiseng.com>
Subject Axis2 / WSDL on OSGi
Date Tue, 09 Mar 2010 16:02:17 GMT
Hi,

Figured I'd retitle the thread....   Just posting back...

So, I modified the Axis 2 wsdl generated code and threw in printf()'s ('er, System.out's)
and trapped the Throwables throughout...

Turns out, the actual error/exception/throwable is a class-not-found on javax.xml.naming...

Now, javax.xml.naming (as well as a ton of other stuff) is in the bundle, embedded, with bundle
class path et al... also, the class loader was passed to context class loader...   I did mention
this is inherited code, didn't I ?

Anyway, yeah, I can go down the diagnostic path of bundle class path and context class loaders
and what have you trying to figure out why javax.xml.naming can't be found... And, there's
boot delegation as well...

I figure there are some axis2 folk out there who could chime in and happen to know the recommended
/ suggested quick answer...

Much appreciated, Craig Phillips


-----Original Message-----
From: Craig Phillips [mailto:lcphillips@praxiseng.com]
Sent: Tue 3/9/2010 9:44 AM
To: dev@felix.apache.org
Subject: RE: The activate method has thrown an exception
 
Hi,

re: DOSGI... Well, I'm not going that far (yet / at this time)... It looks really interesting,
but that's off topic for me right now...

I did some preliminary surfing and found this:

------------------------------------------------------------------------------------------------------------
Well, i solved it just putting the following lines above my webservice
method caller...:

[WebPermission(SecurityAction.Assert, Unrestricted = true)]
[EnvironmentPermission(SecurityAction.Assert, Unrestricted = true)]

And i trusted my assembly in the client machine using a Strong name key
generated by the sn.exe. In the .net framework configuration i created
a new codegroup called "MyComponent", using the membership condiction
type as Strong Name and the Permission Set equal Full trust.
------------------------------------------------------------------------------

Unfortunately, I don't know what that all means, at least in terms of OSGi; And, it appears
1.6 and I'd like something that doesn't require 1.6 based language constructs...

???   My gut feeling tells me I either have a config.properties setting or I modify the jvm
parameters on java startup ???

I appreciate all the feedback/help... If I manage to figure it out, I'll post back... much
appreciated, Craig



From: Justin Edelson
Sent: Tue 3/9/2010 9:33 AM
To: dev@felix.apache.org
Subject: Re: The activate method has thrown an exception


Hi.

On 3/9/10 9:30 AM, Craig Phillips wrote:
> Hi,
> 
> Well, I sort of need to get at what the actual exception is...  I moved the wsdl service
instantiation code from the activator to a separate method, which is invoked from within a
client's bind method... Unfortunately, all that did was move the problem... I got a similar
behavior from SCR there: "the client bind method has thrown an exception"...
> 
> My gut is there's some sort of config.properties / possibly security setting in order
to instantiate a wsdl service from within an OSGi / SCR-based container...
There's DOSGI. CXF has an implementation:
http://cxf.apache.org/distributed-osgi.html

> 
> Interestingly, I wrapped the wsdl instantiation within a try-catch, but apparently the
exception is caught by SCR first, and so the execution stack is hi jacked - thus, my catch{}
block is never executed;
Hmm. This would indicate that you're either catching the wrong exception
type or in the wrong place in your code.
> 
> If there are any wsdl experts out there?       Appreciate the feedback/reply, Craig

HTH,

Justin

> 
> 
> 
> From: Felix Meschberger
> Sent: Tue 3/9/2010 8:52 AM
> To: dev@felix.apache.org
> Subject: Re: The activate method has thrown an exception
> 
> 
> Hi Craig,
> 
> The problem seems to be, that in the activate() method an exception is
> thrown, which is not handled inside the activate() method.
> 
> As a consequence SCR catches the problem and logs said message. As a
> further consequence the component is not considered activated and thus
> the deactivate method will never be called.
> 
> Hope this helps.
> 
> Regards
> Felix
> 
> On 09.03.2010 14:41, Craig Phillips wrote:
>> Hi,
>>
>> Felix 201 / SCR1.4.0...   I'm attempting to connect to a wsdl service from within
the activate() method (don't ask / inherited code, although I'm open to suggestions)..
>>
>> I am getting this message to log4j:  "The activate method has thrown an exception"...
>>
>> I did find one post a la google-surf back to felix and it suggests a security related
issue... There is apparently a fix, from what I can tell, but it seemed that was for felix2.1.0
(no officially released)...
>>
>> Can someone shed some light / provide advisement?
>>
>> Thanks, Craig Phillips
>>
> 




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message