Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Problem using Eclipse with Sun App Server
Problem using Eclipse with Sun App Server [message #163499] Thu, 09 March 2006 21:51 Go to next message
Eclipse UserFriend
Originally posted by: darrinps.comcast.net

First off, there is no support built in
(Window->Preferences->Server->Installed Runtimes->Add).

Secondly, if you do create your own generic, then when you try to create
an EJB project you get this:

cvc-complex-type.2.4.b: The content of element 'ejb-jar' is not complete.
One of '{"http://java.sun.com/xml/ns/j2ee":display-name,
"http://java.sun.com/xml/ns/j2ee":icon,
"http://java.sun.com/xml/ns/j2ee":enterprise-beans}' is expected.

I saw where someone said that you have to specify Java 5.0, but I already
do that.

Can someone just tell me what the line needs to look like please? I can
just edit in manually. Right now it shows this:

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar id="ejb-jar_ID" version="2.1" 
xmlns="http://java.sun.com/xml/ns/j2ee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
	<display-name>
	ImageScanningEJB</display-name>
</ejb-jar>


Thanks!
Re: Problem using Eclipse with Sun App Server [message #163621 is a reply to message #163499] Fri, 10 March 2006 20:50 Go to previous messageGo to next message
Gary Mohr is currently offline Gary MohrFriend
Messages: 25
Registered: July 2009
Junior Member
Darrin

I use the Jonas generic server and find that when I create an EJB project I
get the same error. I have found that if you go in and create an XDoclet
EJB within this project that it will add the necessary tags to the
ejb-jar.xml file to resolve the error. Strange thing though is that the
little red error flag on the ejb-jar.xml file does not disappear. If you
open the file, make any kind of change (I add a space then delete it), and
then resave the file then the error flag will go away.

By the way Sun offers an Eclipse plug-in that adds support for the Sun App
Servers under WTP (Google for "sun glassfish" and you should find it.

Gary


"Darrin" <darrinps@comcast.net> wrote in message
news:40589573628c542dc708a8b058f93f19$1@www.eclipse.org...
> First off, there is no support built in
> (Window->Preferences->Server->Installed Runtimes->Add).
>
> Secondly, if you do create your own generic, then when you try to create
> an EJB project you get this:
>
> cvc-complex-type.2.4.b: The content of element 'ejb-jar' is not complete.
> One of '{"http://java.sun.com/xml/ns/j2ee":display-name,
> "http://java.sun.com/xml/ns/j2ee":icon,
> "http://java.sun.com/xml/ns/j2ee":enterprise-beans}' is expected.
>
> I saw where someone said that you have to specify Java 5.0, but I already
> do that.
>
> Can someone just tell me what the line needs to look like please? I can
> just edit in manually. Right now it shows this:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ejb-jar id="ejb-jar_ID" version="2.1" 
> xmlns="http://java.sun.com/xml/ns/j2ee" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
> http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
> <display-name>
> ImageScanningEJB</display-name>
> </ejb-jar>
> 

>
> Thanks!
>
Re: Problem using Eclipse with Sun App Server [message #163659 is a reply to message #163499] Sat, 11 March 2006 18:41 Go to previous message
Eclipse UserFriend
Originally posted by: ludovic.champenois.sun.com

> First off, there is no support built in
> (Window->Preferences->Server->Installed
> Runtimes->Add).

Download and install the Sun App Server plugin available at
http://glassfishplugins.dev.java.net/

>
> Secondly, if you do create your own generic, then
> when you try to create
> an EJB project you get this:
>
> cvc-complex-type.2.4.b: The content of element
> 'ejb-jar' is not complete.
> One of
> '{"http://java.sun.com/xml/ns/j2ee":display-name,
> "http://java.sun.com/xml/ns/j2ee":icon,
> "http://java.sun.com/xml/ns/j2ee":enterprise-beans}'
> is expected.
>
> I saw where someone said that you have to specify
> Java 5.0, but I already
> do that.
>
> Can someone just tell me what the line needs to look
> like please? I can
> just edit in manually. Right now it shows this:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ejb-jar id="ejb-jar_ID" version="2.1" 
> xmlns="http://java.sun.com/xml/ns/j2ee" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
> http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
> 	<display-name>
> 	ImageScanningEJB</display-name>
> </ejb-jar>
> 

>
this is not a valid xml according to the schema. You need to have or or more enterprise-beans in your ejb module in order to be valid.

> Thanks!
>
Previous Topic:wtp 1.5m5, j2ee perspective, project explorer view
Next Topic:Transform Java Project to Web Project
Goto Forum:
  


Current Time: Thu Apr 25 12:04:24 GMT 2024

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

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

Back to the top