cancel
Showing results for 
Search instead for 
Did you mean: 

need advice for building jsf project with alfresco

mmrs
Champ in-the-making
Champ in-the-making
hi all
I want to build a project dealing with alfresco repository, starting with login page and other required authentication services,
so what is the best  way i can do that with alfresco?? basically i tried to build a jsf login page that interfaces interacting with repository
i used some jar file that allow me to authenticate, create, and edit users. the jar file alone works fine, but when i use it in my login page it doesn't !!
and the following exception appear :


SEVERE: #{crcLogin.login}: javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: com/deltamatics/crc/services/AlfUserServices
javax.faces.FacesException: #{crcLogin.login}: javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: com/deltamatics/crc/services/AlfUserServices
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
   at javax.faces.component.UICommand.broadcast(UICommand.java:312)
   at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
   at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
   at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
   at java.lang.Thread.run(Unknown Source)
Caused by: javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: com/deltamatics/crc/services/AlfUserServices
   at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
   … 21 more
the package "com/deltamatics/crc/services/AlfUserServices" exist in the jar file and contains all the classes i need.
i dont know y it gives NoClassDefFoundError since i imported that jars and the eclips can see its classes ?!
i try to fix it but at the end i think that this approch is wrong; because the jar file is dealling with alfresco repository from the inside (i think). 
the processes here is out of the box and i read that web script is suitable for such a case, so can i use it to build my project ??
i appreciate any advice, explanation or correction here.
thnx in advance
mmrs
1 REPLY 1

t_broyer
Champ in-the-making
Champ in-the-making
If you want to "embed" Alfresco in your app (i.e. build upon Alfresco repository, but not use what's now known as the "Alfresco Explorer" application), then you can start with an Alfresco Explorer and remove everything you don't need. This way, you can use JSF if you really want to go this, er…, broken way (my own opinion about JSF, shared with many other people around the world).

If you want to still be able to use the "Alfresco Explorer" (which I recommend you; be it for administrators only), then I'd suggest starting with SURF or Web Scripts; that's what Alfresco's doing with Alfresco Share (a SURF application), and that's what we're doing for all our developments that don't fit in the "just customize the Explorer a bit" bag.