You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@syncope.apache.org by Savas Ziplies <zi...@gmail.com> on 2013/05/15 14:38:57 UTC

Q: Issues running Syncope archetype example in JBoss AS 7.1.1_final - OpenJPA

Hi

I am fiddling around for quite some time now and googled all lists where
possible but cannot find the solution, so wanna kindly ask for help here.

I am following the
https://cwiki.apache.org/confluence/display/SYNCOPE/Create+a+new+Syncope+project
 and
https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments
documentation.
Nearly everything works fine. The project created, installed but running
leads to issues.

I have a fresh JBoss AS 7.1.1_final running with MySQL Module 5.1.25.
Database is running (also gets populated after check). After some back and
forth and hints from mailing list and other forums I got further down the
line.

But at the moment I am stucked with Core not running with the below error.
This relates to what is stated in
https://issues.apache.org/jira/browse/OPENJPA-2229 and also in the Syncope
documentation. I followed the steps and changed the configs back and forth
but it will just not run. Any help or small pointing in the right direction
is highly appreciated.

If you need more info from me, let me know.


Thanks a lot


JBoss Error message (abridged):
 14:27:40,389 INFO
 [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] (MSC
service thread 1-2) Closing JPA EntityManagerFactory for persistence unit
'syncopePersistenceUnit'
14:27:40,392 INFO
 [org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor] (MSC
service thread 1-2) Shutting down ExecutorService
14:27:40,393 ERROR [org.springframework.web.context.ContextLoader] (MSC
service thread 1-2) Context initialization failed:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'springContextInitializer' defined in
"/D:/sziplies/programs/jboss-as-7.1.1.Final_syncope/standalone/deployments/syncope.war/WEB-INF/classes/org/apache/syncope/core/init/SpringContextInitializer.class":
Invocation of init method failed; nested exception is
<openjpa-2.2.2-r422266:1468616 nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: An error occurred while
parsing the query filter "SELECT e FROM  ExternalResource e". Error
message: The name "ExternalResource" is not a recognized entity or
identifier. Perhaps you meant ExternalResource, which is a close match.
Known entity names: [ExternalResource, AbstractSchema, RAttrUniqueValue,
AbstractVirAttr, Membership, TaskExec, SyncopeConf, Report, RAttr,
AbstractExec, SyncopeLogger, USchema, MAttr, PasswordPolicy, RSchema,
MSchema, AbstractMappingItem, MAttrValue, MAttrUniqueValue, AbstractAttr,
PropagationTask, AbstractDerSchema, AbstractVirSchema, UAttr,
AccountPolicy, RAttrValue, UAttrValue, ReportExec, SyncopeUser,
Notification, ConnInstance, AbstractDerAttr, SyncopeRole,
AbstractAttrValue, UMappingItem, SyncPolicy, AbstractMapping, RMapping,
Policy, ReportletConfInstance, Task, UAttrUniqueValue, RMappingItem,
Entitlement, UMapping, UserRequest]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1488)
[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
[spring-context-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
[spring-context-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
[spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
[spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
[spring-web-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3850)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
[rt.jar:1.6.0_43]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
[rt.jar:1.6.0_43]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_43]
Caused by: <openjpa-2.2.2-r422266:1468616 nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: An error occurred while
parsing the query filter "SELECT e FROM  ExternalResource e". Error
message: The name "ExternalResource" is not a recognized entity or
identifier. Perhaps you meant ExternalResource, which is a close match.
Known entity names: [ExternalResource, AbstractSchema, RAttrUniqueValue,
AbstractVirAttr, Membership, TaskExec, SyncopeConf, Report, RAttr,
AbstractExec, SyncopeLogger, USchema, MAttr, PasswordPolicy, RSchema,
MSchema, AbstractMappingItem, MAttrValue, MAttrUniqueValue, AbstractAttr,
PropagationTask, AbstractDerSchema, AbstractVirSchema, UAttr,
AccountPolicy, RAttrValue, UAttrValue, ReportExec, SyncopeUser,
Notification, ConnInstance, AbstractDerAttr, SyncopeRole,
AbstractAttrValue, UMappingItem, SyncPolicy, AbstractMapping, RMapping,
Policy, ReportletConfInstance, Task, UAttrUniqueValue, RMappingItem,
Entitlement, UMapping, UserRequest]
at
org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException(AbstractExpressionBuilder.java:119)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:194)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:167)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:242)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:212)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:205)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$200(JPQLExpressionBuilder.java:80)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:2417)
[openjpa-2.2.2.jar:2.2.2]
at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:61)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:162)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.datacache.QueryCacheStoreQuery.populateFromCompilation(QueryCacheStoreQuery.java:270)
[openjpa-2.2.2.jar:2.2.2]
at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:673)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:654)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:620)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:682)
[openjpa-2.2.2.jar:2.2.2]
at org.apache.openjpa.kernel.QueryImpl.compile(QueryImpl.java:589)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.persistence.EntityManagerImpl.createQuery(EntityManagerImpl.java:997)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.persistence.EntityManagerImpl.createQuery(EntityManagerImpl.java:979)
[openjpa-2.2.2.jar:2.2.2]
at
org.apache.openjpa.persistence.EntityManagerImpl.createQuery(EntityManagerImpl.java:975)
[openjpa-2.2.2.jar:2.2.2]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[rt.jar:1.6.0_43]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[rt.jar:1.6.0_43]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[rt.jar:1.6.0_43]
at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_43]
at
org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:241)
[spring-orm-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at com.sun.proxy.$Proxy39.createQuery(Unknown Source)
at
org.apache.syncope.core.persistence.dao.impl.ResourceDAOImpl.findAll(ResourceDAOImpl.java:77)
[classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[rt.jar:1.6.0_43]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[rt.jar:1.6.0_43]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[rt.jar:1.6.0_43]
at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_43]
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
[spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
[spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
[spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
[spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
[spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at com.sun.proxy.$Proxy45.findAll(Unknown Source)
at
org.apache.syncope.core.init.ConnectorManager.load(ConnectorManager.java:115)
[classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[rt.jar:1.6.0_43]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[rt.jar:1.6.0_43]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[rt.jar:1.6.0_43]
at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_43]
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
[spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
[spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
[spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
[spring-tx-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
[spring-tx-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
[spring-tx-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
[spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at com.sun.proxy.$Proxy49.load(Unknown Source)
at
org.apache.syncope.core.init.SpringContextInitializer.afterPropertiesSet(SpringContextInitializer.java:70)
[classes:]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1547)
[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1485)
[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]
... 20 more

Re: Q: Issues running Syncope archetype example in JBoss AS 7.1.1_final - OpenJPA

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 15/05/2013 16:04, Savas Ziplies wrote:
> Hi
>
> Thanks for the quick reply.
>
> How can I check that? If I do not use the "workaround" I result in 
> different errors, so I assumed it is actually taken into account.

Hi,
I have updated my sample "Syncope On JBoss" project [2] to Apache 
Syncope 1.1.1 and just checked it works.

My guess is that something went wrong when replacing, in 
core/src/MAIN/resources/persistenceContextEMFactory.xml

<entry key="openjpa.MetaDataFactory" 
value="org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory(URLs=vfs:${project.build.directory}/cargo/configurations/jboss71x/deployments/${project.build.finalName}.war/WEB-INF/classes/, 
Resources=META-INF/orm.xml)"/>

with

<entry key="openjpa.MetaDataFactory" 
value="org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory(URLs=vfs:/content/${project.build.finalName}.war/WEB-INF/classes/, 
Resources=META-INF/orm.xml)"/>

Anyway, you can take a look at [2] and understand where the issue is 
actually.

HTH
Regards.

> On Wed, May 15, 2013 at 3:17 PM, Francesco Chicchiriccò 
> <ilgrosso@apache.org <ma...@apache.org>> wrote:
>
>     On 15/05/2013 14:38, Savas Ziplies wrote:
>>     Hi
>>
>>     I am fiddling around for quite some time now and googled all
>>     lists where possible but cannot find the solution, so wanna
>>     kindly ask for help here.
>>
>>     I am following the
>>     https://cwiki.apache.org/confluence/display/SYNCOPE/Create+a+new+Syncope+project and
>>     https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments documentation.
>>     Nearly everything works fine. The project created, installed but
>>     running leads to issues.
>>
>>     I have a fresh JBoss AS 7.1.1_final running with MySQL Module
>>     5.1.25. Database is running (also gets populated after check).
>>     After some back and forth and hints from mailing list and other
>>     forums I got further down the line.
>>
>>     But at the moment I am stucked with Core not running with the
>>     below error. This relates to what is stated in
>>     https://issues.apache.org/jira/browse/OPENJPA-2229 and also in
>>     the Syncope documentation. I followed the steps and changed the
>>     configs back and forth but it will just not run. Any help or
>>     small pointing in the right direction is highly appreciated.
>
>     Hi,
>     you should check whether [1] is effectively applied.
>     Once done, rebuild and redeploy.
>
>     HTH
>     Regards.
>
>     [1]
>     https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments#RunSyncopeinrealenvironments-Use%7B%7BJBossPersistenceMappingFactory%7D%7D
>
[2] https://github.com/Tirasa/syncopeOnJBoss

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


Re: Q: Issues running Syncope archetype example in JBoss AS 7.1.1_final - OpenJPA

Posted by Savas Ziplies <zi...@gmail.com>.
Hi

Thanks for the quick reply.

How can I check that? If I do not use the "workaround" I result in
different errors, so I assumed it is actually taken into account.



Thanks, best


On Wed, May 15, 2013 at 3:17 PM, Francesco Chicchiriccò <ilgrosso@apache.org
> wrote:

>  On 15/05/2013 14:38, Savas Ziplies wrote:
>
> Hi
>
>  I am fiddling around for quite some time now and googled all lists where
> possible but cannot find the solution, so wanna kindly ask for help here.
>
>  I am following the
> https://cwiki.apache.org/confluence/display/SYNCOPE/Create+a+new+Syncope+project
>  and
> https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments documentation.
> Nearly everything works fine. The project created, installed but running
> leads to issues.
>
>  I have a fresh JBoss AS 7.1.1_final running with MySQL Module 5.1.25.
> Database is running (also gets populated after check). After some back and
> forth and hints from mailing list and other forums I got further down the
> line.
>
>  But at the moment I am stucked with Core not running with the below
> error. This relates to what is stated in
> https://issues.apache.org/jira/browse/OPENJPA-2229 and also in the
> Syncope documentation. I followed the steps and changed the configs back
> and forth but it will just not run. Any help or small pointing in the right
> direction is highly appreciated.
>
>
> Hi,
> you should check whether [1] is effectively applied.
> Once done, rebuild and redeploy.
>
> HTH
> Regards.
>
> [1]
> https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments#RunSyncopeinrealenvironments-Use%7B%7BJBossPersistenceMappingFactory%7D%7D
>
> --
> Francesco Chicchiriccò
>
> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Memberhttp://people.apache.org/~ilgrosso/
>
>

Re: Q: Issues running Syncope archetype example in JBoss AS 7.1.1_final - OpenJPA

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 15/05/2013 14:38, Savas Ziplies wrote:
> Hi
>
> I am fiddling around for quite some time now and googled all lists 
> where possible but cannot find the solution, so wanna kindly ask for 
> help here.
>
> I am following the 
> https://cwiki.apache.org/confluence/display/SYNCOPE/Create+a+new+Syncope+project and 
> https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments documentation. 
> Nearly everything works fine. The project created, installed but 
> running leads to issues.
>
> I have a fresh JBoss AS 7.1.1_final running with MySQL Module 5.1.25. 
> Database is running (also gets populated after check). After some back 
> and forth and hints from mailing list and other forums I got further 
> down the line.
>
> But at the moment I am stucked with Core not running with the below 
> error. This relates to what is stated in 
> https://issues.apache.org/jira/browse/OPENJPA-2229 and also in the 
> Syncope documentation. I followed the steps and changed the configs 
> back and forth but it will just not run. Any help or small pointing in 
> the right direction is highly appreciated.

Hi,
you should check whether [1] is effectively applied.
Once done, rebuild and redeploy.

HTH
Regards.

[1] 
https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments#RunSyncopeinrealenvironments-Use%7B%7BJBossPersistenceMappingFactory%7D%7D

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/