0

I'm new to and wso2. I tried this post. But I got the following error after deploying MediCom.war in Tomcat 7.0.10 and login to the medi_home.jsp via /localhost/MediCom/WebContent/index.jsp.

An error occurred at line: 6 in the generated java file
Only a type can be imported. org.xacmlinfo.xacml.pep.agent.PEPAgent resolves to a package

An error occurred at line: 7 in the generated java file
Only a type can be imported. com.medi.sample.webapp.client.PEPClient resolves to a package

An error occurred at line: 13 in the jsp file: /WebContent/medi_home.jsp
PEPClient cannot be resolved to a type
10: 
11:     String[] staticActionsInPage = new String[] {"create", "read", "update", "delete"};
12:     
13:     PEPClient client = new PEPClient();
14:     List<String> allowedActions = client.getAllowedResources(userName, staticActionsInPage);

Thanks in advance!

Community
  • 1
  • 1

1 Answers1

1

It seems you only have downloaded the web project and not other dependent projects.

There are two ways you can get rid of this error.

1) go to this url : https://svn.wso2.org/repos/wso2/people/asela/xacml/pep/simple-agent/target/

download the jar file and add in your project, its the file which contains this PEPAgent class you are looking for.

Actually, PEP is one of the component in XACML architecture which will enforce your application to get authorized with Identity server using XACMl.

The PEP used in the sample you are using is entire differnet project, you can found the whole project here : https://svn.wso2.org/repos/wso2/people/asela/xacml/pep/simple-agent if you go through with the classes and code you will get more understanding.

In this link : https://svn.wso2.org/repos/wso2/people/asela/xacml/sample/healthcare/

you will find other projects which are used in your webapp sample. They all are maven projects so you can add as a dependency in your main project if you want.

Best of luck

Budhh
  • 153
  • 8
  • Thanks a lot! Actually I've already added "com.medi.sample.service.stub-1.0.0.jar","org.xacmlinfo.xacml.pep.agent-1.0.0.jar","org.xacmlinfo.xacml.axis2.handler-1.0.0.mar" to web-inf\lib folder and java build path. now i'm trying to deploy MediCom.war file to tomcat. – user3128302 Jan 01 '15 at 04:05
  • You are welcome!! Please accept the answer if it resolved your issue and let me know if have any other issue. – Budhh Jan 01 '15 at 12:42
  • Please, deployed with tomcat 7.0.10. I can see the medihome.jsp after logging in via index.jsp. But I can't see any service and just see "Welcome to Patient Data Service". – user3128302 Jan 05 '15 at 02:46
  • Now, I can see the services according to type of login user.but I got the error "Unable to engage module : XACMLModule". What's wrong? I'm new to wso2 and xacml.Please help me!!! – user3128302 Jan 29 '15 at 03:50
  • After logging in as physician user, I can see the "View Record" and "Update Record" service. But I got the following error message in "view_records.jsp" while I'm trying to browse the patient's record(Patient Id: PId_11). I inserted in "patient_data" table with this patient id. "medi_request_failed.jsp" Sorry. You can not perform this action Unable to engage module : XACMLModule Please Try Again org.apache.axis2.AxisFault: Unable to engage module : XACMLModule at – user3128302 Mar 06 '15 at 08:38
  • Please I completed all steps as your answer. but i got the "user is not authorized to perform this action" to view and edit patient's record from both patient user and physician user console. Please help me. Thanks!!! – user3128302 Mar 26 '15 at 07:45