You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Berner, Nicolas" <Be...@secaron.de> on 2009/01/08 14:16:06 UTC

[AXIS2] Repository Problem

Hi!

 

I´m just learning to use Axis2 in combination with rampart.

I have a service FlexSimple running and it is configured to include a timestamp into each outgoing SOAP-message.

Wiring the message over tcpmon one can see that it works fine.

On the client-side I have the consuming FlexSimpleClient which works without rampart (tested before engaging rampart on the server-side). Take a look at the code:

 

public static Student holeStudent(String name){

            Student studi = null;

            try {

                  ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem("D:\\Appserver\\apache-tomcat-6.0.18\\webapps\\axis2\\WEB-INF", "conf/client.axis2.xml" );               

                  FlexSimpleStub.GetStudentResponse response;

                  System.out.println(ctx.getAxisConfiguration().isEngaged("rampart"));

                  FlexSimpleStub stub = new FlexSimpleStub(ctx, TARGET_EPR);

                  GetStudent getStudent = new GetStudent();

                  getStudent.setName(name);

                  response = stub.getStudent(getStudent);

                  studi = response.get_return();

            } catch (AxisFault e) {

                  e.printStackTrace();

            } catch (RemoteException e) {

                  e.printStackTrace();

            }

            

            return studi;

      }

This code works fine.

 

My problem is the given repository. In the code above I use the repostiory of the axis2-web-application within the tomcat-container.

Isn´t it possible to use an own repository? I thought it is possible to create a folder "repository" and use this folder as first argument when instantiating the ConfigurationContext.

 

Repository

|---modules

    |--addressing-1.4.1.mar

    |--rampart-1.4.mar

 

Example:

ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem("repository", "conf/client.axis2.xml" );

 

When I try this I get the following Exception:

org.apache.axis2.AxisFault: The system is attempting to engage a module that is not available: rampart

      at org.apache.axis2.engine.AxisConfiguration.engageModule(AxisConfiguration.java:464)

      at org.apache.axis2.engine.AxisConfiguration.engageGlobalModules(AxisConfiguration.java:591)

      at org.apache.axis2.deployment.DeploymentEngine.engageModules(DeploymentEngine.java:615)

      at org.apache.axis2.deployment.FileSystemConfigurator.engageGlobalModules(FileSystemConfigurator.java:142)

      at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:81)

      at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184)

      at test.flex.client.ServiceClient.holeStudent(ServiceClient.java:53)

      at test.flex.client.ServiceClient.main(ServiceClient.java:16)

 

It seems that Axis2 finds the addressing-module but there is a problem with the rampart-module.

Does anyone know why I can´t use my "own" repository?

 

Best regards
Nicolas Berner


Secaron AG
Ludwigstr. 45 
85399 Hallbergmoos
Tel. +49 811 9594 - 170

Fax +49 811 9594 - 220
__________________________________
 
Secaron AG, Hallbergmoos - Amtsgericht München - HRB130366
Aufsichtsratsvorsitzender: Jochen Speek - Vorstand: Michael Spreng (Vorsitzender), Herbert Pröll

 


Re: [AXIS2] Repository Problem

Posted by Nandana Mihindukulasooriya <na...@gmail.com>.
Hi Nicolos,
       Just to make sure, do you have rampart-core,rampart-policy and
rampart-trust jar files in your class path ?
Otherwise, Rampart can't get initialize and will be deployed as a faulty
module.

thanks,
nandana

On Tue, Jan 27, 2009 at 3:45 AM, treehugger <cd...@gmail.com> wrote:

>
> Nicolas,
>     I seem to be in the same place that you describe.  Have you been able
> to get past this issue?
>
>     I try to access my service which is now using rampart security using a
> web browser and I get this:
>
> javax.servlet.ServletException: The system is attempting to engage a module
> that is not available: rampart
>
>  org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
>
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>
>  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
>
>  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
>
>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>
>
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>
>
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>
>
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>        java.lang.Thread.run(Thread.java:619)
>
> If I remove the rampart module it works fine.
>
>
> --
> Christian Day
> Gavant Software
> Troy, NY
>
>
> Berner, Nicolas wrote:
> >
> > Hi!
> >
> >
> >
> > I´m just learning to use Axis2 in combination with rampart.
> >
> > I have a service FlexSimple running and it is configured to include a
> > timestamp into each outgoing SOAP-message.
> >
> > Wiring the message over tcpmon one can see that it works fine.
> >
> > On the client-side I have the consuming FlexSimpleClient which works
> > without rampart (tested before engaging rampart on the server-side). Take
> > a look at the code:
> >
> >
> >
> > public static Student holeStudent(String name){
> >
> >             Student studi = null;
> >
> >             try {
> >
> >                   ConfigurationContext ctx =
> >
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("D:\\Appserver\\apache-tomcat-6.0.18\\webapps\\axis2\\WEB-INF",
> > "conf/client.axis2.xml" );
> >
> >                   FlexSimpleStub.GetStudentResponse response;
> >
> >
> > System.out.println(ctx.getAxisConfiguration().isEngaged("rampart"));
> >
> >                   FlexSimpleStub stub = new FlexSimpleStub(ctx,
> > TARGET_EPR);
> >
> >                   GetStudent getStudent = new GetStudent();
> >
> >                   getStudent.setName(name);
> >
> >                   response = stub.getStudent(getStudent);
> >
> >                   studi = response.get_return();
> >
> >             } catch (AxisFault e) {
> >
> >                   e.printStackTrace();
> >
> >             } catch (RemoteException e) {
> >
> >                   e.printStackTrace();
> >
> >             }
> >
> >
> >
> >             return studi;
> >
> >       }
> >
> > This code works fine.
> >
> >
> >
> > My problem is the given repository. In the code above I use the
> repostiory
> > of the axis2-web-application within the tomcat-container.
> >
> > Isn´t it possible to use an own repository? I thought it is possible to
> > create a folder "repository" and use this folder as first argument when
> > instantiating the ConfigurationContext.
> >
> >
> >
> > Repository
> >
> > |---modules
> >
> >     |--addressing-1.4.1.mar
> >
> >     |--rampart-1.4.mar
> >
> >
> >
> > Example:
> >
> > ConfigurationContext ctx =
> >
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("repository",
> > "conf/client.axis2.xml" );
> >
> >
> >
> > When I try this I get the following Exception:
> >
> > org.apache.axis2.AxisFault: The system is attempting to engage a module
> > that is not available: rampart
> >
> >       at
> >
> org.apache.axis2.engine.AxisConfiguration.engageModule(AxisConfiguration.java:464)
> >
> >       at
> >
> org.apache.axis2.engine.AxisConfiguration.engageGlobalModules(AxisConfiguration.java:591)
> >
> >       at
> >
> org.apache.axis2.deployment.DeploymentEngine.engageModules(DeploymentEngine.java:615)
> >
> >       at
> >
> org.apache.axis2.deployment.FileSystemConfigurator.engageGlobalModules(FileSystemConfigurator.java:142)
> >
> >       at
> >
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:81)
> >
> >       at
> >
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184)
> >
> >       at
> test.flex.client.ServiceClient.holeStudent(ServiceClient.java:53)
> >
> >       at test.flex.client.ServiceClient.main(ServiceClient.java:16)
> >
> >
> >
> > It seems that Axis2 finds the addressing-module but there is a problem
> > with the rampart-module.
> >
> > Does anyone know why I can´t use my "own" repository?
> >
> >
> >
> > Best regards
> > Nicolas Berner
> >
> >
> > Secaron AG
> > Ludwigstr. 45
> > 85399 Hallbergmoos
> > Tel. +49 811 9594 - 170
> >
> > Fax +49 811 9594 - 220
> > __________________________________
> >
> > Secaron AG, Hallbergmoos - Amtsgericht München - HRB130366
> > Aufsichtsratsvorsitzender: Jochen Speek - Vorstand: Michael Spreng
> > (Vorsitzender), Herbert Pröll
> >
> >
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/-AXIS2--Repository-Problem-tp21351606p21674006.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Nandana Mihindukulasooriya
WSO2 inc.

http://nandana83.blogspot.com/
http://www.wso2.org

Re: [AXIS2] Repository Problem

Posted by treehugger <cd...@gmail.com>.
Nicolas,
     I seem to be in the same place that you describe.  Have you been able
to get past this issue?

     I try to access my service which is now using rampart security using a
web browser and I get this:

javax.servlet.ServletException: The system is attempting to engage a module
that is not available: rampart
	org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
	java.lang.Thread.run(Thread.java:619)

If I remove the rampart module it works fine.


--
Christian Day
Gavant Software
Troy, NY


Berner, Nicolas wrote:
> 
> Hi!
> 
>  
> 
> I´m just learning to use Axis2 in combination with rampart.
> 
> I have a service FlexSimple running and it is configured to include a
> timestamp into each outgoing SOAP-message.
> 
> Wiring the message over tcpmon one can see that it works fine.
> 
> On the client-side I have the consuming FlexSimpleClient which works
> without rampart (tested before engaging rampart on the server-side). Take
> a look at the code:
> 
>  
> 
> public static Student holeStudent(String name){
> 
>             Student studi = null;
> 
>             try {
> 
>                   ConfigurationContext ctx =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("D:\\Appserver\\apache-tomcat-6.0.18\\webapps\\axis2\\WEB-INF",
> "conf/client.axis2.xml" );               
> 
>                   FlexSimpleStub.GetStudentResponse response;
> 
>                  
> System.out.println(ctx.getAxisConfiguration().isEngaged("rampart"));
> 
>                   FlexSimpleStub stub = new FlexSimpleStub(ctx,
> TARGET_EPR);
> 
>                   GetStudent getStudent = new GetStudent();
> 
>                   getStudent.setName(name);
> 
>                   response = stub.getStudent(getStudent);
> 
>                   studi = response.get_return();
> 
>             } catch (AxisFault e) {
> 
>                   e.printStackTrace();
> 
>             } catch (RemoteException e) {
> 
>                   e.printStackTrace();
> 
>             }
> 
>             
> 
>             return studi;
> 
>       }
> 
> This code works fine.
> 
>  
> 
> My problem is the given repository. In the code above I use the repostiory
> of the axis2-web-application within the tomcat-container.
> 
> Isn´t it possible to use an own repository? I thought it is possible to
> create a folder "repository" and use this folder as first argument when
> instantiating the ConfigurationContext.
> 
>  
> 
> Repository
> 
> |---modules
> 
>     |--addressing-1.4.1.mar
> 
>     |--rampart-1.4.mar
> 
>  
> 
> Example:
> 
> ConfigurationContext ctx =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("repository",
> "conf/client.axis2.xml" );
> 
>  
> 
> When I try this I get the following Exception:
> 
> org.apache.axis2.AxisFault: The system is attempting to engage a module
> that is not available: rampart
> 
>       at
> org.apache.axis2.engine.AxisConfiguration.engageModule(AxisConfiguration.java:464)
> 
>       at
> org.apache.axis2.engine.AxisConfiguration.engageGlobalModules(AxisConfiguration.java:591)
> 
>       at
> org.apache.axis2.deployment.DeploymentEngine.engageModules(DeploymentEngine.java:615)
> 
>       at
> org.apache.axis2.deployment.FileSystemConfigurator.engageGlobalModules(FileSystemConfigurator.java:142)
> 
>       at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:81)
> 
>       at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184)
> 
>       at test.flex.client.ServiceClient.holeStudent(ServiceClient.java:53)
> 
>       at test.flex.client.ServiceClient.main(ServiceClient.java:16)
> 
>  
> 
> It seems that Axis2 finds the addressing-module but there is a problem
> with the rampart-module.
> 
> Does anyone know why I can´t use my "own" repository?
> 
>  
> 
> Best regards
> Nicolas Berner
> 
> 
> Secaron AG
> Ludwigstr. 45 
> 85399 Hallbergmoos
> Tel. +49 811 9594 - 170
> 
> Fax +49 811 9594 - 220
> __________________________________
>  
> Secaron AG, Hallbergmoos - Amtsgericht München - HRB130366
> Aufsichtsratsvorsitzender: Jochen Speek - Vorstand: Michael Spreng
> (Vorsitzender), Herbert Pröll
> 
>  
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-AXIS2--Repository-Problem-tp21351606p21674006.html
Sent from the Axis - User mailing list archive at Nabble.com.


Re: [AXIS2] Repository Problem

Posted by Nandana Mihindukulasooriya <na...@gmail.com>.
Hi,
  I don't see anything wrong in the way you create the configuration
context. We can use our own repository and you have followed the correct
steps. Did you add all the dependencies required by Rampart to the
classpath. Otherwise Rampart could have been deployed as a faulty module and
the following error can occur.

thanks,
nandana

On Thu, Jan 8, 2009 at 6:46 PM, Berner, Nicolas <Be...@secaron.de> wrote:

>  Hi!
>
>
>
> I´m just learning to use Axis2 in combination with rampart.
>
> I have a service FlexSimple running and it is configured to include a
> timestamp into each outgoing SOAP-message.
>
> Wiring the message over tcpmon one can see that it works fine.
>
> On the client-side I have the consuming FlexSimpleClient which works
> without rampart (tested before engaging rampart on the server-side). Take a
> look at the code:
>
>
>
> *public* *static* Student holeStudent(String name){
>
>             Student studi = *null*;
>
>             *try* {
>
>                   ConfigurationContext ctx = ConfigurationContextFactory.*
> createConfigurationContextFromFileSystem*("D:\\Appserver\\apache-tomcat-6.0.18\\webapps\\axis2\\WEB-INF",
> "conf/client.axis2.xml" );
>
>                   FlexSimpleStub.GetStudentResponse response;
>
>                   System.*out*
> .println(ctx.getAxisConfiguration().isEngaged("rampart"));
>
>                   FlexSimpleStub stub = *new* FlexSimpleStub(ctx, *
> TARGET_EPR*);
>
>                   GetStudent getStudent = *new* GetStudent();
>
>                   getStudent.setName(name);
>
>                   response = stub.getStudent(getStudent);
>
>                   studi = response.get_return();
>
>             } *catch* (AxisFault e) {
>
>                   e.printStackTrace();
>
>             } *catch* (RemoteException e) {
>
>                   e.printStackTrace();
>
>             }
>
>
>
>             *return* studi;
>
>       }
>
> This code works fine.
>
>
>
> My problem is the given repository. In the code above I use the repostiory
> of the axis2-web-application within the tomcat-container.
>
> Isn´t it possible to use an own repository? I thought it is possible to
> create a folder "repository" and use this folder as first argument when
> instantiating the ConfigurationContext.
>
>
>
> Repository
>
> |---modules
>
>     |--addressing-1.4.1.mar
>
>     |--rampart-1.4.mar
>
>
>
> Example:
>
> ConfigurationContext ctx = ConfigurationContextFactory.*
> createConfigurationContextFromFileSystem*("repository",
> "conf/client.axis2.xml" );
>
>
>
> When I try this I get the following Exception:
>
> org.apache.axis2.AxisFault: The system is attempting to engage a module
> that is not available: rampart
>
>       at org.apache.axis2.engine.AxisConfiguration.engageModule(*
> AxisConfiguration.java:464*)
>
>       at org.apache.axis2.engine.AxisConfiguration.engageGlobalModules(*
> AxisConfiguration.java:591*)
>
>       at org.apache.axis2.deployment.DeploymentEngine.engageModules(*
> DeploymentEngine.java:615*)
>
>       at
> org.apache.axis2.deployment.FileSystemConfigurator.engageGlobalModules(*
> FileSystemConfigurator.java:142*)
>
>       at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(
> *ConfigurationContextFactory.java:81*)
>
>       at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(
> *ConfigurationContextFactory.java:184*)
>
>       at test.flex.client.ServiceClient.holeStudent(*ServiceClient.java:53
> *)
>
>       at test.flex.client.ServiceClient.main(*ServiceClient.java:16*)
>
>
>
> It seems that Axis2 finds the addressing-module but there is a problem with
> the rampart-module.
>
> Does anyone know why I can´t use my "own" repository?
>
>
>
> Best regards
> Nicolas Berner
>
>
> Secaron AG
> Ludwigstr. 45
> 85399 Hallbergmoos
> Tel. +49 811 9594 - 170
>
> Fax +49 811 9594 - 220
> __________________________________
>
> Secaron AG, Hallbergmoos - Amtsgericht München - HRB130366
> Aufsichtsratsvorsitzender: Jochen Speek - Vorstand: Michael Spreng
> (Vorsitzender), Herbert Pröll
>
>
>