Hi David,

The Cactus plugin has moved to the Cactus project. Thus in the future,
you'll get better chance to get answer there.

>From what you say, I reckon you're using the resinconf attribute of the
<cactus> task and thus you are providing your own resin.conf file. 

The error you get seem to be purely Resin related and does not seem to
have any relationship with Cactus. From the error you're getting it
seems you are doing a lookup and you haven't defined which JNDI
factory/server/credential to use for that. Normally it is not needed
when you run inside the container. Is it possible that you are trying to
lookup the data source from client code (for example, in a beginXXX or
endXXX method)?

Thanks
-Vincent 

PS: I'm cc-ing the cactus user list as this is now the correct place for
Cactus related questions. See
http://jakarta.apache.org/cactus/mailinglist.html

> -----Original Message-----
> From: David Chelimsky [mailto:[EMAIL PROTECTED]
> Sent: 01 November 2003 21:19
> To: [EMAIL PROTECTED]
> Subject: NoInitialContextException
> 
> Hi. I'm trying to use Maven to run cactus tests in a resin-2.1.9
> container. I've been able to get tests to execute in this environment,
but
> have not been successful thus far in executing tests that are actually
> interacting w/ the container.
> 
> I'm trying to verify access to a DataSource that is set up in
resin.conf.
> My DAO method looks up the datasource in JNDI, but I get the error
below,
> stating that java.naming.factory.initial needs to be set up. I would
> assume that this is the responsibility of resin (isn't that one of the
> primary reasons for running integration tests in the container?).
> 
> Here's a couple of things to bear in mind:
> 1/ The app actually works and I'm backfilling integration tests now.
> 2/ I've verified that the correct resin.conf is being used
> 
> Any other ideas?
> 
> Thanks,
> David
> 
> cactus:test:
>     [cactus]
-------------------------------------------------------------
> ----
>     [cactus] Running tests against Resin 2.x
>     [cactus]
-------------------------------------------------------------
> ----
>     [cactus] Deleting 42 files from
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\cactus\resin2x
>     [cactus] Deleted 22 directories from
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\cactus\resin2x
>     [cactus] Testsuite: org.chelimsky.tools.dao.TestGetDataSource
>     [cactus] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.513
sec
>     [cactus]
>     [cactus] Testcase: testGetDataSource took 0.11 sec
>     [cactus]    Caused an ERROR
>     [cactus] Need to specify class name in environment or system
property,
> or as an applet parameter, or in an application resource file:
> java.naming.factory.initial
>     [cactus] javax.naming.NoInitialContextException: Need to specify
class
> name in environment or system property, or as an applet parameter, or
in
> an application resource file:  java.naming.factory.initial
>     [cactus]    at
>
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
>     [cactus]    at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
>     [cactus]    at
>
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:2
80
> )
>     [cactus]    at
> javax.naming.InitialContext.lookup(InitialContext.java:347)
>     [cactus]    at
> org.chelimsky.tools.dao.DaoUtil.getDataSource(DaoUtil.java:60)
>     [cactus]    at
>
org.chelimsky.tools.dao.TestGetDataSource.testGetDataSource(TestGetDataS
ou
> rce.java:40)
>     [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>     [cactus]    at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:
> 39)
>     [cactus]    at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Im
> pl.java:25)
>     [cactus]
>     [cactus] Testcase: testGetDataSource
>     [cactus] [ERROR] TEST org.chelimsky.tools.dao.TestGetDataSource
FAILED


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to