Hi,

Il giorno 23/set/2014, alle ore 12:44, tdigambar <[email protected]> ha 
scritto:

> hi,
>     i am using mysql as a syncope internal database
> 
> my *persistence.properties *file:
> 
> jpa.driverClassName=com.mysql.jdbc.Driver
> jpa.url=jdbc:mysql://localhost:3306/syncope1.2?characterEncoding=UTF-8
> jpa.username=root
> jpa.password=spectrum
> jpa.dialect=org.apache.openjpa.jdbc.sql.MySQLDictionary
> jpa.pool.validationQuery=SELECT 1
> #note: other connection pool settings can also be configured here, see
> persistenceContext.xml
> quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
> quartz.sql=tables_mysql_innodb.sql
> audit.sql=audit_mysql_innodb.sql
> database.schema= 
> 
> my *console.properties*
> 
> scheme=http
> host=localhost
> port=9080
> rootPath=/syncope/rest/
> 
> context.xml:
> <Resource name="jdbc/syncopeDataSource" auth="Container"
> type="javax.sql.DataSource"
>          factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> testWhileIdle="true"
>          testOnBorrow="true" testOnReturn="true" validationQuery="SELECT 1"
> validationInterval="30000"
>          maxActive="100" minIdle="2" maxWait="10000" initialSize="2"
> removeAbandonedTimeout="20000"
>          removeAbandoned="true" logAbandoned="true" suspectTimeout="20000"
>          timeBetweenEvictionRunsMillis="5000"
> minEvictableIdleTimeMillis="5000"         
> jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"
>          username="root" password="spectrum"
> driverClassName="com.mysql.jdbc.Driver"
> 
> url="jdbc:mysql://localhost:3306/syncope1.2?characterEncoding=UTF-8"/>
> 
> environment:
> windows 8
> apache tomcat 7.0.55
> 
> 

please check if you have completed all this steps:

1) Create new project [1]
2) Create you Deployment Directory [2]
3) Create in your mysql a new database (if it already exists, you need to 
remove it before)
4) Modify your core/src/main/resources/persistence.properties

                jpa.driverClassName=com.mysql.jdbc.Driver
                
jpa.url=jdbc:mysql://localhost:3306/syncope?characterEncoding=UTF-8
                jpa.username=syncope
                jpa.password=syncope
                jpa.dialect=org.apache.openjpa.jdbc.sql.MySQLDictionary
                jpa.pool.validationQuery=SELECT 1
                #note: other connection pool settings can also be configured 
here, see persistenceContext.xml
                quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
                quartz.sql=tables_mysql_innodb.sql
                audit.sql=audit_mysql_innodb.sql
                database.schema= 

                Please check that the InnoDB engine is enabled in your MySQL 
instance - if this is not the case, then change the value for 'quartz.sql’ to

                quartz.sql=tables_mysql.sql

5) Create %CATALINA_HOME%\bin\setenv.bat with content [3]

                set JAVA_OPTS=-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

6) Define a datasource for internal storage $CATALINA_HOME/conf/context.xml
7) Copy Mysql JDBC driver JAR file under $CATALINA_HOME/lib
8) Check in the core/src/main/webapp/WEB-INF/web.xml the datasource 
configuration. Uncomment JNDI DataSource configuration.
  
 <resource-ref>
    <res-ref-name>jdbc/syncopeDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>-

9) Modify console/src/main/resources/console.properties. If your Tomcat run on 
port 9080

        scheme=http
        host=localhost
        port=9080
        rootPath=/syncope/rest/

10) Build you project (enter the correct paths of your environment)
      mvn clean package -Dconf.directory=/opt/syncope/conf 
-Dbundles.directory=/opt/syncope/bundles -Dlog.directory=/opt/syncope/log
       
11) Now you are ready to deploy core/target/syncope.war and 
console/target/syncope-console.war to your Tomcat.

Regards
Marco


[1] 
https://cwiki.apache.org/confluence/display/SYNCOPE/Create+a+new+Syncope+project#CreateanewSyncopeproject-Createnewproject
[2] 
https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments#RunSyncopeinrealenvironments-Deploymentdirectory
[3] 
https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments#RunSyncopeinrealenvironments-ApacheTomcat7

> 
> 
> --
> View this message in context: 
> http://syncope-user.1051894.n5.nabble.com/Error-while-deploying-1-2-0-m1-tp5707684p5707693.html
> Sent from the syncope-user mailing list archive at Nabble.com.

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 0859111173
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/

Reply via email to