Skip to main content



      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 11:33 Go to next message
Eclipse UserFriend
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 11:42] by Moderator

Re: Log4J problems in xtext plugins [message #1736477 is a reply to message #1736474] Wed, 29 June 2016 11:50 Go to previous messageGo to next message
Eclipse UserFriend
Did you compare the manifests eg regarding import package log4j
Re: Log4J problems in xtext plugins [message #1736479 is a reply to message #1736477] Wed, 29 June 2016 12:00 Go to previous messageGo to next message
Eclipse UserFriend
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 12:06 Go to previous messageGo to next message
Eclipse UserFriend
Hmm can you share a small example project reproducing this
Re: Log4J problems in xtext plugins [message #1736481 is a reply to message #1736479] Wed, 29 June 2016 12:15 Go to previous messageGo to next message
Eclipse UserFriend
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 12:41] by Moderator

Re: Log4J problems in xtext plugins [message #1736482 is a reply to message #1736481] Wed, 29 June 2016 12:25 Go to previous messageGo to next message
Eclipse UserFriend
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 12:26 Go to previous messageGo to next message
Eclipse UserFriend
There must be a difference with the manifests
Re: Log4J problems in xtext plugins [message #1736484 is a reply to message #1736481] Wed, 29 June 2016 12:36 Go to previous messageGo to next message
Eclipse UserFriend
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 12:45 Go to previous messageGo to next message
Eclipse UserFriend
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 12:52 Go to previous messageGo to next message
Eclipse UserFriend
Alex Gor <forums-noreply@xxxxxxxx> wrote:
> does not help (I mean clean -> rebuild)
>

Another point: are .classpath and .project fine?
Re: Log4J problems in xtext plugins [message #1736487 is a reply to message #1736486] Wed, 29 June 2016 13:01 Go to previous messageGo to next message
Eclipse UserFriend
<?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 13:02 Go to previous messageGo to next message
Eclipse UserFriend
<?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 13:04 Go to previous messageGo to next message
Eclipse UserFriend
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 13:06 Go to previous messageGo to next message
Eclipse UserFriend
Alex Gor <forums-noreply@xxxxxxxx> wrote:
> seems to me yes. both files good
>

Yes. What happens when importing the plugins to a new workspace
Re: Log4J problems in xtext plugins [message #1736491 is a reply to message #1736490] Wed, 29 June 2016 13:50 Go to previous messageGo to next message
Eclipse UserFriend
the same problem is observed
Re: Log4J problems in xtext plugins [message #1736492 is a reply to message #1736491] Wed, 29 June 2016 14:02 Go to previous messageGo to next message
Eclipse UserFriend
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 08:58 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 21:09:06 EDT 2025

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

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

Back to the top