You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "Parminder S. Lehal" <pl...@lehal.net> on 2017/06/13 11:31:14 UTC

Ofbiz fails to build with a java service created in a plugin

Ofbiz fails to compile with a java service created in a plugin as it
complains about missing symbols on all ofbiz imports.



 } catch (GenericEntityException e) {
                 ^
  symbol:   class GenericEntityException
  location: class ExpensesServices
/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxx/expenses/
services/ExpensesServices.java:30: error: cannot find symbol
            Debug.logError(e, module);
            ^
  symbol:   variable Debug
  location: class ExpensesServices
/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxxxxxxx/expe
nses/services/ExpensesServices.java:31: error: cannot find symbol
            return ServiceUtil.returnError("Error in creating record in
Expenses entity ........" +module);
                   ^
  symbol:   variable ServiceUtil

Re: Ofbiz fails to build with a java service created in a plugin

Posted by "Parminder S. Lehal" <pl...@lehal.net>.
Thanks a lot.
-----Original Message-----
Date: Wed, 14 Jun 2017 18:10:35 +0530Subject: Re: Ofbiz fails to build
with a java service created in a pluginTo: user@ofbiz.apache.org, pleha
l@lehal.netFrom: Deepak Dixit <de...@hotwaxsystems.com>Hi
Parminder,

I think you are deploying you old code with ofbiz 16.11Package
hierarchy has been changedPlease refer https://issues.apache.org/jira/b
rowse/OFBIZ-6274 for more detail
org.ofbiz.* has been changed to org.apache.ofbiz.*

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com
www.hotwax.co


On Wed, Jun 14, 2017 at 5:50 PM, Parminder S. Lehal <pl...@lehal.net>
wrote:
> code is nothing more than ofbiz demo code for component/plugin
> 
> development. In fact just the import statement alone cause the error
> 
> even if there is no other code. Similarly groovy script also
> complains
> 
> about ofbiz class which should be available to the framework.
> Following
> 
> is the the java code and error messages.
> 
> 
> 
> package net.rimptec.expenses.services;
> 
> import java.util.Map;
> 
>  
> 
> import org.ofbiz.base.util.Debug;
> 
> import org.ofbiz.entity.Delegator;
> 
> import org.ofbiz.entity.GenericEntityException;
> 
> import org.ofbiz.entity.GenericValue;
> 
> import org.ofbiz.service.DispatchContext;
> 
> import org.ofbiz.service.ServiceUtil;
> 
>  
> 
> public class ExpensesServices {
> 
> 
> 
>     public static final String module =
> 
> ExpensesServices.class.getName();
> 
>  
> 
>     public static Map<String, Object> createExpenses(DispatchContext
> 
> dctx, Map<String, ? extends Object> context) {
> 
>         Map<String, Object> result = ServiceUtil.returnSuccess();
> 
>         Delegator delegator = dctx.getDelegator();
> 
>         try {
> 
>             GenericValue expenses = delegator.makeValue("Expenses");
> 
>             // Auto generating next sequence of expensesId primary
> key
> 
>             expenses.setNextSeqId();
> 
>             // Setting up all non primary key field values from
> context
> 
> map
> 
>             expenses.setNonPKFields(context);
> 
>             // Creating record in database for Expenses entity for
> 
> prepared value
> 
>             expenses = delegator.create(expenses);
> 
>             result.put("expensesId",
> expenses.getString("expensesId"));
> 
>             Debug.log("==========Expenses record created successfully
> 
> with expensesId: "+expenses.getString("expensesId"));
> 
>         } catch (GenericEntityException e) {
> 
>             Debug.logError(e, module);
> 
>             return ServiceUtil.returnError("Error in creating record
> in
> 
> Expenses entity ........" +module);
> 
>         }
> 
>         return result;
> 
>     }
> 
>     
> 
> } 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> /home/plehal/Downloads/apache-ofbiz-
> 
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/s
> er
> 
> vices/ExpensesServices.java:17: error: cannot find symbol
> 
>         Map<String, Object> result = ServiceUtil.returnSuccess();
> 
>                                      ^
> 
>   symbol:   variable ServiceUtil
> 
>   location: class ExpensesServices
> 
> /home/plehal/Downloads/apache-ofbiz-
> 
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/s
> er
> 
> vices/ExpensesServices.java:18: error: cannot find symbol
> 
>         Delegator delegator = dctx.getDelegator();
> 
>         ^
> 
>   symbol:   class Delegator
> 
>   location: class ExpensesServices
> 
> /home/plehal/Downloads/apache-ofbiz-
> 
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/s
> er
> 
> vices/ExpensesServices.java:20: error: cannot find symbol
> 
>             GenericValue expenses = delegator.makeValue("Expenses");
> 
>             ^
> 
>   symbol:   class GenericValue
> 
>   location: class ExpensesServices
> 
> /home/plehal/Downloads/apache-ofbiz-
> 
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/s
> er
> 
> vices/ExpensesServices.java:28: error: cannot find symbol
> 
>             Debug.log("==========Expenses record created successfully
> 
> with expensesId: "+expenses.getString("expensesId"));
> 
>             ^
> 
>   symbol:   variable Debug
> 
>   location: class ExpensesServices
> 
> /home/plehal/Downloads/apache-ofbiz-
> 
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/s
> er
> 
> vices/ExpensesServices.java:29: error: cannot find symbol
> 
>         } catch (GenericEntityException e) {
> 
>                  ^
> 
>   symbol:   class GenericEntityException
> 
>   location: class ExpensesServices
> 
> /home/plehal/Downloads/apache-ofbiz-
> 
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/s
> er
> 
> vices/ExpensesServices.java:30: error: cannot find symbol
> 
>             Debug.logError(e, module);
> 
>             ^
> 
>   symbol:   variable Debug
> 
>   location: class ExpensesServices
> 
> /home/plehal/Downloads/apache-ofbiz-
> 
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/s
> er
> 
> vices/ExpensesServices.java:31: error: cannot find symbol
> 
>             return ServiceUtil.returnError("Error in creating record
> in
> 
> Expenses entity ........" +module);
> 
>                    ^
> 
>   symbol:   variable ServiceUtil
> 
>   location: class ExpensesServices
> 
> Note: Some input files use unchecked or unsafe operations.
> 
> Note: Recompile with -Xlint:unchecked for details.
> 
> 14 errors
> 
> 
> 
> :compileJava FAILED
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -----Original Message-----
> 
> 
> 
> Date: Wed, 14 Jun 2017 11:12:45 +0200
> 
> Subject: Re: Ofbiz fails to build with a java service created in a
> 
> plugin
> 
> To: user@ofbiz.apache.org
> 
> Reply-to: user@ofbiz.apache.org
> 
> From: Jacques Le Roux <ja...@les7arts.com>
> 
> Sorry but we will need more information to help
> 
> 
> 
> Maybe the stack trace, and even more the piece of code which fails
> with
> 
> the name of the directory where the file is placed
> 
> 
> 
> Jacques
> 
> 
> 
> 
> 
> Le 13/06/2017 à 21:49, Parminder S. Lehal a écrit :
> 
> > 16.11.02.
> 
> >
> 
> >
> 
> >
> 
> > -----Original Message-----
> 
> >
> 
> > Date: Tue, 13 Jun 2017 20:02:20 +0200
> 
> > Subject: Re: Ofbiz fails to build with a java service created in a
> 
> > plugin
> 
> > To: user@ofbiz.apache.org
> 
> > Reply-to: user@ofbiz.apache.org
> 
> > From: Jacques Le Roux <ja...@les7arts.com>
> 
> > Which version are you using?
> 
> >
> 
> > Jacques
> 
> >
> 
> >
> 
> > Le 13/06/2017 à 18:46, Parminder S. Lehal a écrit :
> 
> > > xxxxx is tld.companyname...The error is about missing ofbiz
> 
> > > imports.
> 
> > >
> 
> > > Same thing happens with groovy service script too at runtime.
> 
> > >
> 
> > > 1: unable to resolve class
> org.ofbiz.entity.GenericEntityException
> 
> > >    @ line 1, column 1.
> 
> > >      import org.ofbiz.entity.GenericEntityException;
> 
> > >      ^
> 
> > >
> 
> > >
> 
> > >
> 
> > >
> 
> > > -----Original Message-----
> 
> > >
> 
> > > Date: Tue, 13 Jun 2017 14:47:24 +0300
> 
> > > Subject: RE: Ofbiz fails to build with a java service created in
> a
> 
> > > plugin
> 
> > > To: user@ofbiz.apache.org, plehal@lehal.net
> 
> > > From: Taher Alkhateeb <sl...@gmail.com>
> 
> > > What's exactly in the "xxxxxxx" and does it match the directory
> 
> > > structure?
> 
> > >
> 
> > > -----Original Message-----
> 
> > > From: Parminder S. Lehal [mailto:plehal@lehal.net]
> 
> > > Sent: Tuesday, 13 June 2017 2:31 PM
> 
> > > To: user <us...@ofbiz.apache.org>
> 
> > > Subject: Ofbiz fails to build with a java service created in a
> 
> > > plugin
> 
> > >
> 
> > > Ofbiz fails to compile with a java service created in a plugin as
> 
> > > it
> 
> > > complains about missing symbols on all ofbiz imports.
> 
> > >
> 
> > >
> 
> > >
> 
> > >    } catch (GenericEntityException e) {
> 
> > >                    ^
> 
> > >     symbol:   class GenericEntityException
> 
> > >     location: class ExpensesServices
> 
> > > /home/plehal/Downloads/apache-ofbiz-
> 
> > >
> 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxx/expen
> 
> > > se
> 
> > > s/
> 
> > > services/ExpensesServices.java:30: error: cannot find symbol
> 
> > >               Debug.logError(e, module);
> 
> > >               ^
> 
> > >     symbol:   variable Debug
> 
> > >     location: class ExpensesServices
> 
> > > /home/plehal/Downloads/apache-ofbiz-
> 
> > >
> 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxxxxxxx/
> 
> > > ex
> 
> > > pe
> 
> > > nses/services/ExpensesServices.java:31: error: cannot find symbol
> 
> > >               return ServiceUtil.returnError("Error in creating
> 
> > > record
> 
> > > in
> 
> > > Expenses entity ........" +module);
> 
> > >                      ^
> 
> > >     symbol:   variable ServiceUtil
> 
> > >
> 
> > >
> 
> 
> 
> 


Re: Ofbiz fails to build with a java service created in a plugin

Posted by Deepak Dixit <de...@hotwaxsystems.com>.
You can also refer the Release Notes 16.11.01
<http://ofbiz.apache.org/release-notes-16.11.01.html> for more details

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com
www.hotwax.co

On Wed, Jun 14, 2017 at 6:10 PM, Deepak Dixit <
deepak.dixit@hotwaxsystems.com> wrote:

> Hi Parminder,
>
>
> I think you are deploying you old code with ofbiz 16.11
>
> Package hierarchy has been changed
>
> Please refer https://issues.apache.org/jira/browse/OFBIZ-6274 for more detail
>
>
> org.ofbiz.* has been changed to org.apache.ofbiz.*
>
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
> www.hotwax.co
>
> On Wed, Jun 14, 2017 at 5:50 PM, Parminder S. Lehal <pl...@lehal.net>
> wrote:
>
>> code is nothing more than ofbiz demo code for component/plugin
>> development. In fact just the import statement alone cause the error
>> even if there is no other code. Similarly groovy script also complains
>> about ofbiz class which should be available to the framework. Following
>> is the the java code and error messages.
>>
>> package net.rimptec.expenses.services;
>> import java.util.Map;
>>
>> import org.ofbiz.base.util.Debug;
>> import org.ofbiz.entity.Delegator;
>> import org.ofbiz.entity.GenericEntityException;
>> import org.ofbiz.entity.GenericValue;
>> import org.ofbiz.service.DispatchContext;
>> import org.ofbiz.service.ServiceUtil;
>>
>> public class ExpensesServices {
>>
>>     public static final String module =
>> ExpensesServices.class.getName();
>>
>>     public static Map<String, Object> createExpenses(DispatchContext
>> dctx, Map<String, ? extends Object> context) {
>>         Map<String, Object> result = ServiceUtil.returnSuccess();
>>         Delegator delegator = dctx.getDelegator();
>>         try {
>>             GenericValue expenses = delegator.makeValue("Expenses");
>>             // Auto generating next sequence of expensesId primary key
>>             expenses.setNextSeqId();
>>             // Setting up all non primary key field values from context
>> map
>>             expenses.setNonPKFields(context);
>>             // Creating record in database for Expenses entity for
>> prepared value
>>             expenses = delegator.create(expenses);
>>             result.put("expensesId", expenses.getString("expensesId"));
>>             Debug.log("==========Expenses record created successfully
>> with expensesId: "+expenses.getString("expensesId"));
>>         } catch (GenericEntityException e) {
>>             Debug.logError(e, module);
>>             return ServiceUtil.returnError("Error in creating record in
>> Expenses entity ........" +module);
>>         }
>>         return result;
>>     }
>>
>> }
>>
>>
>>
>>
>> /home/plehal/Downloads/apache-ofbiz-
>> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
>> vices/ExpensesServices.java:17: error: cannot find symbol
>>         Map<String, Object> result = ServiceUtil.returnSuccess();
>>                                      ^
>>   symbol:   variable ServiceUtil
>>   location: class ExpensesServices
>> /home/plehal/Downloads/apache-ofbiz-
>> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
>> vices/ExpensesServices.java:18: error: cannot find symbol
>>         Delegator delegator = dctx.getDelegator();
>>         ^
>>   symbol:   class Delegator
>>   location: class ExpensesServices
>> /home/plehal/Downloads/apache-ofbiz-
>> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
>> vices/ExpensesServices.java:20: error: cannot find symbol
>>             GenericValue expenses = delegator.makeValue("Expenses");
>>             ^
>>   symbol:   class GenericValue
>>   location: class ExpensesServices
>> /home/plehal/Downloads/apache-ofbiz-
>> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
>> vices/ExpensesServices.java:28: error: cannot find symbol
>>             Debug.log("==========Expenses record created successfully
>> with expensesId: "+expenses.getString("expensesId"));
>>             ^
>>   symbol:   variable Debug
>>   location: class ExpensesServices
>> /home/plehal/Downloads/apache-ofbiz-
>> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
>> vices/ExpensesServices.java:29: error: cannot find symbol
>>         } catch (GenericEntityException e) {
>>                  ^
>>   symbol:   class GenericEntityException
>>   location: class ExpensesServices
>> /home/plehal/Downloads/apache-ofbiz-
>> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
>> vices/ExpensesServices.java:30: error: cannot find symbol
>>             Debug.logError(e, module);
>>             ^
>>   symbol:   variable Debug
>>   location: class ExpensesServices
>> /home/plehal/Downloads/apache-ofbiz-
>> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
>> vices/ExpensesServices.java:31: error: cannot find symbol
>>             return ServiceUtil.returnError("Error in creating record in
>> Expenses entity ........" +module);
>>                    ^
>>   symbol:   variable ServiceUtil
>>   location: class ExpensesServices
>> Note: Some input files use unchecked or unsafe operations.
>> Note: Recompile with -Xlint:unchecked for details.
>> 14 errors
>>
>> :compileJava FAILED
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> -----Original Message-----
>>
>> Date: Wed, 14 Jun 2017 11:12:45 +0200
>> Subject: Re: Ofbiz fails to build with a java service created in a
>> plugin
>> To: user@ofbiz.apache.org
>> Reply-to: user@ofbiz.apache.org
>> From: Jacques Le Roux <ja...@les7arts.com>
>> Sorry but we will need more information to help
>>
>> Maybe the stack trace, and even more the piece of code which fails with
>> the name of the directory where the file is placed
>>
>> Jacques
>>
>>
>> Le 13/06/2017 à 21:49, Parminder S. Lehal a écrit :
>> > 16.11.02.
>> >
>> >
>> >
>> > -----Original Message-----
>> >
>> > Date: Tue, 13 Jun 2017 20:02:20 +0200
>> > Subject: Re: Ofbiz fails to build with a java service created in a
>> > plugin
>> > To: user@ofbiz.apache.org
>> > Reply-to: user@ofbiz.apache.org
>> > From: Jacques Le Roux <ja...@les7arts.com>
>> > Which version are you using?
>> >
>> > Jacques
>> >
>> >
>> > Le 13/06/2017 à 18:46, Parminder S. Lehal a écrit :
>> > > xxxxx is tld.companyname...The error is about missing ofbiz
>> > > imports.
>> > >
>> > > Same thing happens with groovy service script too at runtime.
>> > >
>> > > 1: unable to resolve class org.ofbiz.entity.GenericEntityException
>> > >    @ line 1, column 1.
>> > >      import org.ofbiz.entity.GenericEntityException;
>> > >      ^
>> > >
>> > >
>> > >
>> > >
>> > > -----Original Message-----
>> > >
>> > > Date: Tue, 13 Jun 2017 14:47:24 +0300
>> > > Subject: RE: Ofbiz fails to build with a java service created in a
>> > > plugin
>> > > To: user@ofbiz.apache.org, plehal@lehal.net
>> > > From: Taher Alkhateeb <sl...@gmail.com>
>> > > What's exactly in the "xxxxxxx" and does it match the directory
>> > > structure?
>> > >
>> > > -----Original Message-----
>> > > From: Parminder S. Lehal [mailto:plehal@lehal.net]
>> > > Sent: Tuesday, 13 June 2017 2:31 PM
>> > > To: user <us...@ofbiz.apache.org>
>> > > Subject: Ofbiz fails to build with a java service created in a
>> > > plugin
>> > >
>> > > Ofbiz fails to compile with a java service created in a plugin as
>> > > it
>> > > complains about missing symbols on all ofbiz imports.
>> > >
>> > >
>> > >
>> > >    } catch (GenericEntityException e) {
>> > >                    ^
>> > >     symbol:   class GenericEntityException
>> > >     location: class ExpensesServices
>> > > /home/plehal/Downloads/apache-ofbiz-
>> > > 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxx/expen
>> > > se
>> > > s/
>> > > services/ExpensesServices.java:30: error: cannot find symbol
>> > >               Debug.logError(e, module);
>> > >               ^
>> > >     symbol:   variable Debug
>> > >     location: class ExpensesServices
>> > > /home/plehal/Downloads/apache-ofbiz-
>> > > 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxxxxxxx/
>> > > ex
>> > > pe
>> > > nses/services/ExpensesServices.java:31: error: cannot find symbol
>> > >               return ServiceUtil.returnError("Error in creating
>> > > record
>> > > in
>> > > Expenses entity ........" +module);
>> > >                      ^
>> > >     symbol:   variable ServiceUtil
>> > >
>> > >
>>
>>
>

Re: Ofbiz fails to build with a java service created in a plugin

Posted by Deepak Dixit <de...@hotwaxsystems.com>.
Hi Parminder,


I think you are deploying you old code with ofbiz 16.11

Package hierarchy has been changed

Please refer https://issues.apache.org/jira/browse/OFBIZ-6274 for more detail


org.ofbiz.* has been changed to org.apache.ofbiz.*


Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com
www.hotwax.co

On Wed, Jun 14, 2017 at 5:50 PM, Parminder S. Lehal <pl...@lehal.net>
wrote:

> code is nothing more than ofbiz demo code for component/plugin
> development. In fact just the import statement alone cause the error
> even if there is no other code. Similarly groovy script also complains
> about ofbiz class which should be available to the framework. Following
> is the the java code and error messages.
>
> package net.rimptec.expenses.services;
> import java.util.Map;
>
> import org.ofbiz.base.util.Debug;
> import org.ofbiz.entity.Delegator;
> import org.ofbiz.entity.GenericEntityException;
> import org.ofbiz.entity.GenericValue;
> import org.ofbiz.service.DispatchContext;
> import org.ofbiz.service.ServiceUtil;
>
> public class ExpensesServices {
>
>     public static final String module =
> ExpensesServices.class.getName();
>
>     public static Map<String, Object> createExpenses(DispatchContext
> dctx, Map<String, ? extends Object> context) {
>         Map<String, Object> result = ServiceUtil.returnSuccess();
>         Delegator delegator = dctx.getDelegator();
>         try {
>             GenericValue expenses = delegator.makeValue("Expenses");
>             // Auto generating next sequence of expensesId primary key
>             expenses.setNextSeqId();
>             // Setting up all non primary key field values from context
> map
>             expenses.setNonPKFields(context);
>             // Creating record in database for Expenses entity for
> prepared value
>             expenses = delegator.create(expenses);
>             result.put("expensesId", expenses.getString("expensesId"));
>             Debug.log("==========Expenses record created successfully
> with expensesId: "+expenses.getString("expensesId"));
>         } catch (GenericEntityException e) {
>             Debug.logError(e, module);
>             return ServiceUtil.returnError("Error in creating record in
> Expenses entity ........" +module);
>         }
>         return result;
>     }
>
> }
>
>
>
>
> /home/plehal/Downloads/apache-ofbiz-
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
> vices/ExpensesServices.java:17: error: cannot find symbol
>         Map<String, Object> result = ServiceUtil.returnSuccess();
>                                      ^
>   symbol:   variable ServiceUtil
>   location: class ExpensesServices
> /home/plehal/Downloads/apache-ofbiz-
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
> vices/ExpensesServices.java:18: error: cannot find symbol
>         Delegator delegator = dctx.getDelegator();
>         ^
>   symbol:   class Delegator
>   location: class ExpensesServices
> /home/plehal/Downloads/apache-ofbiz-
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
> vices/ExpensesServices.java:20: error: cannot find symbol
>             GenericValue expenses = delegator.makeValue("Expenses");
>             ^
>   symbol:   class GenericValue
>   location: class ExpensesServices
> /home/plehal/Downloads/apache-ofbiz-
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
> vices/ExpensesServices.java:28: error: cannot find symbol
>             Debug.log("==========Expenses record created successfully
> with expensesId: "+expenses.getString("expensesId"));
>             ^
>   symbol:   variable Debug
>   location: class ExpensesServices
> /home/plehal/Downloads/apache-ofbiz-
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
> vices/ExpensesServices.java:29: error: cannot find symbol
>         } catch (GenericEntityException e) {
>                  ^
>   symbol:   class GenericEntityException
>   location: class ExpensesServices
> /home/plehal/Downloads/apache-ofbiz-
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
> vices/ExpensesServices.java:30: error: cannot find symbol
>             Debug.logError(e, module);
>             ^
>   symbol:   variable Debug
>   location: class ExpensesServices
> /home/plehal/Downloads/apache-ofbiz-
> 16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
> vices/ExpensesServices.java:31: error: cannot find symbol
>             return ServiceUtil.returnError("Error in creating record in
> Expenses entity ........" +module);
>                    ^
>   symbol:   variable ServiceUtil
>   location: class ExpensesServices
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 14 errors
>
> :compileJava FAILED
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
>
> Date: Wed, 14 Jun 2017 11:12:45 +0200
> Subject: Re: Ofbiz fails to build with a java service created in a
> plugin
> To: user@ofbiz.apache.org
> Reply-to: user@ofbiz.apache.org
> From: Jacques Le Roux <ja...@les7arts.com>
> Sorry but we will need more information to help
>
> Maybe the stack trace, and even more the piece of code which fails with
> the name of the directory where the file is placed
>
> Jacques
>
>
> Le 13/06/2017 à 21:49, Parminder S. Lehal a écrit :
> > 16.11.02.
> >
> >
> >
> > -----Original Message-----
> >
> > Date: Tue, 13 Jun 2017 20:02:20 +0200
> > Subject: Re: Ofbiz fails to build with a java service created in a
> > plugin
> > To: user@ofbiz.apache.org
> > Reply-to: user@ofbiz.apache.org
> > From: Jacques Le Roux <ja...@les7arts.com>
> > Which version are you using?
> >
> > Jacques
> >
> >
> > Le 13/06/2017 à 18:46, Parminder S. Lehal a écrit :
> > > xxxxx is tld.companyname...The error is about missing ofbiz
> > > imports.
> > >
> > > Same thing happens with groovy service script too at runtime.
> > >
> > > 1: unable to resolve class org.ofbiz.entity.GenericEntityException
> > >    @ line 1, column 1.
> > >      import org.ofbiz.entity.GenericEntityException;
> > >      ^
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > >
> > > Date: Tue, 13 Jun 2017 14:47:24 +0300
> > > Subject: RE: Ofbiz fails to build with a java service created in a
> > > plugin
> > > To: user@ofbiz.apache.org, plehal@lehal.net
> > > From: Taher Alkhateeb <sl...@gmail.com>
> > > What's exactly in the "xxxxxxx" and does it match the directory
> > > structure?
> > >
> > > -----Original Message-----
> > > From: Parminder S. Lehal [mailto:plehal@lehal.net]
> > > Sent: Tuesday, 13 June 2017 2:31 PM
> > > To: user <us...@ofbiz.apache.org>
> > > Subject: Ofbiz fails to build with a java service created in a
> > > plugin
> > >
> > > Ofbiz fails to compile with a java service created in a plugin as
> > > it
> > > complains about missing symbols on all ofbiz imports.
> > >
> > >
> > >
> > >    } catch (GenericEntityException e) {
> > >                    ^
> > >     symbol:   class GenericEntityException
> > >     location: class ExpensesServices
> > > /home/plehal/Downloads/apache-ofbiz-
> > > 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxx/expen
> > > se
> > > s/
> > > services/ExpensesServices.java:30: error: cannot find symbol
> > >               Debug.logError(e, module);
> > >               ^
> > >     symbol:   variable Debug
> > >     location: class ExpensesServices
> > > /home/plehal/Downloads/apache-ofbiz-
> > > 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxxxxxxx/
> > > ex
> > > pe
> > > nses/services/ExpensesServices.java:31: error: cannot find symbol
> > >               return ServiceUtil.returnError("Error in creating
> > > record
> > > in
> > > Expenses entity ........" +module);
> > >                      ^
> > >     symbol:   variable ServiceUtil
> > >
> > >
>
>

Re: Ofbiz fails to build with a java service created in a plugin

Posted by "Parminder S. Lehal" <pl...@lehal.net>.
code is nothing more than ofbiz demo code for component/plugin
development. In fact just the import statement alone cause the error
even if there is no other code. Similarly groovy script also complains
about ofbiz class which should be available to the framework. Following
is the the java code and error messages.

package net.rimptec.expenses.services;
import java.util.Map;
 
import org.ofbiz.base.util.Debug;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.DispatchContext;
import org.ofbiz.service.ServiceUtil;
 
public class ExpensesServices {

    public static final String module =
ExpensesServices.class.getName();
 
    public static Map<String, Object> createExpenses(DispatchContext
dctx, Map<String, ? extends Object> context) {
        Map<String, Object> result = ServiceUtil.returnSuccess();
        Delegator delegator = dctx.getDelegator();
        try {
            GenericValue expenses = delegator.makeValue("Expenses");
            // Auto generating next sequence of expensesId primary key
            expenses.setNextSeqId();
            // Setting up all non primary key field values from context
map
            expenses.setNonPKFields(context);
            // Creating record in database for Expenses entity for
prepared value
            expenses = delegator.create(expenses);
            result.put("expensesId", expenses.getString("expensesId"));
            Debug.log("==========Expenses record created successfully
with expensesId: "+expenses.getString("expensesId"));
        } catch (GenericEntityException e) {
            Debug.logError(e, module);
            return ServiceUtil.returnError("Error in creating record in
Expenses entity ........" +module);
        }
        return result;
    }
    
} 




/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
vices/ExpensesServices.java:17: error: cannot find symbol
        Map<String, Object> result = ServiceUtil.returnSuccess();
                                     ^
  symbol:   variable ServiceUtil
  location: class ExpensesServices
/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
vices/ExpensesServices.java:18: error: cannot find symbol
        Delegator delegator = dctx.getDelegator();
        ^
  symbol:   class Delegator
  location: class ExpensesServices
/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
vices/ExpensesServices.java:20: error: cannot find symbol
            GenericValue expenses = delegator.makeValue("Expenses");
            ^
  symbol:   class GenericValue
  location: class ExpensesServices
/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
vices/ExpensesServices.java:28: error: cannot find symbol
            Debug.log("==========Expenses record created successfully
with expensesId: "+expenses.getString("expensesId"));
            ^
  symbol:   variable Debug
  location: class ExpensesServices
/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
vices/ExpensesServices.java:29: error: cannot find symbol
        } catch (GenericEntityException e) {
                 ^
  symbol:   class GenericEntityException
  location: class ExpensesServices
/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
vices/ExpensesServices.java:30: error: cannot find symbol
            Debug.logError(e, module);
            ^
  symbol:   variable Debug
  location: class ExpensesServices
/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/net/rimptec/expenses/ser
vices/ExpensesServices.java:31: error: cannot find symbol
            return ServiceUtil.returnError("Error in creating record in
Expenses entity ........" +module);
                   ^
  symbol:   variable ServiceUtil
  location: class ExpensesServices
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
14 errors

:compileJava FAILED




















-----Original Message-----

Date: Wed, 14 Jun 2017 11:12:45 +0200
Subject: Re: Ofbiz fails to build with a java service created in a
plugin
To: user@ofbiz.apache.org
Reply-to: user@ofbiz.apache.org
From: Jacques Le Roux <ja...@les7arts.com>
Sorry but we will need more information to help

Maybe the stack trace, and even more the piece of code which fails with
the name of the directory where the file is placed

Jacques


Le 13/06/2017 à 21:49, Parminder S. Lehal a écrit :
> 16.11.02.
> 
> 
> 
> -----Original Message-----
> 
> Date: Tue, 13 Jun 2017 20:02:20 +0200
> Subject: Re: Ofbiz fails to build with a java service created in a
> plugin
> To: user@ofbiz.apache.org
> Reply-to: user@ofbiz.apache.org
> From: Jacques Le Roux <ja...@les7arts.com>
> Which version are you using?
> 
> Jacques
> 
> 
> Le 13/06/2017 à 18:46, Parminder S. Lehal a écrit :
> > xxxxx is tld.companyname...The error is about missing ofbiz
> > imports.
> > 
> > Same thing happens with groovy service script too at runtime.
> > 
> > 1: unable to resolve class org.ofbiz.entity.GenericEntityException
> >    @ line 1, column 1.
> >      import org.ofbiz.entity.GenericEntityException;
> >      ^
> > 
> > 
> > 
> > 
> > -----Original Message-----
> > 
> > Date: Tue, 13 Jun 2017 14:47:24 +0300
> > Subject: RE: Ofbiz fails to build with a java service created in a
> > plugin
> > To: user@ofbiz.apache.org, plehal@lehal.net
> > From: Taher Alkhateeb <sl...@gmail.com>
> > What's exactly in the "xxxxxxx" and does it match the directory
> > structure?
> > 
> > -----Original Message-----
> > From: Parminder S. Lehal [mailto:plehal@lehal.net]
> > Sent: Tuesday, 13 June 2017 2:31 PM
> > To: user <us...@ofbiz.apache.org>
> > Subject: Ofbiz fails to build with a java service created in a
> > plugin
> > 
> > Ofbiz fails to compile with a java service created in a plugin as
> > it
> > complains about missing symbols on all ofbiz imports.
> > 
> > 
> > 
> >    } catch (GenericEntityException e) {
> >                    ^
> >     symbol:   class GenericEntityException
> >     location: class ExpensesServices
> > /home/plehal/Downloads/apache-ofbiz-
> > 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxx/expen
> > se
> > s/
> > services/ExpensesServices.java:30: error: cannot find symbol
> >               Debug.logError(e, module);
> >               ^
> >     symbol:   variable Debug
> >     location: class ExpensesServices
> > /home/plehal/Downloads/apache-ofbiz-
> > 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxxxxxxx/
> > ex
> > pe
> > nses/services/ExpensesServices.java:31: error: cannot find symbol
> >               return ServiceUtil.returnError("Error in creating
> > record
> > in
> > Expenses entity ........" +module);
> >                      ^
> >     symbol:   variable ServiceUtil
> > 
> > 


Re: Ofbiz fails to build with a java service created in a plugin

Posted by Jacques Le Roux <ja...@les7arts.com>.
Sorry but we will need more information to help

Maybe the stack trace, and even more the piece of code which fails with the name of the directory where the file is placed

Jacques


Le 13/06/2017 à 21:49, Parminder S. Lehal a écrit :
> 16.11.02.
>
>
>
> -----Original Message-----
>
> Date: Tue, 13 Jun 2017 20:02:20 +0200
> Subject: Re: Ofbiz fails to build with a java service created in a
> plugin
> To: user@ofbiz.apache.org
> Reply-to: user@ofbiz.apache.org
> From: Jacques Le Roux <ja...@les7arts.com>
> Which version are you using?
>
> Jacques
>
>
> Le 13/06/2017 à 18:46, Parminder S. Lehal a écrit :
>> xxxxx is tld.companyname...The error is about missing ofbiz imports.
>>
>> Same thing happens with groovy service script too at runtime.
>>
>> 1: unable to resolve class org.ofbiz.entity.GenericEntityException
>>    @ line 1, column 1.
>>      import org.ofbiz.entity.GenericEntityException;
>>      ^
>>
>>
>>
>>
>> -----Original Message-----
>>
>> Date: Tue, 13 Jun 2017 14:47:24 +0300
>> Subject: RE: Ofbiz fails to build with a java service created in a
>> plugin
>> To: user@ofbiz.apache.org, plehal@lehal.net
>> From: Taher Alkhateeb <sl...@gmail.com>
>> What's exactly in the "xxxxxxx" and does it match the directory
>> structure?
>>
>> -----Original Message-----
>> From: Parminder S. Lehal [mailto:plehal@lehal.net]
>> Sent: Tuesday, 13 June 2017 2:31 PM
>> To: user <us...@ofbiz.apache.org>
>> Subject: Ofbiz fails to build with a java service created in a plugin
>>
>> Ofbiz fails to compile with a java service created in a plugin as it
>> complains about missing symbols on all ofbiz imports.
>>
>>
>>
>>    } catch (GenericEntityException e) {
>>                    ^
>>     symbol:   class GenericEntityException
>>     location: class ExpensesServices
>> /home/plehal/Downloads/apache-ofbiz-
>> 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxx/expense
>> s/
>> services/ExpensesServices.java:30: error: cannot find symbol
>>               Debug.logError(e, module);
>>               ^
>>     symbol:   variable Debug
>>     location: class ExpensesServices
>> /home/plehal/Downloads/apache-ofbiz-
>> 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxxxxxxx/ex
>> pe
>> nses/services/ExpensesServices.java:31: error: cannot find symbol
>>               return ServiceUtil.returnError("Error in creating record
>> in
>> Expenses entity ........" +module);
>>                      ^
>>     symbol:   variable ServiceUtil
>>
>>
>


Re: Ofbiz fails to build with a java service created in a plugin

Posted by "Parminder S. Lehal" <pl...@lehal.net>.
16.11.02.



-----Original Message-----

Date: Tue, 13 Jun 2017 20:02:20 +0200
Subject: Re: Ofbiz fails to build with a java service created in a
plugin
To: user@ofbiz.apache.org
Reply-to: user@ofbiz.apache.org
From: Jacques Le Roux <ja...@les7arts.com>
Which version are you using?

Jacques


Le 13/06/2017 à 18:46, Parminder S. Lehal a écrit :
> xxxxx is tld.companyname...The error is about missing ofbiz imports.
> 
> Same thing happens with groovy service script too at runtime.
> 
> 1: unable to resolve class org.ofbiz.entity.GenericEntityException
>   @ line 1, column 1.
>     import org.ofbiz.entity.GenericEntityException;
>     ^
> 
> 
> 
> 
> -----Original Message-----
> 
> Date: Tue, 13 Jun 2017 14:47:24 +0300
> Subject: RE: Ofbiz fails to build with a java service created in a
> plugin
> To: user@ofbiz.apache.org, plehal@lehal.net
> From: Taher Alkhateeb <sl...@gmail.com>
> What's exactly in the "xxxxxxx" and does it match the directory
> structure?
> 
> -----Original Message-----
> From: Parminder S. Lehal [mailto:plehal@lehal.net]
> Sent: Tuesday, 13 June 2017 2:31 PM
> To: user <us...@ofbiz.apache.org>
> Subject: Ofbiz fails to build with a java service created in a plugin
> 
> Ofbiz fails to compile with a java service created in a plugin as it
> complains about missing symbols on all ofbiz imports.
> 
> 
> 
>   } catch (GenericEntityException e) {
>                   ^
>    symbol:   class GenericEntityException
>    location: class ExpensesServices
> /home/plehal/Downloads/apache-ofbiz-
> 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxx/expense
> s/
> services/ExpensesServices.java:30: error: cannot find symbol
>              Debug.logError(e, module);
>              ^
>    symbol:   variable Debug
>    location: class ExpensesServices
> /home/plehal/Downloads/apache-ofbiz-
> 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxxxxxxx/ex
> pe
> nses/services/ExpensesServices.java:31: error: cannot find symbol
>              return ServiceUtil.returnError("Error in creating record
> in
> Expenses entity ........" +module);
>                     ^
>    symbol:   variable ServiceUtil
> 
> 


Re: Ofbiz fails to build with a java service created in a plugin

Posted by Jacques Le Roux <ja...@les7arts.com>.
Which version are you using?

Jacques


Le 13/06/2017 à 18:46, Parminder S. Lehal a écrit :
> xxxxx is tld.companyname...The error is about missing ofbiz imports.
>
> Same thing happens with groovy service script too at runtime.
>
> 1: unable to resolve class org.ofbiz.entity.GenericEntityException
>   @ line 1, column 1.
>     import org.ofbiz.entity.GenericEntityException;
>     ^
>
>
>
>
> -----Original Message-----
>
> Date: Tue, 13 Jun 2017 14:47:24 +0300
> Subject: RE: Ofbiz fails to build with a java service created in a
> plugin
> To: user@ofbiz.apache.org, plehal@lehal.net
> From: Taher Alkhateeb <sl...@gmail.com>
> What's exactly in the "xxxxxxx" and does it match the directory
> structure?
>
> -----Original Message-----
> From: Parminder S. Lehal [mailto:plehal@lehal.net]
> Sent: Tuesday, 13 June 2017 2:31 PM
> To: user <us...@ofbiz.apache.org>
> Subject: Ofbiz fails to build with a java service created in a plugin
>
> Ofbiz fails to compile with a java service created in a plugin as it
> complains about missing symbols on all ofbiz imports.
>
>
>
>   } catch (GenericEntityException e) {
>                   ^
>    symbol:   class GenericEntityException
>    location: class ExpensesServices
> /home/plehal/Downloads/apache-ofbiz-
> 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxx/expenses/
> services/ExpensesServices.java:30: error: cannot find symbol
>              Debug.logError(e, module);
>              ^
>    symbol:   variable Debug
>    location: class ExpensesServices
> /home/plehal/Downloads/apache-ofbiz-
> 16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxxxxxxx/expe
> nses/services/ExpensesServices.java:31: error: cannot find symbol
>              return ServiceUtil.returnError("Error in creating record in
> Expenses entity ........" +module);
>                     ^
>    symbol:   variable ServiceUtil
>
>


Re: Ofbiz fails to build with a java service created in a plugin

Posted by "Parminder S. Lehal" <pl...@lehal.net>.
xxxxx is tld.companyname...The error is about missing ofbiz imports. 

Same thing happens with groovy service script too at runtime.

1: unable to resolve class org.ofbiz.entity.GenericEntityException
 @ line 1, column 1.
   import org.ofbiz.entity.GenericEntityException;
   ^




-----Original Message-----

Date: Tue, 13 Jun 2017 14:47:24 +0300
Subject: RE: Ofbiz fails to build with a java service created in a
plugin
To: user@ofbiz.apache.org, plehal@lehal.net
From: Taher Alkhateeb <sl...@gmail.com>
What's exactly in the "xxxxxxx" and does it match the directory
structure?

-----Original Message-----
From: Parminder S. Lehal [mailto:plehal@lehal.net] 
Sent: Tuesday, 13 June 2017 2:31 PM
To: user <us...@ofbiz.apache.org>
Subject: Ofbiz fails to build with a java service created in a plugin

Ofbiz fails to compile with a java service created in a plugin as it
complains about missing symbols on all ofbiz imports.



 } catch (GenericEntityException e) {
                 ^
  symbol:   class GenericEntityException
  location: class ExpensesServices
/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxx/expenses/
services/ExpensesServices.java:30: error: cannot find symbol
            Debug.logError(e, module);
            ^
  symbol:   variable Debug
  location: class ExpensesServices
/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxxxxxxx/expe
nses/services/ExpensesServices.java:31: error: cannot find symbol
            return ServiceUtil.returnError("Error in creating record in
Expenses entity ........" +module);
                   ^
  symbol:   variable ServiceUtil


RE: Ofbiz fails to build with a java service created in a plugin

Posted by Taher Alkhateeb <sl...@gmail.com>.
What's exactly in the "xxxxxxx" and does it match the directory structure?

-----Original Message-----
From: Parminder S. Lehal [mailto:plehal@lehal.net] 
Sent: Tuesday, 13 June 2017 2:31 PM
To: user <us...@ofbiz.apache.org>
Subject: Ofbiz fails to build with a java service created in a plugin

Ofbiz fails to compile with a java service created in a plugin as it complains about missing symbols on all ofbiz imports.



 } catch (GenericEntityException e) {
                 ^
  symbol:   class GenericEntityException
  location: class ExpensesServices
/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxx/expenses/
services/ExpensesServices.java:30: error: cannot find symbol
            Debug.logError(e, module);
            ^
  symbol:   variable Debug
  location: class ExpensesServices
/home/plehal/Downloads/apache-ofbiz-
16.11.02/specialpurpose/expenses/src/main/java/xxxxxxxxxxxxxxxxxxx/expe
nses/services/ExpensesServices.java:31: error: cannot find symbol
            return ServiceUtil.returnError("Error in creating record in Expenses entity ........" +module);
                   ^
  symbol:   variable ServiceUtil