You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by vijay shanker <vi...@gmail.com> on 2010/01/11 13:58:37 UTC

eroor in executin compile on hibernate project.

Hi there;

I am trying to execute clean and install goals on hinernate project;

And My out put is as given below. Will you please describe the sitution why
this error is coming?

I am not able to find any relevent answer till now. In eclispe this project
is working well without any error. So i think this is something with meven
compiler. But not aware of What? will you please describe the reason for me?

Also added the error file.

+++++++++===============++++++++++++++

D:\VijayAtWork\TeamProjects\accounts-trunk\accounts>mvn -e clean package
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building accounts
[INFO]    task-segment: [clean, package]
[INFO]
------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory
D:\VijayAtWork\TeamProjects\accounts-trunk\accounts\target
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[WARNING] While downloading aspectj:aspectjweaver:1.5.4
  This artifact has been relocated to org.aspectj:aspectjweaver:1.5.4.


[WARNING] While downloading javax.xml.soap:saaj-impl:1.3
  This artifact has been relocated to
com.sun.xml.messaging.saaj:saaj-impl:1.3.


Downloading:
http://192.168.1.200:8014/artifactory/repo/org/springframework/spring-hibernate3/2.0-rc2/spring-hibernate3-2.0-rc2.pom
Downloading:
http://192.168.1.200:8014/artifactory/repo/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.pom
[INFO] [compiler:compile]
[INFO] Compiling 1267 source files to
D:\VijayAtWork\TeamProjects\accounts-trunk\accounts\target\classes
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
D:\VijayAtWork\TeamProjects\accounts-trunk\accounts\src\main\java\com\vsd\accounts\model\hibernate\package-info.java:[92,0]
illegal start of expression



D:\VijayAtWork\TeamProjects\accounts-trunk\accounts\src\main\java\com\vsd\accounts\model\hibernate\package-info.java:[92,0]
illegal start of expression


[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
D:\VijayAtWork\TeamProjects\accounts-trunk\accounts\src\main\java\com\vsd\accounts\model\hibernate\package-info.java:[92,0]
illegal start of expression


        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:579)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation
failure
D:\VijayAtWork\TeamProjects\accounts-trunk\accounts\src\main\java\com\vsd\accounts\model\hibernate\package-info.java:[92,0]
illegal start of expression


        at
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
        at
org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
        ... 16 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 24 seconds
[INFO] Finished at: Mon Jan 11 18:26:15 IST 2010
[INFO] Final Memory: 15M/254M
[INFO]
------------------------------------------------------------------------

D:\VijayAtWork\TeamProjects\accounts-trunk\accounts>

+++++++++===============++++++++++++++

my package-info.java class

============================

/*
 * Type Definitions for custom hibernate data types.
 */
@TypeDefs( {
@TypeDef(name = "bytearray_blob", typeClass =
org.springframework.orm.hibernate3.support.BlobByteArrayType.class),

})
/*
 * Named Queries
 */
@NamedQueries( {
// Item Queries

// Event Log Queries
 @NamedQuery(name = "logEntry.by.date", query = "from LogEntry e where
id1=:parentId and entryDate between :startDate and :endDate"),
})

import org.hibernate.annotations.NamedQueries;
import org.hibernate.annotations.NamedQuery;
import org.hibernate.annotations.TypeDef;
import org.hibernate.annotations.TypeDefs;

============================

Regards,
Vijay Shanker Dubey

Re: eroor in executin compile on hibernate project.

Posted by Wayne Fay <wa...@gmail.com>.
> The project i have got is legacy project and all hibernate queries are
> defined like that only(in package-info.java). So; I am not sure whether it
> is standard or i need to tweak something with compiler.

This is a question for the Hibernate list.

Wayne

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


Re: eroor in executin compile on hibernate project.

Posted by vijay shanker <vi...@gmail.com>.
Thanks guys;
I am digging in to the matter.



Regards,
Vijay Shanker Dubey



On Mon, Jan 11, 2010 at 11:29 PM, Justin Edelson <ju...@gmail.com>wrote:

> You can fix your package-info.java. I'd start by adding a package
> declaration (which you appear to be missing) and using fully-qualified
> class
> names for the annotations.
>
> Alternatively, you can use the Eclipse compiler instead of javac:
>
> http://maven.apache.org/plugins/maven-compiler-plugin/non-javac-compilers.html
>
> There are differences between the Eclipse compiler and javac. They're not
> common, but they do exist.
>
> Justin
>
> On Mon, Jan 11, 2010 at 12:46 PM, vijay shanker <vijay.shad@gmail.com
> >wrote:
>
> > Hi;
> > The project i have got is legacy project and all hibernate queries are
> > defined like that only(in package-info.java). So; I am not sure whether
> it
> > is standard or i need to tweak something with compiler.
> >
> > Is there any option exists so i can do a compiling.
> >
> > :)
> >
> > Regards,
> > Vijay Shanker Dubey
> >
> >
> >
> > On Mon, Jan 11, 2010 at 10:08 PM, Wayne Fay <wa...@gmail.com> wrote:
> >
> > > > I am not able to find any relevent answer till now. In eclispe this
> > > project
> > > > is working well without any error. So i think this is something with
> > > meven
> > > > compiler. But not aware of What? will you please describe the reason
> > for
> > > me?
> > >
> > > Eclipse has its own compiler. Maven does not -- it uses the Javac
> > > compiler included with the JDK you have installed. So there is no
> > > problem with the Maven compiler, rather it is likely you have found a
> > > problem in the Eclipse compiler, which does not complain about a bad
> > > file when it should.
> > >
> > > > my package-info.java class
> > >
> > > This does not appear to be a valid Package Comment file per the
> > > Javadoc documentation, specifically the import statements are invalid.
> > > Read more online:
> > >
> > >
> >
> http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#packagecomment
> > >
> > > "package-info.java - Can contain a package declaration, package
> > > annotations, package comments and Javadoc tags. This file is new in
> > > JDK 5.0, and is preferred over package.html."
> > >
> > > Wayne
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>

Re: eroor in executin compile on hibernate project.

Posted by Justin Edelson <ju...@gmail.com>.
You can fix your package-info.java. I'd start by adding a package
declaration (which you appear to be missing) and using fully-qualified class
names for the annotations.

Alternatively, you can use the Eclipse compiler instead of javac:
http://maven.apache.org/plugins/maven-compiler-plugin/non-javac-compilers.html

There are differences between the Eclipse compiler and javac. They're not
common, but they do exist.

Justin

On Mon, Jan 11, 2010 at 12:46 PM, vijay shanker <vi...@gmail.com>wrote:

> Hi;
> The project i have got is legacy project and all hibernate queries are
> defined like that only(in package-info.java). So; I am not sure whether it
> is standard or i need to tweak something with compiler.
>
> Is there any option exists so i can do a compiling.
>
> :)
>
> Regards,
> Vijay Shanker Dubey
>
>
>
> On Mon, Jan 11, 2010 at 10:08 PM, Wayne Fay <wa...@gmail.com> wrote:
>
> > > I am not able to find any relevent answer till now. In eclispe this
> > project
> > > is working well without any error. So i think this is something with
> > meven
> > > compiler. But not aware of What? will you please describe the reason
> for
> > me?
> >
> > Eclipse has its own compiler. Maven does not -- it uses the Javac
> > compiler included with the JDK you have installed. So there is no
> > problem with the Maven compiler, rather it is likely you have found a
> > problem in the Eclipse compiler, which does not complain about a bad
> > file when it should.
> >
> > > my package-info.java class
> >
> > This does not appear to be a valid Package Comment file per the
> > Javadoc documentation, specifically the import statements are invalid.
> > Read more online:
> >
> >
> http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#packagecomment
> >
> > "package-info.java - Can contain a package declaration, package
> > annotations, package comments and Javadoc tags. This file is new in
> > JDK 5.0, and is preferred over package.html."
> >
> > Wayne
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: eroor in executin compile on hibernate project.

Posted by vijay shanker <vi...@gmail.com>.
Hi;
The project i have got is legacy project and all hibernate queries are
defined like that only(in package-info.java). So; I am not sure whether it
is standard or i need to tweak something with compiler.

Is there any option exists so i can do a compiling.

:)

Regards,
Vijay Shanker Dubey



On Mon, Jan 11, 2010 at 10:08 PM, Wayne Fay <wa...@gmail.com> wrote:

> > I am not able to find any relevent answer till now. In eclispe this
> project
> > is working well without any error. So i think this is something with
> meven
> > compiler. But not aware of What? will you please describe the reason for
> me?
>
> Eclipse has its own compiler. Maven does not -- it uses the Javac
> compiler included with the JDK you have installed. So there is no
> problem with the Maven compiler, rather it is likely you have found a
> problem in the Eclipse compiler, which does not complain about a bad
> file when it should.
>
> > my package-info.java class
>
> This does not appear to be a valid Package Comment file per the
> Javadoc documentation, specifically the import statements are invalid.
> Read more online:
>
> http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#packagecomment
>
> "package-info.java - Can contain a package declaration, package
> annotations, package comments and Javadoc tags. This file is new in
> JDK 5.0, and is preferred over package.html."
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: eroor in executin compile on hibernate project.

Posted by Wayne Fay <wa...@gmail.com>.
> I am not able to find any relevent answer till now. In eclispe this project
> is working well without any error. So i think this is something with meven
> compiler. But not aware of What? will you please describe the reason for me?

Eclipse has its own compiler. Maven does not -- it uses the Javac
compiler included with the JDK you have installed. So there is no
problem with the Maven compiler, rather it is likely you have found a
problem in the Eclipse compiler, which does not complain about a bad
file when it should.

> my package-info.java class

This does not appear to be a valid Package Comment file per the
Javadoc documentation, specifically the import statements are invalid.
Read more online:
http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#packagecomment

"package-info.java - Can contain a package declaration, package
annotations, package comments and Javadoc tags. This file is new in
JDK 5.0, and is preferred over package.html."

Wayne

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