maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: Compile errors that make no sense
Date Sat, 08 Jun 2013 10:09:14 GMT
Hi Lee,

Lee Meador wrote:

> I run "mvn package" and get compile errors. I'm not to the stage of seeing
> if it will run.
> 
> I'm looking for solutions, hints or rumors.
> 
> I have just today created the pom.xml for two non-trivial projects using
> ant. I've been working through the dependencies to get them right all day.
> One creates a jar that the other depends on. This code builds in ant
> without errors. This code "builds" in eclipse without errors (or squiggly
> red lines).
> 
> Now I'm down to one problem java file. Here is the output of running Maven
> from the Windows 7 command line with -X:
> 
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :
> [INFO] -------------------------------------------------------------
> [ERROR]
> \java\f1400\src\fcs\code\src\com\company\interfaces\nds\NDSBoundary.java:
[47,11]
> cannot access com.bea.xml.XmlObject
> class file for com.bea.xml.XmlObject not found
> document.getNotification().addNewMsg();
> [ERROR]
> \java\f1400\src\fcs\code\src\com\company\interfaces\nds\NDSBoundary.java:
[65,55]
> cannot access com.bea.xml.XmlString
> class file for com.bea.xml.XmlString not found
> 
not.setLevel(NotificationDocument.Notification.Level.Enum.forString(System.getProperty(NOTIFICATION_LEVEL)));
> [ERROR]
> \java\f1400\src\fcs\code\src\com\company\interfaces\nds\NDSBoundary.java:
[66,80]
> cannot access com.bea.xml.StringEnumAbstractBase
> class file for com.bea.xml.StringEnumAbstractBase not found
> getAppLogger().debug("Level is
> 
"+NotificationDocument.Notification.Level.Enum.forString(System.getProperty(NOTIFICATION_LEVEL)));
> [INFO] 3 errors
> 
> Notice that it complains about com.bea.xml.X on three lines. But the
> snippet of source code on the next lines does not show a reference to the
> X class. Its not an Exception either.
> 
> In fact, a text search on all the source code finds no references to
> com.bea.xml . I tried it twice typing and copy/pasting to check.

There does not have to be one. It is enough that you use a class that itself 
is derived from such a class or implements such an interface.

> The eclipse projects have weblogic.jar among other weblogic stuff on the
> classpath.
> The Maven pom that's failing has no references to weblogic. All the JavaEE
> stuff comes from open source versions of those dependencies. (Remember I'm
> running from the command line.)
> The other Maven pom, for the project that compiles, has this dependency:
> 
> <groupId>com.bea.wlplatform</groupId>
> <artifactId>commonj-twm</artifactId>
> <version>1.1</version>
> <scope>provided</scope>

The scope explains it all. For the first project this dependency is on the 
compile path, but it is not inherited for the send one. Alas, you get those 
errors above, given that the classes are still part of the class hierarchy.

> I know nothing about it but found it in Mvnrepository and it supplies some
> classes that let the project compile.
> 
> There are a lot of dependent jars that are local to this company and they
> may refer to weblogic. I don't have source for most of them.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message