HTTP 1.1 compliance of SunONE 7.0

I have to send a large amount of data (size is unknown when request is made) using HTTP to a Servlet running on SunONE AppServer 7. I tried using the "Transfer-encoding: chunked" HTTP header, but SunONE returns a 411 error code (asking for content length).
Is the chunked transfer feature available in SunONE. I know my client code is correct, because it works correctly when I contact my servlet running on a Tomcat 4.24, Websphere 5.0, or Weblogic 8.1 server.

The following conditions cause the server to close a connection :
Dynamic content, such as a CGI, does not have an HTTP content-length header set. This applies only to HTTP 1.0 requests.
However, if the request is HTTP 1.1, the server honors keep-alive requests even if the content-length is not set. The server can use chuncked encoding for these requests if the client can handle them (indicated by the request header transfer-encoding:chunked). For more information regarding chuncked encoding, see the Sun ONE Application Server Developer's Guide to NSAPI.

Similar Messages

  • JNDI look up failure from JUnitEE for Sunone AppServer 8

    Hi, Dear All:
    I am trying to set up a test framework for developing J2EE application, I successfully deployed the EJB components, see the sun-ejb-jar.xml below:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
    <sun-ejb-jar>
    <enterprise-beans>
    <unique-id>0</unique-id>
    <ejb>
    <ejb-name>CounterEJB</ejb-name>
    <jndi-name>ejb/Counter</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <is-one-one-cmp>false</is-one-one-cmp>
    </cmp>
    <ior-security-config>
    <transport-config>
    <integrity>SUPPORTED</integrity>
    <confidentiality>SUPPORTED</confidentiality>
    <establish-trust-in-target>SUPPORTED</establish-trust-in-target>
    <establish-trust-in-client>SUPPORTED</establish-trust-in-client>
    </transport-config>
    <as-context>
    <auth-method>USERNAME_PASSWORD</auth-method>
    <realm>default</realm>
    <required>true</required>
    </as-context>
    <sas-context>
    <caller-propagation>SUPPORTED</caller-propagation>
    </sas-context>
    </ior-security-config>
    <is-read-only-bean>false</is-read-only-bean>
    <gen-classes/>
    </ejb>
    <ejb>
    <ejb-name>UniqueIdGeneratorEJB</ejb-name>
    <jndi-name>ejb/UniqueIdGenerator</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <ior-security-config>
    <transport-config>
    <integrity>SUPPORTED</integrity>
    <confidentiality>SUPPORTED</confidentiality>
    <establish-trust-in-target>SUPPORTED</establish-trust-in-target>
    <establish-trust-in-client>SUPPORTED</establish-trust-in-client>
    </transport-config>
    <as-context>
    <auth-method>USERNAME_PASSWORD</auth-method>
    <realm>default</realm>
    <required>true</required>
    </as-context>
    <sas-context>
    <caller-propagation>SUPPORTED</caller-propagation>
    </sas-context>
    </ior-security-config>
    <is-read-only-bean>false</is-read-only-bean>
    <gen-classes/>
    </ejb>
    <cmp-resource>
    <jndi-name>jdo/pickdirector</jndi-name>
    <default-resource-principal>
    <name>rp3data</name>
    <password>rp3data</password>
    </default-resource-principal>
    <create-tables-at-deploy>false</create-tables-at-deploy>
    <drop-tables-at-undeploy>false</drop-tables-at-undeploy>
    <database-vendor-name>mssql</database-vendor-name>
    </cmp-resource>
    </enterprise-beans>
    </sun-ejb-jar>
    and also I made up a deployable war with developed JUnitEE testcase, the code below is a simple example:
    public class UniqueIdGeneratorEJBTest extends TestCase
    //private UniqueIdGeneratorEJBRemote uidBean;
    private UniqueIdGeneratorLocal uidBean;
    public UniqueIdGeneratorEJBTest()
    super();
    // TODO Auto-generated constructor stub
    * @param arg0
    public UniqueIdGeneratorEJBTest(String arg0)
    super(arg0);
    // TODO Auto-generated constructor stub
    protected void setUp() throws Exception
    Context jndiContext = new InitialContext();
    ServiceLocator sl = ServiceLocator.getInstance();
    (JNDINames.UID_EJBHOME);
    UniqueIdGeneratorLocalHome uidHome = (UniqueIdGeneratorLocalHome)sl.getLocalHome("java:comp/env/ejb/UniqueIdGenerator");
    this.uidBean = uidHome.create();
    protected void tearDown() throws Exception
    this.uidBean = null;
    public void testSimpleIntId() throws RemoteException
    int currentId = uidBean.getUniqueIntId("WORKASSN");
    int nextId = uidBean.getUniqueIntId("WORKASSN");
    assertEquals(nextId, currentId + 1);
    assertTrue("NextId should be currentId plus 1.", nextId == currentId + 1);
    then I created deployable war file with the testcase, and deployed it onto SunOne Server, But I got error :
    javax.naming.NameNotFoundException: No object bound to name java:comp/env/ejb/UniqueIdGenerator
    I have been try to fix this problem for days, could anybody help, what I have done wrong?

    Could you please give an example (full code). I'm having the same problem.
    I can connect remotely from any client console application but as soon as I try to access a remote EJB via a servlet under Sun AppServer 8 I get the following error:
    java.lang.NullPointerException at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.sentFullMessage(CorbaMessageMediatorImpl.java:394) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.sendCancelRequestIfFinalFragmentNotSent(CorbaMessageMediatorImpl.java:359) at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.endRequest(CorbaClientRequestDispatcherImpl.java:851) at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.releaseReply(CorbaClientDelegateImpl.java:140) at com.sun.corba.ee.impl.resolver.BootstrapResolverImpl.resolve(BootstrapResolverImpl.java:115) at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22) at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22) at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22) at com.sun.corba.ee.impl.orb.ORBImpl.resolve_initial_references(ORBImpl.java:1112) at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340) at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289) at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245) at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:209) at com.sun.jndi.cosnaming.CNCtx.(CNCtx.java:69) at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:32) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243) at javax.naming.InitialContext.init(InitialContext.java:219) at javax.naming.InitialContext.(InitialContext.java:195) at Test.TestServlet.processRequest(TestServlet.java:57) at Test.TestServlet.doGet(TestServlet.java:85) at javax.servlet.http.HttpServlet.service(HttpServlet.java:748) at javax.servlet.http.HttpServlet.service(HttpServlet.java:861) 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:324) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:500) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107) at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107) at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:272) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107) at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109) at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647) at java.lang.Thread.run(Thread.java:534)
    I have configured my InitialContext properties like so:
    Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    props.put(Context.PROVIDER_URL, "iiop://slavezero:3700");
    InitialContext ic = new InitialContext(props);
    As far as I can see there is no reason for this to be handing back a NullPointerException.
    Please, please HELP!!!!!!!

  • Using Sun Web Server 6.1 from the IDE

    Using JSE 8 with Sun Web Server 6.1 set as the target container, I have a SUNWS61deployment.xml file created.
    That didn't exist in JSE 7. Is it WS 6.1 SP4 or SP5 -related ?
    I also have ws61-sun-web.xml with a simple <sun-web-app/> tag (empty deployment descriptor).
    What should this file contain? Is it a replacement for sun-web.xml?
    Do I still need sun-web.xml? Its DTD declaration sounds like Sun
    App Server 7 (http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-1.dtd)
    So you have plans to make "Sun Resources" (pools, JNDI resources, ...) created in the IDE be registerable directly in the Web Server just like it's possible with the sun app server?
    How safe is it to use JSE 8 with an older Web Server Service Pack (say 6.1SP1)?

    SUNWS61deployment.xml is created bythe IDE to be used internally and not to be used by the developer. This file wouldn't be sent to webserver after deployment.
    The ws61-sun-web.xml is sun-web.xml only and yes it is same as it is in Appserver7 as the webcontainer for both Webserver6.1 and Appserver7 are same. After deployment to webserver, ws61-sun-web.xml is renamed to Webserver as sun-web.xml by the IDE. When opened the developer can edit in the XML editor.
    The reason for having it as ws61-sun-web.xml in IDE is to avoid the clash between sun-web.xml of Appserver8.1 which is J2EE1.4 based whereas Webserver6.1 Web container is J2EE1.3 based.
    It should be okay to use any service pack of Webserver6.1 with JSE8
    Hope this helps

  • Error while running ejbc. Fatal error from EJB Compiler ---- Error while pr

    Hi!
    I was deploying a test application for a session bean with sun 1 studio 5 and I started getting this message while deploying.
    I had tested the bean previously and I had no problems.
    I found this in the sun app server 7 release notes, but I don't understand what I'm supposed to do...
    "Deployment of CMP beans fails.
    The following error is thrown because there are no <query-params> entries in the container-managed persistence (CMP) bean in sun-ejb-jar.xml file:
    Error while running ejbc. Fatal error from EJB Compiler ---- Error while processing CMP beans.
    Solution
    Even if it isn't necessary for the CMP beans, add the query-params tag for finders in the sun-ejb-jar.xml file with the empty parameters."
    Here is my sun-ejb-jar.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd">
    <sun-ejb-jar>
    <enterprise-beans>
    <name>GestorDoBanco_EJBModule</name>
    <ejb>
    <ejb-name>Cliente</ejb-name>
    <jndi-name>ejb/Cliente</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/Cliente.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>ClienteAssociadoAConta</ejb-name>
    <jndi-name>ejb/ClienteAssociadoAConta</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/ClienteAssociadoAConta.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>Conta</ejb-name>
    <jndi-name>ejb/Conta</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/Conta.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>GestorDoBanco</ejb-name>
    <jndi-name>ejb/GestorDoBanco</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    </ejb>
    <ejb>
    <ejb-name>MensagemM003</ejb-name>
    <jndi-name>ejb/MensagemM003</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/MensagemM003.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>MensagemM003Rejeitada</ejb-name>
    <jndi-name>ejb/MensagemM003Rejeitada</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/MensagemM003Rejeitada.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>MensagemM012</ejb-name>
    <jndi-name>ejb/MensagemM012</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/MensagemM012.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>MensagemM012Rejeitada</ejb-name>
    <jndi-name>ejb/MensagemM012Rejeitada</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/MensagemM012Rejeitada.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>MensagemM103</ejb-name>
    <jndi-name>ejb/MensagemM103</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/MensagemM103.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>MensagemM112</ejb-name>
    <jndi-name>ejb/MensagemM112</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/MensagemM112.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>Registo</ejb-name>
    <jndi-name>ejb/Registo</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/Registo.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>TransaccaoConfirmada</ejb-name>
    <jndi-name>ejb/TransaccaoConfirmada</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/TransaccaoConfirmada.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>TransaccaoFinalizada</ejb-name>
    <jndi-name>ejb/TransaccaoFinalizada</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/TransaccaoFinalizada.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>TransaccaoIniciada</ejb-name>
    <jndi-name>ejb/TransaccaoIniciada</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/TransaccaoIniciada.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <pm-descriptors>
    <pm-descriptor>
    <pm-identifier>SunONE</pm-identifier>
    <pm-version>1.0</pm-version>
    <pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
    <pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
    </pm-descriptor>
    <pm-inuse>
    <pm-identifier>SunONE</pm-identifier>
    <pm-version>1.0</pm-version>
    </pm-inuse>
    </pm-descriptors>
    <cmp-resource>
    <jndi-name>mysqlpmanager</jndi-name>
    <default-resource-principal>
    <name>bes</name>
    <password>besbes</password>
    </default-resource-principal>
    </cmp-resource>
    </enterprise-beans>
    </sun-ejb-jar>
    Thanks in advance for any help.
    Nuno

    http://docs.sun.com/source/817-2175-10/decmp.html
    Please go to the above docs and look thru the examples given in it.
    Example 2
    This query returns all products in a specified price range. It defines two query parameters which are the lower and upper bound for the price: double low, double high. The filter compares the query parameters with the price field:
    "low < price && price < high"
    The finder element of the sun-ejb-jar.xml file would look like this:
    <finder>
    <method-name>findInRange</method-name>
    <query-params>double low, double high</query-params>
    <query-filter>low < price && price &lt
    high</query-filter
    </finder>
    I hope this hepls. In your case u just have to make it null.

  • Error in deploying a cmp bean in j2ee 1.3

    Hi,
    I am deploying a cmr application using 3 cmp entity beans. while deloyment i get a error for one of the entity bean, studentEJB. the error is :
    For [ StudentEJB ]
    Error: There are no method permissions within this bean [ StudentEJB ]. Transaction attributes must be specified for the methods defined in the remote interface [ LocalStudent ]. Method [ getLastName ] has no transaction attribute defined.
    my LocalStudent file is:
    import javax.ejb.*;
    import java.util.*;
    public interface LocalStudent extends EJBLocalObject
    public String getStudentID();
    public String getFirstName();
    public String getLastName();
    public ArrayList getAddressList();
    public ArrayList getRosterList();
    public void addAddress(LocalAddress address);
    public void addRoster(LocalRoster roster);
    while no errors are coming for the studentID and firstName fields why is the error coming for lastName field ?
    three fields, studentID, firstName and lastName contain similar implementations in the LocalStudent and studentEJB class.
    wiating for an early response...
    Tanmoy

    Hello there!
    I am having a similar problem here also. I am trying to build a lab for test the J2EE tecnology in order for the company I work for switch our Cash Dispenser system to java.
    I have made a very simple entity EJB witch local interface is:
    public interface LabLocal extends EJBLocalObject
    String getExperiment();
    String getDescription();
    void setDescription(String description);
    String getResult();
    void setResult(String result);
    Local home is:
    public interface LabLocalHome extends EJBLocalHome
         LabLocal create( String experiment, String description, String result ) throws CreateException;
         LabLocal findByPrimaryKey( LabPK key ) throws FinderException;
         void remove();
    and the bean itself is:
    public class LabBean implements EntityBean
    private EntityContext ctx;
    private DataSource dataSource;
    public String experiment;
    public String description;
    public String result;
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbActivate()
    public void ejbActivate() throws EJBException, RemoteException
    // nothing to do here people.
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbLoad()
    public void ejbLoad() throws EJBException, RemoteException
    LabPK key = (LabPK)ctx.getPrimaryKey();
    Connection con = null;
    PreparedStatement stmt = null;
    ResultSet rs = null;
    try
    con = dataSource.getConnection();
    stmt = con.prepareStatement("SELECT description, result FROM laboratory WHERE experiment = ?");
    stmt.setString(1, key.experiment);
    rs = stmt.executeQuery();
    if( ! rs.next() )
    error( "no data found in ejbLoad for " + key, null);
    this.experiment = key.experiment;
    catch( SQLException se)
    error("Error in ejbLoad" + key, se);
    finally
    closeConnection(con, stmt, rs);
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbPassivate()
    public void ejbPassivate() throws EJBException, RemoteException
    this.description = null;
    this.result = null;
    this.experiment = null;
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbRemove()
    public void ejbRemove() throws RemoveException, EJBException, RemoteException
         LabPK key = (LabPK) ctx.getPrimaryKey();
         Connection con = null;
         PreparedStatement stmt = null;
         try
              con = dataSource.getConnection();
              stmt = con.prepareStatement("DELETE FROM laboratory WHERE experiment = ? ");
              stmt.setString(1, key.toString() );
              stmt.executeUpdate();
         catch( SQLException se )
              error( "Error deleting " + key, se );
         finally
              closeConnection(con, stmt, null);
         this.experiment = null;
         this.description = null;
         this.result = null;
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbStore()
    public void ejbStore() throws EJBException, RemoteException
    Connection con = null;
    PreparedStatement stmt = null;
    try
    con = dataSource.getConnection();
    stmt = con.prepareStatement("UPDATE Laboratory SET description = ? , result = ? WHERE experiment = ? ");
    stmt.setString(1, this.description);
    stmt.setString(2, this.result);
    stmt.setString(3, this.experiment);
    stmt.executeUpdate();
    catch( SQLException se)
    error( "Error processing UPDATE statement.", se);
    finally
    closeConnection(con, stmt, null);
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#unsetEntityContext()
    public void unsetEntityContext() throws EJBException, RemoteException
    this.ctx = null;
    this.dataSource = null;
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
    public void setEntityContext(EntityContext arg0) throws EJBException, RemoteException
    this.ctx = arg0;
    InitialContext ic = null;
    try
    ic = new InitialContext();
    dataSource = (DataSource) ic.lookup("java:comp/env/jdbc/teste");
    catch( NamingException ne)
    error( "error looking up depend EJB or resource. ", ne);
    public void error( String message, Exception e)
    throw new EJBException( message, e);
    public void closeConnection( Connection con, PreparedStatement stmt, ResultSet rs )
    try
         if( stmt != null )
         stmt.close();
    catch( SQLException se)
    System.out.println( "Data base error: " + se.toString() );
    try
         if( con != null)
         con.close();
    catch( SQLException se)
    System.out.println( "Data base error: " + se.toString() );
    public LabPK ejbCreate( String experiment, String description, String result ) throws CreateException
    LabPK key = new LabPK( experiment );
    try
    ejbFindByPrimaryKey( key );
    throw new CreateException( "Duplicate lab: " + key);
    catch( FinderException fe ){}
    Connection con = null;
    PreparedStatement stmt = null;
    try
    con = dataSource.getConnection();
    stmt = con.prepareStatement("INSERT INTO laboratory ( experiment, description, result ) VALUES (?, ?, ?) ");
    stmt.setString(1, experiment);
    stmt.setString(2, description);
    stmt.setString(3, result);
    catch( SQLException se )
    error( "Error creating lab: " + key, se);
    finally
    closeConnection(con, stmt, null);
    this.experiment = experiment;
    this.description = description;
    this.result = result;
    return key;
    public void ejbPostCreate(String experiment, String description, String result){}
    public LabPK ejbFindByPrimaryKey( LabPK key ) throws FinderException
         Connection con = null;
         PreparedStatement stmt = null;
         ResultSet rs = null;
         try
              con = dataSource.getConnection();
              stmt = con.prepareStatement("SELECT experiment FROM laboratory WHERE experiment = ?");
              stmt.setString(1, key.experiment );
              rs = stmt.executeQuery();
              if( !rs.next() )
                   throw new FinderException( "Unknown key: " + key );
              return key;
         catch( SQLException se )
              error( "Error in finding primary key for " + key, se );
         finally
         closeConnection(con, stmt, rs);
         return null;
    public String getExperiment()
    return this.experiment;
    public String getDescription()
    return this.description;
    public void setDescription(String description)
    this.description = description;
    public String getResult()
    return this.result;
    public void setResult(String result)
    this.result = result;
    I will omit the PK code in order to not create a longer than necessary post.
    I am using the deploytool�s Graphical interface to generate a standalone jar file. When I run the verify tool I get the following errors:
    For [ D:-Linux-Java-LabJar.jar#LabJar.jar#LabBean ]
    Error: There are no method permissions within this bean [ LabBean ]. Transaction attributes must be specified for the methods defined in the remote interface [ simpleEJB.LabLocal ]. Method [ getDescription ] has no transaction attribute defined.
    For [ D:-Linux-Java-LabJar.jar#LabJar.jar#LabBean ]
    Error: There are no method permissions within this bean [ LabBean ]. Transaction attributes must be specified for the methods defined in the remote interface [ simpleEJB.LabLocal ]. Method [ setDescription ] has no transaction attribute defined.
    For [ D:-Linux-Java-LabJar.jar#LabJar.jar#LabBean ]
    Error: There are no method permissions within this bean [ LabBean ]. Transaction attributes must be specified for the methods defined in the remote interface [ simpleEJB.LabLocal ]. Method [ getResult ] has no transaction attribute defined.
    For [ D:-Linux-Java-LabJar.jar#LabJar.jar#LabBean ]
    Error: There are no method permissions within this bean [ LabBean ]. Transaction attributes must be specified for the methods defined in the remote interface [ simpleEJB.LabLocal ]. Method [ getExperiment ] has no transaction attribute defined.
    For [ D:-Linux-Java-LabJar.jar#LabJar.jar#LabBean ]
    Error: There are no method permissions within this bean [ LabBean ]. Transaction attributes must be specified for the methods defined in the remote interface [ simpleEJB.LabLocal ]. Method [ setResult ] has no transaction attribute defined.
    I�ve read the forum in search for an good answer and found some sugestions to look in the security and transaction tab in order to force the tool to generate the entries for the methods. It did not helped at all.
    I tried to change the defaults in transaction tab from "required" to "mandatory". When I save, the tool presents the root screen of the jar file, but when I go check the values of the transaction atributes, they are again set to "required" .
    In the descriptor viewer for the application descriptor it shows:
    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd"> <sun-ejb-jar> <enterprise-beans> <name>LabJar</name> <unique-id>366779567</unique-id> <ejb> <ejb-name>LabBean</ejb-name> <jndi-name>LabBean</jndi-name> </ejb> </enterprise-beans> </sun-ejb-jar>
    I cant get to edit it when I try.
    I am using the "Deployment Tool for Java 2 Plataform Enterprise Edition 1.4" from the J2EE SDK 1.4_2 running on Windows 2000 SP4.
    Tks in advance,
    Leonardo.
    P.S.: Ok. Isnt it silly. I wrote all that, and then choose "supported" instead of mandatory, saved and verified that it saved the setting indeed. returned to required and runned the test. It worked.

  • Deploy EAR with MySQL as DB

    Just tested with a very simple table called test_string with only one column "guid" (type varchar). Verification is OK, but always got the following error when deploying to server. Not sure about the reason.
    As it is a wrapException, is it possible that some thing wrong in the cmp mapping from String to varchar in mysql?
    [30/Jun/2003:10:27:58] INFO ( 1788): CORE3282: stdout: -----------VERIFYING-----------
    [30/Jun/2003:10:27:58] INFO ( 1788): CORE3282: stdout: app_canaust: There were no failed tests.
    [30/Jun/2003:10:27:58] INFO ( 1788): CORE3282: stdout: WAF WebTier Components: There were no failed tests.
    [30/Jun/2003:10:27:58] INFO ( 1788): CORE3282: stdout: Ejb1: There were no failed tests.
    [30/Jun/2003:10:27:59] INFO ( 1788): CORE3282: stdout: Look in file "C:\WINNT\TEMP\canaust.ear_verified.xml" for detailed results on test assertions.
    [30/Jun/2003:10:27:59] INFO ( 1788): CORE3282: stdout: Look in file "C:\WINNT\TEMP\canaust.ear_verified.txt" for detailed results on test assertions.
    [30/Jun/2003:10:27:59] INFO ( 1788): CORE3282: stdout: Number of tests done: 299
    [30/Jun/2003:10:27:59] INFO ( 1788): CORE3282: stdout: Number of tests excluded: 57
    [30/Jun/2003:10:27:59] INFO ( 1788): CORE3282: stdout: -------VERIFICATION DONE-------
    [30/Jun/2003:10:27:59] INFO ( 1788): DPL5038: Verification Results:
    Number of Failure(s): 0
    Number of Warning(s): 2
    Number of Error(s): 0
    [30/Jun/2003:10:27:59] INFO ( 1788): DPL5109: EJBC - START of EJBC for [canaust]
    [30/Jun/2003:10:27:59] INFO ( 1788): CORE3282: stdout: Remote message: Processing beans ....
    [30/Jun/2003:10:28:00] WARNING ( 1788): DPL5035:Error while running ejbc
    com.iplanet.ias.deployment.backend.IASDeploymentException: Fatal Error from EJB Compiler -- -- Error while processing CMP beans.
    at com.iplanet.ias.deployment.backend.EJBCompiler.wrapException(EJBCompiler.java:589)
    at com.iplanet.ias.deployment.backend.EJBCompiler.compile(EJBCompiler.java:186)
    at com.iplanet.ias.deployment.backend.AppDeployer.runEJBC(AppDeployer.java:215)
    at com.iplanet.ias.deployment.backend.AppDeployer.deploy(AppDeployer.java:98)
    at com.iplanet.ias.deployment.backend.AppDeployer.doRequest(AppDeployer.java:50)
    at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployJ2EEApplicationArchiveOrDirectory(ManagedServerInstance.java:743)
    at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployJ2EEApplication(ManagedServerInstance.java:666)
    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:324)
    at com.iplanet.ias.admin.server.core.jmx.Introspector.invokeMethodOn(Introspector.java:188)
    at com.iplanet.ias.admin.server.core.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:137)
    at com.iplanet.ias.admin.server.core.jmx.ASMBeanServerImpl.invoke(ASMBeanServerImpl.java:222)
    at com.iplanet.ias.admin.servermodel.controllers.SOMRequestDispatcher.invoke(SOMRequestDispatcher.java:88)
    at com.iplanet.ias.admin.servermodel.controllers.AppServerInstanceController.doDeploy(AppServerInstanceController.java:2244)
    at com.iplanet.ias.admin.servermodel.controllers.AppServerInstanceController.deployApplication(AppServerInstanceController.java:1099)
    at com.iplanet.ias.admin.servermodel.AppServerInstance.deployApplication(AppServerInstance.java:249)
    at com.iplanet.ias.admin.server.gui.jato.DeployEARApplicationViewBean.add(DeployEARApplicationViewBean.java:111)
    at com.iplanet.ias.admin.server.gui.jato.IASViewBean.handleOkRequest(IASViewBean.java:235)
    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:324)
    at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
    at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:299)
    at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:811)
    at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:749)
    at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:596)
    at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:772)
    at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:446)
    at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at
    [30/Jun/2003:10:28:04] WARNING ( 1788): Deployment Error
    com.iplanet.ias.deployment.backend.IASDeploymentException: Error while running ejbc -- Fatal Error from EJB Compiler -- -- Error while processing CMP beans.
    at com.iplanet.ias.deployment.backend.AppDeployer.runEJBC(AppDeployer.java:227)
    at com.iplanet.ias.deployment.backend.AppDeployer.deploy(AppDeployer.java:98)
    at com.iplanet.ias.deployment.backend.AppDeployer.doRequest(AppDeployer.java:50)
    at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployJ2EEApplicationArchiveOrDirectory(ManagedServerInstance.java:743)
    at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployJ2EEApplication(ManagedServerInstance.java:666)
    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:324)
    at com.iplanet.ias.admin.server.core.jmx.Introspector.invokeMethodOn(Introspector.java:188)
    at com.iplanet.ias.admin.server.core.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:137)
    at com.iplanet.ias.admin.server.core.jmx.ASMBeanServerImpl.invoke(ASMBeanServerImpl.java:222)
    at com.iplanet.ias.admin.servermodel.controllers.SOMRequestDispatcher.invoke(SOMRequestDispatcher.java:88)
    at com.iplanet.ias.admin.servermodel.controllers.AppServerInstanceController.doDeploy(AppServerInstanceController.java:2244)
    at com.iplanet.ias.admin.servermodel.controllers.AppServerInstanceController.deployApplication(AppServerInstanceController.java:1099)
    at com.iplanet.ias.admin.servermodel.AppServerInstance.deployApplication(AppServerInstance.java:249)
    at com.iplanet.ias.admin.server.gui.jato.DeployEARApplicationViewBean.add(DeployEARApplicationViewBean.java:111)
    at com.iplanet.ias.admin.server.gui.jato.IASViewBean.handleOkRequest(IASViewBean.java:235)
    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:324)
    at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
    at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:299)
    at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:811)
    at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:749)
    at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:596)
    at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:772)
    at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:446)
    at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.ja
    [30/Jun/2003:10:28:04] INFO ( 1788): Total Deployment Time: 27961 msec, Total EJB Compiler Module Time: 0 msec, Portion spent EJB Compiling: 0%
    [30/Jun/2003:10:28:04] WARNING ( 1788): ADM1022:Deployment failed - Detailed Message:
    com.iplanet.ias.deployment.backend.IASDeploymentException: Deployment Error -- Error while running ejbc -- Fatal Error from EJB Compiler -- -- Error while processing CMP beans.
    at com.iplanet.ias.deployment.backend.AppDeployer.doRequest(AppDeployer.java:58)
    at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployJ2EEApplicationArchiveOrDirectory(ManagedServerInstance.java:743)
    at com.iplanet.ias.admin.server.core.mbean.config.ManagedServerInstance.deployJ2EEApplication(ManagedServerInstance.java:666)
    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:324)
    at com.iplanet.ias.admin.server.core.jmx.Introspector.invokeMethodOn(Introspector.java:188)
    at com.iplanet.ias.admin.server.core.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:137)
    at com.iplanet.ias.admin.server.core.jmx.ASMBeanServerImpl.invoke(ASMBeanServerImpl.java:222)
    at com.iplanet.ias.admin.servermodel.controllers.SOMRequestDispatcher.invoke(SOMRequestDispatcher.java:88)
    at com.iplanet.ias.admin.servermodel.controllers.AppServerInstanceController.doDeploy(AppServerInstanceController.java:2244)
    at com.iplanet.ias.admin.servermodel.controllers.AppServerInstanceController.deployApplication(AppServerInstanceController.java:1099)
    at com.iplanet.ias.admin.servermodel.AppServerInstance.deployApplication(AppServerInstance.java:249)
    at com.iplanet.ias.admin.server.gui.jato.DeployEARApplicationViewBean.add(DeployEARApplicationViewBean.java:111)
    at com.iplanet.ias.admin.server.gui.jato.IASViewBean.handleOkRequest(IASViewBean.java:235)
    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:324)
    at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
    at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:299)
    at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:811)
    at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:749)
    at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:596)
    at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:772)
    at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:446)
    at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    Caused by: com.iplanet.ias.deployme
    Here is the ejb-jar.xml:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!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>
    <enterprise-beans>
    <entity>
    <display-name>Test_stringEJB</display-name>
    <ejb-name>Test_stringEJB</ejb-name>
    <local-home>com.canaust.ecommerce.components.Test_stringLocalHome</local-home>
    <local>com.canaust.ecommerce.components.Test_stringLocal</local>
    <ejb-class>com.canaust.ecommerce.components.impl.Test_stringBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>test_string</abstract-schema-name>
    <cmp-field>
    <field-name>guid</field-name>
    </cmp-field>
         <primkey-field>guid</primkey-field>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
         <method><ejb-name>Test_stringEJB</ejb-name><method-name>*</method-name></method>
         <trans-attribute>Required</trans-attribute>
         </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Here is the sun-ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
    <sun-ejb-jar>
    <enterprise-beans>
    <name>CanaustJar</name>
    <ejb>
    <ejb-name>Test_stringEJB</ejb-name>
    <jndi-name>ejb/Test_stringEJB</jndi-name>
    <is-read-only-bean>false</is-read-only-bean>
         <bean-pool>
    <steady-pool-size>10</steady-pool-size>
    <resize-quantity>5</resize-quantity>
    <max-pool-size>100</max-pool-size>
    <pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
    </bean-pool>
    <bean-cache>
    <max-cache-size>100</max-cache-size>
    <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
    <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
    <victim-selection-policy>LRU</victim-selection-policy>
    </bean-cache>
    </ejb>
    <pm-descriptors>
    <pm-descriptor>
    <pm-identifier>SunONE</pm-identifier>
    <pm-version>1.0</pm-version>
    <pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator
    </pm-class-generator>
    <pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
    </pm-descriptor>
    <pm-inuse>
    <pm-identifier>SunONE</pm-identifier>
    <pm-version>1.0</pm-version>
    </pm-inuse>
    </pm-descriptors>
    <cmp-resource>
    <jndi-name>jdo/canaust</jndi-name>
    </cmp-resource>
    </enterprise-beans>
    </sun-ejb-jar>
    And Here is the sun-cmp-mappings.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-cmp-mappings PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-cmp-mapping_1_0.dtd">
    <sun-cmp-mappings>
    <sun-cmp-mapping>
    <schema>Canaust</schema>
    <entity-mapping>
         <ejb-name>Test_stringEJB</ejb-name>
         <table-name>test_string</table-name>
         <cmp-field-mapping><field-name>guid</field-name><column-name>address.guid</column-name></cmp-field-mapping>
    </entity-mapping>
    </sun-cmp-mapping>
    </sun-cmp-mappings>

    Marina,
    Is there any way to make these fields case-insensitive? The reason I ask is that I am trying to create a sun-cmp-mappings.xml that will work with mutliple databases, that might have tables and columns defined with different cases (i.e. Oracle = upper, Sybase = mixed). Is it possible to create a combinbation of .schema file and mappings.xml that will work?
    tia,
    Mike

  • Deployed EJB Not Bound

    I deplyed a simple EJB on S17AS. The server.log tells me it is deployed successful.
    CORE3282: stdout: ejbCreate() on obj samples.jdbc.simple.ejb.GreeterDBBean@1017ca1
    CORE3282: stdout: ejbCreate() on obj samples.jdbc.simple.ejb.GreeterDBBean@9d5793
    LDR5010: All ejb(s) of [simpleEjb] loaded successfully!
    The relevant simpleEjb.jar_verified.txt is as follows
         Test Name : tests.ejb.ias.ASEjbJndiName
         Test Assertion :
         Test Description : PASSED [AS-EJB ejb] : jndi-name is simpleHome
    However, the server log did not indicate the EJB is bound even if I set the log level to finest.
    Therefore when I tried to access it, I get the following error
    Exception in thread "main" javax.naming.NameNotFoundException: No object bound f
    or java:comp/env/ejb/simpleHome
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.j
    ava:116)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at HelloClient.main(HelloClient.java:61)
    The client code is as follows
    String JNDIName = "java:comp/env/ejb/simpleHome";
    myGreeterDBHome = (GreeterDBHome) javax.rmi.PortableRemoteObject.narrow(
                   initContext.lookup(JNDIName), GreeterDBHome.class);
    The sun-ejb-jar.xml is as follows
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    -->
    <!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
    <sun-ejb-jar>
    <enterprise-beans>
    <name>simpleEjb.jar</name>
    <ejb>
    <ejb-name>simpleEJB</ejb-name>
    <jndi-name>simpleHome</jndi-name>
    <is-read-only-bean>false</is-read-only-bean>
                   <bean-pool>
                        <steady-pool-size>2</steady-pool-size>
                        <resize-quantity>5</resize-quantity>
                        <max-pool-size>20</max-pool-size>
                        <pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
                   </bean-pool>
    </ejb>
    </enterprise-beans>
    </sun-ejb-jar>
    I tried to use lookup for both "java:comp/env/ejb/simpleHome" and "java:comp/env/simpleHome". None succeed.
    Does anyone know why the ejb is deployed successful but not bound?
    Sha

    Hi, Parsuram,
    I did restart the server and the error is the same.
    Here is the sample code. I did not change them. Only the names in deployment descriptors are modified.
    Below is the info.
    *************************Remote Interface
    Copyright � 2002 Sun Microsystems, Inc. All rights reserved.
    package samples.jdbc.simple.ejb;
    * Remote interface for the GreeterDBEJB. The remote interface defines all possible
    * business methods for the bean. These are the methods going to be invoked remotely
    * by the servlets, once they have a reference to the remote interface.
    * Servlets generally take the help of JNDI to lookup the bean's home interface and
    * then use the home interface to obtain references to the bean's remote interface.
    public interface GreeterDB extends javax.ejb.EJBObject {
    * Returns the greeting String such as "Good morning, John"
         * @return the greeting String
    public String getGreeting() throws java.rmi.RemoteException;
    *************************Home Interface
    Copyright � 2002 Sun Microsystems, Inc. All rights reserved.
    package samples.jdbc.simple.ejb;
    * Home interface for the GreeterDB EJB. Clients generally use home interface
    * to obtain references to the bean's remote interface.
    public interface GreeterDBHome extends javax.ejb.EJBHome {
    * Gets a reference to the remote interface to the GreeterDBBean.
         * @exception throws CreateException and RemoteException.
    public GreeterDB create() throws java.rmi.RemoteException, javax.ejb.CreateException;
    *************************Bean Class
    Copyright � 2002 Sun Microsystems, Inc. All rights reserved.
    package samples.jdbc.simple.ejb;
    import java.util.*;
    import java.io.*;
    * A simple stateless session bean which generates the greeting string for jdbc-simple
    * application. This bean implements the business method as declared by the remote interface.
    public class GreeterDBBean implements javax.ejb.SessionBean {
    private javax.ejb.SessionContext m_ctx = null;
    * Sets the session context. Required by EJB spec.
         * @param ctx A SessionContext object.
    public void setSessionContext(javax.ejb.SessionContext ctx) {
    m_ctx = ctx;
    * Creates a bean. Required by EJB spec.
    public void ejbCreate() {
    System.out.println("ejbCreate() on obj " + this);
    * Removes a bean. Required by EJB spec.
    public void ejbRemove() {
    System.out.println("ejbRemove() on obj " + this);
    * Loads the state of the bean from secondary storage. Required by EJB spec.
    public void ejbActivate() {
    System.out.println("ejbActivate() on obj " + this);
    * Keeps the state of the bean to secondary storage. Required by EJB spec.
    public void ejbPassivate() {
    System.out.println("ejbPassivate() on obj " + this);
    * Required by EJB spec.
    public void GreeterDBBean() {
    * Returns the Greeting String based on the time
    * @return the Greeting String.
    public String getGreeting() throws java.rmi.RemoteException {
    System.out.println("GreeterDB EJB is determining message...");
    String message = null;
    Calendar calendar = new GregorianCalendar();
    int currentHour = calendar.get(Calendar.HOUR_OF_DAY);
    if(currentHour < 12) message = "morning";
    else {
    if( (currentHour >= 12) &&
    (calendar.get(Calendar.HOUR_OF_DAY) < 18)) message = "afternoon";
    else message = "evening";
    System.out.println("- Message determined successfully");
    return message;
    ************************ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    -->
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <session>
    <display-name>simple</display-name>
    <ejb-name>simpleEJB</ejb-name>
    <home>samples.jdbc.simple.ejb.GreeterDBHome</home>
    <remote>samples.jdbc.simple.ejb.GreeterDB</remote>
    <ejb-class>samples.jdbc.simple.ejb.GreeterDBBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    ************************sun-ejb-jar.xml
    <sun-ejb-jar>
    <enterprise-beans>
    <name>simpleEjb.jar</name>
    <ejb>
    <ejb-name>simpleEJB</ejb-name>
    <jndi-name>ejb/simpleHome</jndi-name>
    <is-read-only-bean>false</is-read-only-bean>
                   <bean-pool>
                        <steady-pool-size>2</steady-pool-size>
                        <resize-quantity>5</resize-quantity>
                        <max-pool-size>20</max-pool-size>
                        <pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
                   </bean-pool>
    </ejb>
    </enterprise-beans>
    </sun-ejb-jar>
    ************************Assemble Info
    C:\Sun\AppServer7\samples\jdbc\simple\assemble\jar>jar cvf simpleEjb.jar *
    added manifest
    ignoring entry META-INF/
    adding: META-INF/ejb-jar.xml(in = 710) (out= 350)(deflated 50%)
    adding: META-INF/sun-ejb-jar.xml(in = 803) (out= 424)(deflated 47%)
    adding: samples/(in = 0) (out= 0)(stored 0%)
    adding: samples/jdbc/(in = 0) (out= 0)(stored 0%)
    adding: samples/jdbc/simple/(in = 0) (out= 0)(stored 0%)
    adding: samples/jdbc/simple/ejb/(in = 0) (out= 0)(stored 0%)
    adding: samples/jdbc/simple/ejb/GreeterDB.class(in = 210) (out= 168)(deflated 20%)
    adding: samples/jdbc/simple/ejb/GreeterDBBean.class(in = 1441) (out= 734)(deflated 49%)
    adding: samples/jdbc/simple/ejb/GreeterDBHome.class(in = 257) (out= 177)(deflated 31%)
    C:\Sun\AppServer7\samples\jdbc\simple\assemble\jar>jar tf simpleEJB.jar
    META-INF/
    META-INF/MANIFEST.MF
    META-INF/ejb-jar.xml
    META-INF/sun-ejb-jar.xml
    samples/
    samples/jdbc/
    samples/jdbc/simple/
    samples/jdbc/simple/ejb/
    samples/jdbc/simple/ejb/GreeterDB.class
    samples/jdbc/simple/ejb/GreeterDBBean.class
    samples/jdbc/simple/ejb/GreeterDBHome.class
    ******************************** Deployment Info
    server1: Applications: EJB Modules: simpleEjb
    EJB Module Name: simpleEjb
    Location: C:\Sun\AppServer7\domains\domain1\server1\applications\j2ee-modules\simpleEjb_1
    ******************************** simplEJB.jar_verified.txt
    STATIC VERIFICATION RESULTS
         NUMBER OF FAILURES/WARNINGS/ERRORS
         # of Failures : 0
    # of Warnings : 1
         # of Errors : 0
         Test Name : tests.ejb.ias.ASEjbJndiName
         Test Assertion :
         Test Description : PASSED [AS-EJB ejb] : jndi-name is ejb/simpleHome
         WARNINGS :
         Test Name : tests.ejb.businessmethod.BusinessMethodException
         Test Assertion : Enterprise bean business method throws RemoteException test
         Test Description : For [ module_simpleEjb#simpleEjb#simpleEJB ]
    For EJB Class [ samples.jdbc.simple.ejb.GreeterDBBean ] business method [ getGreeting ]
    Error: Compatibility Note: A public business method [ getGreeting ] was found, but EJB 1.0 allowed the business methods to throw the java.rmi.RemoteException to indicate a non-application exception. This practice is deprecated in EJB 1.1 ---an EJB 1.1 compliant enterprise bean should throw the javax.ejb.EJBException or another RuntimeException to indicate non-application exceptions to the Container.
    *********************** server log (no binding info)
    [05/Jan/2003:17:07:19] FINE ( 1760): [EJBClassPathUtils] EJB Class Path for [simpleEjb] is ...
    [C:\Sun\AppServer7\domains\domain1\server1\applications\j2ee-modules\simpleEjb_1, C:\Sun\AppServer7\domains\domain1\server1\generated\ejb\j2ee-modules\simpleEjb]
    [05/Jan/2003:17:07:20] FINE ( 1760): Loading StatelessSessionContainer...
    [05/Jan/2003:17:07:20] FINE ( 1760): [BaseContainer] Registered EJB [simpleEJB] with MBeanServer under name [ias:instance-name=server1,mclass=stateless-session-bean,name=simpleEJB,root=root,standalone-ejb-module=simpleEjb,type=monitor]
    [05/Jan/2003:17:07:20] FINE ( 1760): main: name = "samples.jdbc.simple.ejb._GreeterDBBean_RemoteHomeImpl_Tie", codebase = ""
    [05/Jan/2003:17:07:20] FINE ( 1760): main: name = "samples.jdbc.simple.ejb._GreeterDBHome_Stub", codebase = ""
    [05/Jan/2003:17:07:20] FINE ( 1760): main: name = "samples.jdbc.simple.ejb._GreeterDBHome_Stub", codebase = ""
    [05/Jan/2003:17:07:20] FINE ( 1760): main: name = "samples.jdbc.simple.ejb._GreeterDBBean_EJBObjectImpl_Tie", codebase = ""
    [05/Jan/2003:17:07:20] FINE ( 1760): main: name = "samples.jdbc.simple.ejb._GreeterDB_Stub", codebase = ""
    [05/Jan/2003:17:07:20] FINE ( 1760): [Pool-ejb/simpleHome]: Added PoolResizeTimerTask...
    [05/Jan/2003:17:07:20] FINE ( 1760): Created container with uinque id: 68275827784351744
    [05/Jan/2003:17:07:20] FINE ( 1760): Application deployment successful : com.sun.ejb.containers.StatelessSessionContainer@1083717
    [05/Jan/2003:17:07:20] INFO ( 1760): LDR5010: All ejb(s) of [simpleEjb] loaded successfully!
    [05/Jan/2003:17:07:22] FINE ( 1760): Started 48 request processing threads
    [05/Jan/2003:17:07:22] INFO ( 1760): CORE3274: successful server startup
    [05/Jan/2003:17:07:22] FINE ( 1760): The server is now ready to process requests
    [05/Jan/2003:17:07:22] INFO ( 1760): CORE3282: stdout: ejbCreate() on obj samples.jdbc.simple.ejb.GreeterDBBean@10613aa
    [05/Jan/2003:17:07:22] INFO ( 1760): CORE3282: stdout: ejbCreate() on obj samples.jdbc.simple.ejb.GreeterDBBean@1f52460
    [05/Jan/2003:17:07:22] INFO ( 1760): CORE5053: Application onReady complete.
    *********************** Client class
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import java.util.Properties;
    import java.util.Hashtable;
    import javax.ejb.*;
    import java.sql.*;
    import javax.sql.*;
    import samples.jdbc.simple.ejb.*;
    public class HelloClient {
         public static void main(String[] args) throws Exception {
    javax.ejb.Handle beanHandle;
    GreeterDBHome myGreeterDBHome;
    GreeterDB myGreeterDBRemote;
    InitialContext initContext = null;
    Hashtable env = new java.util.Hashtable(1);
    initContext = getContextInfo();
    String JNDIName = "java:comp/env/ejb/simpleHome";
    System.out.println("- Looking up: " + JNDIName);
    myGreeterDBHome = (GreeterDBHome) javax.rmi.PortableRemoteObject.narrow(initContext.lookup(JNDIName), GreeterDBHome.class);
    myGreeterDBRemote = myGreeterDBHome.create();
              String theMessage = myGreeterDBRemote.getGreeting();
    myGreeterDBRemote.remove();
         public static InitialContext getContextInfo() {
         InitialContext ctx = null;
         String url = "iiop://1st:3700";
         String fac = "com.sun.enterprise.naming.SerialInitContextFactory";
    try {
         Properties props = new Properties();
         props.put(Context.INITIAL_CONTEXT_FACTORY, fac);
         props.put(Context.PROVIDER_URL, url);
              ctx = new InitialContext(props);
         catch (NamingException ne){
    System.out.println("We were unable to get a connection to " +
    " the application server at " + url);
    ne.printStackTrace();
    return ctx;
    *********************** Running Client from command line
    C:\Sun\AppServer7\samples\jdbc\simple\assemble\jar>java HelloClient
    - Looking up: java:comp/env/ejb/simpleHome
    Exception in thread "main" javax.naming.NameNotFoundException: No object bound for java:comp/env/ejb/simpleHome
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at HelloClient.main(HelloClient.java:34)

  • Download Help?

    Hello,
    I'm new to the JAVA scene and have Three questions.
    1.I have Win XP home so is " NetBeans IDE v 3.5.1 with J2SE v 1.4.2 COBUNDLE" the right download?
    2.Is it possible to obtain a CD ROM of this software for my os type. And if so How?
    3.Is J2SE the platform I use to make Beginner level apps-advanced.?
    Never hurt's to be sure.

    I'm new to the JAVA scene I recommend you not use an Integrated Development Environment (IDE) to learn Java. NetBeans is a good IDE, but it hides WAY too much from you, and makes it VERY dificult to learn Java. Also, the learning curve using an IDE is steeper and longer, since you have to learn Java and the IDE at the same time. Write your own code using your favorite text or program editor. Learn the details of Java first; once you have a good grounding in the language, try an IDE - you'll better understand what it's doing, that way.
    1.I have Win XP home so
    3.Is J2SE the platform I use to make Beginner level
    apps-advanced.?If you don't use an IDE, the Java you want is this one:
    Go to http://java.sun.com/j2se/1.4.2/download.html
    and, in the first row under the heading Download J2SE v 1.4.2_0x, click on the word DOWNLOAD in the column labeled SDK. In a later page, pick the version for Windows.
    After downloading, go here and read through #6:
    http://java.sun.com/j2se/1.4.2/install-windows.html
    Install the software according to instructions. If you encounter problems, see the section "Troubleshooting the Installation" in the instructions.
    Below is a Helloworld program.
    -------HelloWorld.java--------
    public class HelloWorld
    public static void main (String[] args)
    System.out.println("Hello World!");
    Copy and paste it into your editor and save it as "HelloWorld.java" Use capitalization, Java is case-sensitive. If you're using Notepad, quote the name when saving, otherwise Notepad adds ".txt" to the name. Verify that you've got the file where you want it and that it's named correctly.
    Open a Command window by clicking the Windows Start button, Programs, MS-DOS Prompt in Windows 9x/ME, and Programs, Accessories, Command Prompt in Windows 2000 or XP.
    In the same folder as HelloWorld.java, enter javac - the program should print out a list of options starting with "Usage: javac..." If not, set your PATH - see below.
    Again in the same folder as HelloWorld.java, enter javac HelloWorld.java and the javac compiler will create HelloWorld.class. If it was successful it will not give any messages. Check that the file is created.
    Again in the same directory as HelloWorld.java, enter java -classpath . HelloWorld with the spaces and the period:
    java [sp] -classpath [sp][period][sp] Helloworld
    The program should run. If it doesn't, recheck that you followed the instructions.
    2.Is it possible to obtain a CD ROM of this software
    for my os type. And if so How?Yes, the Sun Starter Kit contains the SDK (and it contains much, much more! - 8 cd's for $30 (or 2 DVD's for $20) with lots of Sun software, both free and limited trials) and is at http://wwws.sun.com/software/sunone/starterkit/
    You can also buy books that include the SDK, although these are usually one or two releases behind.

  • Jndi-name in  Message Driven Bean

    Hi
    I have successfully created the ejb jar file for deployment using sun one studio . I created the message driven bean and I right clicked on the ejb and used the customize option to set the bean properties . But my problem is that the jndi-name in the <ejb> tags takes the value jms/(ejbname) instead of jms/(queuename) . I am attaching the xml file with this . Can any one tell how to set the jndi-name to queue value using studio
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd">
    <sun-ejb-jar>
    <enterprise-beans>
    <name>ejb</name>
    <ejb>
    <ejb-name>Suneesh</ejb-name>
    <jndi-name>jms/Suneesh</jndi-name> <resource-ref>
    <res-ref-name>QueueConnectionFactory</res-ref-name>
    <jndi-name>jms/QueueConnectionFactory</jndi-name>
    </resource-ref>
    <resource-env-ref>
    <resource-env-ref-name>TestQueue</resource-env-ref-name>
    <jndi-name>jms/TestQueue</jndi-name>
    </resource-env-ref>
    <pass-by-reference>false</pass-by-reference>
    </ejb>
    <ejb>
    <ejb-name>Suneesh1</ejb-name>
    <jndi-name>jms/Suneesh1</jndi-name>
    <resource-ref>
    <res-ref-name>QueueConnectionFactory</res-ref-name>
    <jndi-name>jms/QueueConnectionFactory</jndi-name>
    </resource-ref>
    <resource-env-ref>
    <resource-env-ref-name>TestQueue1</resource-env-ref-name>
    <jndi-name>jms/TestQueue1</jndi-name>
    </resource-env-ref>
    <pass-by-reference>false</pass-by-reference>
    </ejb>
    </enterprise-beans>
    </sun-ejb-jar>

    Hi Bhagya,
    Thanks for your response. I think from EJB container we can call Local EJBs with the full JNDI name. The session facade bean which is being called is a remote bean. From the session facade bean I am calling a local stateless session bean for database access. I am getting the reference of the local EJB from my session facade bean with full JNDI name "java:comp/env/ejb/EJBJNDIName". It is working fine with out any problem. My servicelocator is able to provide me the reference of the local EJB from the session facade remote bean with Full JNDI name. I am only having this problem calling from the MDB. I am really not sure whether what is causing it?
    Thanks
    Amit

  • Lbplugin not passing pages that end in .html through

    Hi,
    We are running SunOne 7.0 U2 webserver with the installed lbplugin for SUN Appserver (Glassfish). I've set up the loadbalancer.xml to pass the context root through to the appserver cluster, but any page in the war file that ends in .html is not passing through, but throwing a 404 error. It looks like the web server is looking locally for the files. I've tried everything I can think of to force it, but not sure what else to do. All images, etc. come through fine - just files ending in .html don't.
    I've made sure the plugin is at the top of the magnus.conf, the NameTrans directive is the first one in the server-obj.conf file, etc.
    Thanks!

    Thanks, tried that, but the same behavior persists. The log shows that the /ac2 path (weblogic) gave a 404 not found because it was handled by the JSP engine. Local JSPs work (this is with the ntrans-j2ee still in the default block).
    fine: Registering j2eeType=WebModule,name=//glassdev/,J2EEApplication=null,J2EEServer=none for null
    fine: Configuring default Resources
    fine: setName /com.sun.web-1/glassdev1
    fine: Register Realm com.sun.web-1:type=Realm,path=/,host=glassdev
    fine: valve parent=,path=/,host=glassdev com.sun.web-1:j2eeType=WebModule,name=//glassdev/,J2EEApplication=null,J2EEServer=none
    fine: valve objectname = com.sun.web-1:type=Valve,name=StandardContextValve,path=/,host=glassdev
    fine: Processed default web.xml /programs/sunone/70u2/https-glassdev/config/default-web.xml 505
    fine: debug reports: Entering into method : name_trans_lbplugin
    fine: debug reports: /WEB-INF/web.xml
    fine: debug reports: Exiting out of method : name_trans_lbplugin
    fine: PWC3013: Missing application web.xml, using defaults only StandardEngine[com.sun.web-1].StandardHost[glassdev].StandardContext[]
    fine: Bound StandardEngine[com.sun.web-1].StandardHost[glassdev].StandardContext[]
    fine: Creating JNDI naming context
    fine: Create/use TLD listener cache? false
    fine: Adding tld listeners:0
    fine: Registering com.sun.web-1:type=Manager,path=/,host=glassdev
    fine: Start: Loading persisted sessions
    fine: Posting standard context attributes
    fine: Configuring application event listeners
    fine: Sending application start events
    fine: Starting filters
    fine: debug reports: Entering into method : name_trans_lbplugin
    fine: debug reports: /
    fine: debug reports: Exiting out of method : name_trans_lbplugin
    fine: Checking for com.sun.web-1:j2eeType=WebModule,name=//glassdev/,J2EEApplication=null,J2EEServer=none
    fine: valve parent=,host=glassdev com.sun.web-1:type=Host,host=glassdev
    fine: valve objectname = com.sun.web-1:type=Valve,name=StandardHostValve,host=glassdev
    fine: valve parent= com.sun.web-1:type=Engine
    fine: valve objectname = com.sun.web-1:type=Valve,name=StandardEngineValve
    fine: Adding web module : context = , location = /local/htdocs
    fine: WebModule[/]: adding pattern "/" for resource "default"
    fine: WebModule[/]: adding pattern "*.jspx" for resource "jsp"
    fine: WebModule[/]: adding pattern "/servlet/*" for resource "invoker"
    fine: WebModule[/]: adding pattern "*.jsp" for resource "jsp"
    finefine: Waiting until the server is readySo I first try to request a JSP that is remote on Weblogic (this works if I comment out the NameTrans for ntrans-j2ee, but of course local jsps don't then)
    [15/Aug/2008:15:27:24] fine (14584) glassdev: debug reports: /ac2/wp-dyn/jsp/enc/html/perlBody.jsp
    [15/Aug/2008:15:27:24] fine (14584) glassdev: debug reports: Exiting out of method : name_trans_lbplugin
    [15/Aug/2008:15:27:24] fine (14584) glassdev: trying to GET /ac2/wp-dyn/jsp/enc/html/perlBody.jsp, ntrans-j2ee reports: mapped uri "/ac2/wp-dyn/jsp/enc/html/perlBody.jsp" in context "" to resource "jsp"
    [15/Aug/2008:15:27:24] fine (14584) glassdev: debug reports: Entering into method : name_trans_lbplugin
    [15/Aug/2008:15:27:24] fine (14584) glassdev: debug reports: /ac2/wp-dyn/jsp/enc/html/perlBody.jsp
    [15/Aug/2008:15:27:24] fine (14584) glassdev: debug reports: Exiting out of method : name_trans_lbplugin
    [15/Aug/2008:15:27:24] fine (14584) glassdev: trying to GET /ac2/wp-dyn/jsp/enc/html/perlBody.jsp, ntrans-j2ee reports: mapped uri "/ac2/wp-dyn/jsp/enc/html/perlBody.jsp" in context "" to resource "jsp"
    [15/Aug/2008:15:27:24] failure (14584) glassdev: for host 172.16.55.136 trying to GET /ac2/wp-dyn/jsp/enc/html/perlBody.jsp, service-j2ee reports: PWC6117: File "/ac2/wp-dyn/jsp/enc/html/perlBody.jsp" not foundBut local JSPs still work and other requests (not ending in .jsp) to Glassfish also work
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: Entering into method : name_trans_lbplugin
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: /wp-adv/jobs4/empty.jsp
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: Exiting out of method : name_trans_lbplugin
    [15/Aug/2008:15:27:43] fine (14584) glassdev: for host 172.16.55.136 trying to GET /wp-adv/jobs4/empty.jsp, ntrans-j2ee reports: mapped uri "/wp-adv/jobs4/empty.jsp" in context "" to resource "jsp"
    [15/Aug/2008:15:27:43] fine (14584) glassdev: for host 172.16.55.136 trying to GET /wp-adv/jobs4/empty.jsp, service-j2ee reports: context=[StandardEngine[com.sun.web-1].StandardHost[glassdev].StandardContext[]] contextPath=[] wrapper=[StandardEngine[com.sun.web-1].StandardHost[glassdev].StandardContext[].StandardWrapper[jsp]] servletPath=[/wp-adv/jobs4/empty.jsp] pathInfo=[null]
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: Entering into method : name_trans_lbplugin
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: /wp-adv/jobs4/empty.jsp
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: Exiting out of method : name_trans_lbplugin
    [15/Aug/2008:15:27:43] fine (14584) glassdev: trying to GET /wp-adv/jobs4/empty.jsp, ntrans-j2ee reports: mapped uri "/wp-adv/jobs4/empty.jsp" in context "" to resource "jsp"
    [15/Aug/2008:15:27:43] fine (14584) glassdev: for host 172.16.55.136 trying to GET /wp-adv/jobs4/empty.jsp, service-j2ee reports: JspEngine --> [/wp-adv/jobs4/empty.jsp] ServletPath: [/wp-adv/jobs4/empty.jsp] PathInfo: [null] RealPath: [/local/htdocs/dev/wp-adv/jobs4/empty.jsp] RequestURI: [/wp-adv/jobs4/empty.jsp] QueryString: [null]
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: Entering into method : name_trans_lbplugin
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: /wp-adv/jobs4/empty.jsp
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: Exiting out of method : name_trans_lbplugin
    [15/Aug/2008:15:27:43] fine (14584) glassdev: trying to GET /wp-adv/jobs4/empty.jsp, ntrans-j2ee reports: mapped uri "/wp-adv/jobs4/empty.jsp" in context "" to resource "jsp"
    [15/Aug/2008:15:27:43] fine (14584): Updating accelerator cache
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: Entering into method : name_trans_lbplugin
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: /wp-adv/jobs4/empty.jsp
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: Exiting out of method : name_trans_lbplugin
    [15/Aug/2008:15:27:43] fine (14584) glassdev: trying to GET /wp-adv/jobs4/empty.jsp, ntrans-j2ee reports: mapped uri "/wp-adv/jobs4/empty.jsp" in context "" to resource "jsp"
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: Entering into method : name_trans_lbplugin
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: /wp-adv/jobs4/empty.css
    [15/Aug/2008:15:27:43] fine (14584) glassdev: debug reports: Exiting out of method : name_trans_lbplugin
    [15/Aug/2008:15:27:43] warning (14584) glassdev: for host 172.16.55.136 trying to GET /wp-adv/jobs4/empty.css, send-file reports: HTTP4142: can't find /local/htdocs/dev/wp-adv/jobs4/empty.css (File not found)
    [15/Aug/2008:15:27:44] fine (14584): Updating accelerator cache
    [15/Aug/2008:15:27:49] fine (14584) glassdev: debug reports: Entering into method : name_trans_lbplugin
    [15/Aug/2008:15:27:49] fine (14584) glassdev: debug reports: /gog/index.html
    [15/Aug/2008:15:27:49] fine (14584) glassdev: debug reports: Exiting out of method : name_trans_lbplugin
    [15/Aug/2008:15:27:49] fine (14584) glassdev: debug reports: Entering into method : service_lbplugin
    [15/Aug/2008:15:27:49] fine (14584) glassdev: debug reports: BXKh
    [15/Aug/2008:15:27:49] info (14584) glassdev:  reports: lb.monitor: RNTM2901: RequestStart Sticky 00001218828469048497000760512 1218814069048 http://glassdev.digitalink.com/gog/index.html
    [15/Aug/2008:15:27:49] fine (14584): Updating accelerator cache
    [15/Aug/2008:15:27:53] info (14584):  reports: lb.monitor: HLCK1006: UnhealthyInstances GoG 1218814073080 NoUnhealthyInstances
    [15/Aug/2008:15:27:54] fine (14584): reaping 1 keep-alive connections
    [15/Aug/2008:15:27:57] info (14584) glassdev:  reports: lb.monitor: RNTM2904: RequestExit Sticky 00001218828469048497000760512 1218814077881 http://glassdev.digitalink.com/gog/index.html http://fishdev1:38080 8833
    [15/Aug/2008:15:27:57] fine (14584) glassdev: debug reports: Exiting out of method : service_lbplugin
    [15/Aug/2008:15:27:58] fine (14584) glassdev: debug reports: Entering into method : name_trans_lbplugin
    [15/Aug/2008:15:27:58] fine (14584) glassdev: debug reports: /gog/css/gog-movie-trailers.css
    [15/Aug/2008:15:27:58] fine (14584) glassdev: debug reports: Exiting out of method : name_trans_lbplugin
    [15/Aug/2008:15:27:58] fine (14584) glassdev: debug reports: Entering into method : service_lbplugin
    [15/Aug/2008:15:27:58] fine (14584) glassdev: debug reports: BXKhSo to test what I experienced with files ending in .html searching the server root instead of the doc root (which is why I added the htdocs object block), I created the directory structure off the root of the system and put the text "test" in the perlBody.jsp file:
    bash-3.00# pwd
    /ac2/wp-dyn/jsp/enc/html
    bash-3.00# ls -al
    total 6
    drwxr-xr-x   2 root     root         512 Aug 15 15:36 .
    drwxr-xr-x   3 root     root         512 Aug 15 15:36 ..
    -rw-r--r--   1 root     root           5 Aug 15 15:36 perlBody.jsp
    bash-3.00# cat perlBody.jsp
    test and hit the URL again and what should appear in my browser? Not a "not found", but "test". So this definitely looks like a bug in both the SHTML processing and proxy plugin processing.
    [15/Aug/2008:15:36:55] fine (14584) glassdev: trying to GET /ac2/wp-dyn/jsp/enc/html/perlBody.jsp, ntrans-j2ee
    reports: mapped uri "/ac2/wp-dyn/jsp/enc/html/perlBody.jsp" in context "" to resource "jsp"
    [15/Aug/2008:15:36:55] fine (14584) glassdev: debug reports: Entering into method : name_trans_lbplugin
    [15/Aug/2008:15:36:55] fine (14584) glassdev: debug reports: /ac2/wp-dyn/jsp/enc/html/perlBody.jsp
    [15/Aug/2008:15:36:55] fine (14584) glassdev: debug reports: Exiting out of method : name_trans_lbplugin
    [15/Aug/2008:15:36:55] fine (14584) glassdev: trying to GET /ac2/wp-dyn/jsp/enc/html/perlBody.jsp, ntrans-j2ee
    reports: mapped uri "/ac2/wp-dyn/jsp/enc/html/perlBody.jsp" in context "" to resource "jsp"
    [15/Aug/2008:15:36:55] fine (14584) glassdev: debug reports: Entering into method : name_trans_lbplugin
    [15/Aug/2008:15:36:55] fine (14584) glassdev: debug reports: /WEB-INF/tagPlugins.xml
    [15/Aug/2008:15:36:55] fine (14584) glassdev: debug reports: Exiting out of method : name_trans_lbplugin
    [15/Aug/2008:15:36:55] fine (14584) glassdev: for host 172.16.55.136 trying to GET /ac2/wp-dyn/jsp/enc/html/pe
    rlBody.jsp, service-j2ee reports: Generated /programs/sunone/70u2/https-glassdev/generated/glassdev/default-we
    bapp//org/apache/jsp/ac2/wp_002ddyn/jsp/enc/html/perlBody_jsp.java total=276 generate=73 validate=192
    [15/Aug/2008:15:36:55] fine (14584) glassdev: for host 172.16.55.136 trying to GET /ac2/wp-dyn/jsp/enc/html/pe
    rlBody.jsp, service-j2ee reports: Using classpath: /programs/sunone/70u2/lib/webserv-rt.jar:/programs/sunone/7
    0u2/lib/pwc.jar:/programs/sunone/70u2/lib/ant.jar:/programs/sunone/70u2/jdk/lib/tools.jar:/programs/sunone/70u
    2/lib/ktsearch.jar:/programs/sunone/70u2/lib/webserv-jstl.jar:/programs/sunone/70u2/lib/jsf-impl.jar:/programs
    /sunone/70u2/lib/jsf-api.jar:/programs/sunone/70u2/lib/webserv-jwsdp.jar:/programs/sunone/70u2/lib/container-a
    uth.jar:/programs/sunone/70u2/lib/mail.jar:/programs/sunone/70u2/lib/activation.jar::/programs/sunone/70u2/htt
    ps-glassdev/generated/glassdev/default-webapp:/programs/sunone/70u2/lib/webserv-rt.jar:/programs/sunone/70u2/l
    ib/pwc.jar:/programs/sunone/70u2/lib/ant.jar:/programs/sunone/70u2/jdk/lib/tools.jar:/programs/sunone/70u2/lib
    /ktsearch.jar:/programs/sunone/70u2/lib/webserv-jstl.jar:/programs/sunone/70u2/lib/jsf-impl.jar:/programs/suno
    ne/70u2/lib/jsf-api.jar:/programs/sunone/70u2/lib/webserv-jwsdp.jar:/programs/sunone/70u2/lib/container-auth.j
    ar:/programs/sunone/70u2/lib/mail.jar:/programs/sunone/70u2/lib/activation.jar:/programs/sunone/70u2/https-gla
    ssdev/config/:/programs/sunone/70u2/jdk/jre/lib/ext/dnsns.jar:/programs/sunone/70u2/jdk/jre/lib/ext/sunjce_pro
    vider.jar:/programs/sunone/70u2/jdk/jre/lib/ext/localedata.jar:/programs/sunone/70u2/jdk/jre/lib/ext/sunpkcs11
    .jar
    [15/Aug/2008:15:36:57] fine (14584) glassdev: for host 172.16.55.136 trying to GET /ac2/wp-dyn/jsp/enc/html/pe
    rlBody.jsp, service-j2ee reports: Compiled /programs/sunone/70u2/https-glassdev/generated/glassdev/default-web
    app//org/apache/jsp/ac2/wp_002ddyn/jsp/enc/html/perlBody_jsp.java 1890ms

  • Error when calling ejb.create() call

    Hi Folks,
    I am trying to create a simple CMP bean with J2EE1.4 but when I call ejb.create I get the following exception :-
    Exception in thread "main" java.rmi.ServerException: RemoteException occurred in
    server thread; nested exception is:
    java.rmi.RemoteException
    at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemExceptio
    n(Unknown Source)
    at javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
    at com.titan.customer._CustomerHomeRemote_Stub.create(Unknown Source)
    at Client.main(Client.java:20)
    Caused by: java.rmi.RemoteException
    at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.ja
    va:195)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:73
    9)
    at com.titan.customer.CustomerBean_986018080_ConcreteImpl_RemoteHomeImpl
    .create(CustomerBean_986018080_ConcreteImpl_RemoteHomeImpl.java:38)
    at com.titan.customer._CustomerBean_986018080_ConcreteImpl_RemoteHomeImp
    l_Tie._invoke(Unknown Source)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
    tchToServant(CorbaServerRequestDispatcherImpl.java:648)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
    tch(CorbaServerRequestDispatcherImpl.java:191)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
    Request(CorbaMessageMediatorImpl.java:1655)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
    (CorbaMessageMediatorImpl.java:1514)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
    orbaMessageMediatorImpl.java:896)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
    back(RequestMessage_1_2.java:172)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
    (CorbaMessageMediatorImpl.java:668)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatc
    h(SocketOrChannelConnectionImpl.java:352)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(So
    cketOrChannelConnectionImpl.java:261)
    at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadI
    mpl.java:73)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
    run(ThreadPoolImpl.java:382)
    Bean code :-
    package com.titan.customer;
    import javax.ejb.EntityContext;
    public abstract class CustomerBean implements javax.ejb.EntityBean {
    public Integer ejbCreate(Integer id) {
    setId(id);
    return id;
    public void ejbPostCreate() {
    //abstract methods
    public abstract Integer getId();
    public abstract void setId(Integer Id);
    public abstract String getLastName();
    public abstract void setLastName(String lastName );
    public abstract String getFirstName();
    public abstract void setFirstName(String firstName);
    public void setEntityContext(EntityContext ec) {}
    public void unsetEntityContext() {}
    public void ejbLoad() {}
    public void ejbStore() {}
    public void ejbActivate() {}
    public void ejbPassivate() {}
    public void ejbRemove() {}
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    <display-name>CustomerBean</display-name>
    <enterprise-beans>
    <entity>
    <ejb-name>CustomerBean</ejb-name>
    <home>com.titan.customer.CustomerHomeRemote</home>
    <remote>com.titan.customer.CustomerRemote</remote>
    <ejb-class>com.titan.customer.CustomerBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>false</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CustomerBean</abstract-schema-name>
    <cmp-field>
    <description>no description</description>
    <field-name>firstName</field-name>
    </cmp-field>
    <cmp-field>
    <description>no description</description>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <description>no description</description>
    <field-name>lastName</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <security-identity>
    <use-caller-identity/>
    </security-identity>
    </entity>
    </enterprise-beans>
    </ejb-jar>
    sun cmp mapping
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-cmp-mappings PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-cmp-mapping.dtd">
    <sun-cmp-mappings>
    <sun-cmp-mapping>
    <schema>CustomerBean_jar</schema>
    <entity-mapping>
    <ejb-name>CustomerBean</ejb-name>
    <table-name>CUSTOMERBEAN</table-name>
    <cmp-field-mapping>
    <field-name>firstName</field-name>
    <column-name>CUSTOMERBEAN.FIRSTNAME</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>id</field-name>
    <column-name>CUSTOMERBEAN.ID</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>lastName</field-name>
    <column-name>CUSTOMERBEAN.LASTNAME</column-name>
    </cmp-field-mapping>
    </entity-mapping>
    </sun-cmp-mapping>
    </sun-cmp-mappings>
    sun-ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
    <sun-ejb-jar>
    <enterprise-beans>
    <name>CustomerBean</name>
    <unique-id>579688304</unique-id>
    <ejb>
    <ejb-name>CustomerBean</ejb-name>
    <jndi-name>CustomerBean</jndi-name>
    </ejb>
    <pm-descriptors/>
    <cmp-resource>
    <jndi-name>jdbc/Vineeth</jndi-name>
    <create-tables-at-deploy>true</create-tables-at-deploy>
    <drop-tables-at-undeploy>true</drop-tables-at-undeploy>
    <schema-generator-properties>
    <property>
    <name>use-unique-table-names</name>
    <value>true</value>
    </property>
    <property>
    <name>java-to-database</name>
    <value>true</value>
    </property>
    </schema-generator-properties>
    </cmp-resource>
    </enterprise-beans>
    </sun-ejb-jar>
    Can someone please help me out with this...this is a bit urgent..
    Thanks

    It seems that u need a ejbPostCreate with the same parameters as ejbCreate:
    public Integer ejbCreate(Integer id) {
    setId(id);
    return id;
    public void ejbPostCreate(Integer id) {
    }

  • Oracle Service Bus  - WS Policy

    Hello everybody
    I have the following problem:
    I have a Proxy Service of OSB and I call from JDeveloper withouth problem. Also I can execute the proxy
    When I add the policie Auth.xml I can't execute proxy service and I get the following problem: BEA-380001
    and When I call the proxy service from jdeveloper 11, I can't because the policies of OSB is WL9.x and JAX-WS don't support
    What am I doing?
    I hope your help
    Thanks
    Jose Luis

    Thanks jvanacht, it indeed does work!
    After simply enabling SSL in weblogic our SOAPUI request which was replying with the following is now correctly responding:
    <faultstring>weblogic.wsee.server.ServerURLNotFoundException: Cannot resolve URL for protocol http/https</faultsting>
    We have a SunOne (iPlanet) Web Server proxying requests on HTTPS via the wls plugin to the WLS server.
    Thanks Again,
    Sham

  • Can't get MEJB with J2EE1.4 Ref Impl

    Hello,
    I'm trying to obtain the Management EJB with the J2EE 1.4 Reference Implementation but I am receiving a ClassCastException. Is this not implemented to JSR 77 spec yet? Here is my code snippet:
    String MEJB = "ejb/mgmt/MEJB";
    ManagementHome managementHome = null;
    Context context = new InitialContext();
    Object obj = context.lookup(MEJB);
    // this next line causes the Exception -- I investigated and the 'obj' is a sun CORBA object WHY?
    managementHome = (ManagementHome)PortableRemoteObject.narrow(obj,ManagementHome.class);
    Thanks
    Mark Lepak

    OK here is the info for accessing MEJB using a jsp thru j2ee web module.
    01. create index.jsp
    <%@ page import='javax.naming.*' %>
    <%@ page import='javax.rmi.PortableRemoteObject' %>
    <%@ page import='javax.management.j2ee.ManagementHome' %>
    <%@ page import='javax.management.j2ee.Management' %>
    <%@ page import='javax.management.*' %>
    <%= "start mejbJsp <br>" %>
    <%
    Management mejb = null;
    try {
    InitialContext ic = new InitialContext();
    out.println("in mejbJSP: obtained ic ...<br>");
    Object objRef = ic.lookup("ejb/mgmt/MEJB");
    out.println("in mejbJSP: objRef = " + objRef + " <br>");
    ManagementHome home =
    (ManagementHome)PortableRemoteObject.narrow(objRef,
    ManagementHome.class);
    out.println("in mejbJSP: home = " + home + " <br>");
    mejb = home.create();
    out.println("in mejbJSP: MEJB default domain = " +
    mejb.getDefaultDomain() + " <br>");
    } catch (Exception ex) {
    out.println(ex.getMessage());
    %>
    <%= "end mejbJsp <br>" %>
    02. Since MEJB is secured we need to provide the corresponding security info in the descriptors . Following are the sample descriptor entries which include security and basic authentication.
    02.01. web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <description>no description</description>
    <display-name>mejbJsp</display-name>
    <servlet>
    <description>mejb jsp example</description>
    <display-name>mejbJsp</display-name>
    <servlet-name>mejbJsp</servlet-name>
    <jsp-file>/index.jsp</jsp-file>
    </servlet>
    <ejb-ref>
    <ejb-ref-name>ejbs/mejb</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>javax.management.j2ee.ManagementHome</home>
    <remote>javax.management.j2ee.Management</remote>
    <ejb-link>MEjbBean</ejb-link>
    </ejb-ref>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Basic Realm</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>admin-role</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Basic Realm</realm-name>
    </login-config>
    <security-role>
    <description>The admin role</description>
    <role-name>admin-role</role-name>
    </security-role>
    </web-app>
    02.02. sun-web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd">
    <sun-web-app>
    <context-root>mejbjsp</context-root>
    <class-loader delegate='true'/>
    <ejb-ref>
    <ejb-ref-name>ejbs/mejb</ejb-ref-name>
    <jndi-name>ejb/mgmt/MEJB</jndi-name>
    </ejb-ref>
    <security-role-mapping>
    <role-name>admin-role</role-name>
    <group-name>asadmin</group-name>
    </security-role-mapping>
    </sun-web-app>
    03. Package the above into a war module and deploy it.
    asadmin> deploy mejb_jsp.war
    04. Invoke the jsp using a web browser, say http://<host-name>:<port>/mejbjsp
    When login window pops up, you may enter user name and password which has asadmin role.

  • Can't deploy Simple 2.0 CMP Entity Bean into Sun One Server 7

    Dear all:
    I use JBuilder9 + SunOne Plug-in to
    build a Simple Entity Bean, but I can't
    deploy it into SunOne 7 Server that return
    error message:
    Deployment Error -- Error while running ejbc -- Fatal Error from EJB Compiler -- -- Error while processing CMP beans.
    But I use JBuilder9 + JBoss 3.x Plug-in
    that corrent run on JBoss 3.2 RC
    All code are generated by JBuilder9 EJB Designer
    and only have PK finder.
    Our deploy description flile are:
    ejb-jar.xml=============================
    <?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>
    <enterprise-beans>
    <entity>
    <display-name>Enterprise1</display-name>
    <ejb-name>Enterprise1</ejb-name>
    <home>untitled1.Enterprise1RemoteHome</home>
    <remote>untitled1.Enterprise1Remote</remote>
    <local-home>untitled1.Enterprise1Home</local-home>
    <local>untitled1.Enterprise1</local>
    <ejb-class>untitled1.Enterprise1Bean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>untitled1.Enterprise1PK</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Enterprise1</abstract-schema-name>
    <cmp-field>
    <field-name>inDate</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>sndSeq</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>msgSnd</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>msgRcv</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>brkId</field-name>
    </cmp-field>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>Enterprise1</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    =================================
    sun-ejb-jar.xml=====================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
    <sun-ejb-jar>
    <enterprise-beans>
    <ejb>
    <ejb-name>Enterprise1</ejb-name>
    <jndi-name>Enterprise1Remote</jndi-name>
    </ejb>
    <pm-descriptors>
    <pm-descriptor>
    <pm-identifier>IPLANET</pm-identifier>
    <pm-version>1.0</pm-version>
    <pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
    <pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
    </pm-descriptor>
    <pm-inuse>
    <pm-identifier>IPLANET</pm-identifier>
    <pm-version>1.0</pm-version>
    </pm-inuse>
    </pm-descriptors>
    <cmp-resource>
    <jndi-name>jdo/sample-cmp</jndi-name>
    <default-resource-principal>
    <name>mv01</name>
    <password>mv01</password>
    </default-resource-principal>
    </cmp-resource>
    </enterprise-beans>
    </sun-ejb-jar>
    ===========================
    sun-cmp-mappings.xml===============
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp-mapping_1_0.dtd'>
    <sun-cmp-mappings>
    <sun-cmp-mapping>
    <schema>META-INF/mySchema</schema>
    <entity-mapping>
    <ejb-name>Enterprise1</ejb-name>
    <table-name>TSE_MSG_T</table-name>
    <cmp-field-mapping>
    <field-name>inDate</field-name>
    <column-name>INDATE</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>sndSeq</field-name>
    <column-name>SNDSEQ</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>msgSnd</field-name>
    <column-name>MSGSND</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>msgRcv</field-name>
    <column-name>MSGRCV</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>brkId</field-name>
    <column-name>BRKID</column-name>
    </cmp-field-mapping>
    </entity-mapping>
    </sun-cmp-mapping>
    </sun-cmp-mappings>
    =========================

    I remember getting errors like that. The only thing I see is in the map file. When I
    did mine I used TABLENAME.CMPFIELD to map columns to CMP attributes.
    TSE_MSG_T.INDATE
    TSE_MSG_T.SNDSEQ
    for column names in the sun-cmp-mappings.xml file.
    For any other errors set the logging for server1 or which one you are using to "finest".
    Try the deploy, shut down the server, and when you view the log, start at the bottom
    and keep scrolling up to the top of each stack trace and you should get a more
    specific error explanation at about the 3rd or 4th stack trace.

  • Deploy EJB Failed

    Hi, Dear All:
    I caught this error while I was deploying a EJB to a Sun one 8 application server.
    [|[#|2004-06-24T12:52:18.927+1000|SEVERE|sun-appserver-pe8.0|javax.enterprise.system.tools.deployment|_ThreadID=14;|Caught java.lang.RuntimeException while processing CMP beans for application [wsc]; module [uidgen-ejb.jar]: JDO71002: The schema file wsc_uidgen-ejb, does not contain a table named Counter. See log for details.
    java.lang.RuntimeException: JDO71002: The schema file wsc_uidgen-ejb, does not contain a table named Counter
         at com.sun.jdo.api.persistence.mapping.ejb.MappingFile.intoMappingClasses(MappingFile.java:160)
         at com.sun.jdo.spi.persistence.support.ejb.ejbc.MappingGenerator.loadMappingClasses(MappingGenerator.java:429)
         at com.sun.jdo.spi.persistence.support.ejb.ejbc.MappingGenerator.generateMapping(MappingGenerator.java:267)
         at com.sun.jdo.spi.persistence.support.ejb.ejbc.JDOCodeGenerator.loadOrCreateMappingClasses(JDOCodeGenerator.java:500)
         at com.sun.jdo.spi.persistence.support.ejb.ejbc.JDOCodeGenerator.init(JDOCodeGenerator.java:145)
         at com.sun.jdo.spi.persistence.support.ejb.ejbc.JDOCodeGenerator.init(JDOCodeGenerator.java:118)
         at com.sun.ejb.codegen.CmpCompiler.compile(CmpCompiler.java:143)
         at com.sun.ejb.codegen.IASEJBC.doCompile(IASEJBC.java:617)
         at com.sun.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:565)
         at com.sun.enterprise.deployment.backend.EJBCompiler.preDeployApp(EJBCompiler.java:360)
         at com.sun.enterprise.deployment.backend.EJBCompiler.compile(EJBCompiler.java:208)
         at com.sun.enterprise.deployment.backend.AppDeployer.runEJBC(AppDeployer.java:292)
         at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:173)
         at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:105)
         at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:124)
         at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:74)
         at com.sun.enterprise.deployment.phasing.DeploymentService.executePhases(DeploymentService.java:233)
         at com.sun.enterprise.deployment.phasing.DeploymentService.deploy(DeploymentService.java:150)
         at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:275)
         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:324)
         at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:287)
         at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:280)
         at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:221)
         at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:228)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:823)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
         at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54)
         at $Proxy1.invoke(Unknown Source)
         at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:282)
         at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:38)
         at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:92)
         at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:69)
         at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:768)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:102)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:192)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:261)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:583)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:200)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:180)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:582)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:161)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:979)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:692)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:647)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:691)
         at java.lang.Thread.run(Thread.java:534)
    |#]
    Please Note that I wrote the Sun one cmp mappings by myself, and the mapping files is like:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-cmp-mappings_1_1.dtd">
    <sun-cmp-mappings>
         <sun-cmp-mapping>
              <schema/>
              <entity-mapping>
                   <ejb-name>CounterEJB</ejb-name>
                   <table-name>Counter</table-name>
                   <cmp-field-mapping>
                        <field-name>name</field-name>
                        <column-name>Counter.Name</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>counter</field-name>
                        <column-name>Counter.CounterValue</column-name>
                   </cmp-field-mapping>
              </entity-mapping>
         </sun-cmp-mapping>
    </sun-cmp-mappings>
    Could Anybody help?
    Thanks

    Looking a the sun-cmp-mapping.xml file that you show, the <schema> element is empty thus leaving the creation of the dbschema file to be generated during deployment. Does your XP box point to the same DB? Are the DB tables created prior to deployment of the app?

Maybe you are looking for

  • Multiple problems: OfficeJet Pro 8000 Wireless

    We bought an HP OfficeJet Pro Wireless for our two Macs and it's been a nightmare. I've searched help guides and forums and am hoping you can help me fix the problems. It takes 10 minutes to start up the printer each time. There is a lot whirring and

  • Geforce 6800 Ultra - output only video to TV

    I just bought a new Geforce 6800 Ultra and I'm a little confused about the settings for TV output via the s-video cable. Is it possible to have only the video I'm watching zoomed full screen on the TV? Currently I'm only able to get the desktop shown

  • Program to cancel xml message with status error or schedule ?

    Hi, Any program that can cancel xml message base on period. because i have about 100 thousand unuse xml message that accidentaly generated. because it is too long if i need to cancel 1 by one. Regards Fernand

  • Safari crashes on reset

    Hello Ever since installing OSX 10.9.2, I have been getting the continuous beachball when resetting safari (v 7.0.2) and having to force quit the app. I've tried deleting caches and .plists as referred to in other related threads but these have not h

  • XSD Validation with ABAP XML Parser?

    Hello there, i'm loading xml files into a R/3 System. This all works fine with the standard XML Parser. The XML Files are based on a .xsd structure that is assigned to each file with a external link. To be sure that the xml document conforms to this