Re: Compile error

Per Nyfelt <[email protected]> Tue, 1 Feb 2005 20:09:45 +0100
Newsgroups gmane.comp.java.ozone.user
Organization Resourcing Networks
Message-ID <[email protected]>
I should probably add that the "recent" refactoring of OPP unfortunately 
changed the behavior a bit in the sense that the classpath to the tools.jar 
need to be explicitly available in the ant script. I think most samples are 
fixed in this regard but a couple of weeks ago this issue had to be fixed for 
the SimpleServlet sample so there might very well be so that not all samples 
work "out of the box". I do not think this is the case though. it looks more 
like the build directory is not in the OPP classpath and hence the *Impl 
classes cannot be found.

Regards,
Per

tisdagen den 1 februari 2005 19.30 skrev Naaliel Mendes:
> Hi Bill
>
> In reality, I saw the exception NoClassDefFoundError. I solved that
> problem moving the build directory to the correct path. I used OO7
> (ozone\sample\oo7) in my tests, for the correct operation I did:
> Before:
> ozone\sample\oo7\*.class
> ozone\server\src\org\ozoneDB\*.class
>
> After
> ozone\server\src\oo7\*.class
> ozone\server\src\org\ozoneDB\*.class
>
> However, your case is different, because the ANT build script show an
> error in the sense of Proxy files. As you know, Proxy files are
> generated from Implementation class (*Impl). See Ozone Documentation
> for more details.
> Attention: *Impl class are inherited from Java Interface structure. As
> a tip, in this line of investigation, confirm if there aren't errors
> in your implementation.
> Hey Bill, if possible, compile your files using OPP Ozone command. If
> you have some question do not hesitate to send us a message.
> Other tip:
> At the moment of compilation, probabily, your build.xml do:
> - Compile .java (.class generated)
> - Use opp command to create from *Impl the proxy files (you see error
> in this situation)
> - Execute MainClass
> Obviously, as first pass, start the Ozone server.
>
> We can to found a good solution togheter.
> Sorry for the delay.
>
> Regards,
>
> Naaliel Mendes
> [email protected]
> ---------------------------------------------------------------------------
>-- State University of Campinas (UNICAMP)
> Superior Center of Technological Education (CESET)
> www.ceset.unicamp.br
>
> On Sat, 29 Jan 2005 20:05:41 -0600, Bill Goldsworthy <[email protected]> 
wrote:
> > Hi Naaliel,
> >
> > Here is what I currently have:
> >
> > CLASSPATH=C:\OzoneTest\build\classes\
> > JAVA_HOME=C:\jdk1.5.0
> > OZONE_HOME=C:\ozone-1.2
> >
> > My project directory:
> >
> > C:\OzoneTest\build.xml
> > C:\OzoneTest\src\
> > C:\OzoneTest\build\classes\
> > C:\OzoneTest\build\dist\
> >
> > I'm pretty sure it's a classpath/JVM problem but I still can't seem to
> > nail it down.
> >
> > Would love hear what you did to fix!
> >
> > Thanks for your help!
> > Bill
> >
> > On Fri, 28 Jan 2005 11:01:22 -0200, Naaliel Mendes <[email protected]> 
wrote:
> > > Hey Bill,
> > > Tell me how is the CLASSPATH/JAVA_HOME/OZONE_HOME and your directory
> > > structure (BUILD). In the last week, I saw a similar problem, but I
> > > solved it with some configurations in CLASSPATH.
> > > Regards,
> > > Naaliel Mendes
> > >
> > > On Sat, 8 Jan 2005 00:03:04 -0600, Bill Goldsworthy <[email protected]> 
wrote:
> > > > Hello,
> > > >
> > > > I'm going to be using Ozone embedded in a Java application I'm
> > > > writing.
> > > >
> > > > Anyways, I'm working on compiling the simple sample in the netBeans
> > > > 4.0 IDE RC2 (Java 1.5) wtih the ANT build file.
> > > >
> > > > Everything compiles fine but for some reason the proxies target in
> > > > the ANT build file messes up. It's confusing to me because it seems
> > > > to find the classes, but then it can't find them?
> > > >
> > > > I suspect it's a classpath problem but I've set the CLASSPATH with
> > > > the build directory and set OZONE_HOME etc. Searched around the forum
> > > > but haven't seemed to nailed it down. netBeans doesn't use the
> > > > CLASSPATH as you might normally do, but I don't suspect this to be
> > > > the problem since it's using ANT.
> > > >
> > > > Your advice greatly appreciated!
> > > >
> > > > prepare:
> > > > classes:
> > > > Compiling 5 source files to \Ozone_Example\build\classes
> > > > proxies:
> > > > Begin OPP...
> > > >    Processing class: BusImpl
> > > >    Begin Processing BusImpl...
> > > >       Begin Resolving update methods...
> > > >       End Resolving update methods
> > > >    End Processing BusImpl generated in 0.062 seconds.
> > > >    Generation completed with 0 warnings and 0 errors
> > > > org.ozoneDB.tools.OPP.srcgen.BuilderException:
> > > > org.ozoneDB.tools.OPP.srcgen.ResolverException: Could not resolve
> > > > update methods (BusImpl). BusImpl
> > > >     at
> > > > org.ozoneDB.tools.OPP.srcgen.direct.ReflectionClassDirector.build(Unk
> > > >nown Source)
> > > >     at org.ozoneDB.tools.OPP.OPP.makeProxiesAndFactories(Unknown
> > > > Source) at org.ozoneDB.tools.OPP.OPP.generate(Unknown Source)
> > > >     at org.ozoneDB.tools.OPP.OPP.main(Unknown Source)
> > > > Caused by: org.ozoneDB.tools.OPP.srcgen.ResolverException: Could not
> > > > resolve update methods (BusImpl). BusImpl
> > > >     at
> > > > org.ozoneDB.tools.OPP.srcgen.resolve.SourceUpdateMethodResolver.resol
> > > >veMethods(Unknown Source)
> > > >     at
> > > > org.ozoneDB.tools.OPP.srcgen.resolve.CompositeMethodResolver.resolveM
> > > >ethods(Unknown Source)
> > > >     ... 4 more
> > > > Caused by: java.lang.ClassNotFoundException: BusImpl
> > > >     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> > > >     at java.security.AccessController.doPrivileged(Native Method)
> > > >     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> > > >     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> > > >     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
> > > >     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> > > >     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> > > >     at java.lang.Class.forName0(Native Method)
> > > >     at java.lang.Class.forName(Class.java:164)
> > > >     at
> > > > org.ozoneDB.tools.OPP.srcgen.query.ReflectionClassQuery.isAssignable(
> > > >Unknown Source)
> > > >     at
> > > > org.ozoneDB.tools.OPP.srcgen.resolve.SourceUpdateMethodResolver.searc
> > > >hUpdateMethods(Unknown Source)
> > > >     ... 6 more
> > > > C:\Ozone_Example\src\ozone_example\build.xml:87: Java returned: 1
> > > > BUILD FAILED (total time: 1 second)
> > > >
> > > > -------------------------------------------------------
> > > > The SF.Net email is sponsored by: Beat the post-holiday blues
> > > > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> > > > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> > > > _______________________________________________
> > > > Ozone-users mailing list
> > > > [email protected]
> > > > https://lists.sourceforge.net/lists/listinfo/ozone-users
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> > > Tool for open source databases. Create drag-&-drop reports. Save time
> > > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> > > Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> > > _______________________________________________
> > > Ozone-users mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/ozone-users
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> > Tool for open source databases. Create drag-&-drop reports. Save time
> > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> > Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> > _______________________________________________
> > Ozone-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/ozone-users
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Ozone-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ozone-users


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl