problem with new version JBoss Eclipse when using to generat
jdkxxx May 19, 2006 11:50 AMfor these days i have been using new version jboss eclipse1.6 to build applications, and i try a very small example, which is
from http://www.jboss.com/products/seam/SeamHBTools.html, but i make a little bit change, i make database nothing like demo. i
make two table lectureid, course. there is one-to-many relationship between them. when i run this application, i got a exception. so i check all
the code, and i find something i am not sure. the application seems to use database which has already built to generate ejbs, then use those ejbs
on hsql dababase which is built in jboss. i don't know whether it is crrect or not. i hope some experts can help me. before i show the exceptions, i
want to show something else i don't undershand, when my server is running, something shows below:
16:49:33,150 INFO [EARDeployer] Init J2EE application: file:/E:/Program Files/jboss-4.0.4.GA/server/default/deploy/seamapp.ear
16:49:34,603 INFO [Ejb3Deployment] EJB3 deployment time took: 551
16:49:34,643 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=seamapp.ear,jar=seamapp.ejb3.jar,unitName=entityManager with dependencies:
16:49:34,643 INFO [JmxKernelAbstraction] jboss.jca:name=DefaultDS,service=ManagedConnectionFactory
16:49:34,703 INFO [Ejb3Configuration] found EJB3 Entity bean: com.example.ejbTest.Course
16:49:34,723 INFO [Ejb3Configuration] found EJB3 Entity bean: com.example.ejbTest.Lectureid
16:49:34,763 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.16:49:34,763 WARN [Ejb3Configuration] Defining hibernate.transaction.flush_before_completion=true ignored in HEM
16:49:34,773 INFO [Configuration] Reading mappings from resource: META-INF/orm.xml
16:49:34,773 INFO [Ejb3Configuration] [PersistenceUnit: entityManager] no META-INF/orm.xml found
16:49:34,773 INFO [AnnotationBinder] Binding entity from annotated class: com.example.ejbTest.Course
16:49:34,783 INFO [EntityBinder] Bind entity com.example.ejbTest.Course on table course
16:49:34,953 INFO [AnnotationBinder] Binding entity from annotated class: com.example.ejbTest.Lectureid
16:49:34,953 INFO [EntityBinder] Bind entity com.example.ejbTest.Lectureid on table lectureid
16:49:35,123 INFO [CollectionBinder] Mapping collection: com.example.ejbTest.Lectureid.courses -> course
as above shown, the section using bold font i don't get it. does it mean some error? what kind of error?
then, the following is exceptions:
16:49:40,070 ERROR [[/seamapp]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.NoClassDefFoundError: javax/ejb/InvocationContext
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetPublicMethods(Unknown Source)
at java.lang.Class.getMethods(Unknown Source)
at org.jboss.seam.interceptors.Interceptor.init(Interceptor.java:62)
at org.jboss.seam.interceptors.Interceptor.(Interceptor.java:37)
at org.jboss.seam.Component.initDefaultInterceptors(Component.java:513)
at org.jboss.seam.Component.initInterceptors(Component.java:486)
at org.jboss.seam.Component.(Component.java:187)
...
16:49:41,923 ERROR [LocaleUtils] Locale name null or empty, ignoring
16:49:43,255 INFO [StartupServletContextListener] ServletContext 'E:\Program Files\jboss-4.0.4.GA\server\default\.\tmp\deploy\tmp22429seamapp.ear-contents\seamapp-exp.war\' initialized.
16:49:43,265 ERROR [StandardContext] Error listenerStart
16:49:43,265 ERROR [StandardContext] Context [/seamapp] startup failed due to previous errors
16:49:43,325 WARN [ServiceController] Problem starting service jboss.web.deployment:war=seamapp.war,id=1732501485
org.jboss.deployment.DeploymentException: URL file:/E:/Program Files/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22429seamapp.ear-contents/seamapp-exp.war/ deployment failed
at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:365)
at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
at org.jboss.web.WebModule.startModule(WebModule.java:83)
at org.jboss.web.WebModule.startService(WebModule.java:61)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
...
6:49:43,385 ERROR [MainDeployer] Could not start deployment: file:/E:/Program Files/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22429seamapp.ear-contents/seamapp.war
org.jboss.deployment.DeploymentException: URL file:/E:/Program Files/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22429seamapp.ear-contents/seamapp-exp.war/ deployment failed
at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:365)
at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
at org.jboss.web.WebModule.startModule(WebModule.java:83)
at org.jboss.web.WebModule.startService(WebModule.java:61)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
...
exception contains three parts, i also want to show my database script below, i hope these information may help. i am looking forward to your answer.
SET FOREIGN_KEY_CHECKS=0;
use mydb;
#----------------------------
# Table structure for course
#----------------------------
CREATE TABLE `course` (
`Description` text,
`CourseID` bigint(6) NOT NULL,
`TeacherID` bigint(6) default NULL,
PRIMARY KEY (`CourseID`),
KEY `LecturerID` (`TeacherID`),
CONSTRAINT `LecturerID` FOREIGN KEY (`TeacherID`) REFERENCES `lectureid` (`LecturerID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 4096 kB';
#----------------------------
# No records for table course
#----------------------------
#----------------------------
# Table structure for lectureid
#----------------------------
CREATE TABLE `lectureid` (
`LecturerID` bigint(6) NOT NULL,
`name` text,
PRIMARY KEY (`LecturerID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
#----------------------------
# No records for table lectureid
#----------------------------