geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Jiang <genspr...@gmail.com>
Subject Re: Exception when run Bank sample client in a command line window
Date Fri, 05 Jun 2009 08:33:40 GMT
can you please check if each jar path in your classpath is valid ?
Eg.

GERONIMO_HOME%/repository/org/apache/openejb/openejb-client/3.0/openejb-client-3.0.jar

might be

GERONIMO_HOME%/repository/org/apache/openejb/openejb-client/3.0.1/openejb-client-3.0.1.jar

On Wed, Jun 3, 2009 at 10:45 PM, Rodger <eternaljian@gmail.com> wrote:

> When the sample project is in Eclipse, I run the BankClient.class smoothly.But
> in a command line window , by using the command:
>
> java -classpath
> "%classpath%;%SAMPLE_HOME%/applications/bank/bank-client/target/bank-client-2.1.1.2.jar;%SAMPLE_HOME%/applications/bank/bank-ejb/target/bank-ejb-2.1.1.2.jar;%GERONIMO_HOME%/repository/org/apache/openejb/openejb-client/3.0/openejb-client-3.0.jar;%GERONIMO_HOME%/repository/org/apache/geronimo/specs/geronimo-ejb_3.0_spec/1.0.1/geronimo-ejb_3.0_spec-1.0.1.jar"
> org.apache.geronimo.samples.bank.client.BankClient
>
> There are Exceptions:
> ==============================================
> javax.naming.NoInitialContextException: Failed to create InitialContext
> using factory specified in hashtable
> {java.naming.provider.url=ejbd://localhost:4201,
> java.naming.factory.initial=org.apache.openejb.client.RemoteInitialContextFactory}
>  [Root exception is java.lang.NullPointerException]
>         at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:2
> 46)
>         at
> javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.j
> ava:327)
>         at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:357
> )
>         at
> javax.naming.InitialContext.internalInit(InitialContext.java:295)
>         at javax.naming.InitialContext.<init>(InitialContext.java:212)
>         at
> org.apache.geronimo.samples.bank.client.BankClient.main(BankClient.ja
> va:37)
> Caused by: java.lang.NullPointerException
>         at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:2
> 38)
>         ... 5 more
> ==============================================
>
> Who can give me some suggestions? Thanks a lot.
>
> Rodger
>



-- 
Shawn

Mime
View raw message