- This topic has 9 replies, 2 voices, and was last updated 17 years, 3 months ago by Riyad Kalla.
-
AuthorPosts
-
yulun74MemberHello,
I have tried numerous times to make the EJB3 to work on JBoss 4.0.5. It has failed me so bad.I am using MyEclipse 6.0 M1 with JDk 1.5.0_11 on JBoss 4.0.5. I have used the EJB3 reverse
engine to create the entity, remote and local bean. It was great but when I tried to deploy to JBoss 4.0.5, it didn’t work. I have created only one table to fetch and use the service locator class to get the name as following.import ejb.FacilityFacadeLocal;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;public class serviceLocator {
/** Creates a new instance of serviceLocator */
public serviceLocator() {
}public FacilityFacadeLocal lookupFacilityFacade() {
try {
Context c = new InitialContext();
return (FacilityFacadeLocal) c.lookup(“thor2/FacilityFacade/FacilityFacadeLocal”);
}
catch(NamingException ne) {
Logger.getLogger(getClass().getName()).log(Level.SEVERE,”exception caught” ,ne);
throw new RuntimeException(ne);
}
}
}and this is my persistence xml file as following:
<?xml version=”1.0″ encoding=”UTF-8″?>
<persistence xmlns=”http://java.sun.com/xml/ns/persistence”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd” version=”1.0″><persistence-unit name=”thor-ejb-fsu” transaction-type=”JTA”>
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/THOR</jta-data-source>
<properties>
<property name=”hibernate.hbm2ddl.auto” value=”update”/>
</properties>
</persistence-unit>
</persistence>Once I deployed, those below are what I got. I tried to call from a jsp page. It kept saying that name binding can’t be found.
14:51:09,140 INFO [TomcatDeployer] undeploy, ctxPath=/thorDemowar, warUrl=…/deploy/thor2.ear/thorDemowar.war/
14:51:09,156 INFO [SessionFactoryImpl] closing
14:51:09,156 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:/C:/jboss-4.0.5/server/default/deploy/thor2.ear/
14:51:09,171 INFO [EARDeployer] Undeployed J2EE application: file:/C:/jboss-4.0.5/server/default/deploy/thor2.ear/
14:51:09,171 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.0.5/server/default/deploy/thor2.ear/
14:51:09,296 INFO [Ejb3Deployment] EJB3 deployment time took: 78
14:51:09,359 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=thor2.ear,jar=thorDemo1.jar,unitName=thor-ejb-fsu with dependencies:
14:51:09,359 INFO [JmxKernelAbstraction] jboss.jca:name=THOR,service=DataSourceBinding
14:51:09,390 INFO [Ejb3Configuration] found EJB3 Entity bean: us.ga.state.pap.ejb.Facility
14:51:09,406 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
14:51:09,406 INFO [Configuration] Reading mappings from resource: META-INF/orm.xml
14:51:09,406 INFO [Ejb3Configuration] [PersistenceUnit: thor-ejb-fsu] no META-INF/orm.xml found
14:51:09,406 INFO [AnnotationBinder] Binding entity from annotated class: us.ga.state.pap.ejb.Facility
14:51:09,406 INFO [EntityBinder] Bind entity us.ga.state.pap.ejb.Facility on table FACILITY
14:51:09,500 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
14:51:09,515 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
14:51:09,515 INFO [SettingsFactory] RDBMS: Oracle, version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
14:51:09,515 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 9.2.0.1.0
14:51:09,515 INFO [Dialect] Using dialect: org.hibernate.dialect.OracleDialect
14:51:09,515 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
14:51:09,515 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
14:51:09,515 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
14:51:09,515 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
14:51:09,515 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
14:51:09,515 INFO [SettingsFactory] JDBC batch size: 15
14:51:09,515 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
14:51:09,515 INFO [SettingsFactory] Scrollable result sets: enabled
14:51:09,515 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
14:51:09,515 INFO [SettingsFactory] Connection release mode: auto
14:51:09,515 INFO [SettingsFactory] Default batch fetch size: 1
14:51:09,515 INFO [SettingsFactory] Generate SQL with comments: disabled
14:51:09,515 INFO [SettingsFactory] Order SQL updates by primary key: disabled
14:51:09,515 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
14:51:09,515 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
14:51:09,515 INFO [SettingsFactory] Query language substitutions: {}
14:51:09,515 INFO [SettingsFactory] JPA-QL strict compliance: enabled
14:51:09,515 INFO [SettingsFactory] Second-level cache: enabled
14:51:09,515 INFO [SettingsFactory] Query cache: disabled
14:51:09,515 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
14:51:09,515 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
14:51:09,515 INFO [SettingsFactory] Structured second-level cache entries: disabled
14:51:09,515 INFO [SettingsFactory] Statistics: disabled
14:51:09,515 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
14:51:09,515 INFO [SettingsFactory] Default entity-mode: pojo
14:51:09,546 INFO [SessionFactoryImpl] building session factory
14:51:09,593 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
14:51:09,593 INFO [SchemaUpdate] Running hbm2ddl schema update
14:51:09,593 INFO [SchemaUpdate] fetching database metadata
14:51:09,609 INFO [SchemaUpdate] updating schema
14:51:15,796 INFO [TableMetadata] table found: THOR2.FACILITY
14:51:15,796 INFO [TableMetadata] columns: [director_cell_phone, referral_contact_phone, mod_approved_by, mailing_street, mod_approved_date, driving_directions, office_city, office_street, mailing_state, referral_contact_fname, mailing_city, office_zip, fac_name, referral_contact_lname, director_fname, director_email, updated_by, facility_id, director_phone, create_date, office_state, referral_contact_cell_phone, mod_approved_f, director_beeper, mailing_zip, director_lname, update_date, referral_contact_beeper, referral_contact_email, website, created_by]
14:51:15,812 INFO [TableMetadata] foreign keys: []
14:51:15,812 INFO [TableMetadata] indexes: [idx_f_fac_name, pk_facility]
14:51:15,812 INFO [SchemaUpdate] schema update complete
14:51:15,812 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
14:51:15,828 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=thor2.ear,jar=thorDemo1.jar,name=FacilityFacade,service=EJB3 with dependencies:
14:51:15,828 INFO [JmxKernelAbstraction] persistence.units:ear=thor2.ear,jar=thorDemo1.jar,unitName=thor-ejb-fsu
14:51:16,062 INFO [EJBContainer] STARTED EJB: us.ga.state.pap.ejb.FacilityFacade ejbName: FacilityFacade
14:51:16,281 WARN [ServiceController] Problem starting service jboss.j2ee:ear=thor2.ear,jar=thorDemo1.jar,name=FacilityFacade,service=EJB3
java.lang.NullPointerException
at org.jboss.ejb.txtimer.DatabasePersistencePolicy.listTimerHandles(DatabasePersistencePolicy.java:164)
at sun.reflect.GeneratedMethodAccessor159.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy25.listTimerHandles(Unknown Source)
at org.jboss.ejb.txtimer.EJBTimerServiceImpl.restoreTimers(EJBTimerServiceImpl.java:408)
at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy199.restoreTimers(Unknown Source)
at org.jboss.ejb3.timerservice.jboss.JBossTimerServiceFactory.restoreTimerService(JBossTimerServiceFactory.java:120)
at org.jboss.ejb3.stateless.StatelessContainer.start(StatelessContainer.java:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:102)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy194.start(Unknown Source)
at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:96)
at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:281)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:328)
at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy28.start(Unknown Source)
at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy29.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
14:51:16,296 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.0.5/server/default/deploy/thor2.ear/thorDemo1.jar/
14:51:16,312 INFO [TomcatDeployer] deploy, ctxPath=/thorDemowar, warUrl=…/deploy/thor2.ear/thorDemowar.war/Please help. Thank you.
Riyad KallaMemberHave you tried this same example on Glassfish?
This seems to be a JBoss specific problem… can you provide some code on how you are trying to access the EJB from your JSP page?
yulun74MemberNo, I have not tried it on Glassfish.
Here is the JSP using the service locator to call the EJB.
The database is Oracle 10G enterprise.
Please help…Thank you.
<%@ page language=”java” import=”java.util.*,ejb.FacilityFacadeLocal,.ejb.Facility,util.*” pageEncoding=”ISO-8859-1″%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+”://”+request.getServerName()+”:”+request.getServerPort()+path+”/”;
%><!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<base href=”<%=basePath%>”>
<title>My JSP ‘index.jsp’ starting page</title>
<meta http-equiv=”pragma” content=”no-cache”>
<meta http-equiv=”cache-control” content=”no-cache”>
<meta http-equiv=”expires” content=”0″>
</head><body>
<%
try {
serviceLocator se = new serviceLocator();
FacilityFacadeLocal fal = (FacilityFacadeLocal)se.lookupFacilityFacade();
String facilityID = “112”;
Facility l= fal.findById(Long.valueOf(facilityID));
out.println(l.getFacName());
} catch (Exception e) {
out.println(e.toString());
}
%>
</body>
</html>
Riyad KallaMemberAnd does a certain line throw a particular exception? If so, what’s the exception? (I checked your original post, but the only exception is just a failure of the default timer bean, not your own)
yulun74MemberHi,
Here is the exception for the JSP page. Thank you..exception
org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)root cause
org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:598)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)root cause
java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
Riyad KallaMemberroot cause
java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
Does the web project have access to the EJB? If one is a web project and one is in an EJB project, you need to deploy them as part of a top level Enterprise Application Project, then the application server’s classloader will allow the Web Project to have access to the EJB.
Simply setting the Web Project to rely on the EJB project in MyEclipe, then deploying the web project isn’t enough.
Let me know what your project setup and deployment story is, and I can probably guide you to an answer.
yulun74MemberFirst, I started with enterprise application project. It created the main EAR, EJB, and WAR project folders.
Then I use the EJB reverse engineer tool to create the EJB entity bean, facade local, and facade remote. At the same time, it also crated the persistence.xml to map the JNDI and hibernate property.
After that, I created the regular Java bean called servicelocator under the WAR folder. This service locator java bean is to call the Facade local java bean to instantiate the findby method .
Last, I created a jsp page under the WAR folder to access the service locator bean and get string value of the name back from the Facade local java bean.
When deployed to JBoss, it deployed as EAR.
Thank you for your help.
Riyad KallaMemberFirst, I started with enterprise application project. It created the main EAR, EJB, and WAR project folders.
Ahh ok that’s good.
Then I use the EJB reverse engineer tool to create the EJB entity bean, facade local, and facade remote. At the same time, it also crated the persistence.xml to map the JNDI and hibernate property.
Sounds good…
Hmm is this project something you can send me for testing? Can you export all of these projects to a single archive (File > Export > Archive) and send it to support@genuitec.com ATTN Riyad. I’ll have a look at it when I get back in town and figure out what is going on.
Also you might consider just downloading Glassfish and deploying the exact same thing to it and seeing if it suddenly works… atleast then you’d know it’s a JBoss configuration issue and not a problem with your code.
yulun74MemberHi,
I have attached the ear file and sent it through email.Thank you,
Eric[/quote]
Riyad KallaMemberEric,
I won’t be able to get to this today, would you be able to check your app on Glassfish in the mean time to see if that worked? (Build 58: https://glassfish.dev.java.net/downloads/v2-b58.html) -
AuthorPosts