EJB and Web tutorial 3.0 --> deplyment error

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

EJB and Web tutorial 3.0 --> deplyment error

joquetaire
hi all,

i've tried to run the tutorial on accessing EJB inWeb application but got the error while deploying the Web part

the tutorial is located:
https://cwiki.apache.org/GMOxDOC30/accessing-ejb-in-web-applications.html
(Home > Apache Geronimo v3.0 > Documentation > Developing > Tutorials > Developing Web applications > Accessing EJB in Web applications)

server seems to work fine - SDK, Eclipse, GEP, Geronimo

server: Debian
version: 2.22.3

$ java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)

geronimo-jetty8-javaee6-3.0-M1

eclipse-jee-helios-SR2-linux-gtk

Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 2
Build id: 20110218-0911

Apache Geronimo v3.0 Server Adapter
Version: 3.0.0-20100706214934


all files in 2 projects of the tutorial are presented below (tried to follow the tutorial 'a la lettre')

--> Converter.java

package ejb;

import java.math.BigDecimal;
import javax.ejb.Remote;

@Remote
public interface Converter {

        public BigDecimal dollarToRupees(BigDecimal dollars);

        public BigDecimal rupeesToEuro(BigDecimal rupees);
}


--> ConverterBean.java

package ejb;

import java.math.BigDecimal;
import javax.ejb.*;

@Stateless
public class ConverterBean implements Converter {

        private BigDecimal rupeeRate = new BigDecimal("40.58");
        private BigDecimal euroRate = new BigDecimal("0.018368");

        public BigDecimal dollarToRupees(BigDecimal dollars) {
                BigDecimal result = dollars.multiply(rupeeRate);
                return result.setScale(2, BigDecimal.ROUND_UP);
        }

        public BigDecimal rupeesToEuro(BigDecimal rupees) {
                BigDecimal result = rupees.multiply(euroRate);
                return result.setScale(2, BigDecimal.ROUND_UP);
        }
}


--> ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
        version="3.1">
  <display-name>CurrencyConvertEJB</display-name>
</ejb-jar>


--> openejb-jar.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ejb:openejb-jar
        xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
        xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0"
        xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
        xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
        xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
        xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0"
        xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2"
        xmlns:pers="http://java.sun.com/xml/ns/persistence"
        xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
        xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
        xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
    <dep:environment>
        <dep:moduleId>
            <dep:groupId>default</dep:groupId>
            <dep:artifactId>CurrencyConverterEJB</dep:artifactId>
            <dep:version>1.0</dep:version>
            <dep:type>car</dep:type>
        </dep:moduleId>
    </dep:environment>
</ejb:openejb-jar>


--> index.jsp

<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Converter</title>
</head>
<body bgcolor="white">

Converter

<hr />
<p>Enter an amount to convert:</p>
<form method="get" action="index.jsp">
        <input type="text" name="amount" size="25" /><br />
        <p>
        <input type="submit" value="Submit" />

        <input type="reset" value="Reset" />
        </p>
</form>

<jsp:include page="/ConverterHandler" />

</body>

</html>


--> ConverterHandler.java

package webejb;

import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigDecimal;

import javax.ejb.EJB;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import ejb.Converter;

/**
 * Servlet implementation class ConverterHandler
 */
@WebServlet("/ConverterHandler")
public class ConverterHandler extends HttpServlet {
        private static final long serialVersionUID = 1L;
       
        @EJB(name = "ejb/Converter")
        private Converter converter;
   
    /**
     * @see HttpServlet#HttpServlet()
     */
    public ConverterHandler() {
       
    super();
    }

        /**
         * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
         */
        protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

                PrintWriter out = response.getWriter();
                String amount = request.getParameter("amount");
                if (amount != null && amount.length() > 0) {
                        BigDecimal d = new BigDecimal(amount);
                        BigDecimal rupeeAmount = converter.dollarToRupees(d);
                        out.println("<p>" + amount + " Dollars are " + rupeeAmount + " Rupees.<p>");
                        BigDecimal euroAmount = converter.rupeesToEuro(rupeeAmount);
                        out.println(amount + " Dollars are " + euroAmount + " Euro.");
                }
        }

        /**
         * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
         */
        protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
               
                doGet(request, response);
        }

}


--> web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
  <display-name>WebEJB</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
</web-app>


--> geronimo-web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" 
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2" 
xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" 
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">

    <sys:environment>
        <sys:moduleId>
            <sys:groupId>default</sys:groupId>
            <sys:artifactId>WebEJB</sys:artifactId>
            <sys:version>1.0</sys:version>
            <sys:type>car</sys:type>
        </sys:moduleId>
        <sys:dependencies>
            <sys:dependency>
                <sys:groupId>default</sys:groupId>
                    <sys:artifactId>CurrencyConvertEJB</sys:artifactId>
         <sys:version>1.0</sys:version>
         <sys:type>car</sys:type>
            </sys:dependency>       
        </sys:dependencies>
    </sys:environment>

    <context-root>/WebEJB</context-root>

    <nam:ejb-ref xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
        <nam:ref-name>ejb/Converter</nam:ref-name>
        <nam:pattern>
            <nam:groupId>default</nam:groupId>
            <nam:artifactId>CurrencyConvertEJB</nam:artifactId>
            <nam:version>1.0</nam:version>
            <nam:name>ConverterBean</nam:name>
        </nam:pattern>
    </nam:ejb-ref>

</web-app>


--> Error Message Box

'Publishing to Apache Geronimo v3.0 Server at localhost...' has encouterred a problem.

NLS missing message: DISTRIBUTE_FAIL in: org.apache.geronimo.st.v30.core.internal.Messages
Classloader for nullcan't find Could not fully load class: webejb.ConverterHandler
 due to:Lejb/Converter;
 in classLoader:
412.0
org.apache.geronimo.common.DeploymentException: Classloader for nullcan't find Could not fully load class: webejb.ConverterHandler
 due to:Lejb/Converter;
 in classLoader:
412.0
        at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:678)
        at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:623)
        at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.configureBasicWebModuleAttributes(AbstractWebModuleBuilder.java:700)
        at org.apache.geronimo.jetty8.deployment.JettyModuleBuilder.addGBeans(JettyModuleBuilder.java:482)
        at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:175)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:690)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:250)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:138)
        at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:856)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
        at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:344)
        at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:856)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
        at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: Could not fully load class: webejb.ConverterHandler
 due to:Lejb/Converter;
 in classLoader:
412.0
        at org.apache.xbean.finder.ClassFinder.<init>(ClassFinder.java:161)
        at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:676)
        ... 44 more


--> Console

2011-04-21 01:54:36,567 ERROR [DependencyManager] Could not install bundle dependecy
org.osgi.framework.BundleException: Unable to cache bundle: mvn:default/CurrencyConvertEJB/1.0/car
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2378)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2334)
        at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
        at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:108)
        at org.apache.geronimo.system.configuration.DependencyManager.starting(DependencyManager.java:182)
        at org.apache.geronimo.system.configuration.DependencyManager.bundleChanged(DependencyManager.java:89)
        at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:800)
        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:728)
        at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3612)
        at org.apache.felix.framework.Felix.activateBundle(Felix.java:1750)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1682)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
        at org.apache.geronimo.deployment.DeploymentContext.createTempConfiguration(DeploymentContext.java:202)
        at org.apache.geronimo.deployment.DeploymentContext.initializeConfiguration(DeploymentContext.java:188)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:606)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:250)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:138)
        at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:856)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
        at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:344)
        at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:856)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
        at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: URL [mvn:default/CurrencyConvertEJB/1.0/car] could not be resolved.
        at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)
        at org.apache.felix.framework.util.SecureAction.getURLConnectionInputStream(SecureAction.java:487)
        at org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:163)
        at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:80)
        at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:58)
        at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:1020)
        at org.apache.felix.framework.cache.BundleArchive.revise(BundleArchive.java:631)
        at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:147)
        at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:169)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2374)
        ... 54 more


--> Servers
  +-> Apache Geronimo v3.0 Server at localhost [Started, Republish]
    +--> CurrencyCOnverterEJB [SYnchronized]
    +--> WebEJB [Error publishing module to server]


--> http://localhost:8080/console/

Web App WArs

Component Name Display Name   URL   State   Commands
 org.apache.geronimo.configs/dojo-jetty/3.0-M1/car   Dojo Webapp   /dojo
         running   Stop   Stop   Restart   Restart   Uninstall   Uninstall
 org.apache.geronimo.configs/remote-deploy-jetty/3.0-M1/car   Geronimo Remote Deployer   /remote-deploy
         running   Stop   Stop   Restart   Restart   Uninstall   Uninstall
 org.apache.geronimo.configs/welcome-jetty/3.0-M1/car   Welcome to Geronimo   /
         running   Stop   Stop   Restart   Restart   Uninstall   Uninstall
 org.apache.geronimo.plugins/plugin-console-jetty/3.0-M1/car   Geronimo Management Console Portlets   /plugin
         running   Stop   Restart   Uninstall  


Application EARs

Component Name URL   State   Commands
 org.apache.geronimo.plugins/console-jetty/3.0-M1/car   running   Stop   Restart   Uninstall  


EJB JARs

Component Name State   Commands
 default/CurrencyConverterEJB/1.0/car   running   Stop   Restart   Uninstall  


so... the question is: what do i miss here?

joquetaire
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: EJB and Web tutorial 3.0 --> deplyment error

Forrest Xia
Please try the latest 3.0 trunk. 3.0-M1 might not support that new feature.

Forrest

On Thu, Apr 21, 2011 at 8:24 AM, joquetaire <[hidden email]> wrote:
hi all,

i've tried to run the tutorial on accessing EJB inWeb application but got
the error while deploying the Web part

the tutorial is located:
https://cwiki.apache.org/GMOxDOC30/accessing-ejb-in-web-applications.html
(Home > Apache Geronimo v3.0 > Documentation > Developing > Tutorials >
Developing Web applications > Accessing EJB in Web applications)

server seems to work fine - SDK, Eclipse, GEP, Geronimo

server: Debian
version: 2.22.3

$ java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)

geronimo-jetty8-javaee6-3.0-M1

eclipse-jee-helios-SR2-linux-gtk

Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 2
Build id: 20110218-0911

Apache Geronimo v3.0 Server Adapter
Version: 3.0.0-20100706214934


all files in 2 projects of the tutorial are presented below (tried to follow
the tutorial 'a la lettre')

--> Converter.java

package ejb;

import java.math.BigDecimal;
import javax.ejb.Remote;

@Remote
public interface Converter {

       public BigDecimal dollarToRupees(BigDecimal dollars);

       public BigDecimal rupeesToEuro(BigDecimal rupees);
}


--> ConverterBean.java

package ejb;

import java.math.BigDecimal;
import javax.ejb.*;

@Stateless
public class ConverterBean implements Converter {

       private BigDecimal rupeeRate = new BigDecimal("40.58");
       private BigDecimal euroRate = new BigDecimal("0.018368");

       public BigDecimal dollarToRupees(BigDecimal dollars) {
               BigDecimal result = dollars.multiply(rupeeRate);
               return result.setScale(2, BigDecimal.ROUND_UP);
       }

       public BigDecimal rupeesToEuro(BigDecimal rupees) {
               BigDecimal result = rupees.multiply(euroRate);
               return result.setScale(2, BigDecimal.ROUND_UP);
       }
}


--> ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
       version="3.1">
 <display-name>CurrencyConvertEJB</display-name>
</ejb-jar>


--> openejb-jar.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ejb:openejb-jar
       xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"

xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0"
       xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
       xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
       xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
       xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0"
       xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2"
       xmlns:pers="http://java.sun.com/xml/ns/persistence"
       xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
       xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
       xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
   <dep:environment>
       <dep:moduleId>
           <dep:groupId>default</dep:groupId>
           <dep:artifactId>CurrencyConverterEJB</dep:artifactId>
           <dep:version>1.0</dep:version>
           <dep:type>car</dep:type>
       </dep:moduleId>
   </dep:environment>
</ejb:openejb-jar>


--> index.jsp

<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
   pageEncoding="UTF-8"%>
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Converter</title>
</head>
<body bgcolor="white">
Converter

<hr />
<p>Enter an amount to convert:</p>
<form method="get" action="index.jsp">
       <input type="text" name="amount" size="25" /><br />
       <p>
       <input type="submit" value="Submit" />

       <input type="reset" value="Reset" />
       </p>
</form>

<jsp:include page="/ConverterHandler" />

</body>

</html>


--> ConverterHandler.java

package webejb;

import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigDecimal;

import javax.ejb.EJB;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import ejb.Converter;

/**
 * Servlet implementation class ConverterHandler
 */
@WebServlet("/ConverterHandler")
public class ConverterHandler extends HttpServlet {
       private static final long serialVersionUID = 1L;

       @EJB(name = "ejb/Converter")
       private Converter converter;

   /**
    * @see HttpServlet#HttpServlet()
    */
   public ConverterHandler() {

       super();
   }

       /**
        * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
response)
        */
       protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {

               PrintWriter out = response.getWriter();
               String amount = request.getParameter("amount");
               if (amount != null && amount.length() > 0) {
                       BigDecimal d = new BigDecimal(amount);
                       BigDecimal rupeeAmount = converter.dollarToRupees(d);
                       out.println("<p>" + amount + " Dollars are " + rupeeAmount + "
Rupees.<p>");
                       BigDecimal euroAmount = converter.rupeesToEuro(rupeeAmount);
                       out.println(amount + " Dollars are " + euroAmount + " Euro.");
               }
       }

       /**
        * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
response)
        */
       protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {

               doGet(request, response);
       }

}


--> web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
 <display-name>WebEJB</display-name>
 <welcome-file-list>
   <welcome-file>index.html</welcome-file>
   <welcome-file>index.htm</welcome-file>
   <welcome-file>index.jsp</welcome-file>
   <welcome-file>default.html</welcome-file>
   <welcome-file>default.htm</welcome-file>
   <welcome-file>default.jsp</welcome-file>
 </welcome-file-list>
</web-app>


--> geronimo-web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">

   <sys:environment>
       <sys:moduleId>
           <sys:groupId>default</sys:groupId>
           <sys:artifactId>WebEJB</sys:artifactId>
           <sys:version>1.0</sys:version>
           <sys:type>car</sys:type>
       </sys:moduleId>
       <sys:dependencies>
           <sys:dependency>
               <sys:groupId>default</sys:groupId>
                   <sys:artifactId>CurrencyConvertEJB</sys:artifactId>
                   <sys:version>1.0</sys:version>
                   <sys:type>car</sys:type>
           </sys:dependency>
       </sys:dependencies>
   </sys:environment>

   <context-root>/WebEJB</context-root>

   <nam:ejb-ref xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
       <nam:ref-name>ejb/Converter</nam:ref-name>
       <nam:pattern>
           <nam:groupId>default</nam:groupId>
           <nam:artifactId>CurrencyConvertEJB</nam:artifactId>
           <nam:version>1.0</nam:version>
           <nam:name>ConverterBean</nam:name>
       </nam:pattern>
   </nam:ejb-ref>

</web-app>


--> Error Message Box

'Publishing to Apache Geronimo v3.0 Server at localhost...' has encouterred
a problem.

NLS missing message: DISTRIBUTE_FAIL in:
org.apache.geronimo.st.v30.core.internal.Messages
Classloader for nullcan't find Could not fully load class:
webejb.ConverterHandler
 due to:Lejb/Converter;
 in classLoader:
412.0
org.apache.geronimo.common.DeploymentException: Classloader for nullcan't
find Could not fully load class: webejb.ConverterHandler
 due to:Lejb/Converter;
 in classLoader:
412.0
       at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:678)
       at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:623)
       at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.configureBasicWebModuleAttributes(AbstractWebModuleBuilder.java:700)
       at
org.apache.geronimo.jetty8.deployment.JettyModuleBuilder.addGBeans(JettyModuleBuilder.java:482)
       at
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:175)
       at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:690)
       at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:250)
       at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:138)
       at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
       at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
       at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:856)
       at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
       at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:344)
       at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
       at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
       at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:856)
       at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
       at
org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown
Source)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
       at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown
Source)
       at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown Source)
       at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown
Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown
Source)
       at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
       at sun.rmi.transport.Transport$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at sun.rmi.transport.Transport.serviceCall(Unknown Source)
       at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown
Source)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
       at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: Could not fully load class:
webejb.ConverterHandler
 due to:Lejb/Converter;
 in classLoader:
412.0
       at org.apache.xbean.finder.ClassFinder.<init>(ClassFinder.java:161)
       at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:676)
       ... 44 more


--> Console

2011-04-21 01:54:36,567 ERROR [DependencyManager] Could not install bundle
dependecy
org.osgi.framework.BundleException: Unable to cache bundle:
mvn:default/CurrencyConvertEJB/1.0/car
       at org.apache.felix.framework.Felix.installBundle(Felix.java:2378)
       at org.apache.felix.framework.Felix.installBundle(Felix.java:2334)
       at
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
       at
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:108)
       at
org.apache.geronimo.system.configuration.DependencyManager.starting(DependencyManager.java:182)
       at
org.apache.geronimo.system.configuration.DependencyManager.bundleChanged(DependencyManager.java:89)
       at
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:800)
       at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:728)
       at
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)
       at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3612)
       at org.apache.felix.framework.Felix.activateBundle(Felix.java:1750)
       at org.apache.felix.framework.Felix.startBundle(Felix.java:1682)
       at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
       at
org.apache.geronimo.deployment.DeploymentContext.createTempConfiguration(DeploymentContext.java:202)
       at
org.apache.geronimo.deployment.DeploymentContext.initializeConfiguration(DeploymentContext.java:188)
       at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:606)
       at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:250)
       at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:138)
       at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
       at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
       at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:856)
       at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
       at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:344)
       at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
       at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
       at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:856)
       at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
       at
org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown
Source)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
       at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown
Source)
       at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown Source)
       at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown
Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown
Source)
       at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
       at sun.rmi.transport.Transport$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at sun.rmi.transport.Transport.serviceCall(Unknown Source)
       at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown
Source)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
       at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: URL
[mvn:default/CurrencyConvertEJB/1.0/car] could not be resolved.
       at
org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)
       at
org.apache.felix.framework.util.SecureAction.getURLConnectionInputStream(SecureAction.java:487)
       at
org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:163)
       at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:80)
       at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:58)
       at
org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:1020)
       at
org.apache.felix.framework.cache.BundleArchive.revise(BundleArchive.java:631)
       at
org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:147)
       at
org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:169)
       at org.apache.felix.framework.Felix.installBundle(Felix.java:2374)
       ... 54 more


--> Servers
 +-> Apache Geronimo v3.0 Server at localhost [Started, Republish]
   +--> CurrencyCOnverterEJB [SYnchronized]
   +--> WebEJB [Error publishing module to server]


--> http://localhost:8080/console/

Web App WArs

Component Name  Display Name    URL      State          Commands
 org.apache.geronimo.configs/dojo-jetty/3.0-M1/car       Dojo Webapp     /dojo
        running         Stop   Stop     Restart   Restart       Uninstall   Uninstall
 org.apache.geronimo.configs/remote-deploy-jetty/3.0-M1/car      Geronimo
Remote Deployer          /remote-deploy
        running         Stop   Stop     Restart   Restart       Uninstall   Uninstall
 org.apache.geronimo.configs/welcome-jetty/3.0-M1/car    Welcome to Geronimo
/
        running         Stop   Stop     Restart   Restart       Uninstall   Uninstall
 org.apache.geronimo.plugins/plugin-console-jetty/3.0-M1/car     Geronimo
Management Console Portlets      /plugin
        running         Stop    Restart         Uninstall


Application EARs

Component Name  URL      State          Commands
 org.apache.geronimo.plugins/console-jetty/3.0-M1/car            running         Stop
Restart          Uninstall


EJB JARs

Component Name   State          Commands
 default/CurrencyConverterEJB/1.0/car    running         Stop    Restart
Uninstall


so... the question is: what do i miss here?

joquetaire


--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/EJB-and-Web-tutorial-3-0-deplyment-error-tp2844215p2844215.html
Sent from the Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: EJB and Web tutorial 3.0 --> deplyment error

joquetaire
Forrest Xia wrote
Please try the latest 3.0 trunk. 3.0-M1 might not support that new feature.

Forrest
'new feature' you say  i'm sorry but... isn't accessing EJB from Servlets/JSP 'the basic feature" of Java EE ??

the tutorial is simply copied from v2.2 and screenshots are actually from v2.1 - anyway, you say it may not work just because it hasn't been resolved in v3.0 yet... so the question is:
+ when v3.0-M2 will be available?
or
+ where can download (COMPILED version of) latest trunk? - b'cos no way i will manage to compile it by myself...

tschuss,
joquetaire
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: EJB and Web tutorial 3.0 --> deplyment error

kevan
Administrator

On Apr 21, 2011, at 6:00 PM, joquetaire wrote:

>
> Forrest Xia wrote:
>>
>> Please try the latest 3.0 trunk. 3.0-M1 might not support that new
>> feature.
>>
>> Forrest
>>
>
> 'new feature' you say  i'm sorry but... isn't accessing EJB from
> Servlets/JSP 'the basic feature" of Java EE ??

M1 was a while ago and definitely had it's share of bugs/missing features.

>
> the tutorial is simply copied from v2.2 and screenshots are actually from
> v2.1 - anyway, you say it may not work just because it hasn't been resolved
> in v3.0 yet... so the question is:
> + when v3.0-M2 will be available?
> or
> + where can download (COMPILED version of) latest trunk? - b'cos no way i
> will manage to compile it by myself...

Here's the latest 3.0-SNAPSHOT build:
https://repository.apache.org/content/groups/snapshots/org/apache/geronimo/assemblies/geronimo-tomcat7-javaee6-web/3.0-SNAPSHOT/geronimo-tomcat7-javaee6-web-3.0-20110421.083329-40-bin.tar.gz (you should be able to find the .zip, full java ee, or jetty-based alternatives relative to this url...)

--kevan

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: EJB and Web tutorial 3.0 --> deplyment error

Ivan Xu
Hi, there is a simple typo error in your deployment plan file, in the openejb-jar.xml, the artifact id is
  <dep:moduleId>
           <dep:groupId>default</dep:groupId>
           <dep:artifactId>CurrencyConverterEJB</dep:artifactId> <=========
           <dep:version>1.0</dep:version>
           <dep:type>car</dep:type>
       </dep:moduleId>

While in the geronimo-web.xml file, the dependency wrote :

           <sys:dependency>
               <sys:groupId>default</sys:groupId>
                   <sys:artifactId>CurrencyConvertEJB</sys:artifactId> <=========
                   <sys:version>1.0</sys:version>
                   <sys:type>car</sys:type>
           </sys:dependency>

That is why the classes in the ejb module could not be found, I think that there should be some error messages showing "missing dependency". If not, we might need to improve the message output.

And,  it is better to try the new snapshot in Kevan's email, as there are many bug fix, also we improve a lot for the console, javaee 6 support, OSGi support and etc.
thanks.


2011/4/22 Kevan Miller <[hidden email]>

On Apr 21, 2011, at 6:00 PM, joquetaire wrote:

>
> Forrest Xia wrote:
>>
>> Please try the latest 3.0 trunk. 3.0-M1 might not support that new
>> feature.
>>
>> Forrest
>>
>
> 'new feature' you say  i'm sorry but... isn't accessing EJB from
> Servlets/JSP 'the basic feature" of Java EE ??

M1 was a while ago and definitely had it's share of bugs/missing features.

>
> the tutorial is simply copied from v2.2 and screenshots are actually from
> v2.1 - anyway, you say it may not work just because it hasn't been resolved
> in v3.0 yet... so the question is:
> + when v3.0-M2 will be available?
> or
> + where can download (COMPILED version of) latest trunk? - b'cos no way i
> will manage to compile it by myself...

Here's the latest 3.0-SNAPSHOT build:
https://repository.apache.org/content/groups/snapshots/org/apache/geronimo/assemblies/geronimo-tomcat7-javaee6-web/3.0-SNAPSHOT/geronimo-tomcat7-javaee6-web-3.0-20110421.083329-40-bin.tar.gz (you should be able to find the .zip, full java ee, or jetty-based alternatives relative to this url...)

--kevan




--
Ivan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: EJB and Web tutorial 3.0 --> deplyment error

Rajender
This post has NOT been accepted by the mailing list yet.
I tried the latest snap shot and also the fixed the geronimo-web.xml and still get this error below!

2017-08-07 15:48:53,406 WARN  [AdminObjectRefBuilder] Failed to build reference to resource env reference [java:comp/BeanManager, java:comp/Validator, java:comp/ValidatorFactory] defined in plan file. The corresponding entry in Geronimo deployment descriptor is missing.
2017-08-07 15:48:54,739 ERROR [Deployer] Deployment failed due to
java.lang.NoClassDefFoundError: Could not fully load class: webejb.ConverterHandler
 due to:Lejb/Converter;
 in classLoader:
GeronimoClassLoader[default.WebEJB-DEPLOYMENT_1.0.0 [321]]
        at org.apache.xbean.finder.ClassFinder.<init>(ClassFinder.java:136)
        at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:663)
        at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.configureBasicWebModuleAttributes(AbstractWebModuleBuilder.java:698)
        at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:476)
        at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:174)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:764)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:281)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:145)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
        at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:344)
        at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
        at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
        at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
        at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487)
        at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)
        at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1427)
        at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848)
        at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
        at sun.rmi.transport.Transport$2.run(Transport.java:202)
        at sun.rmi.transport.Transport$2.run(Transport.java:199)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:198)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:567)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.access$400(TCPTransport.java:619)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:684)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:681)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:681)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Loading...