Cannot get Ant to run properly

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

Cannot get Ant to run properly

Mauchline, Christopher R
Trying to build ofbiz so that I can evaluate if it meets by company's needs.  Cannot get it to compile(?) properly.  I haven't done Java in years.

I have the following jdk installed:  jdk1.8.0_40

I have the following environment variables set (for my userid):
ANT_HOME  C:\Program Files (x86)\Java\ofbiz\framework\base\lib
JAVA_HOME C:\Program Files (x86)\Java\jdk1.8.0_40
OFBIZ_HOME C:\Program Files (x86)\Java\ofbiz

Using Command Window:  set to C:\Program Files (x86)\Java>

The following Path is set:  PATH=.;C:\Program Files (x86)\Java\jre1.8.0_40\bin;C:\Program Files (x86)\Java\o
fbiz;C:\Program Files (x86)\Java\jdk1.8.0_40;C:\Program Files (x86)\Java\jdk1.8.
0_40\bin;C:\Program Files (x86)\Java\jdk1.8.0_40\lib;C:\Program Files (x86)\Java
\ofbiz\framework\base\lib;C:\Program Files (x86)\Java

When I run:  ant load-demo start
I get the following:  C:\Program Files (x86)\Java>"C:\Program Files (x86)\Java\jdk1.8.0_40\bin\java" -
jar framework/base/lib/ant-1.9.0-ant-launcher.jar -lib framework/base/lib/ant lo
ad-demo start
Error: Unable to access jarfile framework/base/lib/ant-1.9.0-ant-launcher.jar

What do I need to set or do differently.  I find this a real barrier to trying to test this software.

Reply | Threaded
Open this post in threaded view
|

Re: Cannot get Ant to run properly

Jacques Le Roux
Administrator
OFBiz has ant embedded to be sure you will always use the right version.
Simply get to the OFBiz root folder before running ant, so for you

C:\Program Files (x86)\Java\ofbiz

HTH

Jacques

Le 24/03/2015 22:01, Mauchline, Christopher R a écrit :

> Trying to build ofbiz so that I can evaluate if it meets by company's needs.  Cannot get it to compile(?) properly.  I haven't done Java in years.
>
> I have the following jdk installed:  jdk1.8.0_40
>
> I have the following environment variables set (for my userid):
> ANT_HOME  C:\Program Files (x86)\Java\ofbiz\framework\base\lib
> JAVA_HOME C:\Program Files (x86)\Java\jdk1.8.0_40
> OFBIZ_HOME C:\Program Files (x86)\Java\ofbiz
>
> Using Command Window:  set to C:\Program Files (x86)\Java>
>
> The following Path is set:  PATH=.;C:\Program Files (x86)\Java\jre1.8.0_40\bin;C:\Program Files (x86)\Java\o
> fbiz;C:\Program Files (x86)\Java\jdk1.8.0_40;C:\Program Files (x86)\Java\jdk1.8.
> 0_40\bin;C:\Program Files (x86)\Java\jdk1.8.0_40\lib;C:\Program Files (x86)\Java
> \ofbiz\framework\base\lib;C:\Program Files (x86)\Java
>
> When I run:  ant load-demo start
> I get the following:  C:\Program Files (x86)\Java>"C:\Program Files (x86)\Java\jdk1.8.0_40\bin\java" -
> jar framework/base/lib/ant-1.9.0-ant-launcher.jar -lib framework/base/lib/ant lo
> ad-demo start
> Error: Unable to access jarfile framework/base/lib/ant-1.9.0-ant-launcher.jar
>
> What do I need to set or do differently.  I find this a real barrier to trying to test this software.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Cannot get Ant to run properly

Jacques Le Roux
Administrator

Le 24/03/2015 23:17, Jacques Le Roux a écrit :
> OFBiz has ant embedded to be sure you will always use the right version.
> Simply get to the OFBiz root folder before running ant, so for you

BTW this is explained in OFBiz download page http://ofbiz.apache.org/download.html :
<<unpack the release file and go into the newly created directory>>

Maybe not clear enough?

Jacques

>
> C:\Program Files (x86)\Java\ofbiz
>
> HTH
>
> Jacques
>
> Le 24/03/2015 22:01, Mauchline, Christopher R a écrit :
>> Trying to build ofbiz so that I can evaluate if it meets by company's needs.  Cannot get it to compile(?) properly.  I haven't done Java in years.
>>
>> I have the following jdk installed:  jdk1.8.0_40
>>
>> I have the following environment variables set (for my userid):
>> ANT_HOME  C:\Program Files (x86)\Java\ofbiz\framework\base\lib
>> JAVA_HOME C:\Program Files (x86)\Java\jdk1.8.0_40
>> OFBIZ_HOME C:\Program Files (x86)\Java\ofbiz
>>
>> Using Command Window:  set to C:\Program Files (x86)\Java>
>>
>> The following Path is set:  PATH=.;C:\Program Files (x86)\Java\jre1.8.0_40\bin;C:\Program Files (x86)\Java\o
>> fbiz;C:\Program Files (x86)\Java\jdk1.8.0_40;C:\Program Files (x86)\Java\jdk1.8.
>> 0_40\bin;C:\Program Files (x86)\Java\jdk1.8.0_40\lib;C:\Program Files (x86)\Java
>> \ofbiz\framework\base\lib;C:\Program Files (x86)\Java
>>
>> When I run:  ant load-demo start
>> I get the following:  C:\Program Files (x86)\Java>"C:\Program Files (x86)\Java\jdk1.8.0_40\bin\java" -
>> jar framework/base/lib/ant-1.9.0-ant-launcher.jar -lib framework/base/lib/ant lo
>> ad-demo start
>> Error: Unable to access jarfile framework/base/lib/ant-1.9.0-ant-launcher.jar
>>
>> What do I need to set or do differently.  I find this a real barrier to trying to test this software.
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

RE: Cannot get Ant to run properly

Mauchline, Christopher R
That was a big step forward (thank you Jacques).  But now I'm hitting further errors.
Any thoughts would be appreciated.
The earliest I can scroll back to is this:

  [javac16]     C:\Program Files (x86)\Java\ofbiz\applications\party\src\org\ofb
iz\party\party\PartyWorker.java
  [javac16] warning: [options] bootstrap class path not set in conjunction with
-source 1.6
  [javac16] C:\Program Files (x86)\Java\ofbiz\applications\party\src\org\ofbiz\p
arty\communication\CommunicationEventServices.java:139: error: cannot access Dat
aResourceWorkerInterface
  [javac16]                     ByteBuffer dataContent = DataResourceWorker.getC
ontentAsByteBuffer(delegator, dataResource.getString("dataResourceId"), null, nu
ll, locale, null);
  [javac16]                                                                ^
  [javac16]   class file for org.ofbiz.widget.DataResourceWorkerInterface not fo
und
  [javac16] C:\Program Files (x86)\Java\ofbiz\applications\party\src\org\ofbiz\p
arty\content\PartyContentWrapper.java:229: error: cannot access ContentWorkerInt
erface
  [javac16]             ContentWorker.renderContentAsText(dispatcher, delegator,
 partyContent.getString("contentId"), outWriter, inContext, locale, mimeTypeId,
null, null, false);
  [javac16]                          ^
  [javac16]   class file for org.ofbiz.widget.ContentWorkerInterface not found
  [javac16] 2 errors
   [subant] Exiting C:\Program Files (x86)\Java\ofbiz\applications\party\build.x
ml.
  [antcall] Exiting C:\Program Files (x86)\Java\ofbiz\build.xml.

BUILD FAILED
C:\Program Files (x86)\Java\ofbiz\build.xml:229: The following error occurred wh
ile executing this line:
C:\Program Files (x86)\Java\ofbiz\build.xml:248: The following error occurred wh
ile executing this line:
C:\Program Files (x86)\Java\ofbiz\macros.xml:39: The following error occurred wh
ile executing this line:
C:\Program Files (x86)\Java\ofbiz\common.xml:91: Compile failed; see the compile
r error output for details.
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1174)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:930)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
        at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:303)
        at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:221)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:396)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)

        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
        at org.apache.tools.ant.Main.runBuild(Main.java:851)
        at org.apache.tools.ant.Main.startAnt(Main.java:235)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Christopher R. Mauchline


Reply | Threaded
Open this post in threaded view
|

Re: Cannot get Ant to run properly

Nicolas Malin-2
Le 25/03/2015 15:07, Mauchline, Christopher R a écrit :
>    [javac16]     C:\Program Files (x86)\Java\ofbiz\applications\party\src\org\ofb
> iz\party\party\PartyWorker.java
>    [javac16] warning: [options] bootstrap class path not set in conjunction with
> -source 1.6
>    [javac16] C:\Program Files (x86)\Java\ofbiz\applications\party\src\org\ofbiz\p
> arty\communication\CommunicationEventServices.java:139: error: cannot access Dat
> aResourceWorkerInterface
Hello your jvm run isn't java 1.8 but java 1.6.
Can you recheck your java version and what OFBiz release do you use ?

Check also if your ant don't run under an other java version

Nicolas
Reply | Threaded
Open this post in threaded view
|

RE: Cannot get Ant to run properly

Mauchline, Christopher R
> Hello your jvm run isn't java 1.8 but java 1.6.
>Can you recheck your java version and what OFBiz release do you use ?

In looking at my installed programs I only have java 1.8 and I have the most recent OFBiz release from the website (which says 1.6 or higher.

How would I get it to use my installed 1.8 or am I missing something else?

Christopher R. Mauchline
Application Analyst/Developer

-----Original Message-----
From: Nicolas Malin [mailto:[hidden email]]
Sent: Wednesday, March 25, 2015 10:34 AM
To: [hidden email]
Subject: Re: Cannot get Ant to run properly

Le 25/03/2015 15:07, Mauchline, Christopher R a écrit :
>    [javac16]     C:\Program Files (x86)\Java\ofbiz\applications\party\src\org\ofb
> iz\party\party\PartyWorker.java
>    [javac16] warning: [options] bootstrap class path not set in
> conjunction with -source 1.6
>    [javac16] C:\Program Files
> (x86)\Java\ofbiz\applications\party\src\org\ofbiz\p
> arty\communication\CommunicationEventServices.java:139: error: cannot
> access Dat aResourceWorkerInterface
Hello your jvm run isn't java 1.8 but java 1.6.
Can you recheck your java version and what OFBiz release do you use ?

Check also if your ant don't run under an other java version

Nicolas
Reply | Threaded
Open this post in threaded view
|

Re: Cannot get Ant to run properly

Peter Arnold

Mauchline, Christopher R <mauchlcr <at> intellprinting.com> writes:

>
> > Hello your jvm run isn't java 1.8 but java 1.6.
> >Can you recheck your java version and what OFBiz release do you use ?
>
> In looking at my installed programs I only have java 1.8 and I have the
most recent OFBiz release from the

> website (which says 1.6 or higher.
>
> How would I get it to use my installed 1.8 or am I missing something else?
>
> Christopher R. Mauchline
> Application Analyst/Developer
>
> -----Original Message-----
> From: Nicolas Malin [mailto:nicolas.malin <at> nereide.fr]
> Sent: Wednesday, March 25, 2015 10:34 AM
> To: user <at> ofbiz.apache.org
> Subject: Re: Cannot get Ant to run properly
>
> Le 25/03/2015 15:07, Mauchline, Christopher R a écrit :
> >    [javac16]     C:\Program Files
(x86)\Java\ofbiz\applications\party\src\org\ofb

> > iz\party\party\PartyWorker.java
> >    [javac16] warning: [options] bootstrap class path not set in
> > conjunction with -source 1.6
> >    [javac16] C:\Program Files
> > (x86)\Java\ofbiz\applications\party\src\org\ofbiz\p
> > arty\communication\CommunicationEventServices.java:139: error: cannot
> > access Dat aResourceWorkerInterface
> Hello your jvm run isn't java 1.8 but java 1.6.
> Can you recheck your java version and what OFBiz release do you use ?
>
> Check also if your ant don't run under an other java version
>
> Nicolas
>
>
Hello Christopher,

I am not sure which version of OFBiz you have installed but when installing
OFBiz 13.07 I also could not get it to run because of a to "new" java
version. I installed finally an older java 1.7.xx version. This solved my
problem. If you can get an 1.6 version this would be even better since you
can avoid some warning messages. I hope this will work for you as well.

Peter