You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Lee Meador <le...@leemeador.com> on 2013/06/08 02:55:41 UTC

Compile errors that make no sense

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.

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>

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.

-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com

Re: Compile errors that make no sense

Posted by Lee Meador <le...@leemeador.com>.
Compile plugin has both set to 1.6. Using 'java version "1.6.0_35"'
according to "java -version" when I do "mvn package"

I gave in and added a dependency to xmlbeans 1.0 and it compiled and built
my jar. Still don't know why and that makes me nervous. Perhaps I'll have
to kill a chicken on my monitor to keep it working. (It's harder with the
thin monitors.)

Thank you for your help.

--- Lee


On Fri, Jun 7, 2013 at 9:35 PM, Wayne Fay <wa...@gmail.com> wrote:

> > [ERROR]
> >
> \java\f1400\src\fcs\code\src\com\company\interfaces\nds\NDSBoundary.java:[66,80]
> ...
> > 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.
>
> It certainly sounds odd. What JDK are you using? What version of the
> compiler is specified as source and target? Can you post this
> NDSBoundary.java file somewhere like pastebin or create a simple/small
> project that demonstrates this issue without disclosing large portions
> of your company/private source?
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com

Re: Compile errors that make no sense

Posted by Wayne Fay <wa...@gmail.com>.
> [ERROR]
> \java\f1400\src\fcs\code\src\com\company\interfaces\nds\NDSBoundary.java:[66,80]
...
> 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.

It certainly sounds odd. What JDK are you using? What version of the
compiler is specified as source and target? Can you post this
NDSBoundary.java file somewhere like pastebin or create a simple/small
project that demonstrates this issue without disclosing large portions
of your company/private source?

Wayne

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


Re: Compile errors that make no sense

Posted by Jörg Schaible <jo...@gmx.de>.
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