I have a EJB in one SCA and a servlet in another SCA. I want to use the EJB in the servlet.
In the NWDS Development Infrastructure perspective I set the access restriction of the EJB to unrestricted. Then I added a dependency in the servlet in order to be able to access the bean. The servlet recognizes the bean classes but in the source code NWDS shows the error:
Access restriction: The type MyBean is not accessible due to restriction on required project MyBeanProject
Any idea how to set access control correctly or is the approach in general not correct?
Are the permissions on the dc and the permissions of the public part set correctly?
If the SAP DC build works fine but only the Eclipse (NWDS) build fails, it might be a nasty eclipse bug.
If you are working with NWDI, remove the EAR-DC from client and create the project again.
If your NWDS is standalone, try to "touch" (=manually edit inside NWDS) the ".classpath" file of the servlet DC or try to temporarily change the order of the java build path (which makes eclipse clear some disordered cache).
the permissions on the DC and on the public part are set to unrestricted. I tried to play with the permissions but without success.
The build of the client DC in NWDS Development Infrastructure perspective fails, so I'm not sure if this could be a NWDS bug.
I'm not using NWDI so this can not be the reason.
Any other idea?
Hi I too faced the same issue, but got a work around.
In the ear project that is depending on the ejb project, i created a public part compilation and referenced the ebj project's compilation public part in it.
Now, in the DC where i want to use this class, i created the dependency to the ear project instead of the ejb project, then the error didn't come.