Hanging application while created workbook XSSF (Apache POI)
Hello
We have developed an application (using Netbeans) which, in a single windows is asking for some parameters, reading a few Oracle database data and creating a xlsx spreadsheet on the client side.
Everything works fine, but we have only one user (among 20 using our application) who has a problem. When the application needs to start creating the file xlsx, it hangs, the file is not yet created on the client side. This only happens on a specific computer
We cannot reproduce this behavior in our development environment, or in any other machine.
I tried to create a file xls xlsx (using the HSSFWorkbook instead of XSSFWorkbook) and the problem is not displayed in his laptop. So the behavior seems to be specifically associated with this problem. The Apache POI library used is 3.11.
Is it possible to track client (no right to administrator unfortunately on this machine) and see exactly what causes this problem only on this machine?
Note that only JRE is installed on this computer.
Kind regards.
Alberto
Hello
After you find the error and cheking out how Netbeans using the path class the only problem that could cause the problem was an external library during installation of the JRE.
For some reason any on the laptop user, there was a library external xbeans.jar (lib/ext under JRE path) including and the old version of the XmlOptions class.
Remove the old library xbeans, jre lib/ext pot has solved the problem.
Kind regards.
Alberto
Tags: Java
Similar Questions
-
Exception if you use Apache POI in ADF
Goodmorning;
I use jdev 11g, I'm trying to use Apache POI to import the content of Microsoft XL file in my database.
I already do this with success on netbeans. but not on jdev.
first of all, I have download the POI package on the site web apache, and I create a library and add the jdev jar files using tools-> manage libraries, this is the list of the jar file: poi - 3.6 - 20091214.jar, poi-contrib - 3.6 - 20091214.jar, poi-ooxml - 3.6 - 3-20091214.jar and poi-block-notes - 3.6 - 20091214.jar.
Create a page with a button jsf, then activate the link to this page using the design-> Page-> binding component properties-> check Auto link
in the action of the buton method, I put the following code:
public String cb1_action() throws FileNotFoundException, IOException {}
Connection Conn = null;
String url = "jdbc:mysql://localhost:3306";
String dbName = "test";
String driver = "com.mysql.jdbc.Driver";
String username = "root";
String userPassword = "";
try {}
InputStream fs = new FileInputStream("/home/Rachid/test1.xls");
HSSFWorkbook wb = new HSSFWorkbook (fs);
HSSFSheet sheet = wb.getSheetAt (0);
Line HSSFRow = null;
for (Iterator Tricard = sheet.rowIterator (); rowIt.hasNext ();) {
line = rowIt.next () (HSSFRow);
Code HSSFCell = row.getCell (0);
Name HSSFCell = row.getCell (1);
HSSFCell dt = row.getCell (2);
java.util.Date date = dt.getDateCellValue ();
System.out.println ("code" + code + "% name" + name + "% date" + date);
try {}
Class.forName (driver) .newInstance ();
} catch (ClassNotFoundException e) {}
} catch (InstantiationException e) {}
} catch (IllegalAccessException e) {}
}
try {}
Conn = DriverManager.getConnection (url + dbName, username, userPassword);
} catch (SQLException e) {}
}
Statement stmt = null;
try {}
stmt = conn.createStatement ();
} catch (SQLException e) {}
}
String strQuery = "insert into importxl values (" + code+",'"+nom+"','"+date.getDay()+"/"+date.getMonth()+"/"+date.getYear()+ "'" ");
System.out.println (strQuery);
try {}
stmt. Close();
} catch (SQLException e) {}
}
try {}
Conn.Close ();
} catch (SQLException e) {}
}
}
} catch (FileNotFoundException exception) e {}
e.printStackTrace ();
} catch (IOException e) {}
e.printStackTrace ();
}
Returns a null value.
}
}
and when I run my page and click on the button, this exception page appears:
Error 500 - Internal server error
javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/poi/rich/usermodel/HSSFWorkbook
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:94)
at java.security.AccessController.doPrivileged (Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.doIt (WebAppServletContext.java:3684)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org/apache/poi/rich/usermodel/HSSFWorkbook
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:698)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
... 35 more
Caused by: java.lang.NoClassDefFoundError: org/apache/poi/rich/usermodel/HSSFWorkbook
at Mybean.bean1.wrc (bean1.java:23)
at Mybean.MybeanImport.cb1_action (MybeanImport.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
... more than 43
Caused by: java.lang.ClassNotFoundException: org.apache.poi.hssf.usermodel.HSSFWorkbook
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:280)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:253)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:37)
... 52 moreHave you checked "Deploy default" when you created the library?
John
-
How to create multiple thumbnail images while creating the Image assets
Hi all!
I have a requirement to create several thumbnail images (of different sizes), while creating new assets of image. These vignettes must be associated with different attributes after the recording of assets. I thought you used miniature filter, but I read that it uses a library of swing, it's very very inefficient memory-wise and we can experience the memory leak and crashes with only a very limited number of images... Another solution is to set up the filter citing ImageMagick with a system exec: it's fast, it does not have the memory and it also generates a much greater quality of thumbnail image resizer that comes with swing.
What do you think, and how can I implement this?
Thank you very much!
Hello Elena,
We noticed some performance issues in our current client, so we changed the miniature filter by default:
A temporary file is no longer used for the input image. The source image is used directly, because it is not changed by the thumbnail generator.
This avoids some performance issues, we have detected. First of all, because of the way the image has been copied (a byte is read and written each time), and second, because of some file systems environments run badly.
In addition, it relies on "deleteOnExit", which can produce an impact on the performance of the application server, as the JAVA virtual machine must maintain a list of files to delete when leaving, and which consumes memory. It is even more problematic on servers that are not restarted very often. And if at the end the application server is not normally off, these files would not be removed.
On the other hand it seems that the thumbnail generator is not necessary that the image source file ends with the extension of the right.
Now we use the provided source image directly, it's a ".tmp" instead of a file (for example) the file ".gif".
It will be useful,
Gerardo
-
While creating a slide show with pictures, can you assign music to a specific set of photos? I would use 5 different pieces of music for every 5 parts of my slide show.
No, you can't. One solution is to create 5 different slideshows and export them to the office where you can bring together them in a single quicktime movie file and use it.
If you have a copy of iMovie 6 HD, it can be hacked to work with El Capitan. With it you can assign exactly music groups of slides in the slide show:
-
Win Server 2003 SP2. Backup starts and see errror message "error returned while creating the volume shadow copy: 0x8004230f.» All solutions? CPP, Volume Shadow Copy Stallion are started.
Thank you for visiting the Microsoft answers community.
The question you have posted is related to Windows Server and would be better suited in the MS TechNet Windows Server Forum. Please visit this link to find a community that will provide the support you want.
-
Getting error while creating partitation on hard drive
Getting error while creating partitation on hard drive
Attached screenshot for warning msg
You can have up to four primary partitions. Since you already have four of these partitions, you cannot create a fifth partition. You must do this:
- Delete a primary partition.
- Create an extended partition.
- Create logical partitions as you wish within the extended partition.
-
Hallo,
I have a VO with an attribute based on the field of database of MONEY.
In the configuration of the VO for the attribute I put:
- In the "Details" tab: Type = BigDecimal
- In the "Indications of the UI" tab: Format type and Type like the image below
These settings allow the value of the attribute (in the table, inputText) appears with thousands and decimal separator that according to my language - Italian - are. (point) and, (comma).
For example. Silver number displayed correctly:
10.123.000,37
When I write the value of the attribute in an Excel cell using apache.poi...
cell.setCellValue (attr.toString ());
... I see in the cell...
10123000.3700
... Although I'd like to see what...
10123000,37 (not thousands separator, the comma as separator decimal and only 2 decimal places)
You could you kindly help me to get there?
Thank you
Federico
Federico, this isn't really a question JDev or ADF. This can be solved by setting the cell format to the cell, you write the number. Like oyu would in excel
style.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,##0.00"));
more info on HSSFDataFormat (javadocexamples.COM JAVA DOC BY EXAMPLES) - API, usage, demonstrations and code examples
Timo
-
Difficulty facing export .xlsx by Apache POI
I use Jdeveloper 11.1.1.7
I need to export .xlsx file af:table using Apache POI. I have not used all the attributes of VO in my af:table. I need to export only the visible columns in the same order as in the user interface. The user may change the order of the columns in the user interface, so I need to look at also.
I followed http://www.techartifact.com/blogs/2013/08/generate-excel-file-in-oracle-adf-using-apache-poi.html#sthash.CaVkCeKl.dpbs for reference. Here, he is given to browse all attributes in VO and exported in excel via apache POI. So, I could not able to follow this approach. And I couldn't use the HeaderText property in af:column to match with the attributes of the VO, since we used a different name for HeaderText in the user interface.
So please guide me to achieve the requirement.
Thank you and best regards,
Assia.
There is a lot of work.
For starters, take a look at:
and attention to
reorganizeColumnsInTable()
function
In this way, you can browse columns of tables. Now, in general, inside the af: column, you have a few af:outputText, which tells you what attribute VO are displayed in this column.
So download af:outputText (child column) and see what is the "value" property, for this you can use
ValueExpression ve = outputText.getValueExpression("value"); String valStr = ve.getExpressionString();
the valStr will be something like:
#{rank. EmpName}
Parse this string to get the real name of the VO (EmpName in this case) displayed in this column attribute
... had a point?
-
Hi all
I used poi - 3.12 in my project because I need to read xlsx files
and installed used webcenter poi - 3.5
I get this error in my code:
Caused by: java.lang.NoSuchMethodError: org.apache.poi.ss.SpreadsheetVersion.getMaxCellStyles () I
Please guide me
Thanks in advance
Maybe you can try with
true in your weblogic.xml.
If not enough, you should research how to replace poi next to webcenter
-
Hi, I have a main application and many applications these i have added to my resource and using their taskFlows in my main application by creating the multitaskFlow binding. My problem is that how can currently get us renderings taskFlow Id link MultiTaskFlow running through an action created in our main application. Please explain if we can.
Hello
Try to remove the af: group in the facet of the toolbar or use this code in your bean.
UIComponent panelBox is ae.getComponent () .getParent () .getParent ();.
Kind regards
Ruben.
-
What is the less expensive software or the online application to create PDFs from multiple files?
The service Pack PDF can be used from a web page or of the CD player. Adobe low cost subscription offering that does this. Online PDF converter, convert to web or Acrobat Reader | Adobe PDF Pack to convert things other than Office documents and images, you need the Acrobat application instead.
-
I got a prob while creating a link/link between two tables in a jdeveloper11g
Hi guys...
I got a prob while creating a link/link between two tables in a jdeveloper11g, help me.
I use two table employee, Department.
Unfortunately there is no primary key and foreign key in these tables.now i updated on those of table structure.
I want to create a form like it should be a link between the Department data, i.e. data and employee while the Department is changed then only present corresponding employees in this block...
Table structure as follows
Employee:
-------------------
employe_id,
name,
Department,
GR,
Date of birth
Department of justice
Department:
--------------------
department_id,
department_name;
Note: in the employee department table is the same as in the department table department_id...
So, you want to build master / detail between Department & sub_departments?
In the same way, create a new, yet another link between departments & sub_departments, so that the connection is:
Department.Department_Id = sub_departments.department_id
-
What is the best Adobe application to create mobile applications from the "ground up"?
What is the best Adobe application to create mobile applications from the "ground up"?
This might be useful:
WEB - how to choose the best tools for your project
- Adobe Dreamweaver is mainly for professional website developers who live and breathe the programming or for designers and project managers who have learned enough HTML at ease. Even if there are a lot of models and tools of environmental Designer, the major attraction of Dreamweaver is how it offers full access to the code, with immediate feedback (through a split screen) what look like the results. The same content can be published for a desktop browser or mobile devices like the iPhone, iPad or Android smartphones.
- Adobe Muse is a new tool mainly for graphic designers who want to create and publish Web sites without writing code. With a cooked graphic design interface, Adobe Muse generates the HTML to publish directly to the web. Muse sites can be hosted on the hosting platform integrated Adobe Business catalyst or transferred to a third party hosting provider. Adobe Muse includes widgets, which are built features such as slideshows and albums, that you can drag and drop on the pages of the site. However, Muse currently does not support the development of sites that target mobile devices, like the iPad, iPhone and Android smartphones.
- Adobe Edge, currently public preview on Adobe Labs, is used to create web animations. The files it produces are usually added to a Web site using a tool such as Dreamweaver. The beauty of the edge, is that animations are based on the latest standards open such as HTML5 and CSS3. With no plug-ins needed, animations work on the latest PC and Mac browsers as well as mobile devices, where the Flash technology is not universally supported.
-
Can I process Excel BIFF5 files, or simply abandon Apache POI?
For the experienced:
I am totally new to processing the files using Java Microsoft Excel and embarks on Apache POI. Now it seems that I might be completely out of luck because of Excel files, I'm in the process.
Now looking back, I realize account I got what I got with Excel file (.xls file) was opened in Excel 2007 and clicked on the "Save" button. And it's all OK POI learning by the transformation of this file. Now, after all the work I've done with this file, I trashed it and got a copy of the original Excel file - as is, without first loading in Excel 2007 and recording - and run my java program on it. And I got the following error message speaks BIFF5 and BIFF8:
C:\Oracle\Middleware\jdk160_18\bin\javaw.exe-client - classpath
C:\apps11113\JavaExercise\. ADF; C:\apps11113\JavaExercise\Basic\classes; C:\java_lib\poi-3.7\poi-3.7-20101029.jar
-Djavax.NET.SSL.trustStore=C:\Oracle\Middleware\wlserver_10.3\server\lib\DemoTrust.jks learnjava. ExcelTest2
Exception in thread "main" org.apache.poi.hssf.OldExcelFormatException: the provided spreadsheet seems to be in Excel 5.0/7.0 format (BIFF5).
POI only supports the BIFF8 format (from versions of Excel 97/2000/XP/2003)
My program, when put into production, will run the schedule and unattended and will have to treat the file as it is. I'm out of luck and need to find some other APIs that support BIFF5? Is there some these APIs?
Thank you very much for help!
NewmanWhere do you find excel files? Would it be possible to have the provider upgrade its machines to provide the latest files?
You can try the 'other' Java API Excel, JXL or whatever he called to see if she can manage obsolete formats.
-
How uncheck you a checkbox to the radio while CREATING a form?
There are a lot of discussions about how to disable a checkbox radio on a form to fill out, but what about when the form was created? I get 2 phone numbers in my form and I need the customer to check their main phone number. So I really need a box of the radio. While creating the form in Acrobat, I hit preview to make sure that everything is going well and when I test the check radio boxes, one of them is activated and I can't cancel it. I don't want a default checked telephone numbers, but rather wish both uncontrolled until the client fills out the form. How can I get rid of this preview control?
Yes, it will certainly work as you want with check boxes. As mentioned, the key is to give them the same name, but different value of exports (for example, Yes, no). You set the value to export on the Options tab of the field properties dialog box.
To reset a form in Acrobat 9, select "forms > clear form.
Maybe you are looking for
-
Why videocalls in facebook do not work right?
I can ear and see other people, unfortunately they only see me but the ear not what I say.
-
Excess of communities to Support Apple Mail
I canceled all my subscriptions, communities Support from Apple and I keep getting 1 mail electronic rpm of communities? What I, ve to to?
-
is it safe to update to Snow Leopard 10.6.8 to the Mavericks
My local store thought Stormfront that if I upgraded to El Capitan it would slow down my Imac system upward. They recommended that I should just upgrade to the Mavericks. Someone else has all know about which is the best version upgraded to that I s
-
Hello Does anyone know how to solve the problem with the screensaver kick watching a movie using Windows Media Player (WMP), even though I unchecked the option to "allow the screensaver during playback" in WMP? I found that if I start Windows Media C
-
Challenge: Pre-installed YouTube app not working not
Hi all Problems with pre-installed YouTube app. The application crashes when I start and blinks a random string of characters on the top row below the status bar. None of the buttons work (except the main home button) and it shows the same results wi