-
1. Re: Can't get my client app to work
marc.fleury Feb 5, 2004 4:57 PM (in response to adrianc)hey you seem to be reinventing the wheel on XML files here and obviously your EJB isn't deployed correctly. Please read the intro documentation for examples of well formatted XML.
I would like to recommend you use the Eclipse IDE if you can (I use it) and it formats all the XML correctly with simple generation through XDoclet tags and such. You can find all the documentation on line.
Pay attention to your XML and we should be fine, -
2. Re: Can't get my client app to work
adrianc Feb 6, 2004 11:11 AM (in response to adrianc)*sigh* Eclipse - another poorly documented open source project.
I truly appreciate the reply, and I downloaded Eclipse and the JBoss plug-in. Now I can't get anything to compile. The project compiled great with JBuilder.
I'm determined to get our apps running on JBoss - I just wish it wasn't so complicated. -
3. Re: Can't get my client app to work
juha Feb 6, 2004 11:47 AM (in response to adrianc)What is that XML with < hal-core> tags? What does your ejb-jar.xml and jboss.xml files look like?
-
4. Re: Can't get my client app to work
adrianc Feb 6, 2004 1:30 PM (in response to adrianc)That's the core of my problem - JBuilder isn't generating any XML files, and I've searched reams of documentation trying to find out which XML files are needed and what they should contain.
-
5. Re: Can't get my client app to work
adrianc Feb 6, 2004 3:19 PM (in response to adrianc)Okay, I re-read all the JBoss documentation and I now understand I need to run ant on the jboss-build.xml file - but the one mentioned in the docs is for the Dukes Bank example. Is there a generic jboss-build.xml file that I can modify to build my app?
-
6. Re: Can't get my client app to work
adrianc Feb 6, 2004 6:57 PM (in response to adrianc)Here is the bean code:
public class CAppManagerBean implements SessionBean
{
public String Version()
{
return "1.0";
}
public CAppManagerBean(){}
public void ejbCreate(){}
public void ejbRemove(){}
public void ejbActivate(){}
public void ejbPassivate(){}
public void setSessionContext(SessionContext sc){}
}
The bean is compiled into a core.jar file.
Here is the jboss.xml file:
<enterprise-beans>
<ejb-name>CAppManagerBean</ejb-name>
<jndi-name>AppManager</jndi-name>
</enterprise-beans>
Here is the ejb-jar.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
<display-name>HAL-Core</display-name>
Application description
core.jar
I was able to get AntRunner to work in JBuilder, so progress is being made. I believe there's some information I'm missing here. -
7. Re: Can't get my client app to work
adrianc Feb 6, 2004 7:02 PM (in response to adrianc)#$%^&@!!!
My code was mangled by the forum. *sigh* Let me try again. (my apologies for the excessive posting)
Bean code was posted fine previously.
Here is the jboss.xml file:
<enterprise-beans>
<ejb-name>CAppManagerBean</ejb-name>
<jndi-name>AppManager</jndi-name>
</enterprise-beans>
Here is the ejb-jar.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
<display-name>HAL-Core</display-name>
Application description
core.jar -
8. Re: Can't get my client app to work
juha Feb 6, 2004 9:32 PM (in response to adrianc)the forums are messed up, sorry about that :(
You can use the preview button if you can find a way to post your files without the forums destroying the content. -
9. Re: Can't get my client app to work
adrianc Feb 9, 2004 10:57 AM (in response to adrianc)I spent the last three days downloading more information, I installed XDoclet and Chocolate, I started my project over from scratch, I followed every instruction exactly, and I still can't get this simple bean to deploy.
Here is the source code for the bean:
package com.hlmksw.hal.framework.server;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
public class VersionBean implements SessionBean
{
private SessionContext context;
public void setSessionContext( SessionContext context)
{
this.context = context;
}
public void ejbActivate() { }
public void ejbPassivate() { }
public void ejbRemove() { }
public void ejbCreate() { }
public java.lang.String Value()
{
return "1.0";
}
}
Here is the ejb-jar.xml file (double slashes prepended to each line for posting purposes):
//<?xml version="1.0" encoding="UTF-8"?>
//<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
//<ejb-jar >
// HAL-J Version Bean
// <display-name>HAL-J Version Bean</display-name>
// <enterprise-beans>
//
// <display-name>VersionBean</display-name>
// <ejb-name>VersionBean</ejb-name>
// <jndi-name>Version</jndi-name>
// com.hlmksw.hal.framework.server.VersionHome
// com.hlmksw.hal.framework.server.Version
//<ejb-class>com.hlmksw.hal.framework.server.VersionBean</ejb-class>
// <session-type>Stateless</session-type>
// <transaction-type>Bean</transaction-type>
//
// </enterprise-beans>
//</ejb-jar>
Here is the jboss.xml file (generated by XDoclet):
//<?xml version="1.0" encoding="UTF-8"?>
//<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
//
// <security-domain>java:/jaas/samples</security-domain>
// <enterprise-beans>
// </enterprise-beans>
// <resource-managers>
// </resource-managers>
//
Here is the application descriptor:
//<?xml version="1.0" encoding="UTF-8"?>
//<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
//
// <display-name>HAL-J Core</display-name>
// Application description
//
// core.jar
//
// -
10. Re: Can't get my client app to work
adrianc Feb 9, 2004 11:06 AM (in response to adrianc)I've given up trying to post the requested XML files - the forum keeps destroying them. If anyone is interested in helping me with this problem, I can email the xml files to them.
-
11. Re: Can't get my client app to work
marc.fleury Feb 9, 2004 12:40 PM (in response to adrianc)let's put this as a todo on JULIEN :)
we should be able to post XML -
12. Re: Can't get my client app to work
adrianc Feb 9, 2004 4:31 PM (in response to adrianc)Okay, I finally got my bean to deploy. It was a combination of Deployment Descriptor problems and my Ant script.
End of this thread.
Many thanks to Marc and Juha! -
13. Re: Can't get my client app to work
juha Feb 9, 2004 11:41 PM (in response to adrianc)It is already a reported bug.