java - Docx4j, JAXB in eclipse plugin development -


sorry bad english)

i trying create eclipse plugin, generating docx-files. downloaded docx4j (binary jar 3.2.1), include dependecies , jars plugin project.

no maven!

after that, tried next:

try {         wordprocessingmlpackage wmlpack = wordprocessingmlpackage.createpackage();     } catch (invalidformatexception e2) {         // todo auto-generated catch block         e2.printstacktrace();     } 

this code placed in plugin popupmenu action. called properly. code failed. logs:

debug org.docx4j.utils.resourceutils .getresource line 70 - attempting load: docx4j.properties info org.docx4j.jaxb.context .<clinit> line 74 - java.vendor=oracle corporation info org.docx4j.jaxb.context .<clinit> line 75 - java.version=1.7.0_71 debug org.docx4j.utils.resourceutils .getresource line 70 - attempting load: org/docx4j/wml/jaxb.properties debug org.docx4j.utils.resourceutils .getresource line 82 - not using moxy, since no resource: org/docx4j/wml/jaxb.properties info org.docx4j.jaxb.context .<clinit> line 98 - no moxy jaxb config found; assume not intended.. info org.docx4j.jaxb.namespaceprefixmapperutils .getprefixmapper line 60 - using namespaceprefixmappersuninternal, suitable java 6 info org.docx4j.jaxb.context .<clinit> line 107 - using java 6/7 jaxb implementation 

and

!entry org.eclipse.ui 4 0 2015-04-29 09:44:24.538 !message unhandled event loop exception error while logging event loop exception:  !entry org.eclipse.equinox.util 4 0 2015-04-29 09:44:55.114 !message unable create more threads! active thread pool tasks: 0 exception in thread "[timer] - main queue handler" exception in thread "worker-0"  

ahh, see, error somewhere in docx4j.jaxb.context class. downloaded sources (github) added custom logging , builded it. found out: error sit in method javax.xml.bind.jaxbcontext.newinstance() (org.docx4j.jaxb.context, line 132).

i tried next code directly in plugin code:

try {             jaxbcontext.newinstance("org.docx4j.wml:org.docx4j.w14:org.docx4j.w15:" +                     "org.docx4j.schemas.microsoft.com.office.word_2006.wordml:" +                     "org.docx4j.dml:org.docx4j.dml.chart:org.docx4j.dml.chartdrawing:org.docx4j.dml.compatibility:org.docx4j.dml.diagram:org.docx4j.dml.lockedcanvas:org.docx4j.dml.picture:org.docx4j.dml.wordprocessingdrawing:org.docx4j.dml.spreadsheetdrawing:org.docx4j.dml.diagram2008:" +                     // vml stuff here, since compiling requires wml , dml (and mathml), not pml or sml                     "org.docx4j.vml:org.docx4j.vml.officedrawing:org.docx4j.vml.wordprocessingdrawing:org.docx4j.vml.presentationdrawing:org.docx4j.vml.spreadsheetdrawing:org.docx4j.vml.root:" +                     "org.docx4j.docprops.coverpageprops:" +                     "org.opendope.xpaths:org.opendope.conditions:org.opendope.questions:org.opendope.answers:org.opendope.components:org.opendope.smartart.datahierarchy:" +                     "org.docx4j.math:" +                     "org.docx4j.sharedtypes:org.docx4j.bibliography");         } catch (jaxbexception e1) {             // todo auto-generated catch block             e1.printstacktrace();         } 

but error don't print stacktrace. "unhandled event loop exception". , cpu loaded on 60%. that's all, can see.

my configuration: eclipse.buildid=4.4.1.m20140925-0400 java.version=1.7.0_71 java.vendor=oracle corporation bootloader constants: os=win32, arch=x86_64, ws=win32, nl=ru_ru framework arguments:  -product org.eclipse.platform.ide command-line arguments:  -product org.eclipse.platform.ide -data c:\users\{my username hehe}\workspace/../runtime-eclipseapplication -dev file:c:/users/{and here username too}/workspace/.metadata/.plugins/org.eclipse.pde.core/eclipse application/dev.properties -os win32 -ws win32 -arch x86_64 -consolelog 

thank attention!)


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -