The goal was to use the Vaadin upload-component to upload files. On localhost it just works fine while on the server I get the error message below.
I am running the application on a Glassfish 3.1.2 (build 23) and use Vaadin 7.4.1. Also have tried other Glassfish versions except Glassfish 4, as I have a dependency that is not yet ready for Glassfish 4.
Things tried or checked:
Size-limit: Not defined, files used ranged from 10kb to 500kb.
JVM version: Neither using the exact same version (1.7.0_52), nor playing with different patch-levels or java versions (1.8) changed the situation.
Possible port restrictions: Used more restricted and completely open security groups.
Provider: Tried Amazon AWS and DigitalOcean.
Fresh system: Set up a fresh system with just minimal installations to run the application.
Hardware resources: Whilst Amazon AWS (micro) is quite limited, the instance of DigitalOcean runs with 2 CPUs and 4GB ram.
Glassfish: Used several 3.x versions.
Upload component: Used the vaadin provided upload component and the addon easy uploads.
Things not checked:
OS: My dev system is running Windows 8.1 while the server is linux based.
Glassfish 4.x: As my jenkins deploy plugin is not yet ready for Glassfish 4.x I did not try that yet.
Vaadin: Did not yet downgrade Vaadin.
The code of the upload component looks like this, might have modified it some times trying to fix the error.
Upload-Component:
ImageUploader receiver = new ImageUploader();
upload = new Upload("", receiver);
upload.addSucceededListener(receiver);
addComponent(upload);
ImageUploader (as taken from Book of Vaadin):
class ImageUploader implements Upload.Receiver, Upload.SucceededListener {
public OutputStream receiveUpload(String filename, String mimeType) {
// Create upload stream
FileOutputStream fos = null; // Stream to write to
File file = new File(filename);
try {
fos = new FileOutputStream(file);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
... database stuff ...
// Return the output stream to write to, necessary for framework
return fos;
}
public void uploadSucceeded(Upload.SucceededEvent event) {
... UI-Stuff ...
}
}
Using this on a localhost instance works all fine. But having it deployed to a server makes it return the following error immediately upon hitting the upload-button. However there is no UI-error-message shown.
[#|2015-03-17T15:42:14.153+0000|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=515;_ThreadName=Thread-2;|StandardWrapper$
java.io.IOException: The multipart stream ended unexpectedly
at com.vaadin.server.communication.FileUploadHandler.readLine(FileUploadHandler.java:302)
at com.vaadin.server.communication.FileUploadHandler.doHandleSimpleMultipartFileUpload(FileUploadHandler.java:360)
at com.vaadin.server.communication.FileUploadHandler.handleRequest(FileUploadHandler.java:285)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:350)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:745)
|#]
There is also a Vaadin [addon][3] that should make the process easier, but same results for localhost/server.
If it helps these technologies are used in the overall architecture:
Maven 3.2.1
Jenkins 1.602 (currently only used for build, not deploy)
Hibernate (not relevant, as the error occurs before hibernate is used)
MySQL (not relevant, as the error occurs before the database is accessed)
JDK: 1.7
IntelliJ Idea 14
Glassfish 3.1.2
Used server hosts are Amazon AWS and DigitalOcean.
Right now I don't have anymore clue what could fix this error. Any recommendations? Any further details I can provide?
-- UPDATE on JVM version --
Regarding the JVM I noticed that locally I recently installed 1.8 on my local machine. Using a 1.7 JVM does not reproduce the error.
-- UPDATE on JVM patch level --
Using the same patch level (1.7.0_75) in the development environment does not reproduce the error.
Upgrading to Glassfish 4.1 resolved the issue. The upload- and database-process now runs smoothly. However I was not able to identify the reason behind this issue.
Further information:
GlassFish Server Open Source Edition 4.1 (build 13)
I was pointed to a Vaadin-ticket that has the same issue, but the other way round: working with GF 4.1 but not with 3.1.
I was not able to search for another glassfish ticket that has something to do with this issue. If someone knows one, please tell me where I can add further information.
Related
Server Environment: Weblogic 10.3.6, JDK 1.7
I have a simple working Java SE client application runing with JDK 7. In client I am doing very simple JNDI look of a resource hosted server mentioned above.
Jars in ClassPath: wlthint3client.jar
public static void main(String[] args) throws Exception {
Hashtable t = new Hashtable();
t.put(InitialContext.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
t.put(InitialContext.PROVIDER_URL, "t3://localhost:7003/");
InitialContext ic = new InitialContext(t);
String jndiName = "weblogic.jdbc.DataSource.Workflow";
Object obj = ic.lookup(jndiName);
System.out.println("Found it");
}
I have to upgrade my working Java SE client application from JDK 7 to JDK 11. The server environment remains same.
As soon as I upgrade client to JDK 11, I hit following error. Which is expected because corba jars have been moved out from JDK 11.
Exception in thread "main" java.lang.NoClassDefFoundError: org/omg/CORBA/SystemException
at weblogic.jndi.WLInitialContextFactoryDelegate.<clinit>(WLInitialContextFactoryDelegate.java:202)
at weblogic.jndi.spi.EnvironmentManager$DefaultFactoryMaker.<clinit>(EnvironmentManager.java:27)
at weblogic.jndi.spi.EnvironmentManager.getInstance(EnvironmentManager.java:49)
at weblogic.jndi.Environment.getContext(Environment.java:315)
at weblogic.jndi.Environment.getContext(Environment.java:285)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at java.naming/javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:730)
at java.naming/javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
at java.naming/javax.naming.InitialContext.init(InitialContext.java:236)
at java.naming/javax.naming.InitialContext.<init>(InitialContext.java:208)
at com.test.JndiLookupTestJdk11.main(JndiLookupTestJdk11.java:16)
Added jacorb-omgapi-3.8.jar to client classpath to fix above exception.
After this I am hitting following timeout exception and not giving any clue. Server is up and running because my old client is working.
Error is at this line
InitialContext ic = new InitialContext(t);
Stacktrace
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by weblogic.rjvm.MsgAbbrevInputStream (file:/C:/Users/ke64/OneDrive%20-%20Sun%20Life%20Financial/work_eclipse-jee-2018-12-R/jndi-lookup-test-jdk11/lib/wlthint3client.jar) to method java.io.ObjectInputStream.clear()
WARNING: Please consider reporting this to the maintainers of weblogic.rjvm.MsgAbbrevInputStream
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://localhost:7003: Bootstrap to: localhost/0:0:0:0:0:0:0:1:7003' over: 't3' got an error or timed out]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40)
at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:792)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:368)
at weblogic.jndi.Environment.getContext(Environment.java:315)
at weblogic.jndi.Environment.getContext(Environment.java:285)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at java.naming/javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:730)
at java.naming/javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
at java.naming/javax.naming.InitialContext.init(InitialContext.java:236)
at java.naming/javax.naming.InitialContext.<init>(InitialContext.java:208)
at com.test.JndiLookupTestJdk11.main(JndiLookupTestJdk11.java:16)
Caused by: java.net.ConnectException: t3://localhost:7003: Bootstrap to: localhost/0:0:0:0:0:0:0:1:7003' over: 't3' got an error or timed out
at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:216)
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:165)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:353)
... 8 more
Caused by: java.rmi.ConnectException: Bootstrap to: localhost/0:0:0:0:0:0:0:1:7003' over: 't3' got an error or timed out
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:365)
at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:260)
at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197)
at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238)
at weblogic.rjvm.RJVMFinder.findOrCreateRemoteCluster(RJVMFinder.java:316)
at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:205)
... 11 more
Questions
Has anyone got it working with configuration? Any idea
how to fix this? Do I need to add any specific version of corba jars?
I am thinking that standard J2EE feature of JNDI lookup should work. Is Weblogic 10.3.6 not compatible with JDK 11 client?
Any help is greatly appreciated.
There is no shipping version of WebLogic Server that works on JDK 11.
WLS 10.3.6 isn't even close (it doesn't even work on JDK 8).
The closest shipping version is WLS 12.2.1.3.0, which was pretty much working on JDK9 but has been broken with subsequent changes in JDK 10 and JDK 11.
A version of WebLogic Server that is certified on JDK 11 is planned for the second half of 2019.
Responding to an old question .. I had to look into a similar scenario recently. Just adding my findings here. Real credit should go to stephen-felts as his reply gave me the idea to try this out.
Looked at a Spring Boot client on OpenJDK 11 attempting to talk to JMS queues on WebLogic 10.3.6.0 on Oracle JDK 6.
Trying to use the wlthint3client.jar from 10.3.6 wasn't of much help because of the CORBA dependencies. Following this SAS post for dependencies to add for JDK 11. Could make the ClassNotFound errors go away by adding dependencies org.glassfish.corba:glassfish-corba-org:4.2.4 org.glassfish.pfl: pfl-tf:4.1.2 but still kept seeing the 't3' got an error or timed out exception message as the OP.
Seeing WLS 14.1.1 is certified for JDK 11, installed that and copied out the bundled wlthint3client.jar from the <WLS_SERVER>/lib folder and configured the SpringBoot client to use it. Could successfully post messages to the queue.
I couldn't find any official confirmation on the Oracle website though, so I don't know if this approach is good enough to use in a production environment.
Got the same Problem whilst using jdk11 and wlthint3client 10.3.6.0.181016 and trying to connect to weblogic with t3.
Solution was to use the glassfish-dependencies mentioned above (but there is a typo, must be -orb in artId; see below for the correct ones) and using Version 12.2.1.3.180717 of wlthint3client. Here's the Set:
<dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>wlthint3client</artifactId>
<version>12.2.1.3.180717</version>
</dependency>
<dependency>
<groupId>org.glassfish.corba</groupId>
<artifactId>glassfish-corba-orb</artifactId>
<version>4.2.4</version>
</dependency>
<dependency>
<groupId>org.glassfish.pfl</groupId>
<artifactId>pfl-tf</artifactId>
<version>4.1.2</version>
</dependency>
I am using Grails 2.4.0.RC1 (and JDK 1.7.0_55) and whenever I browse to any app view that makes use of javascript files from the web-app folder, the java process seems to lock those files.
So I cannot work on any of those javascript files any more since when I try to save changes Windows 7 will not let me do it.
I used Process Explorer to check which process is locking the files and it's the java process running the grails app indeed.
At first I thought that this problem could be related to the new asset-pipeline:1.8.7 plugin which I am using. So I uninstalled it to check if the problem was still there... and it was.
The same app was running on Grails 2.3.5 just fine (although we were using an older JDK too... I must check with JDK 1.7.0_55).
By the way, something similar happened with a much older version of Grails: https://jira.grails.org/browse/GRAILS-3585
Is Anyone experiencing the same problem?
UPDATE 1:
I have tested this problem running the app on different versions of java and these are my results:
Win7-64bits, grails2.4.0.RC1, jdk1.7.0_55 -> PROBLEM OCCURS
Win7-64bits, grails2.4.0.RC1, jdk1.7.0_25 -> PROBLEM OCCURS
Win7-64bits, grails2.4.0.RC1, jdk1.6.0_18 -> OK
UPDATE 2:
I created a blank app (which uses Tomcat by default) and everything works fine.
The same blank app using jetty-plugin (with Jetty8) DOES present the problem.
I am further investigating this now.
I found the problem.
It had to do with the jetty-plugin indeed.
On the official version of the plugin 2.0.3 which uses Jetty7, the locking problem is NOT present. But this plugin uses a very old version of Jetty, so it's no use.
On the branch of the plugin created to run Jetty8:
https://github.com/grails-plugins/grails-jetty/tree/2.0.x
... the problem is there.
Also, on the new grails jetty plugin version 3.0.x (which uses Jetty 9.0.x), the problem is there too!
UPDATE 1:
Have a look at:
Jetty locking static files in Windows
Apparently the "useFileMappedBuffer" init-param of Jetty has to be set to false to prevent file locking.
You can use a local version of the jetty plugin and modify the above-mentioned property on [jetty-plugin]/grails-app/conf/webdefault.xml
I have recently started to work with grails. I was able to create applications and generate stuff. Yesterday I wanted to resume my work, after a little break and ran into the following error, when trying to create a new project:
Command terminated with an exception:
org.grails.ide.eclipse.longrunning.client.GrailsProcessDiedException: Grails process died
(see details for partial output)
Grails process died
------System.out:-----------
------System.err:-----------
This error only occurs when I use the SpringSourceTool, if I try using the command line it works fine. My first reaction was to change the java version from 1.8 to 1.7, but that didn't help. My environment variables look like this (I am running Fedora Linux 19)
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.0.x86_64
GRAILS_HOME=/home/peer/grails/grails-2.3.0
They are also included in the PATH variable.
Can anybody help? Thanks, Peer
This is a known issue in STS:
https://issuetracker.springsource.com/browse/STS-3277
A work-around is provided in the link.
For anyone pulling their hair out trying to create a grails project using the STS extension for Grails, here is my setup and following is what I did to get it working:
-- OSX 10.8.4 Build 12E3067 --
-- STS Version 3.4.0 --
-- Grails 2.3.3 (installed separately to STS) --
Fresh installed STS 3.4.0
I *de*selected the Preferences/Groovy/Compiler/Enable checking for mismatches between
project and workspace Groovy compiler levels
I ONLY selected the Grails Support option when installing the extensions (nothing else)
Restart STS 3.4.0 (i.e. restart eclipse)
I then pointed my Grails project to my existing Grails 2.3.3 installation
Make sure that the environment variable GRAILS_HOME is set and exported in the same
shell from which you invoke STS otherwise you will get a process termination error in
Eclipse (STS)
This worked.
I have a Grails app that has been running on CloudFoundry for months. I updated the app from Grails 2.0.4 to 2.1.0 and also updated a few plugins I have been using.
Now when I push the app to CloudFoundry and do the start, I receive the error:
'appname' state is undetermined, not enough information available.
The tomcat Catalina log shows the NoClassDefFoundError below.
I've read about issues with the Ivy cache but have not looked into that yet. I have updated vmc to the latest version (0.3.18).
SEVERE: Error deploying web application directory ROOT
java.lang.NoClassDefFoundError: org/apache/tomcat/PeriodicEventListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1128)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.PeriodicEventListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
... 34 more
I've just had this problem when migrating from Grails 1.3.7 to 2.1.1.
I fixed it by unpacking the WAR file, removing all the tomcat-*.jar files (there are several tomcat-embedded jars) and then restarting Tomcat.
I've got Tomcat 6 running and I wondered if that was the issue? Anyway my app is working for now--though it's not the best installation procedure!
I resolved the issue by rolling back to Grails 2.0.4 from 2.1.0. I think the issue might be the one described here. But the workaround provided by Graeme did not resolve the issue when deploying to cloudfoundry.com.
Running this app locally under Grails 2.1.0 had no problems but it would not work under cloudfoundry.com.
I'm not using CloudFoundry, but experienced the same issue deploying Grails 2.1 WARs to Tomcat 6. For now, I've configured _Events.groovy to remove the embedded tomcat- and grails-plugin-tomcat- jars from the WAR staging area right before WAR generation:
eventCreateWarStart = { warName, stagingDir ->
// Work-around to remove tomcat jars from .war.
File libDir = new File("${stagingDir}/WEB-INF/lib/")
if (libDir.exists() && libDir.isDirectory()) {
ant.echo(message: 'Events.eventCreateWarStart: Removing embedded tomcat .jars from .war.')
libDir.eachFileMatch(FileType.FILES, ~/^(tomcat|grails-plugin-tomcat).*\.jar$/) { File jarToRemove ->
jarToRemove.delete()
}
}
}
(The libDir.exists() && libDir.isDirectory() check may not be necessary.)
This is working for now, but it would be nice to get a real solution rather than a workaround.
I had the same issue with spring apps. After restarting the services ~cloudfoundry/vcap/dev_setup/bin/vcap stop, cloudfoundry/vcap/dev_setup/bin/vcap start I managed to push my application without any issue.Installin the CF on a more powerful machine may help. What is your current HW?
I know this question is about Grails and CF, but Google doesn't care too much about that... ;)
java.lang.ClassNotFoundException: org.apache.tomcat.PeriodicEventListener
may also appear when Eclipse WTP tries to publish a Maven-project and you run it. Somewhere in your hierarchy of dependencies you should find one to a tomcat-library, even if its scope is provided or test.
Check the lib-directory of your WTP-webapp and notice the bunch of tomcat-libraries in there.
Newbie Question:
I've been required to deploy a grails app to jboss 5. I'm having a hell of a time figuring out how to take advantage of the grails jbossas plugin. I've followed the documentation as best as I know how, but I get the same exceptions just as if the plugin was never there.
Here's the documentation i've been following:
http://grails-plugins.github.com/grails-jbossas/docs/manual/guide/2%20Usage.html
I've added the plugin to the BuildConfig.groovy plugin{} closure. I then called grails war. Nothing happens and my war deploy bombs out.
Could somebody give a newbie a little hand holding to get this plugin to work? Unfortunately, I'm finding the documentation to be wanting in the regard of actually telling you how to use it, or when the plugin will do its magic.
UPDATE:
My environment:
Mac OS X Lion Dev machine
Grails 2.0.3
JBoss 5.1.0 -- running a Liferay instance.
Burt, I've done the following:
grails generate-jboss-deploy 5
grails war.
scp the generated war file to the deploy-jboss directory on my remote server.
Dutifully, jboss picked up the new war and attempted to deploy it. I'm getting the following (now dreaded) exception:
Caused by: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator
Per the usage instructions, I've modified Datasource.groovy's hibernate configuration:
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = true
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
validator.apply_to_ddl = false
validator.autoregister_listeners = false
}
The only file that seems to have been modified or created by running the generate-jboss-delpoy 5 script is WEB-INF/jboss-web.xml. It's contents are:
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
sappi-label:loader=sappi-label.war
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
</jboss-web>
I confirmed that the jboss-web.xml file is present in the generated war file (exploded, then checked the directory).
Burt: what files other than jboss-web.xml should have been altered?
UPDATE (Again):
I don't think there's anything wrong with the jbossas plugin. I've done more testing and see that the plugin is doing what it is supposed to do: remove jars, put in jboss-web.xml. I haven't been able to confirm that it modifies the hibernate config, but I assume it is. I think the problem lies within the server I'm attempting to deploy to, a Liferay instance.
regardless of what I'm doing I get an exception saying that slf4j was unable to load successfully. Nothing more, nothing less. I'll keep whacking away at the problem, but it is out of scope of my original question. Burt, thanks for your help. If you have any ideas about why slf4j vomits in a Liferay/jboss environment, please let me know.
Regards.
Thanks!
I guess I didn't make it clear that you need to run the generate-jboss-deploy script, passing in the major version of JBoss that you're using, so in your case generate-jboss-deploy 5. I've updated the docs to describe this.
If this doesn't help please update your question with some indication of what the errors that you're seeing are.