Eclipse and OfBiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Eclipse and OfBiz

wt@teksavvy.com
I downloaded the latest trunk from http://svn.apache.org/repos/asf/ofbiz/trunk using Eclipse 3.3 and subclipse.
After the automatic compile in Eclipse, it showed a lot of compile errors and warnings.  I tried to resolve them by manually adding jar files from the OfBiz project as external jars.
This took care of many compile errors but I was not able to do something about removing the following errors from /ofbiz/framework/entity/src/org/ofbiz/entity/connection/XaPoolConnectionFactory.java.

        *StandardXADataSource cannot be resolved to a type
        *The import org.enhydra cannot be resolved

Could someone tell me if I'm missing some jar files or my Eclipse configuration/environment needs some tweaking.

I believe the source is ok as I am able to compile it using the console by typing "ant" and "ant run-install" and the application runs.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse and OfBiz

Brett
I've had this same problem for a while now.  The ant script's ignore this
code which is why you can compile in ant.  There is a filter in eclipse to
ignore this code but for some reason it isn't working in my eclipse
environment.  The easiest fix in eclipse is to right click on the package
and delete it.  You could also rename the file and refresh.

Hope that helps.  Anyone else have a better work around for this problem?

Brett

On Nov 18, 2007 11:01 AM, Yin T <[hidden email]> wrote:

>
> I downloaded the latest trunk from
> http://svn.apache.org/repos/asf/ofbiz/trunk using Eclipse 3.3 and
> subclipse.
> After the automatic compile in Eclipse, it showed a lot of compile errors
> and warnings.  I tried to resolve them by manually adding jar files from
> the
> OfBiz project as external jars.
> This took care of many compile errors but I was not able to do something
> about removing the following errors from
>
> /ofbiz/framework/entity/src/org/ofbiz/entity/connection/XaPoolConnectionFactory.java.
>
>        *StandardXADataSource cannot be resolved to a type
>        *The import org.enhydra cannot be resolved
>
> Could someone tell me if I'm missing some jar files or my Eclipse
> configuration/environment needs some tweaking.
>
> I believe the source is ok as I am able to compile it using the console by
> typing "ant" and "ant run-install" and the application runs.
>
> Thanks.
> --
> View this message in context:
> http://www.nabble.com/Eclipse-and-OfBiz-tf4831150.html#a13821682
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse and OfBiz

mrisaliti@libero.it
Yes, you have to follow this simple steps:

- go into the project properties
- then select Java build path
- in the right screen select the source tab
- search and select the folder ofbiz/framework/entity/src then  
opening the folder and select excluded and press the edit button
- in the exclusion patterns pressing the add button exclude the  
following class : org/ofbiz/entity/connection/
XaPoolConnectionFactory.java
- and at the end press finish and ok

the project will be rebuild and then you will not see this error.

It's due to an error in the .classpath file on trunk, it would be  
good if someone can commit this upgrade.

Thanks
Marco



Il giorno 18/nov/07, alle ore 19:15, Brett Palmer ha scritto:

> I've had this same problem for a while now.  The ant script's  
> ignore this
> code which is why you can compile in ant.  There is a filter in  
> eclipse to
> ignore this code but for some reason it isn't working in my eclipse
> environment.  The easiest fix in eclipse is to right click on the  
> package
> and delete it.  You could also rename the file and refresh.
>
> Hope that helps.  Anyone else have a better work around for this  
> problem?
>
> Brett
>
> On Nov 18, 2007 11:01 AM, Yin T <[hidden email]> wrote:
>
>>
>> I downloaded the latest trunk from
>> http://svn.apache.org/repos/asf/ofbiz/trunk using Eclipse 3.3 and
>> subclipse.
>> After the automatic compile in Eclipse, it showed a lot of compile  
>> errors
>> and warnings.  I tried to resolve them by manually adding jar  
>> files from
>> the
>> OfBiz project as external jars.
>> This took care of many compile errors but I was not able to do  
>> something
>> about removing the following errors from
>>
>> /ofbiz/framework/entity/src/org/ofbiz/entity/connection/
>> XaPoolConnectionFactory.java.
>>
>>        *StandardXADataSource cannot be resolved to a type
>>        *The import org.enhydra cannot be resolved
>>
>> Could someone tell me if I'm missing some jar files or my Eclipse
>> configuration/environment needs some tweaking.
>>
>> I believe the source is ok as I am able to compile it using the  
>> console by
>> typing "ant" and "ant run-install" and the application runs.
>>
>> Thanks.
>> --
>> View this message in context:
>> http://www.nabble.com/Eclipse-and-OfBiz-tf4831150.html#a13821682
>> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Eclipse and OfBiz

BJ Freeman
In reply to this post by wt@teksavvy.com
Unless you plan to debug in Eclipse the easiet way to compile
is to right click on the build.xml and select run as then Ant
there are two select the first one.
if there is an error then you many have to use the second one to put the
 tools.jar in the library section.

Yin T sent the following on 11/18/2007 10:01 AM:

> I downloaded the latest trunk from
> http://svn.apache.org/repos/asf/ofbiz/trunk using Eclipse 3.3 and subclipse.
> After the automatic compile in Eclipse, it showed a lot of compile errors
> and warnings.  I tried to resolve them by manually adding jar files from the
> OfBiz project as external jars.
> This took care of many compile errors but I was not able to do something
> about removing the following errors from
> /ofbiz/framework/entity/src/org/ofbiz/entity/connection/XaPoolConnectionFactory.java.
>
> *StandardXADataSource cannot be resolved to a type
> *The import org.enhydra cannot be resolved
>
> Could someone tell me if I'm missing some jar files or my Eclipse
> configuration/environment needs some tweaking.
>
> I believe the source is ok as I am able to compile it using the console by
> typing "ant" and "ant run-install" and the application runs.
>
> Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse and OfBiz

BJ Freeman
Just as a note this should be in the User ML
look at the tips and tricks email there.
it has a link to how to use eclipse.

BJ Freeman sent the following on 11/18/2007 12:15 PM:

> Unless you plan to debug in Eclipse the easiet way to compile
> is to right click on the build.xml and select run as then Ant
> there are two select the first one.
> if there is an error then you many have to use the second one to put the
>  tools.jar in the library section.
>
> Yin T sent the following on 11/18/2007 10:01 AM:
>> I downloaded the latest trunk from
>> http://svn.apache.org/repos/asf/ofbiz/trunk using Eclipse 3.3 and subclipse.
>> After the automatic compile in Eclipse, it showed a lot of compile errors
>> and warnings.  I tried to resolve them by manually adding jar files from the
>> OfBiz project as external jars.
>> This took care of many compile errors but I was not able to do something
>> about removing the following errors from
>> /ofbiz/framework/entity/src/org/ofbiz/entity/connection/XaPoolConnectionFactory.java.
>>
>> *StandardXADataSource cannot be resolved to a type
>> *The import org.enhydra cannot be resolved
>>
>> Could someone tell me if I'm missing some jar files or my Eclipse
>> configuration/environment needs some tweaking.
>>
>> I believe the source is ok as I am able to compile it using the console by
>> typing "ant" and "ant run-install" and the application runs.
>>
>> Thanks.
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse and OfBiz

wt@teksavvy.com
In reply to this post by mrisaliti@libero.it
I followed Marco's suggestion in Eclipse for excluding the XaPoolConnectionFactory.java.

under /ofbiz/framework/entity/src
        exclude ofbiz/entity/connection/XaPoolConnectionFactory.java

I also needed to perform the following.  This would obviate the need to manually add jar files to hide the remaining compile errors.

under /ofbiz/framework/testtools/src
        exclude org/ofbiz/testtools

The source tree compiles well now. Thanks for the advise.
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse and OfBiz

Jacques Le Roux
Administrator
In reply to this post by BJ Freeman
> Unless you plan to debug in Eclipse the easiet way to compile
> is to right click on the build.xml and select run as then Ant
> there are two select the first one.
> if there is an error then you many have to use the second one to put the
>  tools.jar in the library section.

Beware this has changed since 3.4M1 (I use 3.4M2, plan to use 3.4M3 soon). Now you have to use the last contextual menu line (don't
remember the name) to open the dialog box, and create a new issue. It will be automatically populated but I prefered before. Though
now you set directly a correct name for reuse.

I don't know if this new behaviour will remain in 1st official 3.4 (a bit cryptic sorry, it's late)

Jacques

> Yin T sent the following on 11/18/2007 10:01 AM:
> > I downloaded the latest trunk from
> > http://svn.apache.org/repos/asf/ofbiz/trunk using Eclipse 3.3 and subclipse.
> > After the automatic compile in Eclipse, it showed a lot of compile errors
> > and warnings.  I tried to resolve them by manually adding jar files from the
> > OfBiz project as external jars.
> > This took care of many compile errors but I was not able to do something
> > about removing the following errors from
> > /ofbiz/framework/entity/src/org/ofbiz/entity/connection/XaPoolConnectionFactory.java.
> >
> > *StandardXADataSource cannot be resolved to a type
> > *The import org.enhydra cannot be resolved
> >
> > Could someone tell me if I'm missing some jar files or my Eclipse
> > configuration/environment needs some tweaking.
> >
> > I believe the source is ok as I am able to compile it using the console by
> > typing "ant" and "ant run-install" and the application runs.
> >
> > Thanks.
>

Reply | Threaded
Open this post in threaded view
|

Re: Eclipse and OfBiz

Jacques Le Roux
Administrator
In reply to this post by BJ Freeman
http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Eclipse

Jacques

De : "BJ Freeman" <[hidden email]>

> Just as a note this should be in the User ML
> look at the tips and tricks email there.
> it has a link to how to use eclipse.
>
> BJ Freeman sent the following on 11/18/2007 12:15 PM:
> > Unless you plan to debug in Eclipse the easiet way to compile
> > is to right click on the build.xml and select run as then Ant
> > there are two select the first one.
> > if there is an error then you many have to use the second one to put the
> >  tools.jar in the library section.
> >
> > Yin T sent the following on 11/18/2007 10:01 AM:
> >> I downloaded the latest trunk from
> >> http://svn.apache.org/repos/asf/ofbiz/trunk using Eclipse 3.3 and subclipse.
> >> After the automatic compile in Eclipse, it showed a lot of compile errors
> >> and warnings.  I tried to resolve them by manually adding jar files from the
> >> OfBiz project as external jars.
> >> This took care of many compile errors but I was not able to do something
> >> about removing the following errors from
> >> /ofbiz/framework/entity/src/org/ofbiz/entity/connection/XaPoolConnectionFactory.java.
> >>
> >> *StandardXADataSource cannot be resolved to a type
> >> *The import org.enhydra cannot be resolved
> >>
> >> Could someone tell me if I'm missing some jar files or my Eclipse
> >> configuration/environment needs some tweaking.
> >>
> >> I believe the source is ok as I am able to compile it using the console by
> >> typing "ant" and "ant run-install" and the application runs.
> >>
> >> Thanks.
> >
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Eclipse and OfBiz

Jacques Le Roux
Administrator
In reply to this post by mrisaliti@libero.it
De : <[hidden email]>

> Yes, you have to follow this simple steps:
>
> - go into the project properties
> - then select Java build path
> - in the right screen select the source tab
> - search and select the folder ofbiz/framework/entity/src then  
> opening the folder and select excluded and press the edit button
> - in the exclusion patterns pressing the add button exclude the  
> following class : org/ofbiz/entity/connection/
> XaPoolConnectionFactory.java
> - and at the end press finish and ok
>
> the project will be rebuild and then you will not see this error.
>
> It's due to an error in the .classpath file on trunk, it would be  
> good if someone can commit this upgrade.

Yes for JUnit too. Too late for me tonight sorry...

Jacques

>
> Thanks
> Marco
>
>
>
> Il giorno 18/nov/07, alle ore 19:15, Brett Palmer ha scritto:
>
> > I've had this same problem for a while now.  The ant script's  
> > ignore this
> > code which is why you can compile in ant.  There is a filter in  
> > eclipse to
> > ignore this code but for some reason it isn't working in my eclipse
> > environment.  The easiest fix in eclipse is to right click on the  
> > package
> > and delete it.  You could also rename the file and refresh.
> >
> > Hope that helps.  Anyone else have a better work around for this  
> > problem?
> >
> > Brett
> >
> > On Nov 18, 2007 11:01 AM, Yin T <[hidden email]> wrote:
> >
> >>
> >> I downloaded the latest trunk from
> >> http://svn.apache.org/repos/asf/ofbiz/trunk using Eclipse 3.3 and
> >> subclipse.
> >> After the automatic compile in Eclipse, it showed a lot of compile  
> >> errors
> >> and warnings.  I tried to resolve them by manually adding jar  
> >> files from
> >> the
> >> OfBiz project as external jars.
> >> This took care of many compile errors but I was not able to do  
> >> something
> >> about removing the following errors from
> >>
> >> /ofbiz/framework/entity/src/org/ofbiz/entity/connection/
> >> XaPoolConnectionFactory.java.
> >>
> >>        *StandardXADataSource cannot be resolved to a type
> >>        *The import org.enhydra cannot be resolved
> >>
> >> Could someone tell me if I'm missing some jar files or my Eclipse
> >> configuration/environment needs some tweaking.
> >>
> >> I believe the source is ok as I am able to compile it using the  
> >> console by
> >> typing "ant" and "ant run-install" and the application runs.
> >>
> >> Thanks.
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Eclipse-and-OfBiz-tf4831150.html#a13821682
> >> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
> >>
> >>
>