Using remote-client-deps - eclipse

Libor Zoubek lzoubek at redhat.com
Tue Apr 9 13:05:12 UTC 2013


Hi John,

I tried to build with java 1.7 (I have oracle ) but it didn't help. I also  
tried to open my project with netbeans. It complains as well, but at least  
those are not errors, but warnings.


Dne Fri, 05 Apr 2013 21:14:42 +0200 John Mazzitelli <mazz at redhat.com>  
napsal(a):

> This smells like the javac bug that Sun's javac compiler has had for  
> ages (its fixed in JDK 1.7).
>
> Those are annotations in those compiler error messages, and even though  
> you won't be loading hibernate into the client, the compiler (prior to  
> 1.7) still barfs on annotations if the compiler classpath doesn't have  
> the jars with those annotations.
>
> Build using JDK 1.7 and see what you get.
>
> ----- Original Message -----
>>
>> I don't think a remote client would/should depend on Hibernate at all.
>> Looking at the CLI lib directory I don't see anything like that.  It
>> shouldn't be necessary I think.
Hi Jay,
I agree, hibernate/JPA classes are not required at runtime nor compile  
time. I do not like this "solution" as well.
>> On 4/4/2013 5:47 AM, Libor Zoubek wrote:
>> > Hi,
>> >
>> > I am writing a java remote client and I am depending on
>> > remote-client-deps:4.6.0 artifact. I have a little issue with my
>> > eclipse, which shows me errors (not compile errors) whenever I
>> > import/reference org.rhq.domain class that has hibernate or JPA
>> > annotations.
>> >
>> > Errors I get are like this:
>> > - The type javax.persistence.GenerationType cannot be resolved. It is
>> > indirectly referenced from required .class files
>> > - The type javax.persistence.CascadeType cannot be resolved. It is
>> > indirectly referenced from required .class files
>> > - The type javax.persistence.FetchType cannot be resolved. It is
>> > indirectly referenced from required .class files
>> > - The type org.hibernate.annotations.CascadeType cannot be resolved.
>> > It is indirectly referenced from required .class files
>> > - The type javax.persistence.EnumType cannot be resolved. It is
>> > indirectly referenced from required .class files
>> >
>> > I was digging around and found out that remote-client-deps had an
>> > exclusion for <artifactId>rhq-remoting-client-api</artifactId>
>> >
>> > <exclusion>
>> >  <groupId>hibernate-annotations</groupId>
>> >  <artifactId>hibernate-annotations</artifactId>
>> > </exclusion>
>> >
>> > commenting it out in remote-client-deps pom didn't help. This is
>> > because rhq-remoting-client-api no longer depends on such atrifact,
>> > because it uses different artifacts provided by AS7.
>> >
>> > I fixed remote-client-deps myself and added this: (taken from
>> > rhq-remoting-client-api:4.6.0 pom)
>> >
>> > <dependency>
>> >  <groupId>org.hibernate.javax.persistence</groupId>
>> >  <artifactId>hibernate-jpa-2.0-api</artifactId>
>> > </dependency>
>> > <dependency>
>> >  <groupId>org.hibernate</groupId>
>> >  <artifactId>hibernate-core</artifactId>
>> > </dependency>
>> >
>> > This fixed my eclipse issue, but it introduced 10 more dependencies.
>> >
>> > Can anyone from you guys confirm this fix is correct? I'll create a BZ
>> > with patch.
>> >
>> > Thank you
>> >
>>
>> _______________________________________________
>> rhq-devel mailing list
>> rhq-devel at lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
>>
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel


-- 
Libor Zoubek
JBoss ON QE


More information about the rhq-devel mailing list