JBOSS EAP 7.0 with ActiveMQ RAR doesn't work? - jboss

I have a war that has being working just fine under EAP 6.4.x (x currently 8, but also under 6 and 4 and so on down to 6.4.0).
The WAR has some simple JMS client features to adding a message to a queue on a remote machine. The target QBroker is ActiveMQ 5.8.0.
I use the 5.8.0 RAR to set up an adapter/connector to the remote broker and then just normal JMS client stuff to push a message into a q. All is fine with this.
Beginning the "port" from 6.4.x to 7.0.1; and I am hung up on the amq 5.8.0 RAR stuff. For starters -- not going to use any of the AMQ Artemis stuff that is part of EAP 7 (yet). Initially I want to get my WAR working under 7.0 with as few changes as possible -- so leaving RAR in place is important.
Under 6.4.x, I use the standalone profile and just deploy the RAR via CLI kinda like this:
./jboss-cli.sh --connect -c "deploy --name=${AMQ_DEPLOY_NAME} --runtime-name=${AMQ_RAR_FNAME} ${_TMPDIR}/${AMQ_RAR_FNAME}"
I then use cli to set up resource adapter, connection def/factory and admin-object for the queue.
Following the same process with EAP 7.0.1, if I use the standalone profile I get
java.lang.NoClassDefFoundError: javax/jms/JMSException
issues while trying to enable the WAR that uses the RAR. Ok so when I used standalone-full I get all sorts of variations of this sort of error:
2016-07-18 15:48:10,867 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "messaging-activemq"),
("server" => "default")
]) - failure description: {
"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.messaging-activemq.default is missing [jboss.http-upgrade-registry.default]"],
"WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available." => {
"Services that were unable to start:" => ["jboss.messaging-activemq.default.jms.manager"],
"Services that may be the cause:" => [
"jboss.http-upgrade-registry.default",
"jboss.naming.context.java.JmsXA"
]
}
}
The above messages suggest something is wrong with the messaging-activemq stuff (or the built in artemis stuff).
In both cases, I do set my EJB default resource adapter to the RAR created above.
So what am I missing on this set up?
Some particulars about my Environment:
War doesn't have any jboss/wildfly specific DDs in it.
I do not have the AMQ RAR deployed as a static module (nor do I want to) -- it is just a jar I have deployed - like other JAR (for DB drivers) or WARS, EJB jars, etc.
cat version.txt
Red Hat JBoss Enterprise Application Platform - Version 7.0.1.GA
java -version
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
uname -a
Linux wellandf3 4.6.4-301.fc24.x86_64 #1 SMP Tue Jul 12 11:50:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Is this NoClassDefFoundError caused by a ClassNotFoundException? If thats the case I would try to add javax.jms.api as global module.

Related

DeploymentDescriptorLoadException: dd_in_ear_load_EXC

I have a WebSphere enterprise app. Manual deployment in the IBM admin console works with no issue, but with the wsadmin scripts and jython,
AdminApp.update('%APP_NAME%', 'app', '[ -operation update -contents %EAR_FILE% -usedefaultbindings -defaultbinding.virtual.host default_host -nopreCompileJSPs -installed.ear.destination $(APP_INSTALL_ROOT)/%WAS_HOST%Network -distributeApp -nouseMetaDataFromBinary -nodeployejb -createMBeansForResources -noreloadEnabled -%ws% -validateinstall warn -noprocessEmbeddedConfig -filepermission .*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755 -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -asyncRequestDispatchType DISABLED -nouseAutoLink -noenableClientModule -clientMode isolated -novalidateSchema -MapModulesToServers [[ %MODULE_NAME% %WAR_FILE%,WEB-INF/web.xml WebSphere:cell=%WAS_HOST%Network,cluster=%CLUSTER%+WebSphere:cell=%WAS_HOST%Network,node=%WEB_NODE%,server=%WEB_NODE% ][ PobolEJB.jar PobolEJB.jar,META-INF/ejb-jar.xml WebSphere:cell=%WAS_HOST%Network,cluster=%CLUSTER%+WebSphere:cell=%WAS_HOST%Network,node=%WEB_NODE%,server=%WEB_NODE% ]]]' )
the following errors returns and the deployment failed:
com.ibm.websphere.management.application.client.AppDeploymentException:
com.ibm.websphere.management.application.client.AppDeploymentException:
[Root exception is
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException:
dd_in_ear_load_EXC_]
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException:
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException:
dd_in_ear_load_EXC_
I verified the war file, the ejb jar file, the deployment descriptor (application.xml), they are all correct. In fact the same automated deployment job in jenkins worked till recently.
I have done lots research on the web, and also tests with no luck.
Your comments will be greatly appreciated.
Webshphere 1.8.5.5.16
JDK 1.8
x86_64 x86_64 x86_64 GNU/Linux
In my case, for the same error message, it turned out to be an error with ear metadata - application.xml referred to an module/jar that did not exist.

Unable to create queues in ActiveMQ broker

In one of the ActiveMQ instance (v5.13.3), when tried to create a queue manually using Web console, getting error as shown below
Within the ActiveMQ logs, there is no errors but an warn as below. This instance is working fine for the existing queues & topics. Only facing problem while trying a new queue. Even the restart doesn't the help. With the similar setup it works fine in another instances.
2018-07-05 14:42:49,700 | WARN | /admin/createDestination.action | org.eclipse.jetty.servlet.ServletHandler | qtp2076549461-5084797
java.io.EOFException
at java.io.RandomAccessFile.readFully(RandomAccessFile.java:438)[:1.8.0_112]
at java.io.RandomAccessFile.readFully(RandomAccessFile.java:416)[:1.8.0_112]
at org.apache.activemq.util.RecoverableRandomAccessFile.readFully(RecoverableRandomAccessFile.java:75)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.PageFile.readPage(PageFile.java:878)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.Transaction$2.readPage(Transaction.java:456)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.Transaction$2.<init>(Transaction.java:447)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.Transaction.openInputStream(Transaction.java:444)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.Transaction.load(Transaction.java:420)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.Transaction.load(Transaction.java:377)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.index.BTreeIndex.loadNode(BTreeIndex.java:266)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.index.BTreeNode.getChild(BTreeNode.java:233)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.index.BTreeNode.getLast(BTreeNode.java:624)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.index.BTreeIndex.getLast(BTreeIndex.java:248)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.MessageDatabase$MessageOrderIndex.addLast(MessageDatabase.java:3298)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.MessageDatabase$MessageOrderIndex.configureLast(MessageDatabase.java:3289)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.MessageDatabase.loadStoredDestination(MessageDatabase.java:2346)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.MessageDatabase.getStoredDestination(MessageDatabase.java:2298)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore$7.execute(KahaDBStore.java:722)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore$7.execute(KahaDBStore.java:716)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.disk.page.Transaction.execute(Transaction.java:802)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.recoverMessageStoreStatistics(KahaDBStore.java:716)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.AbstractMessageStore.start(AbstractMessageStore.java:45)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.start(KahaDBStore.java:671)[activemq-kahadb-store-5.13.3.jar:5.13.3]
at org.apache.activemq.store.ProxyMessageStore.start(ProxyMessageStore.java:75)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.region.Queue.initialize(Queue.java:385)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.region.DestinationFactoryImpl.createDestination(DestinationFactoryImpl.java:87)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.region.AbstractRegion.createDestination(AbstractRegion.java:629)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.jmx.ManagedQueueRegion.createDestination(ManagedQueueRegion.java:56)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:155)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:348)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:173)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.advisory.AdvisoryBroker.addDestination(AdvisoryBroker.java:239)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:173)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:173)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:178)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.broker.jmx.BrokerView.addQueue(BrokerView.java:405)[activemq-broker-5.13.3.jar:5.13.3]
at org.apache.activemq.web.DestinationFacade.addDestination(DestinationFacade.java:56)[activemq-web-5.13.3.jar:5.13.3]
at org.apache.activemq.web.controller.CreateDestination.handleRequest(CreateDestination.java:38)[file:/C:/Talend/6.2.1/esb/activemq/webapps/admin/WEB-INF/classes/:]
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:965)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:867)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)[tomcat-servlet-api-8.0.24.jar:]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:841)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[tomcat-servlet-api-8.0.24.jar:]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.apache.activemq.web.AuditFilter.doFilter(AuditFilter.java:59)[activemq-web-5.13.3.jar:5.13.3]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:102)[file:/C:/Talend/6.2.1/esb/activemq/webapps/admin/WEB-INF/classes/:]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.Server.handle(Server.java:499)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_112]
[1]: https://i.stack.imgur.com/gNbCT.png
This is mostly because of incompatible Jetty version with JDK 1.8. You can resolve this
either by downgrading the JDK version to 1.7 and the set the JAVA_HOME or by upgrading the Jetty compatible with JDK 1.8.
I have got the similar issue with activemq version 5.10.0. Web console was working fine with JDK 1.7 but throwing an exception for JDK 1.8.
The root cause of the problem is due to corrupted kahadb database files of the Active MQ. Copied the kahadb folder from another runtime instance (similar setup) and restarted the Active MQ service. This issue is now fixed.

Jasper Report Server not working

I have a problem with the installation of Jasper Server v. 6.4.2 on Redhat 7.2
redhat-release-server-7.5-8.el7.x86_64.
My Tomcat is running and my postgresql
[root# jasperreports-server-cp-6.4.2]# ./ctlscript.sh restart
Using CATALINA_BASE: /opt/jasperreports-server-cp-6.4.2/apache-tomcat
Using CATALINA_HOME: /opt/jasperreports-server-cp-6.4.2/apache-tomcat
Using CATALINA_TMPDIR: /opt/jasperreports-server-cp-6.4.2/apache-tomcat/temp
Using JRE_HOME: /opt/jasperreports-server-cp-6.4.2/java
Using CLASSPATH: /opt/jasperreports-server-cp-6.4.2/apache-tomcat/bin/bootstrap.jar:/opt/jasperreports-server-cp-6.4.2/apache-tomcat/bin/tomcat-juli.jar
Using CATALINA_PID: /opt/jasperreports-server-cp-6.4.2/apache-tomcat/temp/catalina.pid
Tomcat stopped.
/opt/jasperreports-server-cp-6.4.2/apache-tomcat/scripts/ctl.sh : tomcat stopped
waiting for server to shut down.... done
server stopped
/opt/jasperreports-server-cp-6.4.2/postgresql/scripts/ctl.sh : postgresql stopped
waiting for server to start.... done
server started
/opt/jasperreports-server-cp-6.4.2/postgresql/scripts/ctl.sh : postgresql started at port 5432
Using CATALINA_BASE: /opt/jasperreports-server-cp-6.4.2/apache-tomcat
Using CATALINA_HOME: /opt/jasperreports-server-cp-6.4.2/apache-tomcat
Using CATALINA_TMPDIR: /opt/jasperreports-server-cp-6.4.2/apache-tomcat/temp
Using JRE_HOME: /opt/jasperreports-server-cp-6.4.2/java
Using CLASSPATH: /opt/jasperreports-server-cp-6.4.2/apache-tomcat/bin/bootstrap.jar:/opt/jasperreports-server-cp-6.4.2/apache-tomcat/bin/tomcat-juli.jar
Using CATALINA_PID: /opt/jasperreports-server-cp-6.4.2/apache-tomcat/temp/catalina.pid
Tomcat started.
/opt/jasperreports-server-cp-6.4.2/apache-tomcat/scripts/ctl.sh : tomcat started
but went I try to connect to http://localhost:8080/jasperserver-pro I have this Message
HTTP Status 404 – Not Found
Type Status Report
Message /jasperserver-pro
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/8.5.20
First of all just check the whether your war file (tomcat> webapps> jasperserver-pro) is there or not.
Sometimes it does get corrupt and deleted while you are running a js-install sh script for database setup.
So while setting up jasperserver, before running js-install sh (/buildomatic/) make one directory in at /buildmomatic/install_resources with name "war" and copy your war file from tomcat> webapps> to this directory. otherwise, jasperverserver will through error (/war/jasperserver not found).

JBoss 7.1.1 + mod_cluster : Session replication - Can't find resource org.jboss.as.web.session.LocalStrings

I am running JBoss 7.1.1 instances and httpd + mod_cluster in the standalone mode
Machine1: JBoss 7.1.1 , Apache httpd + mod_cluster (windows 7)
Machine2 : JBoss 7.1.1 (windows 7)
I am starting the nodes in with the below command
standalone -c standalone-ha.xml -b 192.168.4.76 -u 230.0.0.4 -Djboss.server.base.dir=../standalonenode1 -Djboss.node.name=node1
standalone -c standalone-ha.xml -b 192.168.4.81 -u 230.0.0.4 -Djboss.server.base.dir=../standalonenode2 -Djboss.node.name=node2
Apache httpd is installed as a service,configured with JBoss mod cluster subsystem.
I have written a sample application to test the session replication. When the node1 is down, the session object becomes null. The following contents are from server.log file,
22:36:23,111 DEBUG [org.apache.tomcat.util.http.Cookies] (ajp--192.168.4.81-9595-1) Cookies: Parsing b[]: JSESSIONID=yzC5kdQ1jre0T2FnNhVAI6J6.standalonenode1
22:36:23,134 DEBUG [org.apache.catalina.util.StringManager] (ajp--192.168.4.81-9595-1) Can't find resource org.jboss.as.web.session.LocalStrings ModuleClassLoader for Module "deployment.sampleSession-1.0.war:main" from Service Module Loader
The above setup is completely working fine in a remote environment(windows 2012) and i tried to set it up locally with windows 7 machines.
I opened up jboss-as-web-7.1.1.Final.jar and there is no class file with the name org.jboss.as.web.session.LocalStrings.
Please help.
Thanks
Venkat

Creating jRuby 1.9 Sinatra app with Warbler fails to start

I have a simple Sinatra app that I will be hosting in tomcat as a war. Everything works fine when I warble it and run it in tomcat. If I set the Ruby 1.9 flag in my warble config
config.webxml.jruby.compat.version = "1.9"
then the war doesn't run and I get this error in the tomcat logs
INFO: An exception happened during JRuby-Rack startup
no such file to load -- mysinatraapp
--- System
jruby 1.6.5.1 (ruby-1.9.2-p136) (2011-12-27 1bf37c2) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
Time: 2012-01-16 10:06:32 -0600
Server: Apache Tomcat/7.0.23
jruby.home: file:/apache-tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/jruby-stdlib-1.6.5.1.jar!/META-INF/jruby.home
--- Context Init Parameters:
jruby.compat.version = 1.9
jruby.max.runtimes = 1
jruby.min.runtimes = 1
public.root = /
rack.env = production
--- Backtrace
LoadError: no such file to load -- mysinatraapp
require at org/jruby/RubyKernel.java:1047
require at file:/apache-tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/jruby-stdlib-1.6.5.1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
(root) at /apache-tomcat-7.0.23/webapps/ROOT/WEB-INF/config.ru:2
instance_eval at org/jruby/RubyBasicObject.java:1720
initialize at file:/apache-tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/jruby-rack-1.1.3.jar!/vendor/rack-1.3.6/rack/builder.rb:51
(root) at /apache-tomcat-7.0.23/webapps/ROOT/WEB-INF/config.ru:1
the mysinatraapp.rb file is in the war so I don't understand why it can't find it. The app runs fine when just run from the command line in jruby so I don't think it is a compatibility issue with my code and 1.9. Even just removing these lines from the web.xml
<context-param>
<param-name>jruby.compat.version</param-name>
<param-value>1.9</param-value>
</context-param>
will let the app startup fine.
The versions of my jars are
jruby-core-1.6.5.1.jar
jruby-rack-1.1.3.jar
jruby-stdlib-1.6.5.1.jar
I think this can be explained by a subtle change in load path behavior between 1.8 and 1.9 (MRI too, not just JRuby). Witness:
$ jruby -v -rpp -e 'pp $LOAD_PATH'
jruby 1.7.0.dev (ruby-1.8.7-p357) (2012-01-12 0e83d96) (Java HotSpot(TM) Client VM 1.6.0_29) [darwin-i386-java]
["/Users/nicksieger/Projects/ruby/jruby/lib/ruby/site_ruby/1.8",
"/Users/nicksieger/Projects/ruby/jruby/lib/ruby/shared",
"/Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.8",
"."]
$ jruby -v --1.9 -rpp -e 'pp $LOAD_PATH'
jruby 1.7.0.dev (ruby-1.9.3-p6) (2012-01-12 0e83d96) (Java HotSpot(TM) Client VM 1.6.0_29) [darwin-i386-java]
["/Users/nicksieger/Projects/ruby/jruby/lib/ruby/site_ruby/1.9",
"/Users/nicksieger/Projects/ruby/jruby/lib/ruby/shared",
"/Users/nicksieger/Projects/ruby/jruby/lib/ruby/1.9"]
So you'll probably have to explicitly add '.' or $servlet_context.getRealPath("/WEB-INF") to the load path inside config.ru.