[jbosstools-dev] antlr packages and lib not exported in Hibernate Tools 4.0.1

Max Rydahl Andersen manderse at redhat.com
Tue Apr 21 03:25:55 EDT 2015


On 20 Apr 2015, at 20:01, Alexey Kazakov wrote:

> First at all, please create an issue in 
> https://issues.jboss.org/browse/JBIDE to solve this problem in the 
> next release.
> A pull request for https://github.com/jbosstools/jbosstools-hibernate 
> would be useful too :)

please note that we are really trying to limit exposing any of hibernate 
internal runtime API's to support multiple versions of Hibernate. Thus 
if this break that we won't be able to do it.

What is your plugin trying to do that needs this level of access ?

/max
>
> On 04/20/2015 04:44 AM, Bastian Ugimachi wrote:
>>
>> Dear all,
>>
>> I am currently working on an Eclipse-Plugin that is built on top of 
>> the Hibernate Tools project. For example, I am using the following 
>> statements to get the AST of a named query:
>>
>> try {
>> HqlParser parser = HqlParser.getInstance(statementString);
>> parser.statement();
>> } catch (RecognitionException | TokenStreamException e) {
>> e.printStackTrace();
>> }
>> AST statementAst = parser.getAST();
>>
>> For this to work well with Hibernate Tools Version 4.0.0, I added 
>> bundle org.hibernate.eclipse.libs as required bundle to my plug-in 
>> configuration (which resolved to 
>> org.hibernate.eclipse.libs_4.0.0.Final-v20141016-1911-B82 so far).
>>
>> However, I now updated to Hiberate Tools 4.0.1 
>> (org.hibernate.eclipse.libs_4.0.1.Final-v20150324-2307-B95). The 
>> problem I have now is that the following imports cannot be resolved:
>> import antlr.RecognitionException;
>> import antlr.TokenStreamException;
>> import antlr.collections.AST;
>>
>> The problem seems to arise from the fact, that in the new version's 
>> MANIFEST.MF, the antlr... packages are not exported and 
>> lib/hibernate/antlr-2.7.6.jar is not listed in the Bundle-ClassPath 
>> any more (I reformatted both MANIFEST.MFs, that you can find 
>> attached, to allow a convenient comparison). After manually adding 
>> the antlr-related entries to the new version's MANIFEST.MF, my code 
>> works pretty well again.
>>
>> My question is thus:
>> (a) Do you consider this to be a bug in the realease of Hibernate 
>> Tools 4.0.1?
>> (b) If yes for (a): Do you have an idea when this issue could be 
>> solved?
>> (c) If no for (a): Which alternative solution would you suggest? I 
>> mean, manually editing the MANIFEST.MF of realeased plug-ins is not 
>> quite the best practice, is it? I tried to manally add 
>> antlr-2.7.6.jar as library to my project, which solved the 
>> compilation error, but yields a java.lang.ClassNotFoundException: 
>> antlr.LLkParser cannot be found by 
>> org.hibernate.eclipse.libs_4.0.1.Final-v20150324-2307-B95
>>
>> Any advice?
>>
>> Thanks!
>> Bastian
>>
>>
>>
>> _______________________________________________
>> jbosstools-dev mailing list
>> jbosstools-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jbosstools-dev
>
> _______________________________________________
> jbosstools-dev mailing list
> jbosstools-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jbosstools-dev


/max
http://about.me/maxandersen


More information about the jbosstools-dev mailing list