Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 778777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:49:12+00:00 2026-05-14T19:49:12+00:00

I am in the process of converting a large J2EE app (called AeApp below)

  • 0

I am in the process of converting a large J2EE app (called AeApp below) from EJB 2 to EJB 3 (all stateless session beans, using glassfish 2.1.1), and running out of ideas.

The first EJB I converted (let’s call it Foo) ran without major problems (it was the only one in its ejb-module and I could completely replace the deployment descriptor with annotations) and the app ran fine. But after converting the second one (let’s call it Bar, one of several in a different ejb-module) there is a weird combination of problems:

  • AeApp deploys without errors (nothing in the logs either). In the log, I get initialize messages for both Foo and Bar, but further messages about method permissions and JNDI name only for Foo:

    [#|2010-05-10T12:26:13.234+0200|FINE|sun-appserver2.1|javax.enterprise.system.core.security|_ThreadID=25;_ThreadName=Thread-2821;ClassName=com.sun.enterprise.security.application.EJBSecurityManager;MethodName=initialize;_RequestID=1801c4ff-90fe-4406-aaac-219c669be8c1;|Codebase (module id for ejb Foo) = null|#]
    [#|2010-05-10T12:26:11.625+0200|FINE|sun-appserver2.1|javax.enterprise.system.core.security|_ThreadID=25;_ThreadName=Thread-2821;ClassName=com.sun.enterprise.security.application.EJBSecurityManager;MethodName=initialize;_RequestID=1801c4ff-90fe-4406-aaac-219c669be8c1;|Codebase (module id for ejb Bar) = null|#]
    [#|2010-05-10T12:26:13.234+0200|FINE|sun-appserver2.1|javax.enterprise.system.core.security|_ThreadID=25;_ThreadName=Thread-2821;ClassName=com.sun.enterprise.security.application.EJBSecurityManager;MethodName=fooMethod;_RequestID=1801c4ff-90fe-4406-aaac-219c669be8c1;|JACC DD conversion: EJBMethodPermission ->(Foo fooMethod,Remote,java.lang.Long,java.util.Locale)protected by role -> FOOUSER|#]
    [#|2010-05-10T12:26:19.312+0200|INFO|sun-appserver2.1|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=httpWorkerThread-14848-1;|**RemoteBusinessJndiName: com.example.Foo; remoteBusIntf: com.example.Foo|#]
    
  • There is an error when looking up Bar via JNDI

  • When looking at the JNDI tree in the glassfish admin console, Bar is not present at all.
  • The other EJBs in the same module do appear, as does Foo.
  • There are exceptions in the logs concerning Foo, but these already appeared when it was still working.

Any ideas what could cause this or how to diagnose it further? The beans are pretty straightforward:

@Stateless(name = "Foo")
@RolesAllowed("FOOUSER")
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public class FooImpl extends BaseBean implements Foo {

I’m also having some problems with the deployment descriptor for Bar: I’d like to eliminate it, but glassfish doesn’t seem to like having a bean appear only in sun-ejb-jar.xml, or having some beans in a module declared in the descriptor and others use only annotations.

Edit: The structure of the EAR is like this:

AeApp.ear
    AeApp.war
    Foo.jar (Foo.class and FooImpl.class present here)
    Bar.jar (Bar.class and BarImpl.class present here, also BaseBean.class)
    (some more EJB module JARs)
    (lots of library JARs)

AeApp.ear does not (and AFAIK never had, even when it was working) a META-INF/MANIFEST.MF. Its application.xml looks like this:

<application>
  <description>AE EAR</description>
  <display-name>AE EAR</display-name>
  <module><ejb>Foo.jar</ejb></module>
  <module><ejb>Bar.jar</ejb></module>
  <module><ejb>Baz.jar</ejb></module>
  <module><ejb>Doh.jar</ejb></module>
  <module><web>
      <web-uri>AeApp.war</web-uri>
      <context-root>/</context-root>
  </web></module>
</application>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:49:13+00:00Added an answer on May 14, 2026 at 7:49 pm

    After some trial and error, I narrowed down the problem, and a colleague brought me on the right track. The problem was not with classpaths or the EJBs themselves. It was much dumber.

    My ejb-jar.xml had a EJBv2 DOCTYPE. That caused glassfish to silently ignore the EJBs using only annotations, and fail to put them into the JNDI tree when they were declared in the deployment descriptor. All I had to do is replace this:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
         <ejb-jar>
    

    With this:

    <?xml version="1.0" encoding="UTF-8"?>
         <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" 
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" 
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
                                      http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our shop is in the process of converting our internal project management application from
Has anybody gone through the process of converting a real-world business application from ASP.NET
I'm in the process of converting a varchar(8000) field to an xml field in
I was in the process of converting a VS2003 project (.NET 1.1) to VS2008
I am in the process of converting a VS 2008 Web Site to a
A Windows process created from an exe file has access to the command string
I'm in the process of weeding out all hardcoded values in a Java library
Java process control is notoriously bad - primarily due to inadequate support by the
There is a conversion process that is needed when migrating Visual Studio 2005 web
I'm in the process of refactoring some code which includes moving folders around, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.