Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Did Jboss 5.1.0 supports EJB

 
sarvan kumar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Iam working in eclipse 3.5 and jboss 5.1.0 server and in this class is not loading it shows null when iam debugged it

my question is

1. whether jboss 5.1.0 support class.forname or alternate for class.forname is to be replaced
2. Is it EJB problem

Thanks,
K.Saravanan
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

whether jboss 5.1.0 support class.forname or alternate for class.forname is to be replaced

Yes it does. Class.forName is a core part of the Java SDK.

Can you post the code that shows how you are using it?
 
sarvan kumar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Iam using following code


Thanks,
K.Saravanan
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exception message do you get?
 
Matthew Brown
Bartender
Posts: 4565
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's going to look for a class called "daoClassName", whereas I assume you want a class with the name contained in that variable. Try Class.forName(daoClassName) instead.
 
sarvan kumar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Iam getting following exception

11 Jan 2011 10:08:14,127 ERROR BusinessLayer:126 - LoginBL Checking User Existnull
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - java.lang.NullPointerException
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at com.visiontss.accuquote.bo.BusinessObject.read(BusinessObject.java:47)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at com.visiontss.accuquote.bo.Login.isUserExist(Login.java:336)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at com.visiontss.accuquote.bl.LoginBL.isUserExist(LoginBL.java:114)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at com.visiontss.accuquote.facade.LoginFacadeBean.isUserExist(LoginFacadeBean.java:69)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at java.lang.reflect.Method.invoke(Unknown Source)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:228)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:97)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at org.jboss.ejb.Container.invoke(Container.java:1029)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at java.lang.reflect.Method.invoke(Unknown Source)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.proxy.ejb.SecurityContextInterceptor.invoke(SecurityContextInterceptor.java:64)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at $Proxy259.isUserExist(Unknown Source)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at com.visiontss.accuquote.action.LoginAction.execute(LoginAction.java:90)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
11 Jan 2011 10:08:14,142 ERROR STDERR:156 - at java.lang.Thread.run(Unknown Source)

Thanks,
K.Saravanan
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - java.lang.NullPointerException
11 Jan 2011 10:08:14,127 ERROR STDERR:156 - at com.visiontss.accuquote.bo.BusinessObject.read(BusinessObject.java:47)


It's coming from some application specific code. So you'll have to check why the object is null.
 
sarvan kumar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have also checked the code it shows the result

the following line is not loading the class

currentDAO = (DataAccessObject)(Class.forName(daoClassName).newInstance());

that is class.forname is not loading the class any other alternative for this code

Thanks,
K.Sarvanan
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If what you say were true there would be a different exception message.

What happens on line 47 of the class com.visiontss.accuquote.bo.BusinessObject?
 
sarvan kumar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When i used that line and debugged i get ClassNotFound Exception message as a result

Thanks,
K.Saravanan
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So the exception is different from the one you posted?

ClassNotFoundException is fairly straight forward. Normally its caused by the class not existing or at least not existing on the classpath. It may also happen if you have a static block in that class and the code in there throws an exception, but that's unusual. So, is the class in your application's classpath?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic