Hi,
please follow steps from

https://cwiki.apache.org/confluence/display/SYNCOPE/Create+a+new+Syncope+project

to create your own Syncope-based project via Maven archetype (no need to download Apache Syncope source code, as you write below).

Once safe with that, you can proceed with

https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments

Only Maven is required as development tool to successfully complete the steps above.
About Eclipse I cannot provide any advice, never been using it.

HTH
Regards.

On 05/09/2015 09:55, zhiy wrote:
I want to develop the Syncope and download the version 1.2.5 source code.
But I got some exceptions when I run the server.

Following is my steps:
1. Install postgress DB and create user syncope/syncope

2. Create a database syncope with owner syncope

3. Copy postgresql-9.4-1202.jdbc4.jar to $TOMCAT\lib

4. Add DB resouce to $TOMCAT\conf\context.xml
     <Resource
        name="jdbc/syncopeDataSource"
        auth="Container"
        type="javax.sql.DataSource"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
        username="syncope"
        password="syncope"
        driverClassName="org.postgresql.Driver"
        url="jdbc:postgresql://localhost:5432/syncope"
       />

5. Import the maven project into eclipse jee version.

6. Keep the core\src\main\resource\persistence.properties with default:
     jpa.driverClassName=org.postgresql.Driver
     jpa.url=jdbc:postgresql://localhost:5432/syncope
     jpa.username=syncope
     jpa.password=syncope
     jpa.dialect=org.apache.openjpa.jdbc.sql.PostgresDictionary
     jpa.pool.validationQuery=SELECT 1
     #note: other connection pool settings can also be configured here, see
persistenceContext.xml
     quartz.jobstore=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
     quartz.sql=tables_postgres.sql
     audit.sql=audit.sql
     database.schema=

7. Add resouce to core\src\main\webapp\WEB-INF\web.xml
       <resource-ref>
       <res-ref-name>jdbc/syncopeDataSource</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
       </resource-ref>

8. New a maven build with configuation:
      goals: package
      parameters: conf.directory=d:\syncope\conf,
bundles.directory=d:\syncope\bundles,
                       log.directory=d:\syncope\log

9. Run the mvn package in eclipse

10. Add syncope-console and syncope-core project to Tomcat server.

11. Run Tomcat server with arguments:
       -Dcatalina.base="D:\apache-tomcat-7.0.55"
-Dcatalina.home="D:\apache-tomcat-7.0.55"
-Dwtp.deploy="D:\apache-tomcat-7.0.55\wtpwebapps"
-Djava.endorsed.dirs="D:\apache-tomcat-7.0.55\endorsed"
-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1536m -Xmx1536m
-XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m
-XX:+DisableExplicitGC

But I get errors for both syncope-console and syncope-core project.
Exception in syncope-console :

SEVERE: Exception sending context initialized event to listener instance of
class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'configurationRestClient': Injection of autowired dependencies
failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire
field: private org.apache.syncope.console.rest.SchemaRestClient
org.apache.syncope.console.rest.ConfigurationRestClient.schemaRestClient;
nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.apache.syncope.client.SyncopeClientFactoryBean] for bean with
name 'syncopeClientFactory' defined in class path resource
[consoleContext.xml]; nested exception is java.lang.ClassNotFoundException:
org.apache.syncope.client.SyncopeClientFactoryBean
         at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:301)
         at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1186)
         at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
         at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
         at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
         at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
         at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
         at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)
         at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
         at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
         at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
         at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
         at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
         at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
         at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
         at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
         at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
         at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
         at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
         at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:663)
         at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1642)
         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
         at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Could
not autowire field: private org.apache.syncope.console.rest.SchemaRestClient
org.apache.syncope.console.rest.ConfigurationRestClient.schemaRestClient;
nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.apache.syncope.client.SyncopeClientFactoryBean] for bean with
name 'syncopeClientFactory' defined in class path resource
[consoleContext.xml]; nested exception is java.lang.ClassNotFoundException:
org.apache.syncope.client.SyncopeClientFactoryBean
         at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:522)
         at
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
         at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:298)
         ... 26 more
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException:
Cannot find class [org.apache.syncope.client.SyncopeClientFactoryBean] for
bean with name 'syncopeClientFactory' defined in class path resource
[consoleContext.xml]; nested exception is java.lang.ClassNotFoundException:
org.apache.syncope.client.SyncopeClientFactoryBean
         at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1325)
         at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:594)
         at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1394)
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:385)
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:362)
         at
org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:187)
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1006)
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:964)
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:862)
         at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:494)
         ... 28 more
Caused by: java.lang.ClassNotFoundException:
org.apache.syncope.client.SyncopeClientFactoryBean
         at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
         at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
         at org.springframework.util.ClassUtils.forName(ClassUtils.java:246)
         at
org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395)
         at
org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1346)
         at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1317)
         ... 37 more

Sep 02, 2015 4:45:59 下午 org.apache.catalina.core.StandardContext
startInternal
SEVERE: Error listenerStart


Exception in syncope-core :

SEVERE: Exception sending context initialized event to listener instance of
class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'connectorManager': Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire field: private
org.apache.syncope.core.util.ConnIdBundleManager
org.apache.syncope.core.init.ConnectorManager.connIdBundleManager; nested
exception is org.springframework.beans.factory.CannotLoadBeanClassException:
Cannot find class
[org.apache.syncope.core.rest.data.DoubleValueAttributableTransformer] for
bean with name '${attributableTransformer}#0' defined in file
[D:\apache-tomcat-7.0.55\wtpwebapps\syncope-core\WEB-INF\classes\restContext.xml];
nested exception is java.lang.ClassNotFoundException:
org.apache.syncope.core.rest.data.DoubleValueAttributableTransformer
         at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:301)
         at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1186)
         at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
         at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
         at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
         at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
         at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
         at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)
         at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
         at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
         at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
         at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
         at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
         at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
         at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
         at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
         at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
         at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
         at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
         at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:663)
         at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1642)
         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
         at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Could
not autowire field: private org.apache.syncope.core.util.ConnIdBundleManager
org.apache.syncope.core.init.ConnectorManager.connIdBundleManager; nested
exception is org.springframework.beans.factory.CannotLoadBeanClassException:
Cannot find class
[org.apache.syncope.core.rest.data.DoubleValueAttributableTransformer] for
bean with name '${attributableTransformer}#0' defined in file
[D:\apache-tomcat-7.0.55\wtpwebapps\syncope-core\WEB-INF\classes\restContext.xml];
nested exception is java.lang.ClassNotFoundException:
org.apache.syncope.core.rest.data.DoubleValueAttributableTransformer
         at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:522)
         at
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
         at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:298)
         ... 26 more
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException:
Cannot find class
[org.apache.syncope.core.rest.data.DoubleValueAttributableTransformer] for
bean with name '${attributableTransformer}#0' defined in file
[D:\apache-tomcat-7.0.55\wtpwebapps\syncope-core\WEB-INF\classes\restContext.xml];
nested exception is java.lang.ClassNotFoundException:
org.apache.syncope.core.rest.data.DoubleValueAttributableTransformer
         at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1325)
         at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:594)
         at
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1394)
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:385)
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:362)
         at
org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:187)
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1006)
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:964)
         at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:862)
         at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:494)
         ... 28 more
Caused by: java.lang.ClassNotFoundException:
org.apache.syncope.core.rest.data.DoubleValueAttributableTransformer
         at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
         at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
         at org.springframework.util.ClassUtils.forName(ClassUtils.java:246)
         at
org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395)
         at
org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1346)
         at
org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1317)
         ... 37 more

Sep 02, 2015 4:46:17 下午 org.apache.catalina.core.StandardContext
startInternal
SEVERE: Error listenerStart

--
View this message in context: 
http://syncope-user.1051894.n5.nabble.com/Deploy-syncope-error-with-Cannot-find-class-org-apache-syncope-client-SyncopeClientFactoryBean-tp5708129.html
Sent from the syncope-user mailing list archive at Nabble.com.


--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/

Reply via email to