Everything Java Apache Geospatial Open Source. Hello Shinning Stars!!! Vincent Massol, Raphael Luta, Santiago Gala, Carsten Z.

Wednesday, June 16, 2004

This is my patch for my bug.

modules/core/src/java/org/openejb/deployment/OpenEJBModuleBuilder.java
TransactionPolicyHelper transactionPolicyHelper = new TransactionPolicyHelper(ejbJar.getAssemblyDescriptor());

modules/core/src/java/org/openejb/deployment/TransactionPolicyHelper.java
public TransactionPolicyHelper(AssemblyDescriptorType assemblyDescriptor) {
if (assemblyDescriptor != null) {
processContainerTransactions(assemblyDescriptor.getContainerTransactionArray());
}
}

public TransactionPolicyHelper(ContainerTransactionType[] containerTransactions) {
processContainerTransactions(containerTransactions);
}

private void processContainerTransactions(ContainerTransactionType[] containerTransactions) {
for (int i = 0; i < containerTransactions.length; i++) {
ContainerTransactionType containerTransaction = containerTransactions[i];
String transactionAttribute = containerTransaction.getTransAttribute().getStringValue();
MethodType[] methods = containerTransaction.getMethodArray();
for (int j = 0; j < methods.length; j++) {
MethodType method = methods[j];
String ejbName = method.getEjbName().getStringValue();
MethodTransaction methodTransaction = new MethodTransaction(method, transactionAttribute);
putMethodTransaction(ejbName, methodTransaction);
}
}
}
Keep an eye on the Overview (Geronimo :: System 1.0-SNAPSHOT API)
ejbJar : <xml-fragment version="2.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee">
<j2ee:display-name>ConverterJAR</j2ee:display-name>
<j2ee:enterprise-beans>
<j2ee:session>
<j2ee:ejb-name>ConverterBean</j2ee:ejb-name>
<j2ee:home>converter.ConverterHome</j2ee:home>
<j2ee:remote>converter.Converter</j2ee:remote>
<j2ee:ejb-class>converter.ConverterBean</j2ee:ejb-class>
<j2ee:session-type>Stateless</j2ee:session-type>
<j2ee:transaction-type>Bean</j2ee:transaction-type>
<j2ee:security-identity>
<j2ee:use-caller-identity/>
</j2ee:security-identity>
</j2ee:session>
</j2ee:enterprise-beans>
</xml-fragment>
java.lang.NullPointerException
at org.openejb.deployment.OpenEJBModuleBuilder.addGBeans(OpenEJBModuleBuilder.java:426)
at org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b20.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:141)
at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:740)
at org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89)
at org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperationInvoker.java:34)
at org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibMethodInterceptor.java:110)
at org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$9e45a280.addGBeans()
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:225)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:148)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:141)
at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:740)
at org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89)
at org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperationInvoker.java:34)
at org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibMethodInterceptor.java:110)
at org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$7a1ca0ae.buildConfiguration()
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:132)
at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:141)
at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:761)
at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:218)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:205)
at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079)
at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:231)
at org.apache.geronimo.system.main.CommandLine.main(CommandLine.java:82)

Seems to be that this bug is due to the fact that the builder is looking for the assembly-descriptor element. This element is optional according xml schema descriptor file http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd


Friday, June 11, 2004

java.lang.NullPointerException
at org.openejb.deployment.OpenEJBModuleBuilder.addGBeans(OpenEJBModuleBuilder.java:409)
at org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b20.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:141)
at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:740)
at org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89)
at org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperationInvoker.java:34)
at org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibMethodInterceptor.java:110)
at org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$9e45a280.addGBeans()
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:209)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:142)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:141)
at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:740)
at org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89)
at org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperationInvoker.java:34)
at org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibMethodInterceptor.java:110)
at org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$7a1ca0ae.buildConfiguration()
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:132)
at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:141)
at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:761)
at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:218)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:205)
at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079)
at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:231)
at org.apache.geronimo.system.main.CommandLine.main(CommandLine.java:82)

Thursday, June 10, 2004

How does the demo application work?
Check out Cactus, Clover.

I just had the idea to write a Getting Started guide to Geronimo.
Trying this in Geronimo :

java -jar bin/server.jar org/apache/geronimo/Demo

TIP : Before building Geronimo modify the file modules/assembly/src/plan/system-plan.xml changing INFO to DEBUG. This will tell Log4j to output debug statements.

Friday, June 04, 2004

gisig.com cvs coordinates :

:pserver:gisig.com:/home/cvs/anoncvs
I am trying to get the hang of this so that I can finnish the TutorialHowTo ... Google Search: openejb geronimo

Thursday, May 27, 2004

Edit MyBlog
This is what can happen if you don't use JMX...

21-May-2004 15:06:10 org.apache.tomcat.util.threads.ThreadPool logFull
SEVERE: All threads are busy, waiting. Please increase maxThreads or check the servlet status75 75

Tuesday, May 18, 2004

==== Build the Example ====

cd j2eetutorial14/examples/jaxrpc/helloservice
ant

Ant reports that the BUILD FAILED but if the compile-service task passed we will be ok

==== Create a Web Application ====

Use the web application created in HowToAxisGeronimo but name the directory MyHelloService.
cp -R build/helloservice MyHelloService/WEB-INF/classes/

==== Create the geronimo-jetty.xml ====


xmlns="http://geronimo.apache.org/xml/ns/web/jetty"
configId="your/domain/name/j2eetutorialhelloservice"
parentId="org/apache/geronimo/Server"
>
/hello-jaxrpc
false


==== Create the WAR File ====

cd MyHelloService
jar -cf ../MyHelloService.war *

==== Deploy the WAR File ====

cd incubator-geronimo/target
java -jar bin/deployer.jar --install --module MyHelloService.war

==== Start the Server ====

java -jar bin/server.jar your/domain/name/j2eetutorialhelloservice

==== Test the Web Application ====

http://localhost:8080/hello-jaxrpc gives you some links to check out.

==== Create the file MyHelloService/WEB-INF/deploy.wsdd ====







==== Deploy the Web Service ====

Executing the Axis client as shown here.

cd MyHelloService/WEB-INF
java -cp $AXISCLASSPATH org.apache.axis.client.AdminClient -l local://localhost:8080/hello-jaxrpc/servlet/AdminServlet deploy.wsdd
Processing file deploy.wsdd
Done processing

==== Repackage the WAR File ====

The WEB-INF directory now includes the file server-config.xml which requires redeployment.

cd ..
jar -cf ../MyHelloService.war *

==== Stop the Server ====

Ctrl-C

==== Redeploy the WAR File ====

cd incubator-geronimo/target
java -jar bin/deployer.jar --install --module MyHelloService.war

==== Restart the Server ====

java -jar bin/server.jar your/domain/name/j2eetutorialhelloservice

==== Test the Web Service Endpoint ====

http://gisig.com:8080/hello-jaxrpc/servlet/AxisServlet should now show the hello web service.
http://localhost:8080/hello-jaxrpc/services/hello?WSDL shows you the WSDL for the hello service.

==== Use the Tutorial Clients ====

The J2EE Tutorial comes with a number of clients that use this web service.

==== Use Axis WSDL2Java to Generate a Client ===

Friday, May 14, 2004

Google Search: Linux is a new page dedicated to searching for Linux resources.

Thursday, May 13, 2004

[#GERONIMO-175] Web to EJB security integration - ASF JIRA. Another security issue that is a high priority.
This problem may be resolved or related to the Object Relational Bridge project. [#GERONIMO-176] CMP table mapping support - ASF JIRA
Security bugs are critical issues for Geronimo. Example : [#GERONIMO-178] Support for security roles in ejb-jar.xml - ASF JIRA
Transactions, a notion used by container managed persitence (CMP), must be isolated. This Geronimo issue is important for EJB certification. [#GERONIMO-181] Transaction propogation accross calls to stateful session beans - ASF JIRA

Wednesday, May 12, 2004

== Axis 1.2 Web Application Installation ==

Before continuing with HowToTutorial we must install and test the Axis web application within Geronimo.

Download the Axis binaries. We are using 1.2 beta

cd $AXIS_HOME/webapps/axis

Create a geronimo-jetty.xml, our's looks like this,


xmlns="http://geronimo.apache.org/xml/ns/web/jetty"
configId="org/apache/axis/webapp"
parentId="org/apache/geronimo/Server"
>
/axis
false


Modify the web.xml so that Jetty is happy. Working version below,


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"
version="2.4">
Apache-Axis


org.apache.axis.transport.http.AxisHTTPSessionListener



AxisServlet

org.apache.axis.transport.http.AxisServlet




AdminServlet

org.apache.axis.transport.http.AdminServlet

100



SOAPMonitorService

org.apache.axis.monitor.SOAPMonitorService


SOAPMonitorPort
5001

100



AxisServlet
/servlet/AxisServlet



AxisServlet
*.jws



AxisServlet
/services/*



SOAPMonitorService
/SOAPMonitor







5




wsdl
text/xml




xsd
text/xml



index.html
index.jsp
index.jws




Add the additional jars required by Axis. Our axis/WEB-INF/lib looks like this,

activation.jar
axis-ant.jar
axis.jar
commons-discovery.jar
commons-logging.jar
jaxrpc.jar
log4j-1.2.8.jar
mail.jar
saaj.jar
wsdl4j.jar
xmlsec.jar

Note : See also the tag dependancy for an alternative way of using libraries.

Create a the axis.war

jar -cf ../axis.war *

Deploy the war

cd incubator-geronimo/target

java -jar bin/deployer.jar --install --module axis.war

Start the Geronimo server

java -jar bin/server.jar org/apache/axis/webapp

http://localhost:8080/axis/happyaxis.jsp should report total bliss.

More information is available at the root of the context, http://gisig.com:8080/axis/
=== Helloservice ===

You can use the asant and deployer tools provided with Sun's application server or follow the quick steps below. The Axis binaries must also be installed on your machine.

Create the MyHelloService.war as described in the tutorial Chapter 8: Building Web Services with JAX-RPC. Section 2: Creating a Simple Web Service and Client with JAX-RPC.

Quick steps :

cd examples/jaxrpc/helloservice

ant build

Ant says BUILD FAILED but we will do some stuff manually

mkdir -p war/WEB-INF/lib

cp -R build war/WEB-INF/classes

cp $AXIS_HOME/lib/*jar war/WEB-INF/lib

cat > war/WEB-INF/web.xml
Ctrl-D

cat > war/WEB-INF/geronimo-jetty.xml
Ctrl-D

Monday, May 10, 2004

J2EE Tutorial 1.4 Creating a Simple Web Service and Client with JAX-RPC