<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Am 07.01.2015 um 10:16 schrieb Kai
Widmann:<br>
</div>
<blockquote
cite="mid:C55BD5BAE254404F9AC26C237DA9BB93014240EBF1BF@EXCHANGE.mediaworx.de"
type="cite">
<pre wrap="">Hi Christoph,
Concerning your second question: usually it's no problem to extract the jar (using any zip tool) that contains the class you want to change, make your modifications to the source, compile the class, replace the compiled class in the extracted jar and repackage the jar. That way you don't have to do a full build. And I know that building older versions of OpenCms was not the easiest thing to do, I've struggled with this for a while myself.
Now back to the first question:
I've followed this thread a little and from what I understand the double byte characters in UTF-8 are causing the problem because a faulty content length is given. Maybe there is a way to switch to a single byte character set like ISO-8859-1 (this should be configurable somewhere in OpenCms)? That way the export might succeed, but with broken characters for German "Umlauts" and the likes. You could fix those by hand in an editor using search/replace. Just an idea, I haven't really thought this through.
Cheers
Kai
</pre>
</blockquote>
Hi Kai,<br>
<br>
I managed to change the encoding to ISO-8859-1 in opencms-system.xml
and exported the users again.<br>
This time it looks like the export is not corrupted. But I'm still
getting that same error. So the problem must be somewhere <br>
in the middle of the file and not be caused by the truncation.<br>
<br>
I examined the problem a bit further by splitting the exported file
into pieces and one line in there is causing the error:<br>
<br>
name;description;lastname;firstname;email;address;zipcode;city;country;USERPREFERENCES_workplace-startupsettingssite;USERPREFERENCES_workplace-startupsettingslocale;password<br>
1111-ABC-DE;ABC Pqrstuvwxyz GmbH<br>
Arbeitsvorbereitung / XYZ-Programmierung<br>
Frau Karin Mustermann<br>
Panger Str. 24<br>
<br>
83062 Pang<br>
;Mustermann;Karin;karin.mustermann@domain.de;;;;;/sites/verein/;de;MD5_863hZypCE2CzP3qfi/0dYQ==<br>
<br>
The point here is that the csv-line has an entry that contains line
wraps (cr/lf). IMO it should be allowed, since the item separator
does not occur in the data, especially since the "Description" field
in the user record is a multiline entry. <br>
When I now try to write all data into one line, OpenCMS 9.5.0
throws a Nullpointer Exception:<br>
<br>
<fieldset class="dialogblock"><legend><span class="textbold">Fehler</span></legend>
Fehler beim Füllen der Liste "Import Benutzer"<br>
Der Grund: Ein unerwarteter Fehler ist aufgetreten, aber es wurde
keine Fehlerbeschreibung gefunden.<br>
Bitte kontrollieren Sie die Details oder kontaktieren Sie Ihren
Systemadministrator.<br>
<br>
<br>
</fieldset>
<br>
<pre><pre>org.opencms.main.CmsRuntimeException: Error while filling the list "Import Benutzer".
at org.opencms.workplace.list.A_CmsListDialog.fillList(A_CmsListDialog.java:909)
at org.opencms.workplace.list.A_CmsListDialog.refreshList(A_CmsListDialog.java:647)
at org.opencms.workplace.list.A_CmsListDialog.actionDialog(A_CmsListDialog.java:383)
at org.opencms.workplace.tools.accounts.CmsUserDataImportList.actionDialog(CmsUserDataImportList.java:222)
at org.opencms.workplace.list.A_CmsListDialog.displayDialog(A_CmsListDialog.java:430)
at org.opencms.workplace.list.A_CmsListDialog.displayDialog(A_CmsListDialog.java:415)
at org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.admin.accounts.imexport_005fuser_005fdata.import_005fcsv_005flist_jsp._jspService(import_005fcsv_005flist_jsp.java:57)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.opencms.flex.CmsFlexRequestDispatcher.forward(CmsFlexRequestDispatcher.java:111)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:522)
at org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1193)
at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1715)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)
at org.opencms.main.OpenCmsServlet.doPost(OpenCmsServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.opencms.flex.CmsFlexRequestDispatcher.forward(CmsFlexRequestDispatcher.java:111)
at org.opencms.util.CmsRequestUtil.forwardRequest(CmsRequestUtil.java:469)
at org.opencms.workplace.tools.CmsToolManager.jspForwardPage(CmsToolManager.java:475)
at org.opencms.workplace.administration.CmsAdminDialog.displayDialog(CmsAdminDialog.java:92)
at org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.views.admin.admin_002dmain_jsp._jspService(admin_002dmain_jsp.java:57)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.opencms.flex.CmsFlexRequestDispatcher.forward(CmsFlexRequestDispatcher.java:111)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:522)
at org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1193)
at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1715)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)
at org.opencms.main.OpenCmsServlet.doPost(OpenCmsServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.opencms.flex.CmsFlexRequestDispatcher.forward(CmsFlexRequestDispatcher.java:111)
at org.opencms.util.CmsRequestUtil.forwardRequest(CmsRequestUtil.java:469)
at org.opencms.util.CmsRequestUtil.forwardRequest(CmsRequestUtil.java:431)
at org.opencms.workplace.CmsDialog.actionCloseDialog(CmsDialog.java:363)
at org.opencms.workplace.tools.accounts.CmsUserDataImportList.actionDialog(CmsUserDataImportList.java:219)
at org.opencms.workplace.list.A_CmsListDialog.displayDialog(A_CmsListDialog.java:430)
at org.opencms.workplace.list.A_CmsListDialog.displayDialog(A_CmsListDialog.java:415)
at org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.admin.accounts.imexport_005fuser_005fdata.import_005fcsv_005flist_jsp._jspService(import_005fcsv_005flist_jsp.java:57)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:522)
at org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:1193)
at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1715)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)
at org.opencms.main.OpenCmsServlet.doPost(OpenCmsServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1774)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at java.io.File.<init>(Unknown Source)
at org.opencms.workplace.tools.accounts.CmsUserDataImportList.getUsers(CmsUserDataImportList.java:543)
at org.opencms.workplace.tools.accounts.CmsUserDataImportList.getListItems(CmsUserDataImportList.java:509)
at org.opencms.workplace.list.A_CmsListDialog.fillList(A_CmsListDialog.java:902)
... 102 more</pre></pre>
<br>
As the result, though, the User has been entered into the database.<br>
Thanks anyway for the golden tip. I have my users back. <br>
<br>
<div class="moz-signature">-- <br>
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
</div>
</body>
</html>