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 2015/04/28 18:32:47 UTC

[Bug 57867] New: TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

https://bz.apache.org/bugzilla/show_bug.cgi?id=57867

            Bug ID: 57867
           Summary: TransformerFactoryConfigurationError: Provider
                    org.apache.xalan.processor.TransformerFactoryImpl not
                    found
           Product: POI
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: POI Overall
          Assignee: dev@poi.apache.org
          Reporter: hfontanez@ogresystems.com

Documentation should reflect a change made in Java SE 5.0 that affects creation
of documents that depend on the "org.apache" project. The following
incompatibility i was extracted from Java SE 5.0 release notes:

"Apache - The org.apache classes, which have never been supported J2SE APIs but
are used by the javax.xml package, have moved in 5.0 to com.sun.org.apache.
package.internal so that they won't clash with more recent,
developer-downloaded versions of the classes. Any applications that depend on
the org.apache classes being part of the J2SE release must do one of the
following to work in 5.0:

Code the application so it uses only the supported interfaces that are part of
JAXP.
Download the org.apache.xalan classes from Apache."

This should be documented as an external dependency of the POI jars since Xalan
is not provided with the POI distribution.

-- 
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


[Bug 57867] TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

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

Hector Fontanez <he...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unspecified                 |3.11-FINAL

-- 
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


[Bug 57867] TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

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

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #8 from Dominik Stadler <do...@gmx.at> ---
No response for a long time, thus closing this bug for now, please reopen with
more information if this is still a problem for you.

-- 
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


[Bug 57867] TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

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

--- Comment #4 from Hector Fontanez <he...@gmail.com> ---
(In reply to Nick Burch from comment #3)
> I can't find any references to org.apache.xalan in our codebase or
> documentation, sorry. Any chance you could point me to the place where they
> are, so we can get them updated?
> 
> Ideally, if you could also provide a unit test (that fails on trunk without
> the fix) to highlight the problem, that'd be handy too!

The following code works with xalan.jar in the classpath, but throws an
exception without it:

      Workbook wb = new XSSFWorkbook();
      FileOutputStream fileOut = new FileOutputStream("workbook.xlsx");
      wb.write(fileOut); // Fails here (uncaught exception)
      fileOut.close();

Using HSSFWorkbook works with our without Xalan because they don't use OOXML.
My development environment uses Java SE 6 and was failing on the call to the
write method until I downloaded (as recommended by Java) Xalan with all the
additional JARs (serializer.jar, xercesImpl.jar, xml-apis.jar). Removing the
xalan.jar (and leaving the other updated ones) results in following error:
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal.

-- 
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


[Bug 57867] TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

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

--- Comment #7 from Dominik Stadler <do...@gmx.at> ---
1. Can you run the following to see where the XSSFWorkbook is loaded, just to
make sure that there is not a version of POI loaded from somewhere:

System.out.println(Thread.currentThread().getContextClassLoader().getResource(XSSFWorkbook.class.getName().replace(".",
"/") + ".class"));

2. Another thing that could happen is that you have some other jar-file in the
classpath which tries to pull in Xalan/Xerces and via the service-files in
META-INF "install" Xerces as default XML Parser. 

3. Also which exact JDK is this? If it is the IBM JDK, I would strongly suggest
to upgrade to 1.7 as 1.6 has various problems, see also the FAQ at
http://poi.apache.org/faq.html#faq-N1017E

=> Can you try this in a newly created project which only has POI? This way we
eliminate the first two possible causes?

-- 
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


[Bug 57867] TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

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

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Current versions of Apache POI requires Java 6, so I'm not sure this
applies/matters to us?

(There are no org.apache.xalan references to be found in the current codebase
either)

-- 
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


[Bug 57867] TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

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

--- Comment #2 from Hector Fontanez <he...@gmail.com> ---
(In reply to Nick Burch from comment #1)
> Current versions of Apache POI requires Java 6, so I'm not sure this
> applies/matters to us?
> 
> (There are no org.apache.xalan references to be found in the current
> codebase either)

Precisely for that reason the documentation must be updated. Since Java SE 5.0,
the "org.apache" packages have been relocated. Therefore, you must download
Xalan from Apache.  Because that change in Java, this is an external dependency
of POI products that depend on code in that package.

-- 
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


[Bug 57867] TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

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

--- Comment #6 from Hector Fontanez <he...@gmail.com> ---
(In reply to Nick Burch from comment #5)
> You haven't said what version of Apache POI you are using. As long as it's
> something recent (eg 3.11 or 3.12 beta 1), no additional jars are required
> beyond those shipped in the binary packages. 
> 
> The code you have given in your snippet works just fine for me on trunk,
> with no additional jars needed, so my hunch is that you're using an old
> version of POI, either knowingly or by accident

I am using Apache POI 3.11. I updated the bug information. When I upgraded to
3.11, I added the following JARs and removed the old ones from classpath:

    poi-3.11-20141221.jar
    poi-ooxml-3.11-20141221.jar
    poi-ooxml-schemas-3.11-20141221.jar
    xmlbeans-2.6.0.jar

In my particular case, when I wrote using HSSF, it worked fine. However, after
changing to XSSF, I could not create even a blank file without an error. Once I
added the JARs I mentioned before, the problem went away.  Reading operations
were unaffected by this.

-- 
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


[Bug 57867] TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

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

--- Comment #5 from Nick Burch <ap...@gagravarr.org> ---
You haven't said what version of Apache POI you are using. As long as it's
something recent (eg 3.11 or 3.12 beta 1), no additional jars are required
beyond those shipped in the binary packages. 

The code you have given in your snippet works just fine for me on trunk, with
no additional jars needed, so my hunch is that you're using an old version of
POI, either knowingly or by accident

-- 
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


[Bug 57867] TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

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

Drake <gu...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WORKSFORME                  |---
            Version|3.11-FINAL                  |3.17-FINAL
             Status|RESOLVED                    |REOPENED

--- Comment #9 from Drake <gu...@gmail.com> ---
I am using following versions to make XSSF Workbook
poi-3.17.jar
poi-ooxml-3.17.jar
poi-ooxml-schemas-3.17.jar
xmlbeans-2.6.0.jar
commons-codec-1.10.jar
commons-collections4-4.1.jar
curvesapi-1.04.jar
stax-api-1.0.1.jar

When i run the code , in the workbook.write() method it is giving error 
[Fail to save: an error occurs while saving the package 
 : The part /docProps/core.xml failed to be saved in the stream with marshaller 

org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller@1d386dd]
,
even the excel generated is of unsupported format(Corrupted)

But, when i add xalan-2.6.0.jar , this works perfectly fine , workbook write
method is working properly and excel generated is as per expectation.
But I don't need xalan-2.6.0 or any of it version. I want to run my code only
with above mentioned jars.

-- 
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


[Bug 57867] TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

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

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|REOPENED                    |RESOLVED

--- Comment #10 from Dominik Stadler <do...@gmx.at> ---
Please do not reopen any bug where you did not contribute before and which is
not related to your problem. 

Please try with the latest version of POI (4.0.1 currently) and create a new
bug entry with a sample file and some code that reproduces the problem so we
can properly analyze.

-- 
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


[Bug 57867] TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found

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

--- Comment #3 from Nick Burch <ap...@gagravarr.org> ---
I can't find any references to org.apache.xalan in our codebase or
documentation, sorry. Any chance you could point me to the place where they
are, so we can get them updated?

Ideally, if you could also provide a unit test (that fails on trunk without the
fix) to highlight the problem, that'd be handy too!

-- 
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