Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 6th, 2005, 09:30 PM
chaman4110 chaman4110 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 2 chaman4110 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 56 m 24 sec
Reputation Power: 0
Why does error come in deployment?

sir,
I used following file(java & xml) & make jar file with command
jar -cvf greet.jar *.class META-INF\*.xml

It gives follwing message after making jar file(which is wriiten down
with header "jar").
Now copy this jar file in jboss-3.2.2\server\ default\deploy
directory.After than we start jboss server it gives following error
message,which is written with header "error". I use java 1.4.1 version
& set classpath as:-
classpath=f:\java;f:\jboss-3.2.2\client\log4j.jar;
f:\jboss-3.2.2\client\jboss-system-client.jar;
f:\jboss-3.2.2\client\jboss-common-client.jar;
f:\jboss-3.2.2\client\jboss-client.jar;
f:\jboss-3.2.2\client\jbosssx-client.jar;
f:\jboss-3.2.2\client\jboss-j2ee.jar;
f:\jboss-3.2.2\client\jnp-client.jar;
f:\jboss-3.2.2\client\jboss-transaction-client.jar;
f:\jboss-3.2.2\server\default\lib\javax.servlet.jar;


How can I solve this problem ? I delete some error due to character limits
-------------------------------------------------------------------
greethome.java
-------------------------------------------------------------------
import javax.ejb.*;
import java.rmi.RemoteException;

public interface greethome extends EJBHome
{
greethome create() throws
RemoteException,CreateException;
}
------------------------------------------------------------------
greetremote.java
-------------------------------------------------------------------
import javax.ejb.*;
import java.rmi.RemoteException;

public interface greetremote extends EJBObject
{
public String greetme(String s) throws RemoteException;
}
-----------------------------------------------------------------
greetbean.java
-----------------------------------------------------------------
import javax.ejb.*;
public class greetbean implements SessionBean
{
public String greetme(String s) throws RemoteException
{
return "How are you?............."+s;
}
public void ejbCreate() {}
public void ejbRemove() {}
public void ejbActivate() {}
public void ejbPassivate() {}

public void setSessionContext(SessionContext sc)
{}
}
-----------------------------------------------------------------
ejb-jar.xml
------------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE ejb-jar PUBLIC
"-Sun MicroSystem, INC.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb.jar_2_0.dtd" >
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>greetbean</ejb-name>
<home>greethome</home>
<remote>greetremote</remote>
<ejb-class>greetbean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container </transaction-type>
</session>
</enterprise-beans>
</ejb-jar>

--------------------------------------------------------------------
jboss.xml
-------------------------------------------------------------------
<!DOCTYPE jboss PUBLIC
"-//JBoss//DTD JBOSS 3.2//EN"
"http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
<jboss>
<enterprise-beans>
<entity>
<ejb-name>greetbean</ejb-name>
<jndi-name>greetjndi</jndi-name>
</entity>
</enterprise-beans>
</jboss>
----------------------------------------------------------------------
jar
------------------------------------------------------------------
adding: META-INF/ (in=0) (out=0) (stored 0%)
adding: META-INF/MANIFEST.MF (in=56) (out=56) (stored 0%)
adding: greetbean.class (in=806) (out=397) (deflated 50%)
adding: greethome.class (in=243) (out=178) (deflated 26%)
adding: greetremote.class (in=242) (out=173) (deflated 28%)
adding: META-INF/ejb-jar.xml (in=577) (out=282) (deflated 51%)
adding: META-INF/jboss.xml (in=272) (out=174) (deflated 36%)

Total:
------
(in = 2184) (out = 2030) (deflated 7%)
----------------------------------------------------------------
error
----------------------------------------------------------------
10:38:34,773 ERROR [XmlFileLoader] XmlFileLoader: File META-INF/jboss.xml process fatal error.
Line: 13. Error message: Content is not allowed in trailing section.
10:38:34,776 ERROR [XmlFileLoader] Content is not allowed in trailing
section.:1:13

org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(U nknown Source)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFi leLoader.java:313)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFi leLoader.java:257)
at org.jboss.ejb.EJBDeployer.init(EJBDeployer.java:42 5)
at org.jboss.deployment.MainDeployer.init(MainDeploye r.java:799)
at org.jboss.deployment.MainDeployer.deploy(MainDeplo yer.java:736)
at org.jboss.deployment.MainDeployer.deploy(MainDeplo yer.java:709)
at sun.reflect.GeneratedMethodAccessor29.invoke(Unkno wn Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation .java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invok e(AbstractInterceptor.java:119)
at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterc eptor.invoke
(ModelMBeanOperationInterceptor.java:131)
at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:242)
.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyE xt.java:176)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerI mpl.java:396)
at org.jboss.system.server.ServerImpl.start(ServerImp l.java:293)
at org.jboss.Main.boot(Main.java:151)
at org.jboss.Main$1.run(Main.java:405)
at java.lang.Thread.run(Thread.java:595)


10:38:35,956 ERROR [MainDeployer] Could not initialise deployment: file:/opt/jboss-4.0.0/server/default/deploy/greet.jar
org.jboss.deployment.
DeploymentException: Content is not allowed in trailing section.; - nested throwable:

(org.xml.sax.SAXParseException: Content is not allowed in trailing section.)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFi leLoader.java:327)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFi leLoader.java:257)
at org.jboss.ejb.EJBDeployer.init(EJBDeployer.java:42 5)
at org.jboss.deployment.MainDeployer.init(MainDeploye r.java:799)
at org.jboss.deployment.MainDeployer.deploy(MainDeplo yer.java:736)
at org.jboss.deployment.MainDeployer.deploy(MainDeplo yer.java:709)
at sun.reflect.GeneratedMethodAccessor29.invoke(Unkno wn Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation .java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invok e(AbstractInterceptor.java:119)
at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterc eptor.invoke(ModelMBeanOperationInterceptor.java:1 31)
at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:242)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyE xt.java:176)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner. deploy(URLDeploymentScanner.java:305)
at org.jboss.deployment.scanner.URLDeploymentScanner. scan(URLDeploymentScanner.java:481)
at org.jboss.deployment.scanner.AbstractDeploymentSca nner$ScannerThread.doScan(AbstractDeploymentScanne r.java:204)
at org.jboss.deployment.scanner.AbstractDeploymentSca nner.startService(AbstractDeploymentScanner.java:2 77)
at org.jboss.system.ServiceMBeanSupport.jbossInternal Start(ServiceMBeanSupport.java:271)
at org.jboss.system.ServiceMBeanSupport.jbossInternal Lifecycle(ServiceMBeanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation .java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:242)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:642)
at org.jboss.system.ServiceController$ServiceProxy.in voke(ServiceController.java:891)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceCo ntroller.java:416)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation .java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:242)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:642)

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > Why does error come in deployment?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT