Unable import ofbiz references into hot/deploy java code

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

Unable import ofbiz references into hot/deploy java code

Victor Hernadez
Hi OFBiz Devs,

I'll appreciate your advice to fix a compile issue I'm facing about since a week, when trying to compile the attached ofbiz demo Java service from a custom hot-deploy component (trunk-rev1759478 / version 15) I got a "package org.ofbiz... does not exists" errors.

I tried to fix with no success creating the attached build.gradle into hot-deploy directory and adding someĀ <classpath> entries into ofbiz-component.xml.

Thanks a lot in advance,
Regards
Victor

ofbiz-component.xml (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Unable import ofbiz references into hot/deploy java code

taher
Hello,

We recently refactored the framework so that all java packages are
org.apache.ofbiz instead of org.ofbiz. So I think a simple renaming would
perhaps fix your issue

Cheers,

Taher Alkhateeb

On Sat, Oct 22, 2016 at 9:09 PM, Teams Corner <[hidden email]
> wrote:

> Hi OFBiz Devs,
>
> I'll appreciate your advice to fix a compile issue I'm facing about since
> a week, when trying to compile the attached ofbiz demo Java service from a
> custom hot-deploy component (trunk-rev1759478 / version 15) I got a
> "package org.ofbiz... does not exists" errors.
>
> I tried to fix with no success creating the attached build.gradle into
> hot-deploy directory and adding some <classpath> entries into
> ofbiz-component.xml.
>
> Thanks a lot in advance,
> Regards
> Victor
>
Reply | Threaded
Open this post in threaded view
|

Re: Unable import ofbiz references into hot/deploy java code

Victor Hernadez
Hi Taher,

You're right I was using old package names, sadly after update package names into import clauses I'm still getting the same errors, any additional recommendation?

Thanks again for help.
Victor

#gradlew build
:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:createBaseTestServiceProviderJar
:processResources UP-TO-DATE
:classes
:jar
:assemble
:compileTestJava
:processTestResources UP-TO-DATE
:testClasses
:test
:check
:build
:hot-deploy:tc:compileJava
E:\app\apache\tc-dev\branches\tc-ofbiz-trunk-rev1759478\hot-deploy\tc\src\main\java\com\tc\ofbizdemo\services\OfbizDemoServices.java:5: error: package org.apach
e.ofbiz.base.util does not exist
import org.apache.ofbiz.base.util.Debug;
                                 ^
E:\app\apache\tc-dev\branches\tc-ofbiz-trunk-rev1759478\hot-deploy\tc\src\main\java\com\tc\ofbizdemo\services\OfbizDemoServices.java:6: error: package org.apach
e.ofbiz.entity does not exist
import org.apache.ofbiz.entity.Delegator;
                              ^
...
Reply | Threaded
Open this post in threaded view
|

Re: Unable import ofbiz references into hot/deploy java code

Deepak Dixit-3
In reply to this post by Victor Hernadez
Hi Victor,

As Taher mentioned we refactored java package. It will be applicable only
for trunk, In 15.12 brach you need to use old package hierarchy and on
trunk you need to use new package hierarchy.


Could you please share your build.xml?

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

On Sat, Oct 22, 2016 at 11:39 PM, Teams Corner <
[hidden email]> wrote:

> Hi OFBiz Devs,
>
> I'll appreciate your advice to fix a compile issue I'm facing about since
> a week, when trying to compile the attached ofbiz demo Java service from a
> custom hot-deploy component (trunk-rev1759478 / version 15) I got a
> "package org.ofbiz... does not exists" errors.
>
> I tried to fix with no success creating the attached build.gradle into
> hot-deploy directory and adding some <classpath> entries into
> ofbiz-component.xml.
>
> Thanks a lot in advance,
> Regards
> Victor
>
Reply | Threaded
Open this post in threaded view
|

Re: Unable import ofbiz references into hot/deploy java code

Victor Hernadez
Hi Deepak/Taher,

Finally I was able to fix this issue with your advice adjusting package names and removing the build.gradle file from my <OFBIZ_ROOT_DIR>/hot-deploy/<CUSTOM_APP>, it was added by myself while trying to fix.

Certainly I'm using trunk source code rev1759478 and the package names must be org.apache.ofbiz.* instead of org.ofbiz.*

Thanks both for support.

Regards