Request clarification on deployment requirements.

  9 posts   Feedicon  
Replies: 8 - Last Post: February 03, 2012 15:11
by: Jim
showing 1 - 9 of 9
 
Posted: January 23, 2012 16:43 by Jim

Hello,

We are exploring various MPI implementations, including OpenEMPI.

Even though the instructions page states:

"The war file can be deployed on any container that supports the deployment of WAR files..."

we have been running into a variety of deployment issue under GlassFish, both 2.x and 3.x.

Browsing through the forums leads me to think that perhaps OpenEMPI is limited in deployment options. I am coming across statements that lead me to some troubling conclusions. I would love to see these conclusions disproved, or at least rationalized:

  • Only JBoss 4.2.3 is supported. Any more recent version does not work.
  • Any version of GlassFish is not supported.

I conclude from the above that OpenEMPI works only on specific (now ancient) technologies. JBoss 4.2.3 is an app server implementation for Java EE 1.4 (now 10 years old), so it should not be surprising that more recent application servers implementing Java 1.5 or Java 1.6 would have troubles.

Has anyone is the community successfully deployed OpenEMPI on any application server that is Java 5 or Java 6 based?

I hope that I am wrong in my conclusions, and that someone can put clarity to my observations, and reading of the documentation.

Thank you for your time.

-- Jim

 
Posted: January 25, 2012 01:11 by odysseas
Jim,

The war file can be deployed on any web container and we have it running on Tomcat, Glassfish and newer versions of JBoss. You need to set the environment variable OPENEMPI_HOME to point to the directory where the OpenEMPI distribution was expanded into. What error message are you seeing with Glassfish?

Odysseas
 
Posted: January 26, 2012 16:30 by Jim

Hi Odysseas,

Thanks so much for responding.

First, for both GlassFish 2.x and 3.x, the following applies:

We do indeed have the environment variable OPENEMPI_HOME set to the parent directory of where the file was extracted, in our case, we downloaded :

openempi-2.2.0-openempi.tar.gz

and extracted to

/opt/openempi-2.2.0

which had a directory structure of

root@OpenEMPI-2 /opt/openempi-2.2.0# ls -1

conf
openempi-2.2.0.ear
openempi-core-2.2.0.jar
openempi-nhin-adapter-2.2.0.war
openempi-nhin-proxy-2.2.0.jar
openempi-openpixpdq-adapter-2.2.0.jar
openempi-webapp-web-2.2.0.war

so our /etc/profile.d/myprofile.sh script has:

OPENEMPI_HOME=/opt/openempi-2.2.0

For both versions we also opted to start off with the easiest path, and so we autodeployed the WAR file.

Also, for both versions the only other modification was to the file

jdc.properties

where we changed the

jdbc.url

to point to our PostGreSql server.

From there our results for each GlassFish version diverge substantially.

The server.log files tend to be rather long, with SEVERE tags that do the cascade thing that go on and on.

So, since this forum does not seem to permit attachments, I am going to be considerate of my fellow
forum members and just extract and highlight what I believe to be the important statements.

If you would rather that you have the whole log file, I can certainly forward that to you, out-of-band (jimkfoster@gmail.com).

GlassFish 2.1:

According to the console, GlassFish appears to start up ok.

However, the server.log tells a different story, and appears to originate with a problem with transactionManager.
There are (3) tagged SEVERE:

[1] [#|2012-01-23T08:48:21.861+0000|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|ThreadID=10;ThreadName=main;_RequestID=6ee8688c-9341-4c8e-9a68-56da3c9b3680;|WebModule[/openempi-webapp-web-2.2.0]StandardWrapper.Throwablejava.lang.NullPointerException at org.openempi.webapp.server.AdminServiceImpl.init(AdminServiceImpl.java:45)

[2] [#|2012-01-23T08:48:21.867+0000|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|ThreadID=10;ThreadName=main;_RequestID=6ee8688c-9341-4c8e-9a68-56da3c9b3680;|WebModule[/openempi-webapp-web-2.2.0]PWC1396: Servlet /openempi-webapp-web-2.2.0 threw load() exceptionjava.lang.NullPointerException at org.openempi.webapp.server.AdminServiceImpl.init(AdminServiceImpl.java:45)

[3] [#|2012-01-23T08:48:21.915+0000|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|ThreadID=10;ThreadName=main;_RequestID=6ee8688c-9341-4c8e-9a68-56da3c9b3680;|WEB0207: Error starting web context StandardEngine[com.sun.appserv].StandardHost[server].StandardContext[/openempi-webapp-web-2.2.0] on virtual server serverLifecycleException: java.lang.NullPointerException at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4979

GlassFish 3.1:

According to the console, GlassFish appears to start up ok.

However, autodeploy of the WAR file throws v3 into a loop that is unrecoverable.

The server.log file has but one SEVERE tag:

[#|2012-01-26T08:07:37.421-0700|SEVERE|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|ThreadID=41;ThreadName=Thread-1;|java.net.MalformedURLException: Bad host: "OpenEMPI-2.2.0-Baseline-GF31" at javax.management.remote.JMXServiceURL.validateHost(JMXServiceURL.java:459) at javax.management.remote.JMXServiceURL.validateHost(JMXServiceURL.java:361) at javax.management.remote.JMXServiceURL.validate(JMXServiceURL.java:337) at javax.management.remote.JMXServiceURL.(JMXServiceURL.java:208) at org.glassfish.admin.mbeanserver.RMIConnectorStarter.start(RMIConnectorStarter.java:288) at org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread.startConnector(JMXStartupService.java:243) at org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread.run(JMXStartupService.java:283) |#]

I'm not sure what to make of the statement

Bad host: "OpenEMPI-2.2.0-Baseline-GF31"

It is the name of the server and has its entry in resolv.conf as well as the DNS machine on this local network.

I suspect that it is a GlassFish-specific configuration thing, and has nothing at all to do with OpenEMPI, itself.

-----

Anything jump out at you that would lend some insight as to steps forward?

Thanks for you time, Odysseas. I very much appreciate it.

-- Jim

 
Posted: January 26, 2012 19:33 by odysseas
Jim,

Glassfish 2.1 needed some customization of the domain's configuration to get the deployment to work. There may be a better way to do this, and if you find a better way please share it with us, but here is how we got OpenEMPI running on Glassfish.

First, you need to copy the log4j.properties file from the OpenEMPI home directory to the domain1/lib/classes. This will allow Glassfish to find it during deployment of the war file and you will be able to see in the openempi.log file why the deployment is failing (if it still is by the time we are done).

Then you need to add some of the OpenEMPI jar file to the classpath since they seem to conflict with those used by the Glassfish app server itself. You need to add the classpath-prefix attribute in the java-config element of your domain.xml file and also make sure that you copy the listed jar file to the domain/domain1/lib directory. I truncated many of the jvm-options below so you don't have to remove any of the default options in that section of the XML file. We also added the openempi.home system variable to ensure that the environment for OpenEMPI is setup properly.

      <java-config classpath-suffix="" debug-enabled="true" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" env-classpath-ignored="false" java-home="${com.sun.aas.javaRoot}" javac-options="-g" rmic-options="-iiop -poa -alwaysgenerate -keepgenerated -g" system-classpath=""
      	classpath-prefix="${com.sun.aas.instanceRoot}/lib/aspectjweaver-1.6.0.jar:${com.sun.aas.instanceRoot}/lib/hibernate-3.2.6.ga.jar:${com.sun.aas.instanceRoot}/lib/dom4j-1.6.1.jar:${com.sun.aas.instanceRoot}/lib/hibernate-annotations-3.3.0.ga.jar:${com.sun.aas.instanceRoot}/lib/hibernate-commons-annotations-3.3.0.ga.jar:${com.sun.aas.instanceRoot}/lib/postgresql-8.1-407.jdbc3.jar">
        <!-- various required jvm-options -->
        <jvm-options>-XX:MaxPermSize=192m</jvm-options>
        <jvm-options>-client</jvm-options>

      <jvm-options>-Dopenempi.home=/opt/openempi-2.2.0</jvm-options>
  
      </java-config>
 


Let me know if this gets your instance up and running.

Odysseas
 
Posted: January 27, 2012 16:37 by Jim

Odysseas,

Thank you for your recommendations on fixing the deploy steps to GlassFish 2.1.

I followed your steps and have some feedback for you.

Bad news is that there are still errors.
Good news is that the openempi.log does indeed appear to pinpoint where those errors occur.

As I did yesterday, I am going to extract from the log files where I believe the focal point of debugging effort should go, with the standing offer to send the entire log file(s) to you out-of-band.

openempi.log

This one is pretty clear on what is wrong: Spring cannot create a bean, specifically, transactionManager.
Root cause appears to be with sessionFactory in applicationContext-dao.xml, which has the implementation class

org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean.

The following is the first ERROR encountered in openempi.log (with indentations to facilitate reading).
The remaining 200 lines or so are of the cascade type and do not lend much more insight (IMHO).

[2012-01-27 01:28:23,351]ERROR  2369[Timer-7] - org.openhie.openempi.context.Context.startup(Context.java:77) - 
  Failed while setting up the context for OpenEMPI:
    org.springframework.beans.factory.BeanCreationException:
      Error creating bean with name 'org.springframework.transaction.interceptor.TransactionInterceptor#0':
        Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; 
        nested exception is org.springframework.beans.factory.BeanCreationException: 
          Error creating bean with name 'transactionManager' 
          defined in URL [file:/opt/openempi-2.2.0/conf/applicationContext-dao.xml]: 
            Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; 
            nested exception is org.springframework.beans.factory.BeanCreationException: 
              Error creating bean with name 'sessionFactory' 
              defined in URL [file:/opt/openempi-2.2.0/conf/applicationContext-dao.xml]: 
                Instantiation of bean failed; 
                nested exception is org.springframework.beans.BeanInstantiationException: 
                  Could not instantiate bean class 
                  [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean]: 
                    Constructor threw exception; 
                    nested exception is java.lang.NoClassDefFoundError: 
                      org/apache/commons/logging/LogFactory

    org.springframework.beans.factory.BeanCreationException:
      Error creating bean with name 'org.springframework.transaction.interceptor.TransactionInterceptor#0':
        Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; 
        nested exception is org.springframework.beans.factory.BeanCreationException:
          Error creating bean with name 'transactionManager' 
          defined in URL [file:/opt/openempi-2.2.0/conf/applicationContext-dao.xml]:
            Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; 
            nested exception is org.springframework.beans.factory.BeanCreationException:
              Error creating bean with name 'sessionFactory' 
              defined in URL [file:/opt/openempi-2.2.0/conf/applicationContext-dao.xml]:
                Instantiation of bean failed; 
                nested exception is org.springframework.beans.BeanInstantiationException:
                  Could not instantiate bean class 
                  [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean]:
                    Constructor threw exception; 
                    nested exception is java.lang.NoClassDefFoundError:
                      org/apache/commons/logging/LogFactory

server.log

Server log has 16 SEVERE tags that point directly to catalina. Those lines are (less the cascade):

[#|2012-01-27T01:28:16.664-0700|SEVERE|sun-appserver2.1|org.apache.catalina.core.StandardContext|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|Unable to create custom ObjectInputStream  

[#|2012-01-27T01:28:16.665-0700|SEVERE|sun-appserver2.1|org.apache.catalina.session.ManagerBase|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|PWC2768: IOException while loading persisted sessions: java.io.EOFException  

[#|2012-01-27T01:28:16.667-0700|SEVERE|sun-appserver2.1|org.apache.catalina.session.ManagerBase|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|PWC2773: Exception loading sessions from persistent storage  

[#|2012-01-27T01:28:16.841-0700|SEVERE|sun-appserver2.1|org.apache.catalina.core.StandardContext|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|Unable to create custom ObjectInputStream  

[#|2012-01-27T01:28:16.843-0700|SEVERE|sun-appserver2.1|org.apache.catalina.session.ManagerBase|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|PWC2768: IOException while loading persisted sessions: java.io.EOFException  

[#|2012-01-27T01:28:16.845-0700|SEVERE|sun-appserver2.1|org.apache.catalina.session.ManagerBase|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|PWC2773: Exception loading sessions from persistent storage  

[#|2012-01-27T01:28:16.904-0700|SEVERE|sun-appserver2.1|org.apache.catalina.core.StandardContext|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|PWC1300: Error starting resources in context /openempi-webapp-web-2.2.0|#]  

[#|2012-01-27T01:28:16.904-0700|SEVERE|sun-appserver2.1|org.apache.catalina.core.StandardContext|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|PWC4430: Document base /opt/glassfish/domains/domain1/applications/j2ee-modules/openempi-webapp-web-2.2.0 does not exist or is not a readable directory|#]  

[#|2012-01-27T01:28:16.906-0700|SEVERE|sun-appserver2.1|org.apache.catalina.core.StandardContext|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|PWC1306: Startup of context /openempi-webapp-web-2.2.0 failed due to previous errors|#]  

[#|2012-01-27T01:28:16.907-0700|INFO|sun-appserver2.1|org.apache.catalina.core.StandardContext|_ThreadID=10;_ThreadName=main;|PWC1240: Container WebModule[/openempi-webapp-web-2.2.0] has not been started|#]  

[#|2012-01-27T01:28:16.924-0700|SEVERE|sun-appserver2.1|org.apache.catalina.core.StandardContext|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|Unable to create custom ObjectInputStream  

[#|2012-01-27T01:28:16.925-0700|SEVERE|sun-appserver2.1|org.apache.catalina.session.ManagerBase|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|PWC2768: IOException while loading persisted sessions: java.io.EOFException  

[#|2012-01-27T01:28:16.927-0700|SEVERE|sun-appserver2.1|org.apache.catalina.session.ManagerBase|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|PWC2773: Exception loading sessions from persistent storage  

[#|2012-01-27T01:28:16.958-0700|SEVERE|sun-appserver2.1|org.apache.catalina.core.StandardContext|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|Unable to create custom ObjectInputStream  

[#|2012-01-27T01:28:16.961-0700|SEVERE|sun-appserver2.1|org.apache.catalina.session.ManagerBase|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|PWC2768: IOException while loading persisted sessions: java.io.EOFException  

[#|2012-01-27T01:28:16.962-0700|SEVERE|sun-appserver2.1|org.apache.catalina.session.ManagerBase|_ThreadID=10;_ThreadName=main;_RequestID=5ef4ceb0-ff87-4044-b084-a2d01dbabf53;|PWC2773: Exception loading sessions from persistent storage  

[#|2012-01-27T01:28:23.379-0700|SEVERE|sun-appserver2.1|org.apache.catalina.core.ContainerBase|_ThreadID=13;_ThreadName=Timer-7;_RequestID=bd673589-76e3-4b4c-9687-11cfce417a5a;|ContainerBase.addChild: start:  

[#|2012-01-27T01:29:22.895-0700|INFO|sun-appserver2.1|org.apache.catalina.loader.WebappClassLoader|_ThreadID=14;_ThreadName=Timer-10;|PWC1635: Illegal access: this web application instance has been stopped already (the eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact)|#]

I am still on the high end of the learning curve with the code base of OpenEMPI, of course, but it appears to me that one should start with nailing down that sessionFactory in applicationContext-dao.xml.

Your thoughts?

-- Jim

 
Posted: January 27, 2012 17:56 by odysseas
Jim,
I am not sure why it is not working as I assume we are both using the same app server version but I can see that the problem you are having now is with a class loader conflict with a class from the Apache Logging framework:

 Constructor threw exception; 
                    nested exception is java.lang.NoClassDefFoundError:
                      org/apache/commons/logging/LogFactory
 


What you need to do to fix it, is copy the following jar files: commons-logging-1.1.1.jar and commons-logging-api-1.1.jar from the deployment directory under domain1/applications/j2ee-modules/../ into the domain1/lib directory and then add the name of these two jar files to the classpath-prefix attribute in the domain.xml file.

This should get you past this error although you may get more of these so you may have to repeat this process iteratively until all of them are resolved. What I mean here is that if you get another NoClassDefFoundError, you need to identify the jar file that includes the missing class, move that jar file to the domain1/lib directory and add the jar name to the classpath-prefix attribute.

Let me know if this helps.
Odysseas
 
Posted: January 30, 2012 16:08 by Jim

Hi odysseas,

I have some more feedback for you.

First, as to the platform I am on:

GlassFish (Installed from glassfish-installer-v2.1.1-b31g-linux.jar)

$ asadmin version  
Version = Sun GlassFish Enterprise Server v2.1.1  
Command version executed successfully.

Java (Installed from jdk-6u26-linux-i586.bin)

$ java -version  
java version "1.6.0_26"  
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)  
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

Linux (Ubuntu 10.04.1)

$ uname --all  
Linux OpenEMPI-2.2.0-Baseline-GF2.1 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:54:21 UTC 2011 i686 GNU/Linux

or, in a more readable form:

kernel name                     Linux
network node hostname           OpenEMPI-2.2.0-Baseline-GF2.1
kernel release                  2.6.32-32-generic
kernel version                  #62-Ubuntu SMP Wed Apr 20 21:54:21 UTC 2011 
machine hardware name           i686
processor type or unknown       i686
hardware platform or unknown    i686
operating system                GNU/Linux




As to handling the class loader conflicts, I sat down over the weekend and handled each as they came up, each in turn.

In addition to the (6) you originally identified:

aspectjweaver-1.6.0.jar
dom4j-1.6.1.jar
hibernate-3.2.6.ga.jar
hibernate-annotations-3.3.0.ga.jar
hibernate-commons-annotations-3.3.0.ga.jar
postgresql-8.1-407.jdbc3.jar


my current list also includes (handled in this order, which is the order errors occurred):

openempi-webapp-server-2.2.0.jar
log4j-1.2.15.jar
openempi-core-2.2.0.jar
spring-context-2.5.4.jar
spring-beans-2.5.4.jar
spring-core-2.5.4.jar
spring-orm-2.5.4.jar
spring-tx-2.5.4.jar
spring-aop-2.5.4.jar
aopalliance-1.0.jar
spring-security-core-2.0.1.jar
spring-jdbc-2.5.4.jar
commons-collections-3.2.jar
ehcache-1.4.1.jar
activemq-4.0.1.jar    [*]
cglib-2.1_3.jar
antlr-2.7.6.jar
asm-1.5.3.jar         [**]


[*] The offending line was:

  "...nested exception is java.lang.NoClassDefFoundError: 
   edu/emory/mathcs/backport/java/util/concurrent/AbstractExecutorService"


However, I could not find it in any of the jars in

openempi-webapp-web-2.2.0/WEB-INF/lib

In order to move forward I used activemq-4.0.1.jar which has the required class.
(Perhaps you could point out where I missed it?)

[**] This is were I left off at...and am stuck at. The offending line was:

  "...Invocation of init method failed; 
      nested exception is java.lang.NoSuchMethodError:  
      org.objectweb.asm.ClassWriter.<init>(Z)V"


The jar containing that method appears to be asm-1.5.3.jar, but yet even when included just like the others I still receive that error...I am clueless as to what that trailing <init>(Z)V means.


What would be your suggestions at this point?

Thanks!

-- Jim

 
Posted: February 02, 2012 16:54 by odysseas
Jim,

The dependence on the edu/emory/../AbstractExecutoreService is a result of the eh-cache library we are using:

[INFO] | +- net.sf.ehcache:ehcache:jar:1.4.1:compile
[INFO] | | +- net.sf.jsr107cache:jsr107cache:jar:1.0:compile
[INFO] | | \- backport-util-concurrent:backport-util-concurrent:jar:3.1:compile

You should have in the WEB-INF/lib directory of the openempi-webapp-web-2.2.0.war file the jar file:

backport-util-concurrent:backport-util-concurrent:jar:

We have been very busy with preparations for the upcoming HIMSS Conference where we will be doing a demonstration of OpenEMPI so, we haven't had much time to help you out with the install on Glassfish.

Let me know if this gets you further.

Odysseas
 
Posted: February 03, 2012 15:11 by Jim

Hi Odysseas,

I apologize that I caught you at a bad time.

I know what it is like to prepare for these sorts of things - exciting, nerve-wracking, and time-consuming - all in one package...I had similar experiences when I was with Intel. With that in mind, I will make this my last post until after HIMSS12.


Earlier, when first discussing the class loader issue, you said:

   "There may be a better way to do this,
     and if you find a better way please share it with us..."

Well, there is a better way: set an environment variable for the application classpath like so:

CLASSPATH=/opt/glassfish/domains/domain1/applications/j2ee-modules/openempi-webapp-web-2.2.0/WEB-INF/lib


This does away with copying the jars from

/opt/glassfish/domains/domain1/applications/j2ee-modules/openempi-webapp-web-2.2.0/WEB-INF/lib/

to

/opt/glassfish/domains/domain1/lib/


and modifying the java-config section of domain.xml with all those classpath-prefixes.


This leaves me with just the errors mentioned earlier about

sessionFactory in applicationContext-dao.xml

and

org.objectweb.asm.ClassWriter.<init>(Z)V




My best wishes to you and your team at HIMSS!

I am sure you will have a great showing, and I would be interested in hearing how how it turns out.

Thanks for all your patient help, Odysseas!

-- Jim

showing 1 - 9 of 9
Replies: 8 - Last Post: February 03, 2012 15:11
by: Jim
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close