Jump to content
Excelsior Forums
Ruslan

Can't compile Apache POI 3.9

Recommended Posts

Hello! I'm trying to compile Apache POI 3.9 to native code from jars provided, but at the stage of checking consistency I have many errors (513) about missing classes, most rated is com.sun.javadoc package. Of course library works at Oracle Java.

Share this post


Link to post
Share on other sites

Hello!

I have just downloaded Apache POI 3.9 and successfully compiled poi-3.9-20121203.jar as DLL.

Could you please specify how exactly you're trying to compile Apache POI 3.9?

--

Excelsior Support

Share this post


Link to post
Share on other sites

Hello!

I have just downloaded Apache POI 3.9 and successfully compiled poi-3.9-20121203.jar as DLL.

Could you please specify how exactly you're trying to compile Apache POI 3.9?

--

Excelsior Support

For example, there are 8 errors for imports when checking consistency with these 2. Classpath, mainclass, properties:

"java -cp /home/***/poi-3.9/poi-scratchpad-3.9-20121203.jar:/home/***/poi-3.9/poi-3.9-20121203.jar:/home/***/poi-3.9/lib/commons-logging-1.1.jar:/home/***/poi-3.9/lib/commons-codec-1.5.jar:/home/***/poi-3.9/lib/log4j-1.2.13.jar:/home/***/poi-3.9/lib/junit-3.8.1.jar org.apache.poi.hwpf.QuickTest test.doc"

test.doc - Microsoft Word Document.

With this string Oracle Java 1.6.0_31 works well, showing output of doc file as expected

List of not found classes for project "poi39":

1) Class "com/sun/jdmk/comm/CommunicatorServer" is not found; imported from:
  - org/apache/log4j/jmx/Agent

2) Class "com/sun/jdmk/comm/HtmlAdaptorServer" is not found; imported from:
  - org/apache/log4j/jmx/Agent

3) Class "javax/jms/Connection" is not found; imported from:
  - org/apache/log4j/net/JMSSink
  - org/apache/log4j/net/JMSAppender

4) Class "javax/jms/Destination" is not found; imported from:
  - org/apache/log4j/or/jms/MessageRenderer

5) Class "javax/jms/JMSException" is not found; imported from:
  - org/apache/log4j/net/JMSSink
  - org/apache/log4j/or/jms/MessageRenderer

6) Class "javax/jms/Message" is not found; imported from:
  - org/apache/log4j/net/JMSSink
  - org/apache/log4j/or/jms/MessageRenderer
  - org/apache/log4j/net/JMSAppender

7) Class "javax/jms/MessageConsumer" is not found; imported from:
  - org/apache/log4j/net/JMSSink

 Class "javax/jms/MessageListener" is not found; imported from:
  - org/apache/log4j/net/JMSSink

9) Class "javax/jms/ObjectMessage" is not found; imported from:
  - org/apache/log4j/net/JMSSink
  - org/apache/log4j/net/JMSAppender

10) Class "javax/jms/Session" is not found; imported from:
  - org/apache/log4j/net/JMSAppender

11) Class "javax/jms/Topic" is not found; imported from:
  - org/apache/log4j/net/JMSSink
  - org/apache/log4j/net/JMSAppender

12) Class "javax/jms/TopicConnection" is not found; imported from:
  - org/apache/log4j/net/JMSSink
  - org/apache/log4j/net/JMSAppender

13) Class "javax/jms/TopicConnectionFactory" is not found; imported from:
  - org/apache/log4j/net/JMSSink
  - org/apache/log4j/net/JMSAppender

14) Class "javax/jms/TopicPublisher" is not found; imported from:
  - org/apache/log4j/net/JMSAppender

15) Class "javax/jms/TopicSession" is not found; imported from:
  - org/apache/log4j/net/JMSSink
  - org/apache/log4j/net/JMSAppender

16) Class "javax/jms/TopicSubscriber" is not found; imported from:
  - org/apache/log4j/net/JMSSink

17) Class "javax/mail/Address" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

18) Class "javax/mail/Authenticator" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

19) Class "javax/mail/BodyPart" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

20) Class "javax/mail/Message" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

21) Class "javax/mail/Message$RecipientType" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

22) Class "javax/mail/MessagingException" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

23) Class "javax/mail/Multipart" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

24) Class "javax/mail/Session" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

25) Class "javax/mail/Transport" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

26) Class "javax/mail/internet/AddressException" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

27) Class "javax/mail/internet/InternetAddress" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

28) Class "javax/mail/internet/MimeBodyPart" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

29) Class "javax/mail/internet/MimeMessage" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

30) Class "javax/mail/internet/MimeMultipart" is not found; imported from:
  - org/apache/log4j/net/SMTPAppender

31) Class "javax/servlet/ServletContextEvent" is not found; imported from:
  - org/apache/commons/logging/impl/ServletContextCleaner

32) Class "javax/servlet/ServletContextListener" is not found; imported from:
  - org/apache/commons/logging/impl/ServletContextCleaner

33) Class "org/apache/avalon/framework/logger/Logger" is not found; imported from:
  - org/apache/commons/logging/impl/AvalonLogger

34) Class "org/apache/log/Hierarchy" is not found; imported from:
  - org/apache/commons/logging/impl/LogKitLogger

35) Class "org/apache/log/Logger" is not found; imported from:
  - org/apache/commons/logging/impl/LogKitLogger

----------------------------------------------

List of classes with unresolved import dependencies for project "poi39":

1) Class "org/apache/commons/logging/impl/AvalonLogger" has the following unresolved import dependencies:
  - org/apache/avalon/framework/logger/Logger

2) Class "org/apache/commons/logging/impl/LogKitLogger" has the following unresolved import dependencies:
  - org/apache/log/Logger
  - org/apache/log/Hierarchy

3) Class "org/apache/commons/logging/impl/ServletContextCleaner" has the following unresolved import dependencies:
  - javax/servlet/ServletContextListener
  - javax/servlet/ServletContextEvent

4) Class "org/apache/log4j/jmx/Agent" has the following unresolved import dependencies:
  - com/sun/jdmk/comm/HtmlAdaptorServer
  - com/sun/jdmk/comm/CommunicatorServer

5) Class "org/apache/log4j/net/JMSAppender" has the following unresolved import dependencies:
  - javax/jms/Connection
  - javax/jms/ObjectMessage
  - javax/jms/Message
  - javax/jms/TopicSession
  - javax/jms/TopicConnectionFactory
  - javax/jms/Topic
  - javax/jms/Session
  - javax/jms/TopicPublisher
  - javax/jms/TopicConnection

6) Class "org/apache/log4j/net/JMSSink" has the following unresolved import dependencies:
  - javax/jms/Connection
  - javax/jms/ObjectMessage
  - javax/jms/MessageConsumer
  - javax/jms/Message
  - javax/jms/TopicSubscriber
  - javax/jms/MessageListener
  - javax/jms/TopicConnectionFactory
  - javax/jms/TopicSession
  - javax/jms/JMSException
  - javax/jms/Topic
  - javax/jms/TopicConnection

7) Class "org/apache/log4j/net/SMTPAppender" has the following unresolved import dependencies:
  - javax/mail/internet/MimeMessage
  - javax/mail/Message
  - javax/mail/BodyPart
  - javax/mail/Address
  - javax/mail/internet/MimeBodyPart
  - javax/mail/Multipart
  - javax/mail/Authenticator
  - javax/mail/internet/AddressException
  - javax/mail/MessagingException
  - javax/mail/Message$RecipientType
  - javax/mail/Session
  - javax/mail/internet/MimeMultipart
  - javax/mail/internet/InternetAddress
  - javax/mail/Transport

 Class "org/apache/log4j/or/jms/MessageRenderer" has the following unresolved import dependencies:
  - javax/jms/JMSException
  - javax/jms/Message
  - javax/jms/Destination

Share this post


Link to post
Share on other sites

I've tried to compile the same application and also got this message about classes inconsistency.

However you should understand that Java classes may contain links to unresolved classes and it's OK if these links are never resolved.

Fortunately, the JET compiler is able to compile the application even if it comprises such classes.

In your case you should treat this messages as warnings in third-party library, ignore them and continue compilation.

I've successfully compiled your example and JET compiled executable runs flawlessly.

For more information see JET User's Guide, Chapter "JET Control Panel", Section "Step 3: Selecting a compilation mode", Subsection "Class viewer", Paragraph "Classpath inconsistency", Subparagraph "Unresolved import".

--

Excelsior Support

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×