Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Adding deployment info to J2EE Preview server: realms/users and env-entry
Adding deployment info to J2EE Preview server: realms/users and env-entry [message #664048] Thu, 07 April 2011 09:54 Go to next message
Edoardo Comar is currently offline Edoardo Comar
Messages: 102
Registered: July 2009
Senior Member
Hi
I've developed a small webservice whose runtime config requires
deployment information : binding env-entry to the naming context and
mapping users to roles.

My target deployment is not supported by WTP, so i could use Tomcat
but the embedded J2EE preview seems all I need,
except that I can't see how to add the deployment info.

out of the box I get HTTP 500 and NPEs ...

Thanks
Edoardo

<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing .... Reason:
<pre> No realm</pre>


javax.naming.NoInitialContextException: Failed to create InitialContext
using factory specified in hashtable {} [Root exception is
java.lang.NullPointerException]
at javax.naming.spi.NamingManager.getInitialContext(NamingManag er.java:243)
at
javax.naming.InitialContext.initializeDefaultInitCtx(Initial Context.java:318)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext .java:348)
at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialCo ntext.java:424)
at javax.naming.InitialContext.lookup(InitialContext.java:436)

Caused by: java.lang.NullPointerException
at javax.naming.spi.NamingManager.getInitialContext(NamingManag er.java:235)
... 29 more
Re: Adding deployment info to J2EE Preview server: realms/users and env-entry [message #664096 is a reply to message #664048] Thu, 07 April 2011 13:11 Go to previous message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1310
Registered: July 2009
Senior Member
On 4/7/2011 5:54 AM, Edoardo Comar wrote:
> Hi
> I've developed a small webservice whose runtime config requires
> deployment information : binding env-entry to the naming context and
> mapping users to roles.
>
> My target deployment is not supported by WTP, so i could use Tomcat
> but the embedded J2EE preview seems all I need,
> except that I can't see how to add the deployment info.
>
> out of the box I get HTTP 500 and NPEs ...
>
> Thanks
> Edoardo
>
> <body><h2>HTTP ERROR 500</h2>
> <p>Problem accessing .... Reason:
> <pre> No realm</pre>
>
>
> javax.naming.NoInitialContextException: Failed to create InitialContext
> using factory specified in hashtable {} [Root exception is
> java.lang.NullPointerException]
> at javax.naming.spi.NamingManager.getInitialContext(NamingManag er.java:243)
> at
> javax.naming.InitialContext.initializeDefaultInitCtx(Initial Context.java:318)
>
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext .java:348)
> at
> javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialCo ntext.java:424)
> at javax.naming.InitialContext.lookup(InitialContext.java:436)
>
> Caused by: java.lang.NullPointerException
> at javax.naming.spi.NamingManager.getInitialContext(NamingManag er.java:235)
> ... 29 more
>

I don't believe the J2EE Preview server provides much in the way of user
configurability. You are welcome to start the server, switch to the
Debug view in the Debug perspective, then right-click on the "Java"
executable item and select Properties. The dialog that appears will
show you the "Java" command used to launch the server. I suspect the
"preview.xml" used to configure the Jetty server is internally generated
and rewritten on each startup. You will likely be better off using
Tomcat or some other server that provides sufficient configurability.

Cheers,
Larry
Previous Topic:tomcat server 5.5 is not working in window 7
Next Topic:Creation of .jar file of a Dynamic Web Project when building the project
Goto Forum:
  


Current Time: Sat Oct 25 14:54:52 GMT 2014

Powered by FUDForum. Page generated in 0.01662 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software