Discussion:
[Middlegen-user] Sample application throws NPE
Luiz-Otavio Zorzella
2003-02-04 20:44:08 UTC
Permalink
Hi,

I'm trying to test Middlegen with JBoss and Mysql. I upgraded my MySQL
from 3.23.52 to 4.0.10 for proper InnoDB support, and I've managed to
have the ear deployed, and use the Person and Flight parts of it, but
creating a Reservation throws a NPE. I upgraded Jboss from 3.0.6 to
3.2.0RC1 because thinking this is due to the lack of CMP + CMR fields,
but this also throws the same exception (below).

Any help?

Zorzella


13:29:45,783 ERROR [Engine] ApplicationDispatcher[/airline]
Servlet.service() for servlet ActionServlet threw exception
java.lang.NullPointerException
at airline.web.struts.ViewReservationAction.getParameter(Unknown Source)
at airline.web.struts.ViewReservationAction.perform(Unknown Source)
at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1758)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
[...]
Luiz-Otavio Zorzella
2003-02-04 22:26:04 UTC
Permalink
I'm trying to use the many2many from the samples, by uncommenting the
<many2many> tag in build.xml, and I'm able to generate and compile
everything, but when deploying in jboss 3.2.0RC1, I get an exception
(below) about Entity Reservation not found... Any hints?

Thanks,

Zorzella

16:05:14,752 INFO [EntityContainer] Starting
16:05:14,929 ERROR [EntityContainer] Starting failed
org.jboss.deployment.DeploymentException: Entity: Reservation not found
for: ***@171120a at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.<init>(JDBCRelationshipRoleMetaData.java:103)
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.<init>(JDBCRelationMetaData.java:127)
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.<init>(JDBCApplicationMetaData.java:154)
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:52)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:733)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:436)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:378)
at
org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:359)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:197)
at org.jboss.ejb.Container.invoke(Container.java:729)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1026)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:957)
at $Proxy11.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:388)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy31.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:444)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:197)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:957)
at $Proxy11.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:388)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy19.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:470)
Aslak Hellesoy
2003-02-04 22:57:01 UTC
Permalink
-----Original Message-----
Luiz-Otavio Zorzella
Sent: 4. februar 2003 23:43
Subject: [Middlegen-user] Sample application throws NPE
Hi,
I'm trying to test Middlegen with JBoss and Mysql. I upgraded my MySQL
from 3.23.52 to 4.0.10 for proper InnoDB support, and I've managed to
have the ear deployed, and use the Person and Flight parts of it, but
creating a Reservation throws a NPE. I upgraded Jboss from 3.0.6 to
3.2.0RC1 because thinking this is due to the lack of CMP + CMR fields,
but this also throws the same exception (below).
Any help?
The struts plugin is buggy and generates buggy code. It will work allright
for simple tables, but starts choking as soon as relationships are involved.
You'll have to wait till someone gets around and improves the Struts plugin.

I recommend you stick to the plugins that are more thoroughly tested: cmp20
and jdo.

Aslak
Zorzella
13:29:45,783 ERROR [Engine] ApplicationDispatcher[/airline]
Servlet.service() for servlet ActionServlet threw exception
java.lang.NullPointerException
at
airline.web.struts.ViewReservationAction.getParameter(Unknown Source)
at airline.web.struts.ViewReservationAction.perform(Unknown Source)
at
org.apache.struts.action.ActionServlet.processActionPerform(Action
Servlet.java:1786)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationD
ispatcher.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(Applicati
onDispatcher.java:432)
at
org.apache.catalina.core.ApplicationDispatcher.forward(Application
Dispatcher.java:356)
at
org.apache.struts.action.ActionServlet.processActionForward(Action
Servlet.java:1758)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
pplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
onFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
erValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
text.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardConte
xtValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
text.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesVa
lve.java:246)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
text.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
java:480)
[...]
-------------------------------------------------------
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Luiz-Otavio Zorzella
2003-02-04 23:07:02 UTC
Permalink
I eventually figured out I should not use the Web interface for that
table... But, for the life of me, I can't make man2many work properly...
Code gets generated that makes reference to ReservationBean, which is
not generated... And I'm trying to remove the references to it
(get/setReservations from both Flight and Person Beans), but I'm having
other weird deployment exceptions... Any hints/how-tos?
Post by Aslak Hellesoy
-----Original Message-----
Luiz-Otavio Zorzella
Sent: 4. februar 2003 23:43
Subject: [Middlegen-user] Sample application throws NPE
Hi,
I'm trying to test Middlegen with JBoss and Mysql. I upgraded my MySQL
from 3.23.52 to 4.0.10 for proper InnoDB support, and I've managed to
have the ear deployed, and use the Person and Flight parts of it, but
creating a Reservation throws a NPE. I upgraded Jboss from 3.0.6 to
3.2.0RC1 because thinking this is due to the lack of CMP + CMR fields,
but this also throws the same exception (below).
Any help?
The struts plugin is buggy and generates buggy code. It will work allright
for simple tables, but starts choking as soon as relationships are involved.
You'll have to wait till someone gets around and improves the Struts plugin.
I recommend you stick to the plugins that are more thoroughly tested: cmp20
and jdo.
Aslak
Zorzella
13:29:45,783 ERROR [Engine] ApplicationDispatcher[/airline]
Servlet.service() for servlet ActionServlet threw exception
java.lang.NullPointerException
at
airline.web.struts.ViewReservationAction.getParameter(Unknown Source)
at airline.web.struts.ViewReservationAction.perform(Unknown Source)
at
org.apache.struts.action.ActionServlet.processActionPerform(Action
Servlet.java:1786)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationD
ispatcher.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(Applicati
onDispatcher.java:432)
at
org.apache.catalina.core.ApplicationDispatcher.forward(Application
Dispatcher.java:356)
at
org.apache.struts.action.ActionServlet.processActionForward(Action
Servlet.java:1758)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
pplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
onFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
erValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
text.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardConte
xtValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
text.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesVa
lve.java:246)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
text.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
java:480)
[...]
-------------------------------------------------------
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Aslak Hellesoy
2003-02-04 23:07:05 UTC
Permalink
-----Original Message-----
Luiz-Otavio Zorzella
Sent: 5. februar 2003 01:26
Subject: Re: [Middlegen-user] How to: man2many and jboss?
I'm trying to use the many2many from the samples, by uncommenting the
<many2many> tag in build.xml, and I'm able to generate and compile
everything, but when deploying in jboss 3.2.0RC1, I get an exception
(below) about Entity Reservation not found... Any hints?
Err, bullet 7: http://boss.bekk.no/boss/middlegen/nude.html

Sorry,
Aslak

Loading...