• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Migrating from jboss 4.0 to Jboss 5.0GA

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI all,

I am trying to migrate my Enterprise Application running on JBoss 4.0GA Java 1.4 to Jboss 5.0GA with Java 1.5,
I do have many libraries in the class path without which my Application will not work as expected. And when i tried the same classpath setting as JBoss4.0GA in 5.0GA. its not deploying the application throwing lot of errors. and then i realized to remove all the classpath variable and tried it successfully deployed ear though application is not getting logged as it does not supported libraries in path.

If I put the jar files required at run time, its failing with javax/ejb/SessionBean class not found exception and does not used to process further.
i was trying to find the implementation classes from the server for ejb and servlet, i didnt find it. later from documentation or some where in the web i found that jboss uses internal implementation of these which were not available as jar something.

Sometimes while deploying the ear file i used to get the local not bound error, and sometimes if i put the ojdbc14.jar file in the classpath which i need at the time of log in, server hags up and not doing anything, if i check it up on the java.exe process its eating most of RAM and system is going in to damn slow. and i have replaced the latest ojdbc14.jar from oracle site still the same problem.

Adding to this some times everything got worked fine and deployed when i tried to access the resource in my application, when its trying to access the ejb using casting the remote proxy, i am getting

org.apache.jasper.JasperException: java.lang.ClassCastException: $Proxy121
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:515)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

Adding to this some times while deploying ear file in the middle of deployment, server log keeps logging this message
and server hangs up and not able to finish this thread and eating up complete system RAM, finally nothing brings up and to get rid of this we would need to kill the process.


2009-01-12 20:27:27,216 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-13) Periodic recovery - first pass <Mon, 12 Jan 2009 20:27:27>
2009-01-12 20:27:27,216 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-13) StatusModule: first pass
2009-01-12 20:27:27,216 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] (Thread-13) [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
2009-01-12 20:27:27,216 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] (Thread-13) [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
2009-01-12 20:27:37,207 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-13) Periodic recovery - second pass <Mon, 12 Jan 2009 20:27:37>
2009-01-12 20:27:37,207 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-13) AtomicActionRecoveryModule: Second pass
2009-01-12 20:27:37,207 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] (Thread-13) [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_6] - TORecoveryModule - second pass
2009-01-12 20:27:37,207 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] (Thread-13) [com.arjuna.ats.internal.jta.recovery.info.secondpass] Local XARecoveryModule - second pass
2009-01-12 20:29:36,938 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-13) Periodic recovery - first pass <Mon, 12 Jan 2009 20:29:36>
2009-01-12 20:29:36,938 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] (Thread-13) StatusModule: first pass




Can any one address what would be the possible reason behind these scenarios ?

Prompt response would greatly appreciated


Thanks in Advance


Balakrishna


 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Regarding the arjuna log messages - those are normal. The arjuna recovery thread wakes up about every two minutes and looks to see if anything needs to be recovered. If you don't like having those messages logged, you can add a category to the jboss-log4j.xml file to change the logging level. (I agree they are a nuisance - I turn them off also.)

Regarding the class cast exception, we need more information. EJB2.x or EJB3? Post the code that gets the exception. Post the JNDIView list. If EJB3, post the interface and class declarations along with their annotations.
 
balakrishnabilla billa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Johnson,

Thanks for your reply

Just now i checked this site
http://jboss.org/community/docs/DOC-10809;jsessionid=F4AF33BDA4553DBA4929EB6409E07701

*JBoss AS 3.2.6+ and 4.0.1+ are the ONLY versions to be fully functional under JDK 5, due to JMX issues*

I tested my app with JBOSS 4.2.2 GA, it got worked perfectly fine and able to work with my application.

From the notes it seems JBOSS 5.0 GA may not work with JDK1.5

My first question : will the JDK1.5 compilation run on Jboss 5.0 GA ??

By the way I am using EJB2.x. i don't understand why i am getting local not bound error.

javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: local not bound


 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Beware of relying on wiki pages for your information - many of them are very outdated, such as the one you quoted, and rarely does anyone go back and update them when things change. There are two binary downloads for JBoss AS 5.0.0.GA and 4.2.3.GA, one for JDK 5, the other for JDK 6. The other 4.2.x versions require JDK 5 - they are not qualified with JDK 6.


Regarding the namenotfound exception, you can look at the JNDIView list to see what is registered and from there correct the name you are looking up. Also, where does the code looking up the name reside, in a stand-alone client or in a web application. If in a web application, double check the web.xml and jboss-web.xml file to ensure the name mappings are correct.
 
balakrishnabilla billa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Johnson,

I can see all the required JNDI names list from the jmx-console application.
but still i see the local not bound

Caused by: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: local not bound

Actually I am trying to look up the EJB from servlet, the web.xml has all the ejb-local-ref mappings.
if I look at the jboss-web.xml it doesn't have any entries other than the saas configuration.


Thanks
Balakrishna
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please provide the following items:

a) The code doing the lookup
b) The web.xml file
c) the jboss-web.xml file
d) the list from JNDIView

When posting source code, enclose it within "code" brackets (select the text and click the Code button above the editor window).
 
balakrishnabilla billa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a) Code doing lookup





b) The web.xml




3) jboss-web.xml file




4) JNDI view from the JMX-console




5) server log :
Jhonson, I have 3 start-up servlets all are trying to look-up the same EJB that i why see 3 stack trace.

 
balakrishnabilla billa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
+- ConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- jaas (class: javax.naming.Context)
| +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| +- profileservice (class: org.jboss.security.plugins.SecurityDomainContext)
| +- messaging (class: org.jboss.security.plugins.SecurityDomainContext)
+- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
+- EDX-DS-NONXA (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- Mail (class: javax.mail.Session)
+- XAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- EDX-DS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- securityManagement (class: org.jboss.security.integration.JNDIBasedSecurityManagement

I see this in JNDI view was this anything to do ??

or i dont have anything in jboss-web.xml where this file with all the configuration used to work fine with Jboss 4


Let me know where i may need to change to make it work ?

 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suspect that the problem has something to do with how EJB3 beans are named - they have '/local' or '/remote' tacked on to the end of their names. Perhaps the app server is doing the same for EJB2.x. Try this: add the following entry to jboss-web.xml (you might have to play with it a little bit, the code is based on an example I have lying around but the names might need to be tweaked to get it to work for you)



If this fixes the problem for one of the beans, then do it for all the beans. In addition, you should post your question in the JBossAS5 forum. This might be a bug they need to fix and posting it there will get the developers' attention.
 
balakrishnabilla billa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have added the code you suggested

this time its throwing edx not bound.

# Could not dereference object [Root exception is javax.naming.NameNotFoundException: edx not bound # ]

i think there is little trick in specifying the jndi look up name

even i try with local/PollerAccessBean still the same result
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try



 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic