[JBoss Seam] - Re: Step-by-Step Seam Getting Started Guide
by chuckadams
Actually it looks like it's not that simple. If I take that shortcut, the sample fails to deploy:
| :18:55,245 ERROR [MainDeployer] Could not create deployment: file:/pkg/jboss-4.0.4.GA/server/default/tmp/deploy/tmp3975sample.ear-contents/sampleEJB.jar
| org.jboss.deployment.DeploymentException: expected one enterprise-beans tag
| at org.jboss.metadata.MetaData.getUniqueChild(MetaData.java:113)
| at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.java:371)
| at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:166)
| at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:541)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| ... etc ...
|
Curiously, this only works if I use the org.jboss package names given in the example when setting up seamgen. If you don't use those package names (I used org.example) then the application deploys fine, though it fails to actually show any example content.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964876#3964876
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964876
19 years, 10 months
[Beginners Corner] - trouble obtaining EJB reference in portlet
by bernieb
I'm having trouble obtaining a reference to an EJB entity bean in a portlet.
The entity bean has successfully deployed and I've confirmed the JNDI name in the jmx-console (PersonBean).
I had first tried to obtain the reference through the EJB annotation, injecting it into the portlet as such:
| public class ModifyPerson extends GenericPortlet {
| @EJB(name="PersonBean")
| private PersonLocal bean;
| .
| .
| .
| }
|
(PersonLocal is the local interface)
However, this did not appear to work as I got a NullPointerException when I tried to call any of its methods.
When that faied, I tried to do a JNDI lookup in the init() method:
| public void inti() throws PortletException{
| try{
| InitialContext ctx = new InitialContext();
| bean = (PersonLocal) ctx.lookup("java:/env/comp/PersonBean");
| }catch(NamingException ex){
| throw new PortletException(ex.getMessage());
| }
| }
|
The portlet instance did not appear to have thrown any exceptions when initializing, which I had thought was promising, but when I try to call any of the bean's methods, I still get the NullPointerException.
I am assuming this NullPointerException is the result of bean remaining as a null value as an actual reference to the bean is not obtained.
Any help in this matter will be greatly appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964871#3964871
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964871
19 years, 10 months
[Tomcat, HTTPD, Servlets & JSP] - Http Server start error
by cimatch
I am Shimada.
It is likely to fail in the start of the http server by the environment of OS AIX5.2 / JBoss4.0.1sp1, and generating unusual "Error registering contexts". Isn't there knowing someone ..the solution..?
The following are output by the trace when starting.
javax.management.InstanceNotFoundException: jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/xxxx,j2eeType=Servlet,name=jsp is not registered.
| at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java(Compiled Code))
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java(Compiled Code))
| at org.apache.coyote.tomcat5.MapperListener.registerWrapper(MapperListener.java:468)
| at org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:140)
| at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1537)
| at org.jboss.web.tomcat.tc5.Tomcat5.startConnectors(Tomcat5.java:462)
| at org.jboss.web.tomcat.tc5.Tomcat5.handleNotification(Tomcat5.java:488)
| at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
| at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
| at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java(Compiled Code))
| at $Proxy22.handleNotification(Unknown Source)
| at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java(Inlined Compiled Code))
| at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java(Compiled Code))
| at org.jboss.system.server.ServerImpl.sendNotification(ServerImpl.java:838)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:427)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:310)
| at org.jboss.Main.boot(Main.java:162)
| at org.jboss.Main$1.run(Main.java:423)
| at java.lang.Thread.run(Thread.java:568)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964867#3964867
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964867
19 years, 10 months
[Beginners Corner] - Re: Installing JBoss application server
by satimis
Hi PeterJ,
JRockit was installed automatically on;
$ ls /home/satimis/jrockit-R26.4.0-jdk1.5.0_06/
| bin demo jra lib memleak README.TXT src.zip
| console include jre LICENSE mercuryprofiler sample
$ ls /home/satimis/jrockit-R26.4.0-jdk1.5.0_06/bin
| appletviewer idlj javac jconsole jrcc keytool memleak policytool serialver
| apt jar javadoc jdb jrcmd kinit native2ascii rmic servertool
| console jarsigner javah jps jstat klist orbd rmid tnameserv
| extcheck java javap jra jstatd ktab pack200 rmiregistry unpack200
But I can't find "jdk" there.
anonymous wrote : You need to set JAVA_HOME to the JRockit JVM.
I did it before running;
$ export JAVA_HOME=/home/satimis/jrockit-R26.4.0-jdk1.5.0_06/
$ sudo jboss-4.0.4.GA/bin/run.sh...
| ....
| ....
|
| 08:47:00,591 INFO [Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)] Started in 16s:810ms
|
It hung there with nothing started.
Others noted with tks.
B.R.
satimis
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964866#3964866
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964866
19 years, 10 months