geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Jain" <ashja...@gmail.com>
Subject Re: Getting class not found exception while running the jaxws-tools.bat
Date Fri, 21 Mar 2008 15:38:28 GMT
Hi Jarek,
Thanks for your help! It worked finally for me. I will document these steps
in the tutorial section.

Thanks
Ashish

On Fri, Mar 21, 2008 at 7:15 PM, Jarek Gawor <jgawor@gmail.com> wrote:

> Use jaxws/wsgen -classpath to pass the right jars to the wsgen
> command. And if on Windows you still will need to use Unix-style
> slashes to specify the classpath. So something like this should work:
>
> jaxws/wsgen -classpath /test/org.jar <sei class>
>
> assuming you have c:\test\org.jar
>
> Jarek
>
> On Fri, Mar 21, 2008 at 8:01 AM, Ashish Jain <ashjain2@gmail.com> wrote:
> > Hi Jarek,
> > Thanks for your eply! But still I am not able to completely workout
> things.
> > I keep getting a classnotfound exception when I try generating the WS
> > artifacts from Class. I tried the following
> > 1) set the classpath in the windows command prompt using the command set
> > CLASSPATH=C:\TEST\org.jar. This jar has the SEI. Later ran the gsh.batto
> > start gshell followed by jaxws/wsgen
> > org.apache.geronimo.samples.jws.CalculatorService
> >  I got the error error: Class not found:
> > "org.apache,geronimo.samples.jws.CalculatorService"
> >
> > 2) I ran the gsh.bat. Later using the set variable with gshell I tried
> > setting the Classpath
> > using the command
> >  set CLASSPATH="C:\TEST\org.jar" I got the error
> > ERROR TokenMgrError: Lexical error at line 1, column 19.  Encountered:
> "T"
> > (84),
> >  after : "\"C:\\"
> >
> > So I modified the command as follows set CLASSPATH="C:\\TEST\\org.jar"
>  and
> > it went fine. But later running the command
> >  jaxws/wsgen org.apache.geronimo.samples.jws.CalculatorService I get the
> > same class not found exception.
> >
> > 3) Later I tried setting the classpath using Environment Variables in
> > windowsxp ended up with the same error.
> >
> > Please help.
> >
> > Thanks
> > Ashish
> >
> >
> >
> > On Fri, Mar 21, 2008 at 10:53 AM, Jarek Gawor <jgawor@gmail.com> wrote:
> > > Well, there is no easy workaround. You could patch 2.1 by getting the
> > > geronimo-jaxws-builder-*.jar from 2.1.1-SNAPSHOT. Another way to get
> > > this running in 2.1 is to execute wsgen/wsimport via GShell but you
> > > have to configure things a bit. Here's how to do it:
> > >
> > > 1) Edit etc/gsh-classworlds.conf and add the following line:
> > >
> > > load ${gshell.home}/lib/geronimo-jaxws-builder-2.1.jar
> > >
> > > 2) Edit etc/layout.xml and add the following:
> > >
> > >        <group>
> > >            <name>jaxws</name>
> > >            <nodes>
> > >                <command>
> > >                    <name>wsgen</name>
> > >                    <id>geronimo-jaxws-builder:wsgen</id>
> > >                </command>
> > >                <command>
> > >                    <name>wsimport</name>
> > >                    <id>geronimo-jaxws-builder:wsimport</id>
> > >                </command>
> > >            </nodes>
> > >        </group>
> > >
> > > And then start gshell. You should be able to execute jaxws/wsgen or
> > > jaxws/wsimport now.
> > >
> > > Hope this helps,
> > > Jarek
> > >
> > >
> > >
> > >
> > > On Thu, Mar 20, 2008 at 5:26 PM, Ashish Jain <ashjain2@gmail.com>
> wrote:
> > > > Hi Jarek,
> > > > I found the JIRA GERONIMO-3831 associated with this issue but could
> not
> > find
> > > > a workaround. Is there a workaround available for this issue in AG
> 2.1?
> > > >
> > > > Thanks
> > > > Ashish
> > > >
> > > > On Wed, Mar 19, 2008 at 11:32 PM, Jarek Gawor <jgawor@gmail.com>
> wrote:
> > > >
> > > > > Yes, this problem exists in 2.1 but it is already fixed in svn and
> > > > > will be included in 2.1.1. You can use 2.1.1-SNAPSHOT if you want
> in
> > > > > the meantime (
> http://geronimo.apache.org/maven/server/binaries/2.1/).
> > > > >
> > > > > Jarek
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Mar 19, 2008 at 10:22 AM, Ashish Jain <ashjain2@gmail.com>
> > wrote:
> > > > > > Hi,
> > > > > > I am using the jaxws-tools.bat to create the required artifacts
> for
> > > > jax-ws
> > > > > > webservice.
> > > > > > I ran the command jaxws-tools.bat wsgen on a command window
and
> got
> > the
> > > > > > following error.
> > > > > >
> > > > > > Exception in thread "main" java.lang.NoClassDefFoundError:
> > > > > > org.apache.geronimo.c
> > > > > >  ommon.DeploymentException
> > > > > >         at java.lang.J9VMInternals.verifyImpl(Native Method)
> > > > > >         at java.lang.J9VMInternals.verify(J9VMInternals.java:68)
> > > > > >         at
> > java.lang.J9VMInternals.initialize(J9VMInternals.java:129)
> > > > > >          at
> > > > > >
> > org.apache.geronimo.jaxws.builder.JAXWSToolsCLI.run(JAXWSToolsCLI.jav
> > > > > > a:71)
> > > > > >         at
> > > > > >
> > org.apache.geronimo.jaxws.builder.JAXWSToolsCLI.main(JAXWSToolsCLI.ja
> > > > > > va:61)
> > > > > >
> > > > > > I could find this class at
> > > > > >
> > > >
> >
> <GERONIMO_HOME>\repository\org\apache\geronimo\framework\geronimo-common\2.1.
> > > > > >
> > > > > > The previous version of geronimo on running the same command
> will
> > give a
> > > > > > help menu
> > > > > >
> > > > > > Usage: wsgen [options] <SEI>
> > > > > >
> > > > > > where [options] include:
> > > > > >   -classpath <path>          specify where to find input
class
> files
> > > > > >    -cp <path>                 same as -classpath <path>
> > > > > >   -d <directory>             specify where to place generated
> output
> > > > files
> > > > > >   -extension                 allow vendor extensions -
> functionality
> > not
> > > > > > specifi
> > > > > >  ed
> > > > > >                              by the specification.  Use of
> > extensions
> > > > may
> > > > > >                              result in applications that are
not
> > > > portable or
> > > > > >                              may not interoperate with other
> > > > implementations
> > > > > >    -help                      display help
> > > > > >   -keep                      keep generated files
> > > > > >   -r <directory>             resource destination directory,
> specify
> > > > where
> > > > > > to
> > > > > >                              place resouce files such as WSDLs
> > > > > >    -s <directory>             specify where to place generated
> > source
> > > > files
> > > > > >   -verbose                   output messages about what the
> compiler
> > is
> > > > > > doing
> > > > > >   -version                   print version information
> > > > > >    -wsdl[:protocol]           generate a WSDL file.  The
> protocol is
> > > > > > optional.
> > > > > >                              Valid protocols are soap1.1 and
> > Xsoap1.2,
> > > > the
> > > > > > defau
> > > > > > lt
> > > > > >                              is soap1.1.  Xsoap1.2 is not
> standard
> > and
> > > > can
> > > > > > only
> > > > > >  be
> > > > > >                              used in conjunction with the
> -extension
> > > > option
> > > > > >   -servicename <name>        specify the Service name
to use in
> the
> > > > > > generated WS
> > > > > > DL
> > > > > >                              Used in conjunction with the -wsdl
> > option.
> > > > > >    -portname <name>           specify the Port name to
use in
> the
> > > > generated
> > > > > > WSDL
> > > > > >                              Used in conjunction with the -wsdl
> > option.
> > > > > >
> > > > > > Examples:
> > > > > >   wsgen -cp . example.Stock
> > > > > >   wsgen -cp . example.Stock -wsdl -servicename
> > > > {http://mynamespace}MyService <http://mynamespace%7DMyService>
> > > > > >
> > > > > > Note: Previous version of geronimo had the class
> DeploymentException
> > at
> > > > > >
> > > >
> >
> <GERONIMO_HOME>\repository\org\apache\geronimo\modules\geronimo-common\2.0.1
> > > > > >
> > > > > > Thanks
> > > > > > Ashish
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>

Mime
View raw message