Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Log4J problems in xtext plugins(log4j library is avaiilable in one plugin and not available in other plugin)
Log4J problems in xtext plugins [message #1736474] Wed, 29 June 2016 15:33 Go to next message
Alex Gor is currently offline Alex GorFriend
Messages: 157
Registered: November 2014
Location: Russia
Senior Member
Hello

I observe the strange situation. I use Log4j library for logging in my DSL plugin.

BUT

Log4j API is available in plugin mydsl but not available in ui plugin.
The same situation with org.antlr.runtime library. it is not available in ide plugin
I cannot understand the reason of this issue.
Eclipse suggets me to change access rule. But why? In one plugin this library is available.
You help is very appreciated

Thanks in advance
Alexander

[Updated on: Wed, 29 June 2016 15:42]

Report message to a moderator

Re: Log4J problems in xtext plugins [message #1736477 is a reply to message #1736474] Wed, 29 June 2016 15:50 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13721
Registered: July 2009
Senior Member
Did you compare the manifests eg regarding import package log4j

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Log4J problems in xtext plugins [message #1736479 is a reply to message #1736477] Wed, 29 June 2016 16:00 Go to previous messageGo to next message
Alex Gor is currently offline Alex GorFriend
Messages: 157
Registered: November 2014
Location: Russia
Senior Member
I have the following lines

in MANIFEST of ui plugin
Import-Package: org.apache.log4j;version="1.2.15"

in MANIFEST of mydsl plugin
Import-Package: org.apache.log4j,
Re: Log4J problems in xtext plugins [message #1736480 is a reply to message #1736479] Wed, 29 June 2016 16:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13721
Registered: July 2009
Senior Member
Hmm can you share a small example project reproducing this

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Log4J problems in xtext plugins [message #1736481 is a reply to message #1736479] Wed, 29 June 2016 16:15 Go to previous messageGo to next message
Alex Gor is currently offline Alex GorFriend
Messages: 157
Registered: November 2014
Location: Russia
Senior Member
Also the same problem with :

Access restriction: The constructor 'DynamicEObjectImpl()' is not API (restriction on required library 'C:\tools\eclipse\mars\xtext-dsl-64\plugins\org.eclipse.emf.ecore_2.11.2.v20160208-0816.jar')
Access restriction: The constructor 'PolymorphicDispatcher<Collection<FollowElement>>(String, int, int, List<? extends Object>)' is not API (restriction on required library 'C:\tools\eclipse\mars\xtext-dsl-64\plugins\org.eclipse.xtext.util_2.10.0.v201605250459.jar')
Access restriction: The field 'IFileSystemAccess.DEFAULT_OUTPUT' is not API (restriction on required library 'C:\tools\eclipse\mars\xtext-dsl-64\plugins\org.eclipse.xtext_2.10.0.v201605250459.jar')
Access restriction: The method 'EObject.eClass()' is not API (restriction on required library 'C:\tools\eclipse\mars\xtext-dsl-64\plugins\org.eclipse.emf.ecore_2.11.2.v20160208-0816.jar')
Access restriction: The method 'Injector.injectMembers(Object)' is not API (restriction on required library 'C:\tools\eclipse\mars\xtext-dsl-64\plugins\com.google.inject_3.0.0.v201312141243.jar')
Access restriction: The type 'EList<Property>' is not API (restriction on required library 'C:\tools\eclipse\mars\xtext-dsl-64\plugins\org.eclipse.emf.common_2.11.1.v20160208-0816.jar')

and other

Also I tried to reimport my project to new workspace the same story is observed






[Updated on: Wed, 29 June 2016 16:41]

Report message to a moderator

Re: Log4J problems in xtext plugins [message #1736482 is a reply to message #1736481] Wed, 29 June 2016 16:25 Go to previous messageGo to next message
Alex Gor is currently offline Alex GorFriend
Messages: 157
Registered: November 2014
Location: Russia
Senior Member
I try to create HelloWorld mydsl project and to this project log4j plugin. No problem observed
Re: Log4J problems in xtext plugins [message #1736483 is a reply to message #1736482] Wed, 29 June 2016 16:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13721
Registered: July 2009
Senior Member
There must be a difference with the manifests

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Log4J problems in xtext plugins [message #1736484 is a reply to message #1736481] Wed, 29 June 2016 16:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6993
Registered: July 2009
Senior Member
Hi

Stupid errors => the incremental builder is confused.

Have you tried: Restart, clean all, rebuild?

Regards

Ed Willink


On 29/06/2016 17:15, Alex Gor wrote:
> Also the same problem with :
> Access restriction: The constructor 'DynamicEObjectImpl()' is not API
> (restriction on required library
> 'C:\tools\eclipse\mars\xtext-dsl-64\plugins\org.eclipse.emf.ecore_2.11.2.v20160208-0816.jar')
>
> Access restriction: The constructor
> 'PolymorphicDispatcher<Collection<FollowElement>>(String, int, int,
> List<? extends Object>)' is not API (restriction on required library
> 'C:\tools\eclipse\mars\xtext-dsl-64\plugins\org.eclipse.xtext.util_2.10.0.v201605250459.jar')
>
> Access restriction: The field 'IFileSystemAccess.DEFAULT_OUTPUT' is
> not API (restriction on required library
> 'C:\tools\eclipse\mars\xtext-dsl-64\plugins\org.eclipse.xtext_2.10.0.v201605250459.jar')
> Access restriction: The method 'EObject.eClass()' is not API
> (restriction on required library
> 'C:\tools\eclipse\mars\xtext-dsl-64\plugins\org.eclipse.emf.ecore_2.11.2.v20160208-0816.jar')
> Access restriction: The method 'Injector.injectMembers(Object)' is not
> API (restriction on required library
> 'C:\tools\eclipse\mars\xtext-dsl-64\plugins\com.google.inject_3.0.0.v201312141243.jar')
> Access restriction: The type 'EList<Property>' is not API (restriction
> on required library
> 'C:\tools\eclipse\mars\xtext-dsl-64\plugins\org.eclipse.emf.common_2.11.1.v20160208-0816.jar')
>
>
> and other
>
>
>
>
>
>
>
Re: Log4J problems in xtext plugins [message #1736485 is a reply to message #1736484] Wed, 29 June 2016 16:45 Go to previous messageGo to next message
Alex Gor is currently offline Alex GorFriend
Messages: 157
Registered: November 2014
Location: Russia
Senior Member
does not help (I mean clean -> rebuild)
Re: Log4J problems in xtext plugins [message #1736486 is a reply to message #1736485] Wed, 29 June 2016 16:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13721
Registered: July 2009
Senior Member
Alex Gor <forums-noreply@xxxxxxxx> wrote:
> does not help (I mean clean -> rebuild)
>

Another point: are .classpath and .project fine?


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Log4J problems in xtext plugins [message #1736487 is a reply to message #1736486] Wed, 29 June 2016 17:01 Go to previous messageGo to next message
Alex Gor is currently offline Alex GorFriend
Messages: 157
Registered: November 2014
Location: Russia
Senior Member
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Re: Log4J problems in xtext plugins [message #1736488 is a reply to message #1736487] Wed, 29 June 2016 17:02 Go to previous messageGo to next message
Alex Gor is currently offline Alex GorFriend
Messages: 157
Registered: November 2014
Location: Russia
Senior Member
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.psl.atom.ui</name>
<comment></comment>
<projects>
<project>com.psl.atom.services</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
Re: Log4J problems in xtext plugins [message #1736489 is a reply to message #1736488] Wed, 29 June 2016 17:04 Go to previous messageGo to next message
Alex Gor is currently offline Alex GorFriend
Messages: 157
Registered: November 2014
Location: Russia
Senior Member
seems to me yes. both files good
Re: Log4J problems in xtext plugins [message #1736490 is a reply to message #1736489] Wed, 29 June 2016 17:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13721
Registered: July 2009
Senior Member
Alex Gor <forums-noreply@xxxxxxxx> wrote:
> seems to me yes. both files good
>

Yes. What happens when importing the plugins to a new workspace


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Log4J problems in xtext plugins [message #1736491 is a reply to message #1736490] Wed, 29 June 2016 17:50 Go to previous messageGo to next message
Alex Gor is currently offline Alex GorFriend
Messages: 157
Registered: November 2014
Location: Russia
Senior Member
the same problem is observed
Re: Log4J problems in xtext plugins [message #1736492 is a reply to message #1736491] Wed, 29 June 2016 18:02 Go to previous messageGo to next message
Alex Gor is currently offline Alex GorFriend
Messages: 157
Registered: November 2014
Location: Russia
Senior Member
I've tried import my pllugind to Neon version and see the same story
Re: Log4J problems in xtext plugins [message #1736584 is a reply to message #1736492] Thu, 30 June 2016 12:58 Go to previous message
Alex Gor is currently offline Alex GorFriend
Messages: 157
Registered: November 2014
Location: Russia
Senior Member
I resolve this problem via installing Eclipse Mars from scratch and aply my project again. Seems to me reason is incorrect update of current version of Eclipse. I could not find out which update is destroy eclipse distribition. History of installation does not contains significal update last week.
Previous Topic:DSL tools from Eclipse Site
Next Topic:Obtainign the classpath from a XtextResource
Goto Forum:
  


Current Time: Sat Jan 23 04:41:55 GMT 2021

Powered by FUDForum. Page generated in 0.03216 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top