You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by Timo Weber <ti...@timoweber.de> on 2023/02/08 14:29:11 UTC

enduser application with java version problem

Hi,

I'm trying to get Syncope 2.1.13 to run in Eclipse. I followed the Getting Started Guide, ran "mvn -P all clean verify" from root and after that "mvn -P embedded, all" from the enduser-Folder.
I get results for contexts "/syncope-console" and "/syncope" but the /enduser context show only a 404 error.
I compile and start maven with JDK 1.8.
The cargo-output.log in folder enduser/target/log shows the following error:
SCHWERWIEGEND: Fehler beim Senden der 'Context Initialized' Benachrichtigung an den Listener aus der Klasse [org.apache.syncope.ext.oidcclient.agent.OIDCClientAgentSetup]
java.lang.UnsupportedClassVersionError: org/apache/syncope/common/lib/policy/PolicyTO has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 (unable to load class [org.apache.syncope.common.lib.policy.PolicyTO])
	at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2477)
	at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:875)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1376)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1220)
	at org.apache.syncope.client.lib.SyncopeClientFactoryBean.defaultJAXBProvider(SyncopeClientFactoryBean.java:109)
	at org.apache.syncope.client.lib.SyncopeClientFactoryBean.getJaxbProvider(SyncopeClientFactoryBean.java:163)
	at org.apache.syncope.client.lib.SyncopeClientFactoryBean.defaultRestClientFactoryBean(SyncopeClientFactoryBean.java:144)
	at org.apache.syncope.client.lib.SyncopeClientFactoryBean.getRestClientFactoryBean(SyncopeClientFactoryBean.java:259)
	at org.apache.syncope.client.lib.SyncopeClientFactoryBean.create(SyncopeClientFactoryBean.java:313)
	at org.apache.syncope.ext.oidcclient.agent.OIDCClientAgentSetup.contextInitialized(OIDCClientAgentSetup.java:70)

It seems to me that the syncope-commons lib was not compiled with JDK 8

So I tried starting the second maven command with JDK 17 as execution environment. This leads to the following error:
[ERROR] Failed to execute goal [org.codehaus.gmaven:gmaven-plugin:1.5:execute(default) on project syncope-enduser: java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.String(char[],int,int,java.lang.Void) accessible: module java.base does not "opens java.lang" to unnamed module @437bd805 -> [Help 1]

Where am I going wrong?

Regards,
 Timo

Re: enduser application with java version problem

Posted by Lorenzo Di Cola <lo...@apache.org>.
Hi Timo,
I'm glad to hear your interest in Apache Syncope.
In general, Syncope 2.1.X version works with at least Java 8 version as you
can see from here [1].

Running it in embedded mode you have to follow these steps as you can see
from [2]:


   - From project root folder mvn -P all clean install
   - From enduser folder mvn -P embedded,all

Try these exactly steps and I think you'll be able to run all core, console
and enduser as well.

For sure Syncope project has no mixed JDK version for build different
modules.

HTH,
Best Regards,
Lorenzo
[1] https://syncope.apache.org/docs/2.1/getting-started.html#java
[2] https://syncope.apache.org/docs/2.1/getting-started.html#embedded-mode

Il giorno mer 8 feb 2023 alle ore 15:29 Timo Weber <ti...@timoweber.de> ha
scritto:

> Hi,
>
> I'm trying to get Syncope 2.1.13 to run in Eclipse. I followed the Getting
> Started Guide, ran "mvn -P all clean verify" from root and after that "mvn
> -P embedded, all" from the enduser-Folder.
> I get results for contexts "/syncope-console" and "/syncope" but the
> /enduser context show only a 404 error.
> I compile and start maven with JDK 1.8.
> The cargo-output.log in folder enduser/target/log shows the following
> error:
> SCHWERWIEGEND: Fehler beim Senden der 'Context Initialized'
> Benachrichtigung an den Listener aus der Klasse
> [org.apache.syncope.ext.oidcclient.agent.OIDCClientAgentSetup]
> java.lang.UnsupportedClassVersionError:
> org/apache/syncope/common/lib/policy/PolicyTO has been compiled by a more
> recent version of the Java Runtime (class file version 55.0), this version
> of the Java Runtime only recognizes class file versions up to 52.0 (unable
> to load class [org.apache.syncope.common.lib.policy.PolicyTO])
>         at
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2477)
>         at
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:875)
>         at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1376)
>         at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1220)
>         at
> org.apache.syncope.client.lib.SyncopeClientFactoryBean.defaultJAXBProvider(SyncopeClientFactoryBean.java:109)
>         at
> org.apache.syncope.client.lib.SyncopeClientFactoryBean.getJaxbProvider(SyncopeClientFactoryBean.java:163)
>         at
> org.apache.syncope.client.lib.SyncopeClientFactoryBean.defaultRestClientFactoryBean(SyncopeClientFactoryBean.java:144)
>         at
> org.apache.syncope.client.lib.SyncopeClientFactoryBean.getRestClientFactoryBean(SyncopeClientFactoryBean.java:259)
>         at
> org.apache.syncope.client.lib.SyncopeClientFactoryBean.create(SyncopeClientFactoryBean.java:313)
>         at
> org.apache.syncope.ext.oidcclient.agent.OIDCClientAgentSetup.contextInitialized(OIDCClientAgentSetup.java:70)
>
> It seems to me that the syncope-commons lib was not compiled with JDK 8
>
> So I tried starting the second maven command with JDK 17 as execution
> environment. This leads to the following error:
> [ERROR] Failed to execute goal
> [org.codehaus.gmaven:gmaven-plugin:1.5:execute(default) on project
> syncope-enduser: java.lang.reflect.InaccessibleObjectException: Unable to
> make java.lang.String(char[],int,int,java.lang.Void) accessible: module
> java.base does not "opens java.lang" to unnamed module @437bd805 -> [Help 1]
>
> Where am I going wrong?
>
> Regards,
>  Timo
>


-- 

-- 
Lorenzo Di Cola

Software Engineer @ Tirasa S.r.l.
Viale Vittoria Colonna, 97 - 65127 Pescara
Tel +39 0859116307 / FAX +39 0859111173http://www.tirasa.net

Apache Syncope Committerhttp://people.apache.org/phonebook.html?uid=loredicola