Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
I guess I was confusing in my statements. What I meant (or meant to mean) is that the issue might only be fixed by completely isolating the app from the JBoss class-path (or class loader), which we failed to do (warning that we still receive proves that). That is, parent class loader class-path is still visible from our application, which makes slf4j complain about multiple bindings. However, in our case we have minimized the slf4j errors to the following set > 2011-05-13 18:46:42,072 ERROR [STDERR] (RMI TCP Connection(4)-127.0.0.1) > SLF4J: Class path contains multiple SLF4J bindings. > 2011-05-13 18:46:42,073 ERROR [STDERR] (RMI TCP Connection(4)-127.0.0.1) > SLF4J: Found binding in > [vfszip://lib/slf4j-log4j12-1.6.1.jar/org/slf4j/impl/StaticLoggerBinder.class] > 2011-05-13 18:46:42,073 ERROR [STDERR] (RMI TCP Connection(4)-127.0.0.1) > SLF4J: Found binding in > [vfszip://common/lib/slf4j-jboss-logging.jar/org/slf4j/impl/StaticLoggerBinder.class] > 2011-05-13 18:46:42,073 ERROR [STDERR] (RMI TCP Connection(4)-127.0.0.1) > SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an > explanation. > and luckily it does work for us. In JBoss 7 they are going to change the class loading model and class loading configuration options, making it possible to overcome this issue (at least that's what I've heard somewhere, need a proof link). We're using JBoss 5.1 and the following code for META-INF/jboss-app.xml file of our application's ear file > > > com.company:loader=MyAppName.ear > > java2ParentDelegation=false > > > > I don't know whether things have changed for JBoss 6 or are different for war files, so isolation config you're using might turn out to be correct as well. I wish I could help you more. If you get lucky solving this issue, please let me know :) Regards, Roman -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-war-JBoss-AS6-MySQL-tp6309076p6369009.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
To check the class loaders andyp wrote: > can't find the tool you mention. 1) Go to JBoss JMX console (usually it's available at http://localhost:8080/jmx-console/ ) 2) In the 'jboss.classloader' locate string similar to 'deployment/xwiki.war', 3) Click on that link and you will be forwarded to XWiki MBean Inspector 4) use findClassLoaderForClass operation with 'org.slf4j.LoggerFactory' parameter to check which class loader it comes from Regards, Roman -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-war-JBoss-AS6-MySQL-tp6309076p6368757.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
Hi Roman, In another thread you said: "This may not be a critical issue (in our case things worked, but we've isolated our web application's classpath and yet the warning got printed), but worth double-checking." Can I ask how you achieved classpath isolation? And what version of JBoss you are using? My attempts with adding the below section to my $JBOSS_HOME/server/default/deploy/xwiki.war/WEB-INF/jboss-web.xml appears to make no difference: org.xwiki:archive=xwiki.war java2ParentDelegation=false Cheers, Andy -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-war-JBoss-AS6-MySQL-tp6309076p6361256.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
Hi Roman, Thanks for your reply – I'll try and find out what I can but as yet can't find the tool you mention. FYI, XWiki can't use JBosses SLF4J jars and JBoss can't use XWikis SLF4J jars (or at least it breaks the web interface for the Administration console). To be honest I think it's back to the drawing board for me. Thanks to all for your help anyway. Cheers, Andy -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-war-JBoss-AS6-MySQL-tp6309076p6359968.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
Hi Andy, Usually class cast exceptions with JBoss indicate that you have several jars of the same library in your class path. The class looks proper but being loaded with different class loaders, it's actually different. So what you should do now is to carefully check the JBoss class path to see where do the org.apache.xerces.jaxp.DocumentBuilderFactoryImpl and javax.xml.parsers.DocumentBuilderFactory come from. I believe there's a tool (somewhere in JBoss console) that lets you see where the classes in the classpath were loaded from. Regarding your question about slf4j - most likely you did the right thing :) http://xwiki.475771.n2.nabble.com/Proposal-Switch-from-Commons-Logging-Log4j-to-SLF4J-Logback-tp6343910p6352403.html Regards, Roman -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-war-JBoss-AS6-MySQL-tp6309076p6356605.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
Hi all, Not sure if anyone can help here but I am still unable to deploy XWiki 3.0 on JBoss 6.0.0. I noticed the following error in the startup output (see previous post): 13:21:56,380 ERROR [STDERR] SLF4J: Class path contains multiple SLF4J bindings. 13:21:56,381 ERROR [STDERR] SLF4J: Found binding in [vfs:/java/apps/jboss/jboss-6.0.0.Final/common/lib/slf4j-jboss-logmanager.jar/org/slf4j/impl/StaticLoggerBinder.class] 13:21:56,381 ERROR [STDERR] SLF4J: Found binding in [vfs:/java/apps/jboss/jboss-6.0.0.Final/server/default/deploy/xwiki.war/WEB-INF/lib/slf4j-log4j12-1.6.1.jar/org/slf4j/impl/StaticLoggerBinder.class] 13:21:56,381 ERROR [STDERR] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 13:21:56,820 INFO [STDOUT] 2011-05-06 13:21:56,798 [Thread-2] ERROR reflections.Reflections - could not create Vfs.Dir from url. ignoring the exception and continuing 13:21:56,834 INFO [STDOUT] org.reflections.ReflectionsException: could not create Dir using org.reflections.vfs.Vfs$DefaultUrlTypes$2 from url vfs:/java/apps/jboss/jboss-6.0.0.Final/server/default/deploy/xnio-provider.jar!/xnio-nio.jar/META-INF/maven/ 13:21:56,834 INFO [STDOUT] at org.reflections.vfs.Vfs.fromURL(Vfs.java:99) 13:21:56,834 INFO [STDOUT] at org.reflections.vfs.Vfs.fromURL(Vfs.java:89) 13:21:56,835 INFO [STDOUT] at org.reflections.Reflections.scan(Reflections.java:136) 13:21:56,835 INFO [STDOUT] at org.reflections.Reflections.(Reflections.java:91) Due to the above error I removed slf4j-jboss-logmanager.jar and slf4j-api.jar from $JBOSS/common/lib. And because XWiki's implementation is newer, I moved slf4j-api-1.6.1.jar and slf4j-log4j12-1.6.1.jar into $JBOSS/common/lib. I don't know whether this was the correct thing to do(?) but if it was, it's given me another error: 12:31:05,683 ERROR [MbeansDescriptorsDOMSource] Error reading descriptors : java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory . . . 12:31:07,705 ERROR [Reflections] could not create Vfs.Dir from url. ignoring the exception and continuing: org.reflections.ReflectionsException: could not create Dir using org.reflections.vfs.Vfs$DefaultUrlTypes$2 from url vfs:/java/apps/jboss/jboss-6.0.0.Final/server/default/deploy/xnio-provider.jar!/xnio-nio.jar/META-INF/maven/ . . . 12:31:08,753 INFO [Reflections] Reflections took 1344 ms to scan 355 urls, producing 3 keys and 1168 values 12:31:11,739 ERROR [[/xwiki]] Exception starting filter Resteasy: java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate MessageBodyReader . . . Any help greatly appreciated. Cheers, Andy -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-war-JBoss-AS6-MySQL-tp6309076p6356136.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
Hi Sergiu, I still receive an error in deployment but I feel we're getting closer. Here's an update of the changes I've made and the error I now receive: == In bin\run.conf.bat (if you're on windows) you should search for the line setting Xms and MaxPermSize, and replace it with: set "JAVA_OPTS=-Xms512M -Xmx2048M -XX:MaxPermSize=512M" == I am using Linux so amended the JAVA_OPTS variable as you suggested within bin/run.conf. == > > org.xwiki:archive=xwiki.war > This is wrong, the server manages to start up because the jboss-web.xml file is invalid, so it won't even try to start xwiki.war Actually, since there is no real class conflict, the classloader configuration is not important, you can remove that part completely. == Like you said, this makes no difference so I have removed this section completely. It now look like: jdbc/XWikiDS javax.sql.DataSource java:/XWikiDS == There is another real error that occurs, and it's caused by a bad jar file. You must solve it manually: - locate WEB-INF/jaxb-xjc-2.1.8.jar - delete the 1.0 directory from it (for example you can extract, delete and repack the jar) == Here I extracted the JAR, removed the “1.0” directory and repacked the JAR as follows: jar xf jaxb-xjc-2.1.8.jar rm -vRf 1.0/ jar cvf jaxb-xjc-2.1.8.jar ./* == Right now I don't get any more class loading errors, but I still have an error about the missing data source, maybe I didn't configure it correctly: == Yeah, looks like I setup the data source wrong – the jndi name within jboss-web.xml should have been “java:/XWiki”, not “java:jdbc/XWikiDS”. Now the JBoss server starts (given enough time) but XWiki fails with the first real error being: 13:20:58,486 INFO [TomcatDeployment] deploy, ctxPath=/ 13:21:54,457 INFO [TomcatDeployment] deploy, ctxPath=/xwiki 13:21:54,657 ERROR [MbeansDescriptorsDOMSource] Error reading descriptors : java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123) [:1.6.0_24] at org.apache.tomcat.util.DomUtil.readXml(DomUtil.java:242) [:6.0.0.Final] at org.apache.tomcat.util.modeler.modules.MbeansDescriptorsDOMSource.execute(MbeansDescriptorsDOMSource.java:86) [:6.0.0.Final] at org.apache.tomcat.util.modeler.modules.MbeansDescriptorsDOMSource.loadDescriptors(MbeansDescriptorsDOMSource.java:76) [:6.0.0.Final] at org.apache.tomcat.util.modeler.Registry.load(Registry.java:753) [:6.0.0.Final] . . . Please see http://xwiki.475771.n2.nabble.com/file/n6337659/jboss_error.txt here for the full startup log. Thanks again for all the help here. Cheers, Andy -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-war-JBoss-AS6-MySQL-tp6309076p6337659.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
On 05/04/2011 06:44 PM, andyp wrote: > Hi Sergiu, > > Unfortunately this doesn't work for me. With the below entry in my > jboss-web.xml, the Virtual Machine JBoss is on hangs within 7 minutes and I > have to reboot the VM. Also at no point am I able to connect to the default > JBoss page (http://localhost:8080). To see the full startup log, please > find the attached - > http://xwiki.475771.n2.nabble.com/file/n6331582/jboss_startup_error.txt > jboss_startup_error.txt . > > > > org.xwiki:archive=xwiki.war > > java2ParentDelegation=false > > > > <1 Min: > http://xwiki.475771.n2.nabble.com/file/n6331582/Selection_078.png > > <2 Mins: > http://xwiki.475771.n2.nabble.com/file/n6331582/Selection_079.png > > 7 Mins (flat-lined): > http://xwiki.475771.n2.nabble.com/file/n6331582/Selection_082.png Right, I forgot to mention that I had to increase the memory limits a lot to get it to work. In bin\run.conf.bat (if you're on windows) you should search for the line setting Xms and MaxPermSize, and replace it with: set "JAVA_OPTS=-Xms512M -Xmx2048M -XX:MaxPermSize=512M" > As reported before, the only way I can get JBoss to complete it's startup > and not crash the machine is by using the following entry in jboss-web.xml. > However, XWiki does still not start under this config. > > > org.xwiki:archive=xwiki.war > This is wrong, the server manages to start up because the jboss-web.xml file is invalid, so it won't even try to start xwiki.war Actually, since there is no real class conflict, the classloader configuration is not important, you can remove that part completely. > Many thanks, > Andy > -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
Hi Sergiu, Unfortunately this doesn't work for me. With the below entry in my jboss-web.xml, the Virtual Machine JBoss is on hangs within 7 minutes and I have to reboot the VM. Also at no point am I able to connect to the default JBoss page (http://localhost:8080). To see the full startup log, please find the attached - http://xwiki.475771.n2.nabble.com/file/n6331582/jboss_startup_error.txt jboss_startup_error.txt . org.xwiki:archive=xwiki.war java2ParentDelegation=false <1 Min: http://xwiki.475771.n2.nabble.com/file/n6331582/Selection_078.png <2 Mins: http://xwiki.475771.n2.nabble.com/file/n6331582/Selection_079.png 7 Mins (flat-lined): http://xwiki.475771.n2.nabble.com/file/n6331582/Selection_082.png As reported before, the only way I can get JBoss to complete it's startup and not crash the machine is by using the following entry in jboss-web.xml. However, XWiki does still not start under this config. org.xwiki:archive=xwiki.war Many thanks, Andy -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-war-JBoss-AS6-MySQL-tp6309076p6331582.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
On 05/04/2011 02:04 AM, Sergiu Dumitriu wrote: > On 05/04/2011 01:54 AM, andyp wrote: >> Hi Sergiu, >> >> If I try that I get the same class loading error and JBoss is unable to >> start: > > I'll download a JBoss and try for myself, since debugging over the email > is quite slow. > > Unfortunately it's quite late for me, I'll try it tomorrow and reply > with the outcome. > > Just to make sure, you're using JBoss Application Server 6.0.0, the > community edition, right? OK, I have an answer. The stacktraces you get are not really a problem. As you can see, those are WARN messages. You can safely ignore those. They are caused by the fact that we're mixing 1.0 and 1.4 jackrabbit modules, and some of the classes have changed their signatures. This is not a problem, since we're not actually using those classes that are incompatible. Starting JBoss take a lot of time (12+ minutes on my machine), so be patient when loading. You must wait until the startup script prints a message like this: > 13:09:00,862 INFO [org.jboss.bootstrap.impl.base.server.AbstractServer] > JBossAS [6.0.0.Final "Neo"] Started in 12m:17s:88ms There is another real error that occurs, and it's caused by a bad jar file. You must solve it manually: - locate WEB-INF/jaxb-xjc-2.1.8.jar - delete the 1.0 directory from it (for example you can extract, delete and repack the jar) Right now I don't get any more class loading errors, but I still have an error about the missing data source, maybe I didn't configure it correctly: > Deployment "jboss-switchboard:appName=xwiki,module=xwiki" is missing the > following dependencies: > Dependency "java:jdbc/XWikiDS" (should be in state "Installed", but is > actually in state "** NOT FOUND Depends on 'java:jdbc/XWikiDS' **") -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
That correct, I am using AS 6.0.0 community edition. Thanks for your help here Sergiu, I really appreciate it! -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-war-JBoss-AS6-MySQL-tp6309076p6329250.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
On 05/04/2011 01:54 AM, andyp wrote: > Hi Sergiu, > > If I try that I get the same class loading error and JBoss is unable to > start: I'll download a JBoss and try for myself, since debugging over the email is quite slow. Unfortunately it's quite late for me, I'll try it tomorrow and reply with the outcome. Just to make sure, you're using JBoss Application Server 6.0.0, the community edition, right? -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
Hi Sergiu, If I try that I get the same class loading error and JBoss is unable to start: JBoss Bootstrap Environment JBOSS_HOME: /usr/local/jboss JAVA: /usr/lib/jvm/java-6-sun/bin/java JAVA_OPTS: -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=360 -Dsun.rmi.dgc.server.gcInterval=360 -Djava.net.preferIPv4Stack=true -Dprogram.name=run.sh -Djava.li$ CLASSPATH: /usr/local/jboss/bin/run.jar:/usr/lib/jvm/java-6-sun/lib/tools.jar 23:36:21,795 INFO [AbstractJBossASServerBase] Server Configuration: JBOSS_HOME URL: file:/java/apps/jboss/jboss-6.0.0.Final/ Bootstrap: $JBOSS_HOME/server/default/conf/bootstrap.xml Common Base: $JBOSS_HOME/common/ Common Library: $JBOSS_HOME/common/lib/ Server Name: default Server Base: $JBOSS_HOME/server/ Server Library: $JBOSS_HOME/server/default/lib/ Server Config: $JBOSS_HOME/server/default/conf/ Server Home: $JBOSS_HOME/server/default/ Server Data: $JBOSS_HOME/server/default/data/ Server Log: $JBOSS_HOME/server/default/log/ Server Temp: $JBOSS_HOME/server/default/tmp/ 23:36:21,798 INFO [AbstractServer] Starting: JBossAS [6.0.0.Final "Neo"] 23:36:23,652 INFO [ServerInfo] Java version: 1.6.0_24,Sun Microsystems Inc. 23:36:23,652 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_24-b07) 23:36:23,652 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 19.1-b02,Sun Microsystems Inc. 23:36:23,653 INFO [ServerInfo] OS-System: Linux 2.6.35-28-server,amd64 23:36:23,653 INFO [ServerInfo] VM arguments: -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=360 -Dsun.rmi.dgc.server.gcInterval=360 -Djava.net.preferIPv4Stack=true -Dprog$ 23:36:23,701 INFO [JMXKernel] Legacy JMX core initialized 23:36:30,013 INFO [AbstractServerConfig] JBoss Web Services - Stack CXF Server 3.4.1.GA 23:36:30,707 INFO [JSFImplManagementDeployer] Initialized 3 JSF configurations: [Mojarra-1.2, MyFaces-2.0, Mojarra-2.0] 23:36:37,193 WARNING [FileConfigurationParser] AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal 23:37:44,064 WARN [ClassLoaderManager] Unexpected error during load of:org.apache.jackrabbit.core.query.lucene.WildcardQuery$WildcardQueryWeight: java.lang.IncompatibleClassChangeError: Implementing class at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_24] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_24] at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_24] at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:52) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:650) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:609) [jboss-classloader.jar:2.2.0.GA] at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_24] at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:608) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:585) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:156) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.filter.FilteredDelegateLoader.doLoadClass(FilteredDelegateLoader.java:141) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:132) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:461) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:262) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:161) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:260) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1152) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:886) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:505) [jboss-classloader.jar:2.2.0.GA] at o
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
On 05/04/2011 12:21 AM, andyp wrote: > Vincent and Sergiu – thanks both for all your replies. Unfortunately the > headache continues. I'm not sure if this is correct but making the below > changes to jboss-web.xml no longer crashes JBoss but XWiki still fails with > the stack trace at the bottom of this message. > > “Should we create a jboss-web.xml configuration file as well? > > We recently added a sun-web.xml file to fix another classloading > problem, this time for GlassFish. “ > > To someone like me – this seems like a great idea. Anything you can do to > ease the learning curve for a newbie trying to setup and learn XWiki can't > be bad. > > Cheers, > Andy > > > $JBOSS_HOME/server/default/deploy/xwiki.war/WEB-INF/jboss-web.xml: > > > > > com.xwiki:archive=xwiki.war > > > jdbc/XWikiDS > javax.sql.DataSource > java:jdbc/XWikiDS > > > Can you try this one: > > > > > org.xwiki:archive=xwiki.war > > java2ParentDelegation=false > > > > jdbc/XWikiDS > javax.sql.DataSource > java:jdbc/XWikiDS > > -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
Vincent and Sergiu – thanks both for all your replies. Unfortunately the headache continues. I'm not sure if this is correct but making the below changes to jboss-web.xml no longer crashes JBoss but XWiki still fails with the stack trace at the bottom of this message. “Should we create a jboss-web.xml configuration file as well? We recently added a sun-web.xml file to fix another classloading problem, this time for GlassFish. “ To someone like me – this seems like a great idea. Anything you can do to ease the learning curve for a newbie trying to setup and learn XWiki can't be bad. Cheers, Andy $JBOSS_HOME/server/default/deploy/xwiki.war/WEB-INF/jboss-web.xml: com.xwiki:archive=xwiki.war jdbc/XWikiDS javax.sql.DataSource java:jdbc/XWikiDS = JBoss Bootstrap Environment JBOSS_HOME: /usr/local/jboss JAVA: /usr/lib/jvm/java-6-sun/bin/java JAVA_OPTS: -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=360 -Dsun.rmi.dgc.server.gcInterval=360 -Djava.net.preferIPv4Stack=true -Dprogram.name=run.sh -Djava.li$ CLASSPATH: /usr/local/jboss/bin/run.jar:/usr/lib/jvm/java-6-sun/lib/tools.jar = 21:35:28,226 INFO [AbstractJBossASServerBase] Server Configuration: JBOSS_HOME URL: file:/java/apps/jboss/jboss-6.0.0.Final/ Bootstrap: $JBOSS_HOME/server/default/conf/bootstrap.xml Common Base: $JBOSS_HOME/common/ Common Library: $JBOSS_HOME/common/lib/ Server Name: default Server Base: $JBOSS_HOME/server/ Server Library: $JBOSS_HOME/server/default/lib/ Server Config: $JBOSS_HOME/server/default/conf/ Server Home: $JBOSS_HOME/server/default/ Server Data: $JBOSS_HOME/server/default/data/ Server Log: $JBOSS_HOME/server/default/log/ Server Temp: $JBOSS_HOME/server/default/tmp/ 21:35:28,230 INFO [AbstractServer] Starting: JBossAS [6.0.0.Final "Neo"] 21:35:29,998 INFO [ServerInfo] Java version: 1.6.0_24,Sun Microsystems Inc. 21:35:29,998 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_24-b07) 21:35:29,999 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 19.1-b02,Sun Microsystems Inc. 21:35:29,999 INFO [ServerInfo] OS-System: Linux 2.6.35-28-server,amd64 21:35:29,999 INFO [ServerInfo] VM arguments: -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=360 -Dsun.rmi.dgc.server.gcInterval=360 -Djava.net.preferIPv4Stack=true -Dprog$ 21:35:30,039 INFO [JMXKernel] Legacy JMX core initialized 21:35:36,611 INFO [AbstractServerConfig] JBoss Web Services - Stack CXF Server 3.4.1.GA 21:35:37,282 INFO [JSFImplManagementDeployer] Initialized 3 JSF configurations: [Mojarra-1.2, MyFaces-2.0, Mojarra-2.0] 21:35:43,385 ERROR [AbstractKernelController] Error installing to Parse: name=vfs:///java/apps/jboss/jboss-6.0.0.Final/server/default/deploy/xwiki.war state=PreParse mode=Manual requiredState=Parse: org.jboss.deployers.spi.DeploymentExce$ at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA] at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:383) [:2.2.0.GA] at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:343) [:2.2.0.GA] at org.jboss.deployment.JBossWebAppParsingDeployer.createMetaData(JBossWebAppParsingDeployer.java:99) [:6.0.0.Final] at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:315) [:2.2.0.GA] at org.jboss.deployment.JBossWebAppParsingDeployer.createMetaData(JBossWebAppParsingDeployer.java:80) [:6.0.0.Final] at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:255) [:2.2.0.GA] at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA] at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA] at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA] at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA] at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA] at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA] at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
On May 3, 2011, at 9:40 AM, Vincent Massol wrote: > > On May 3, 2011, at 9:39 AM, Vincent Massol wrote: > >> Hi Andy, >> >> On Apr 27, 2011, at 1:25 PM, andyp wrote: >> >>> Hi all, >>> >>> I'm trying to install the XWiki war file on a Ubuntu virtual machine (KVM) >>> but as yet with no success. I've installed and configured java, jboss and >>> mysql using all the information I could find from your website: >> >> [snip] >> >>> 01:36:10,087 WARN [ClassLoaderManager] Unexpected error during load >>> of:org.apache.jackrabbit.core.query.lucene.WildcardQuery$WildcardQueryWeight: >>> java.lang.IncompatibleClassChangeError: Implementing class >> >> [snip] >> >>> 01:36:10,936 WARN [ClassLoaderManager] Unexpected error during load >>> of:org.apache.jackrabbit.core.query.lucene.MatchAllWeight: >>> java.lang.IncompatibleClassChangeError: Implementing class >> >> [snip] >> >> As you can see in the error above the problem is an incompatible version. >> JBoss uses Jackrabbit in a given version and XWiki users another version of >> Jackrabbit. >> >> It's the role of the appserver to isolate classloader so that a webapp can >> use whatever version it wants in WEB-INF/lib. >> >> You need to configure JBoss to provide this isolation. You need to check >> Jboss's doc for that. > > I just googled it quickly and found > http://community.jboss.org/wiki/ClassLoadingConfiguration I've updated http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationJBoss with this information. Thanks -Vincent > > Hope it helps, > -Vincent > >> >> Alternatively you could remove xwiki'ds jackrabbit version from WEB-INF/lib >> (make sure the version used by jboss is greater than the one used by xwiki). >> >> Thanks >> -Vincent >> >>> Can anyone see what I'm doing wrong? All the information on the web seems a >>> little old – I'm using JBoss 6. I would be grateful if anyone could help >>> shed any light on this issue. >>> >>> Cheers, >>> Andy > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
On 05/03/2011 09:40 AM, Vincent Massol wrote: > > On May 3, 2011, at 9:39 AM, Vincent Massol wrote: > >> Hi Andy, >> >> On Apr 27, 2011, at 1:25 PM, andyp wrote: >> >>> Hi all, >>> >>> I'm trying to install the XWiki war file on a Ubuntu virtual machine (KVM) >>> but as yet with no success. I've installed and configured java, jboss and >>> mysql using all the information I could find from your website: >> >> [snip] >> >>> 01:36:10,087 WARN [ClassLoaderManager] Unexpected error during load >>> of:org.apache.jackrabbit.core.query.lucene.WildcardQuery$WildcardQueryWeight: >>> java.lang.IncompatibleClassChangeError: Implementing class >> >> [snip] >> >>> 01:36:10,936 WARN [ClassLoaderManager] Unexpected error during load >>> of:org.apache.jackrabbit.core.query.lucene.MatchAllWeight: >>> java.lang.IncompatibleClassChangeError: Implementing class >> >> [snip] >> >> As you can see in the error above the problem is an incompatible version. >> JBoss uses Jackrabbit in a given version and XWiki users another version of >> Jackrabbit. >> >> It's the role of the appserver to isolate classloader so that a webapp can >> use whatever version it wants in WEB-INF/lib. >> >> You need to configure JBoss to provide this isolation. You need to check >> Jboss's doc for that. > > I just googled it quickly and found > http://community.jboss.org/wiki/ClassLoadingConfiguration Should we create a jboss-web.xml configuration file as well? We recently added a sun-web.xml file to fix another classloading problem, this time for GlassFish. > Hope it helps, > -Vincent > >> >> Alternatively you could remove xwiki'ds jackrabbit version from WEB-INF/lib >> (make sure the version used by jboss is greater than the one used by xwiki). >> >> Thanks >> -Vincent >> >>> Can anyone see what I'm doing wrong? All the information on the web seems a >>> little old – I'm using JBoss 6. I would be grateful if anyone could help >>> shed any light on this issue. >>> >>> Cheers, >>> Andy -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
On May 3, 2011, at 9:39 AM, Vincent Massol wrote: > Hi Andy, > > On Apr 27, 2011, at 1:25 PM, andyp wrote: > >> Hi all, >> >> I'm trying to install the XWiki war file on a Ubuntu virtual machine (KVM) >> but as yet with no success. I've installed and configured java, jboss and >> mysql using all the information I could find from your website: > > [snip] > >> 01:36:10,087 WARN [ClassLoaderManager] Unexpected error during load >> of:org.apache.jackrabbit.core.query.lucene.WildcardQuery$WildcardQueryWeight: >> java.lang.IncompatibleClassChangeError: Implementing class > > [snip] > >> 01:36:10,936 WARN [ClassLoaderManager] Unexpected error during load >> of:org.apache.jackrabbit.core.query.lucene.MatchAllWeight: >> java.lang.IncompatibleClassChangeError: Implementing class > > [snip] > > As you can see in the error above the problem is an incompatible version. > JBoss uses Jackrabbit in a given version and XWiki users another version of > Jackrabbit. > > It's the role of the appserver to isolate classloader so that a webapp can > use whatever version it wants in WEB-INF/lib. > > You need to configure JBoss to provide this isolation. You need to check > Jboss's doc for that. I just googled it quickly and found http://community.jboss.org/wiki/ClassLoadingConfiguration Hope it helps, -Vincent > > Alternatively you could remove xwiki'ds jackrabbit version from WEB-INF/lib > (make sure the version used by jboss is greater than the one used by xwiki). > > Thanks > -Vincent > >> Can anyone see what I'm doing wrong? All the information on the web seems a >> little old – I'm using JBoss 6. I would be grateful if anyone could help >> shed any light on this issue. >> >> Cheers, >> Andy ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
Hi Andy, On Apr 27, 2011, at 1:25 PM, andyp wrote: > Hi all, > > I'm trying to install the XWiki war file on a Ubuntu virtual machine (KVM) > but as yet with no success. I've installed and configured java, jboss and > mysql using all the information I could find from your website: [snip] > 01:36:10,087 WARN [ClassLoaderManager] Unexpected error during load > of:org.apache.jackrabbit.core.query.lucene.WildcardQuery$WildcardQueryWeight: > java.lang.IncompatibleClassChangeError: Implementing class [snip] > 01:36:10,936 WARN [ClassLoaderManager] Unexpected error during load > of:org.apache.jackrabbit.core.query.lucene.MatchAllWeight: > java.lang.IncompatibleClassChangeError: Implementing class [snip] As you can see in the error above the problem is an incompatible version. JBoss uses Jackrabbit in a given version and XWiki users another version of Jackrabbit. It's the role of the appserver to isolate classloader so that a webapp can use whatever version it wants in WEB-INF/lib. You need to configure JBoss to provide this isolation. You need to check Jboss's doc for that. Alternatively you could remove xwiki'ds jackrabbit version from WEB-INF/lib (make sure the version used by jboss is greater than the one used by xwiki). Thanks -Vincent > Can anyone see what I'm doing wrong? All the information on the web seems a > little old – I'm using JBoss 6. I would be grateful if anyone could help > shed any light on this issue. > > Cheers, > Andy ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
Hi Andy, On May 2, 2011, at 1:58 PM, andyp wrote: > Hi all, > > Please help here if you can - XWiki breaks JBoss. Could this be a library > conflict? Maybe someone could suggest what jars could be causing the > problem? did you check http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationJBoss ? (make sure you check the comments too) Thanks -Vincent ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki.war + JBoss AS6 + MySQL
Hi all, Please help here if you can - XWiki breaks JBoss. Could this be a library conflict? Maybe someone could suggest what jars could be causing the problem? Cheers, Andy -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-war-JBoss-AS6-MySQL-tp6309076p6323569.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] XWiki.war + JBoss AS6 + MySQL
Hi all, I'm trying to install the XWiki war file on a Ubuntu virtual machine (KVM) but as yet with no success. I've installed and configured java, jboss and mysql using all the information I could find from your website: http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationJBoss http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL I've copied the MySQL J/Connector to $JBOSS_HOME/server/default/lib and below are the relevant configuration settings: $JBOSS_HOME/server/default/deploy/mysql-ds.xml: XWikiDS jdbc:mysql://localhost:3306/xwiki com.mysql.jdbc.Driver xwiki xwiki org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter mySQL $JBOSS_HOME/server/default/deploy/xwiki.war/WEB-INF/web.xml: (Uncommented below section...) XWiki MySQL DB Connection jdbc/XWikiDS javax.sql.DataSource Container $JBOSS_HOME/server/default/deploy/xwiki.war/WEB-INF/xwiki.cfg: (Uncommented the following line...) xwiki.store.hibernate.path=/WEB-INF/hibernate.cfg.xml $JBOSS_HOME/server/default/deploy/xwiki.war/WEB-INF/hibernate.cfg.xml: (Commented out HSQLDB section and added the below MySQL bit...) java:/comp/env/jdbc/XWikiDS org.hibernate.dialect.MySQLDialect 2 2 $JBOSS_HOME/server/default/deploy/xwiki.war/WEB-INF/jboss-web.xml: jdbc/XWikiDS javax.sql.DataSource java:jdbc/XWikiDS JBoss seems to work fine without XWiki in the deploy directory but as soon as it's copied across and restarted – JBoss fails to startup and gives a very long error message. The error all seems very similar so I will only include a bit from the beginning and the end: = JBoss Bootstrap Environment JBOSS_HOME: /usr/local/jboss JAVA: /usr/lib/jvm/java-6-sun/bin/java JAVA_OPTS: -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=360 -Dsun.rmi.dgc.server.gcInterval=360 -Djava.net.preferIPv4Stack=true -Dprogram.name=run.sh -Djava.li$ CLASSPATH: /usr/local/jboss/bin/run.jar:/usr/lib/jvm/java-6-sun/lib/tools.jar = 01:34:42,418 INFO [AbstractJBossASServerBase] Server Configuration: JBOSS_HOME URL: file:/java/apps/jboss/jboss-6.0.0.Final/ Bootstrap: $JBOSS_HOME/server/default/conf/bootstrap.xml Common Base: $JBOSS_HOME/common/ Common Library: $JBOSS_HOME/common/lib/ Server Name: default Server Base: $JBOSS_HOME/server/ Server Library: $JBOSS_HOME/server/default/lib/ Server Config: $JBOSS_HOME/server/default/conf/ Server Home: $JBOSS_HOME/server/default/ Server Data: $JBOSS_HOME/server/default/data/ Server Log: $JBOSS_HOME/server/default/log/ Server Temp: $JBOSS_HOME/server/default/tmp/ 01:34:42,422 INFO [AbstractServer] Starting: JBossAS [6.0.0.Final "Neo"] 01:34:44,018 INFO [ServerInfo] Java version: 1.6.0_24,Sun Microsystems Inc. 01:34:44,018 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_24-b07) 01:34:44,018 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 19.1-b02,Sun Microsystems Inc. 01:34:44,019 INFO [ServerInfo] OS-System: Linux 2.6.35-28-server,amd64 01:34:44,019 INFO [ServerInfo] VM arguments: -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=360 -Dsun.rmi.dgc.server.gcInterval=360 -Djava.net.preferIPv4Stack=true -Dprog$ 01:34:44,059 INFO [JMXKernel] Legacy JMX core initialized 01:34:50,594 INFO [AbstractServerConfig] JBoss Web Services - Stack CXF Server 3.4.1.GA 01:34:51,535 INFO [JSFImplManagementDeployer] Initialized 3 JSF configurations: [Mojarra-1.2, MyFaces-2.0, Mojarra-2.0] 01:34:58,256 WARNING [FileConfigurationParser] AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal 01:36:10,087 WARN [ClassLoaderManager] Unexpected error during load of:org.apache.jackrabbit.core.query.lucene.WildcardQuery$WildcardQueryWeight: java.lang.IncompatibleClassChangeError: Implementing class at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_24] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_24] at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_24] at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:52) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:650) [jboss-classloader.jar:2.2.0.GA] at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:609) [jboss-classloader.jar:2.2.