I tried installing Ofbiz 11.04 of Ubuntu 12.04 with OpenJDK 6 and got the following error ..
classes: [javac16] Compiling 13 source files to /opt/ofbiz.trunk/framework/security/build/classes [javac16] /opt/ofbiz.trunk/framework/security/src/org/ofbiz/security/OFBizSecurity.java:52: invalid inferred types for V; inferred type does not conform to declared bound(s) [javac16] inferred: java.util.Map<java.lang.String,java.lang.Object> [javac16] bound(s): java.util.Map<java.lang.String,java.lang.String> [javac16] protected static final Map<String, Map<String, String>> simpleRoleEntity = UtilMisc.toMap( [javac16] ^ [javac16] 1 error Any thoughts on where I could be going wrong ??
Rgds
Sanjeev Gupta www.digitalwebadvisors.com |
It's problem with java version. Try with sun java 1.6 (This is what we have
been using. More specifically I am happy with 1.6_23) On Wed, May 16, 2012 at 11:54 PM, Sanjeev Gupta <[hidden email]>wrote: > I tried installing Ofbiz 11.04 of Ubuntu 12.04 with OpenJDK 6 and got the > following error .. > > classes: > [javac16] Compiling 13 source files to > /opt/ofbiz.trunk/framework/security/build/classes > [javac16] > > /opt/ofbiz.trunk/framework/security/src/org/ofbiz/security/OFBizSecurity.java:52: > invalid inferred types for V; inferred type does not conform to > declared bound(s) > [javac16] inferred: java.util.Map<java.lang.String,java.lang.Object> > [javac16] bound(s): java.util.Map<java.lang.String,java.lang.String> > [javac16] protected static final Map<String, Map<String, > String>> simpleRoleEntity = UtilMisc.toMap( > [javac16] > ^ > [javac16] 1 error > > > Any thoughts on where I could be going wrong ?? > > ----- > Rgds > Sanjeev > www.sanjeevg.com > @sanjeevgcom > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Unable-to-install-Ofbiz-11-04-on-Ubuntu-12-04-tp4631840.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > > -- > Thanks, > Deepak Agarwal, > > Paxcel Technologies Pvt Ltd. > Hartron Complex, Sector 18, Gurgaon, India. > E-Mail: [hidden email] > Mobile: +91 9910322604 > > |
Hi Sanjeev,
There is a patch that might fix your specific problem at https://issues.apache.org/jira/browse/OFBIZ-4638. It was done for the trunk version, but you may be able to apply it to earlier versions. As Deepak says, earlier releases of OFBiz do not compile with OpenJDK, although several people have made improvements. Cheers Paul Foxworthy
--
Coherent Software Australia Pty Ltd http://www.coherentsoftware.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ |
Thx Paul
I installed the patch, and it resolved the problem. but then the install failed with the following error classes: [javac16] Compiling 65 source files to /opt/ofbiz.11.04/applications/product/build/classes [javac16] ProductSearchEvents.java:317: invalid inferred types for V; inferred type does not conform to declared bound(s) [javac16] inferred: java.lang.Integer [javac16] bound(s): java.lang.String [javac16] Map<String, String> messageMap = UtilMisc.toMap("numAdded", Integer.valueOf(numAdded), "productFeatureId", productFeatureId); [javac16] ^ [javac16] ProductSearchEvents.java:367: invalid inferred types for V; inferred type does not conform to declared bound(s) [javac16] inferred: java.lang.Integer [javac16] bound(s): java.lang.String [javac16] Map<String, String> messageMap = UtilMisc.toMap("numRemoved", Integer.valueOf(numRemoved), "productFeatureId", productFeatureId); [javac16] ^ [javac16] ProductSearchSession.java:1231: cannot find symbol [javac16] symbol : method add(java.util.Map<java.lang.String,java.lang.Object>) [javac16] location: interface java.util.List<java.util.Map<java.lang.String,java.lang.String>> [javac16] featureCountList.add(UtilMisc.toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount")))); [javac16] ^ [javac16] ShipmentServices.java:1033: invalid inferred types for V; inferred type does not conform to declared bound(s) [javac16] inferred: org.ofbiz.entity.GenericValue [javac16] bound(s): java.lang.String [javac16] Map<String, String> input = UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "userLogin", userLogin); [javac16] ^ [javac16] 4 errors BUILD FAILED /opt/ofbiz.11.04/build.xml:209: The following error occurred while executing this line: /opt/ofbiz.11.04/applications/build.xml:67: The following error occurred while executing this line: /opt/ofbiz.11.04/macros.xml:32: The following error occurred while executing this line: /opt/ofbiz.11.04/common.xml:93: Compile failed; see the compiler error output for details. Just to make sure, I upgraded to openJDK 1.7, but still no luck. classes: [javac16] Compiling 65 source files to /opt/ofbiz.11.04/applications/product/build/classes [javac16] warning: [options] bootstrap class path not set in conjunction with -source 1.6 [javac16] /opt/ofbiz.11.04/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java:317: error: invalid inferred types for V; inferred type does not conform to declared bound(s) [javac16] Map<String, String> messageMap = UtilMisc.toMap("numAdded", Integer.valueOf(numAdded), "productFeatureId", productFeatureId); [javac16] ^ [javac16] inferred: Integer [javac16] bound(s): String [javac16] where V,V1,V2 are type-variables: [javac16] V extends Object declared in method <V,V1,V2>toMap(String,V1,String,V2) [javac16] V1 extends V declared in method <V,V1,V2>toMap(String,V1,String,V2) [javac16] V2 extends V declared in method <V,V1,V2>toMap(String,V1,String,V2) [javac16] /opt/ofbiz.11.04/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java:367: error: invalid inferred types for V; inferred type does not conform to declared bound(s) [javac16] Map<String, String> messageMap = UtilMisc.toMap("numRemoved", Integer.valueOf(numRemoved), "productFeatureId", productFeatureId); [javac16] ^ [javac16] inferred: Integer [javac16] bound(s): String [javac16] where V,V1,V2 are type-variables: [javac16] V extends Object declared in method <V,V1,V2>toMap(String,V1,String,V2) [javac16] V1 extends V declared in method <V,V1,V2>toMap(String,V1,String,V2) [javac16] V2 extends V declared in method <V,V1,V2>toMap(String,V1,String,V2) [javac16] /opt/ofbiz.11.04/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java:1231: error: no suitable method found for add(Map<String,Object>) [javac16] featureCountList.add(UtilMisc.toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount")))); [javac16] ^ [javac16] method List.add(int,Map<String,String>) is not applicable [javac16] (actual and formal argument lists differ in length) [javac16] method List.add(Map<String,String>) is not applicable [javac16] (actual argument Map<String,Object> cannot be converted to Map<String,String> by method invocation conversion) [javac16] /opt/ofbiz.11.04/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java:1033: error: invalid inferred types for V; inferred type does not conform to declared bound(s) [javac16] Map<String, String> input = UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "userLogin", userLogin); [javac16] ^ [javac16] inferred: GenericValue [javac16] bound(s): String [javac16] where V,V1,V2,V3 are type-variables: [javac16] V extends Object declared in method <V,V1,V2,V3>toMap(String,V1,String,V2,String,V3) [javac16] V1 extends V declared in method <V,V1,V2,V3>toMap(String,V1,String,V2,String,V3) [javac16] V2 extends V declared in method <V,V1,V2,V3>toMap(String,V1,String,V2,String,V3) [javac16] V3 extends V declared in method <V,V1,V2,V3>toMap(String,V1,String,V2,String,V3) [javac16] 4 errors [javac16] 1 warning BUILD FAILED /opt/ofbiz.11.04/build.xml:209: The following error occurred while executing this line: /opt/ofbiz.11.04/applications/build.xml:67: The following error occurred while executing this line: /opt/ofbiz.11.04/macros.xml:32: The following error occurred while executing this line: /opt/ofbiz.11.04/common.xml:93: Compile failed; see the compiler error output for details. I'll probably try take on Deepak's recommendation too and switch to Oracle JDK and see if that resolves the issue. Meantime does is actually make any diff if I use Oracle JDK or Open JDK ?? (apart from the fact that Ubuntu no longer supports oralce JDK)
Rgds
Sanjeev Gupta www.digitalwebadvisors.com |
While doing that, make sure you don't install sun jdk1.7. Install 1.6 .
AFAIR I had prob with jdk1.7. On Thu, May 17, 2012 at 11:52 AM, Sanjeev Gupta <[hidden email]>wrote: > Thx Paul > I installed the patch, and it resolved the problem. > but then the install failed with the following error > classes: > [javac16] Compiling 65 source files to > /opt/ofbiz.11.04/applications/product/build/classes > [javac16] ProductSearchEvents.java:317: invalid inferred types for V; > inferred type does not conform to declared bound(s) > [javac16] inferred: java.lang.Integer > [javac16] bound(s): java.lang.String > [javac16] Map<String, String> messageMap = > UtilMisc.toMap("numAdded", Integer.valueOf(numAdded), "productFeatureId", > productFeatureId); > [javac16] ^ > [javac16] ProductSearchEvents.java:367: invalid inferred types for V; > inferred type does not conform to declared bound(s) > [javac16] inferred: java.lang.Integer > [javac16] bound(s): java.lang.String > [javac16] Map<String, String> messageMap = > UtilMisc.toMap("numRemoved", Integer.valueOf(numRemoved), > "productFeatureId", productFeatureId); > [javac16] ^ > [javac16] ProductSearchSession.java:1231: cannot find symbol > [javac16] symbol : method > add(java.util.Map<java.lang.String,java.lang.Object>) > [javac16] location: interface > java.util.List<java.util.Map<java.lang.String,java.lang.String>> > [javac16] > featureCountList.add(UtilMisc.toMap("productFeatureId", (String) > searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) > searchResult.get("pfcProductFeatureTypeId"), "description", (String) > searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) > searchResult.get("featureCount")))); > [javac16] ^ > [javac16] ShipmentServices.java:1033: invalid inferred types for V; > inferred type does not conform to declared bound(s) > [javac16] inferred: org.ofbiz.entity.GenericValue > [javac16] bound(s): java.lang.String > [javac16] Map<String, String> input = > UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", > shipmentRouteSegmentId, "userLogin", userLogin); > [javac16] ^ > [javac16] 4 errors > > BUILD FAILED > /opt/ofbiz.11.04/build.xml:209: The following error occurred while > executing > this line: > /opt/ofbiz.11.04/applications/build.xml:67: The following error occurred > while executing this line: > /opt/ofbiz.11.04/macros.xml:32: The following error occurred while > executing > this line: > /opt/ofbiz.11.04/common.xml:93: Compile failed; see the compiler error > output for details. > > > */Just to make sure, I upgraded to openJDK 1.7, but still no luck./* > > classes: > [javac16] Compiling 65 source files to > /opt/ofbiz.11.04/applications/product/build/classes > [javac16] warning: [options] bootstrap class path not set in conjunction > with -source 1.6 > [javac16] > > /opt/ofbiz.11.04/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java:317: > error: invalid inferred types for V; inferred type does not conform to > declared bound(s) > [javac16] Map<String, String> messageMap = > UtilMisc.toMap("numAdded", Integer.valueOf(numAdded), "productFeatureId", > productFeatureId); > [javac16] ^ > [javac16] inferred: Integer > [javac16] bound(s): String > [javac16] where V,V1,V2 are type-variables: > [javac16] V extends Object declared in method > <V,V1,V2>toMap(String,V1,String,V2) > [javac16] V1 extends V declared in method > <V,V1,V2>toMap(String,V1,String,V2) > [javac16] V2 extends V declared in method > <V,V1,V2>toMap(String,V1,String,V2) > [javac16] > > /opt/ofbiz.11.04/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java:367: > error: invalid inferred types for V; inferred type does not conform to > declared bound(s) > [javac16] Map<String, String> messageMap = > UtilMisc.toMap("numRemoved", Integer.valueOf(numRemoved), > "productFeatureId", productFeatureId); > [javac16] ^ > [javac16] inferred: Integer > [javac16] bound(s): String > [javac16] where V,V1,V2 are type-variables: > [javac16] V extends Object declared in method > <V,V1,V2>toMap(String,V1,String,V2) > [javac16] V1 extends V declared in method > <V,V1,V2>toMap(String,V1,String,V2) > [javac16] V2 extends V declared in method > <V,V1,V2>toMap(String,V1,String,V2) > [javac16] > > /opt/ofbiz.11.04/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java:1231: > error: no suitable method found for add(Map<String,Object>) > [javac16] > featureCountList.add(UtilMisc.toMap("productFeatureId", (String) > searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) > searchResult.get("pfcProductFeatureTypeId"), "description", (String) > searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) > searchResult.get("featureCount")))); > [javac16] ^ > [javac16] method List.add(int,Map<String,String>) is not applicable > [javac16] (actual and formal argument lists differ in length) > [javac16] method List.add(Map<String,String>) is not applicable > [javac16] (actual argument Map<String,Object> cannot be converted to > Map<String,String> by method invocation conversion) > [javac16] > > /opt/ofbiz.11.04/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java:1033: > error: invalid inferred types for V; inferred type does not conform to > declared bound(s) > [javac16] Map<String, String> input = > UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", > shipmentRouteSegmentId, "userLogin", userLogin); > [javac16] ^ > [javac16] inferred: GenericValue > [javac16] bound(s): String > [javac16] where V,V1,V2,V3 are type-variables: > [javac16] V extends Object declared in method > <V,V1,V2,V3>toMap(String,V1,String,V2,String,V3) > [javac16] V1 extends V declared in method > <V,V1,V2,V3>toMap(String,V1,String,V2,String,V3) > [javac16] V2 extends V declared in method > <V,V1,V2,V3>toMap(String,V1,String,V2,String,V3) > [javac16] V3 extends V declared in method > <V,V1,V2,V3>toMap(String,V1,String,V2,String,V3) > [javac16] 4 errors > [javac16] 1 warning > > BUILD FAILED > /opt/ofbiz.11.04/build.xml:209: The following error occurred while > executing > this line: > /opt/ofbiz.11.04/applications/build.xml:67: The following error occurred > while executing this line: > /opt/ofbiz.11.04/macros.xml:32: The following error occurred while > executing > this line: > /opt/ofbiz.11.04/common.xml:93: Compile failed; see the compiler error > output for details. > > I'll probably try take on Deepak's recommendation too and switch to Oracle > JDK and see if that resolves the issue. > Meantime does is actually make any diff if I use Oracle JDK or Open JDK ?? > (apart from the fact that Ubuntu no longer supports oralce JDK) > > ----- > Rgds > Sanjeev > www.sanjeevg.com > @sanjeevgcom > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Unable-to-install-Ofbiz-11-04-on-Ubuntu-12-04-tp4631840p4631860.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > > -- > Thanks, > Deepak Agarwal, > > Paxcel Technologies Pvt Ltd. > Hartron Complex, Sector 18, Gurgaon, India. > E-Mail: [hidden email] > Mobile: +91 9910322604 > > |
Thx for the tip Deepak.
Uninstalling openJDK from Ubuntu is painful, so rebuilding Ubuntu from scratch to install oracle Java 1.6
Rgds
Sanjeev Gupta www.digitalwebadvisors.com |
w8. don't rebuild.
I tell you solution for that too. On Thu, May 17, 2012 at 4:26 PM, Sanjeev Gupta <[hidden email]>wrote: > Thx for the tip Deepak. > Uninstalling openJDK from Ubuntu is painful, so rebuilding Ubuntu from > scratch to install oracle Java 1.6 > > ----- > Rgds > Sanjeev > www.sanjeevg.com > @sanjeevgcom > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Unable-to-install-Ofbiz-11-04-on-Ubuntu-12-04-tp4631840p4631878.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > -- Thanks, Deepak Agarwal, Paxcel Technologies Pvt Ltd. Hartron Complex, Sector 18, Gurgaon, India. E-Mail: [hidden email] Mobile: +91 9910322604 |
Have your sun jdk anywhere . Lets say u have it at : /usr/java/jdk1.6_23/
'alternatives' command is your buddy here. Issue follow to know your current java installations: *alternatives --display java * * * above will show all the paths which are linked to when you type 'java' Now, lets say you do see your sun jdk entry at number 2. then issue following: *alternatives --config java * * * Press 2 and that's it, now java is pointing to your sun jdk. If you don't see it under that list, then do following: *update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk1.6_23/bin" 1* above command will link java to ur directory(or installation) and set it to 1. On Thu, May 17, 2012 at 4:34 PM, Deepak Agarwal <[hidden email]>wrote: > w8. don't rebuild. > I tell you solution for that too. > > On Thu, May 17, 2012 at 4:26 PM, Sanjeev Gupta <[hidden email]>wrote: > >> Thx for the tip Deepak. >> Uninstalling openJDK from Ubuntu is painful, so rebuilding Ubuntu from >> scratch to install oracle Java 1.6 >> >> ----- >> Rgds >> Sanjeev >> www.sanjeevg.com >> @sanjeevgcom >> -- >> View this message in context: >> http://ofbiz.135035.n4.nabble.com/Unable-to-install-Ofbiz-11-04-on-Ubuntu-12-04-tp4631840p4631878.html >> Sent from the OFBiz - User mailing list archive at Nabble.com. >> > > > > -- > Thanks, > Deepak Agarwal, > > Paxcel Technologies Pvt Ltd. > Hartron Complex, Sector 18, Gurgaon, India. > E-Mail: [hidden email] > Mobile: +91 9910322604 > > -- > Thanks, > Deepak Agarwal, > > Paxcel Technologies Pvt Ltd. > Hartron Complex, Sector 18, Gurgaon, India. > E-Mail: [hidden email] > Mobile: +91 9910322604 > > <%2B91%209910322604> > |
Thanks Deepak. Learned this the hard way today. I wish installing Oracle JDK was as easy as OpenJDK.
Anyhow I finally got myself a neat and clean VMware image of Ofbiz 11.04 on Ubuntu 12.04 with Oracle JDK. And I'll be happy to SHARE if someone needs it - it's about 2.5GB, so would just need to figure out where to host it :-)
Rgds
Sanjeev Gupta www.digitalwebadvisors.com |
In reply to this post by Sanjeev Gupta
Hi Sanjeev,
Another patch, https://issues.apache.org/jira/browse/OFBIZ-4387, should help. You can see there have been efforts to get the trunk version of OFBiz compiling with other compilers, but they haven't been backported to earlier versions. A complete patch for version 10.04 or 11.04 might be of interest to some people. If you end up creating one, it might be relevant to Jira issue OFBIZ-4749. Cheers Paul Foxworthy
--
Coherent Software Australia Pty Ltd http://www.coherentsoftware.com.au/ Bonsai ERP, the all-inclusive ERP system http://www.bonsaierp.com.au/ |
Thanks Paul. I'll try this patch out too.
And I do happen to create a patch, I will share it. Meantime I'm still wondering if there is any difference in running Ofbiz with Oracle JDK Vs with OpenJDK
Rgds
Sanjeev Gupta www.digitalwebadvisors.com |
Has anyone tried IBMs JDK?
http://www.ibm.com/developerworks/java/jdk/linux/download.html#java6 On Fri, May 18, 2012 at 2:34 AM, Sanjeev Gupta <[hidden email]>wrote: > Thanks Paul. I'll try this patch out too. > And I do happen to create a patch, I will share it. > > Meantime I'm still wondering if there is any difference in running Ofbiz > with Oracle JDK Vs with OpenJDK > > > ----- > Rgds > Sanjeev > www.sanjeevg.com > @sanjeevgcom > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Unable-to-install-Ofbiz-11-04-on-Ubuntu-12-04-tp4631840p4631949.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > |
In reply to this post by Sanjeev Gupta
In case anyone wants to download the VMWare image, it's available for download here.
http://vsphere.layeredtech.net:8080/4093260325290 For easier download I've split the file, so select and download all files. Use http://www.hjsplit.org/ to combine the file. Unzip the combined file and you should be good to go.
Rgds
Sanjeev Gupta www.digitalwebadvisors.com |
Free forum by Nabble | Edit this page |