You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2009/02/06 08:19:48 UTC

DO NOT REPLY [Bug 46667] New: HSSF.createCell(int) - java.lang.NoSuchMethodError

https://issues.apache.org/bugzilla/show_bug.cgi?id=46667

           Summary: HSSF.createCell(int) - java.lang.NoSuchMethodError
           Product: POI
           Version: 3.2-FINAL
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: cnoonan@delexian.com


While trying to export data from db to an Excel file using HSSF, I get the
following error:

java.lang.NoSuchMethodError:
org.apache.poi.hssf.usermodel.HSSFRow.createCell(I)Lorg/apache/poi/hssf/usermodel/HSSFCell

Method that is being used: HSSFRow.createCell(int)
I have changed from using the deprecated method HSSFRow.createCell(short),
because of an issue with rows greater than 32768 (methods bombs out, reason
relating to Bug 44539).

private HSSFWorkbook createWorkbook() throws IOException {

        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet sheet = wb.createSheet("WorkSheet1");
        HSSFRow row = sheet.createRow();

        for(int i=0; i < 10; i++){
           row.createCell(i).setCellValue(new HSSFRichTextString("somesort of
string"));
        }
        return wb;

}


I've tried with precompiled libraries versions 3.2 Final and 3.5 Beta with no
luck.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46667] HSSF.createCell(int) - java.lang.NoSuchMethodError

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46667





--- Comment #3 from Yegor Kozlov <ye...@dinom.ru>  2009-02-08 23:16:37 PST ---
You can check the path to the POI jar as follows:
       
System.out.println(HSSFWorkbook.class.getProtectionDomain().getCodeSource().getLocation());


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46667] HSSF.createCell(int) - java.lang.NoSuchMethodError

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46667





--- Comment #2 from Chris Noonan <cn...@delexian.com>  2009-02-08 16:50:30 PST ---
That's the strange thing. In both 3.2, and 3.5 beta4, it is in the classpath,
however during runtime, it won't pick it up.



public final class HSSFRow
        implements java.lang.Comparable, org.apache.poi.ss.usermodel.Row
{

...

public org.apache.poi.hssf.usermodel.HSSFCell createCell(int p1) { }

public org.apache.poi.hssf.usermodel.HSSFCell createCell(int p1, int p2) { }

...

}

I'm using Oracle Containers 4 Java (OC4J) as my server. Not sure whether this
is causing the issue or not.

I've also tried compiling the src myself and using that (thinking there could
have been an issue with the binary), however, same issue still occurs.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 46667] HSSF.createCell(int) - java.lang.NoSuchMethodError

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46667


Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #1 from Yegor Kozlov <ye...@dinom.ru>  2009-02-06 02:24:35 PST ---
Check the classpath and try 3.5-Beta4.  HSSFRow.createCell(int) is there.

Yegor


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org