I've created a Play 1.2.3 app and I'm trying to deploy its war file to Tomcat 6, but I keep getting this exception.
I generate the war file, enabling the "production" profile, with:
play war webapp -o webapp.war --%production --zip
I get two files:
A webapp.war folder
A webapp.war.war file
I move the webapp.war.war file into the webapps folder of Tomcat, renaming the file to webapp.war. When I start Tomcat and try to execute the app, the following exception appears:
SEVERE: Exception sending context initialized event to listener instance of class play.server.ServletWrapper
java.lang.NullPointerException
at play.classloading.ApplicationClassloader.scanPrecompiled(ApplicationClassloader.java:527)
at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:385)
at play.Play.preCompile(Play.java:550)
at play.Play.init(Play.java:291)
at play.server.ServletWrapper.contextInitialized(ServletWrapper.java:74)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
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)
Any tips?
run this
play war webapp -o temp --%production --zip
after you get the temp.war, rename it into webapp.war, then deploy
HTH
Related
I try to use Hudson (3.3.3) and Legacy Maven 2 job type Plugin (3.0.2) with Maven (3.2.1), but I get an error. Is there a way to use Maven 3.2.1?
Job log:
Found mavenVersion 3.2.1 from file jar:file:/C:/Users/dur/.hudson/tools/Maven_3.2.1/lib/maven-core-3.2.1.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties
Parsing POMs
[workspace] $ "C:\Program Files\Java\jdk1.7.0_25/bin/java" -cp C:\Users\dur\.hudson\plugins\maven-plugin\WEB-INF\lib\maven3-agent-3.0.2.jar;C:\Users\dur\.hudson\tools\Maven_3.2.1\boot\plexus-classworlds-2.5.1.jar org.jvnet.hudson.maven3.agent.Maven3Main C:\Users\dur\.hudson\tools\Maven_3.2.1 C:\Users\dur\.hudson\war\webapp\WEB-INF\lib\hudson-remoting-3.0.3.jar C:\Users\dur\.hudson\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-3.0.2.jar 61659
<===[HUDSON REMOTING CAPACITY]===>channel started
Executing Maven: -B -f C:\Users\dur\.hudson\jobs\Test\workspace\pom.xml clean install -P Hudson
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:146)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:124)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
at hudson.remoting.UserRequest.perform(UserRequest.java:107)
at hudson.remoting.UserRequest.perform(UserRequest.java:41)
at hudson.remoting.Request$2.run(Request.java:276)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NoClassDefFoundError: org/apache/maven/cli/MavenLoggerManager
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:73)
... 18 more
Caused by: java.lang.ClassNotFoundException: org.apache.maven.cli.MavenLoggerManager
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
... 19 more
channel stopped
I found following questions:
Eclipse Community Forums
GitHub
User list for the Hudson continuous build server
but with no working answer.
I found a work-around with Hudson (3.3.3) free-style project and Maven 3 Build Plugin (3.0.5):
Maven 3 Build Plugin configuration (see Hudson Book):
Build Step configuration (see Hudson Book):
I am trying to install new-relic jar to my Openshift application (wildfly cartridge), but it fails with permission denied. Here is the log
\> java -jar newrelic.jar install
Jan 29, 2015 15:01:14 -0500 [64858 1] com.newrelic INFO: Agent is using Logback
***** ( ( o)) New Relic Java Agent Installer
***** Installing version 3.13.0 ...
Problem writing file to disk
java.io.FileNotFoundException: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf.20150129_150114 (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:206)
at java.io.FileOutputStream.<init>(FileOutputStream.java:95)
at java.io.FileWriter.<init>(FileWriter.java:63)
at com.newrelic.agent.util.EditableFile.write(EditableFile.java:273)
at com.newrelic.agent.util.EditableFile.backup(EditableFile.java:251)
at com.newrelic.agent.install.SelfInstaller.backup(SelfInstaller.java:125)
at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEdit(JBoss7SelfInstaller.java:51)
at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEditStartScript(JBoss7SelfInstaller.java:35)
at com.newrelic.agent.AgentCommandLineParser.installCommand(AgentCommandLineParser.java:138)
at com.newrelic.agent.AgentCommandLineParser.parseCommand(AgentCommandLineParser.java:81)
at com.newrelic.agent.Agent.main(Agent.java:261)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.newrelic.bootstrap.BootstrapAgent.main(BootstrapAgent.java:84)
Problem writing file to disk
java.io.FileNotFoundException: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:206)
at java.io.FileOutputStream.<init>(FileOutputStream.java:95)
at java.io.FileWriter.<init>(FileWriter.java:63)
at com.newrelic.agent.util.EditableFile.write(EditableFile.java:273)
at com.newrelic.agent.util.EditableFile.write(EditableFile.java:263)
at com.newrelic.agent.util.EditableFile.append(EditableFile.java:240)
at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEdit(JBoss7SelfInstaller.java:55)
at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEditStartScript(JBoss7SelfInstaller.java:35)
at com.newrelic.agent.AgentCommandLineParser.installCommand(AgentCommandLineParser.java:138)
at com.newrelic.agent.AgentCommandLineParser.parseCommand(AgentCommandLineParser.java:81)
at com.newrelic.agent.Agent.main(Agent.java:261)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.newrelic.bootstrap.BootstrapAgent.main(BootstrapAgent.java:84)
Added agent switch to start script /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf
Problem writing file to disk
java.io.FileNotFoundException: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf.20150129_150114 (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:206)
at java.io.FileOutputStream.<init>(FileOutputStream.java:95)
at java.io.FileWriter.<init>(FileWriter.java:63)
at com.newrelic.agent.util.EditableFile.write(EditableFile.java:273)
at com.newrelic.agent.util.EditableFile.backup(EditableFile.java:251)
at com.newrelic.agent.install.SelfInstaller.backup(SelfInstaller.java:125)
at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEdit(JBoss7SelfInstaller.java:51)
at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEditStartScript(JBoss7SelfInstaller.java:37)
at com.newrelic.agent.AgentCommandLineParser.installCommand(AgentCommandLineParser.java:138)
at com.newrelic.agent.AgentCommandLineParser.parseCommand(AgentCommandLineParser.java:81)
at com.newrelic.agent.Agent.main(Agent.java:261)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.newrelic.bootstrap.BootstrapAgent.main(BootstrapAgent.java:84)
Problem writing file to disk
java.io.FileNotFoundException: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:206)
at java.io.FileOutputStream.<init>(FileOutputStream.java:95)
at java.io.FileWriter.<init>(FileWriter.java:63)
at com.newrelic.agent.util.EditableFile.write(EditableFile.java:273)
at com.newrelic.agent.util.EditableFile.write(EditableFile.java:263)
at com.newrelic.agent.util.EditableFile.append(EditableFile.java:240)
at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEdit(JBoss7SelfInstaller.java:55)
at com.newrelic.agent.install.JBoss7SelfInstaller.backupAndEditStartScript(JBoss7SelfInstaller.java:37)
at com.newrelic.agent.AgentCommandLineParser.installCommand(AgentCommandLineParser.java:138)
at com.newrelic.agent.AgentCommandLineParser.parseCommand(AgentCommandLineParser.java:81)
at com.newrelic.agent.Agent.main(Agent.java:261)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.newrelic.bootstrap.BootstrapAgent.main(BootstrapAgent.java:84)
Added agent switch to start script /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/bin/standalone.conf
No need to create New Relic configuration file because:
.:. A config file already exists: /var/lib/openshift/544c2c3be0b8cdf8da000253/wildfly/newrelic/newrelic.yml
***** Install successful
***** Next steps:
You're almost done! To see performance data for your app:
.:. Restart your app server
.:. Exercise your app
.:. Log into http://rpm.newrelic.com
Within two minutes, your app should show up, ready to monitor and troubleshoot.
If app data doesn't appear, check newrelic/logs/newrelic_agent.log for errors.
How can I install it? Where can I get permission?
Looks like NewRelic is attempting to create a backup of the WildFly configuration file which it finds at ~/wildfly/bin/standalone.conf. Unfortunately it fails due because the ~/wildfly/bin is locked by the WildFly cartridge as you can see by its permissions and entry in the cartridge's managed_files.yml:
\> ls -ld wildfly/bin/
drwxr-xr-x. 6 root 544c2c3be0b8cdf8da000253 4096 Dec 23 20:01 wildfly/bin/
\> cat wildfly/metadata/managed_files.yml
---
[...]
locked_files:
- bin/
- bin/*
[...]
I see three options, in order of complexity.
See if newrelic.jar accepts an flag to not perform a backup of the config file.
Since it looks like newrelic.jar is trying to automatically modify standalone.conf for you, try running this step on a local environment with WildFly where you do have permissions. Then check in the new standalone.conf to OpenShift git.
Fork the WildFly cart repo and remove the bin/ and bin/* entries from the locked_files key in managed_files.yml. But make sure to create these manually within the cart's bin/setup script, as locking would normally do that for you. See Locking cartridges for more info.
I have a fresh installation of Android Studio with a new Android project. I created one JUnit test class but I cannot run it:
"C:\Program Files\Java\jdk1.7.0_55\bin\java" -ea -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files\android-studio\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\android-studio\lib\idea_rt.jar;C:\Program Files\android-studio\plugins\junit\lib\junit-rt.jar;D:\Dev\android-sdks\platforms\android-21\android.jar;D:\Dev\android-sdks\platforms\android-21\data\res;D:\Dev\android-sdks\tools\support\annotations.jar;d:\myapp\mobile\build\intermediates\classes\debug;D:\jon\.gradle\caches\modules-2\files-2.1\com.j256.ormlite\ormlite-android\4.48\afa06f539a4026c10b247386312aa67404b80a16\ormlite-android-4.48.jar;D:\jon\.gradle\caches\modules-2\files-2.1\commons-io\commons-io\2.0.1\7ffdb02f95af1c1a208544e076cea5b8e66e731a\commons-io-2.0.1.jar;D:\Dev\android-sdks\extras\android\m2repository\com\android\support\support-annotations\21.0.2\support-annotations-21.0.2.jar;D:\jon\.gradle\caches\modules-2\files-2.1\com.j256.ormlite\ormlite-core\4.48\e579bd2905d0399af5029aaaf9817d5fa0ca88a5\ormlite-core-4.48.jar;d:\myapp\mobile\build\intermediates\exploded-aar\com.android.support\support-v4\21.0.2\res;d:\myapp\mobile\build\intermediates\exploded-aar\com.android.support\support-v4\21.0.2\libs\internal_impl-21.0.2.jar;d:\myapp\mobile\build\intermediates\exploded-aar\com.android.support\support-v4\21.0.2\classes.jar;D:\jon\.gradle\caches\modules-2\files-2.1\com.squareup.dagger\dagger\1.2.2\e8f912ee19ad84958510883ea191135276b091f8\dagger-1.2.2.jar;D:\jon\.gradle\caches\modules-2\files-2.1\javax.inject\javax.inject\1\6975da39a7040257bd51d21a231b76c915872d38\javax.inject-1.jar;D:\jon\.gradle\caches\modules-2\files-2.1\org.androidannotations\androidannotations-api\3.2\89b33bb1e996eb2c4089f79d1b8651c71fe8e2d1\androidannotations-api-3.2.jar;D:\jon\.gradle\caches\modules-2\files-2.1\com.squareup\otto\1.3.5\7941cd2c2c8ec006800d75c35f8a9dacf892ab93\otto-1.3.5.jar;d:\myapp\mobile\build\intermediates\exploded-aar\com.google.android.gms\play-services\6.1.71\classes.jar;d:\myapp\mobile\build\intermediates\exploded-aar\com.google.android.gms\play-services\6.1.71\res;d:\myapp\mobile\build\intermediates\exploded-aar\net.danlew\android.joda\2.5.1\classes.jar;d:\myapp\mobile\build\intermediates\exploded-aar\net.danlew\android.joda\2.5.1\res;D:\jon\.gradle\caches\modules-2\files-2.1\org.robobinding\robobinding\0.8.9\c6b50ddd9e741a7c8e54b56ac7057a66312a3e11\robobinding-0.8.9-with-dependencies.jar;d:\myapp\javamail\build\intermediates\classes\debug" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 com.example.MyUnitTest
Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/ResultPrinter
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:116)
Caused by: java.lang.ClassNotFoundException: junit.textui.ResultPrinter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 3 more
It's my first attempt to use Android Studio and to do JUnit tests. So sorry if the solution is obvious.
Following solution worked for me in windows:
1) in the environment variables add a new "system variables"
ANDROID_SDK_HOME=D:\Program Files\android-sdk-windows (select your home directory of android sdk )
2) modify system variables Path, add "%Android_SDK_HOME%\tools;"
I'm very new to Pentaho, and I need to install it on my machine to start a BI project. I installed the last community version from the community website (biserver-ce-5.1.0.0-752), set the PENTAHO_JAVA_HOME to point to my JDK 1.8 installation and simply unzip the file and run
2014-07-22 00:02:48,669 ERROR [org.pentaho.platform.util.logging.Logger] Error: Pentaho
2014-07-22 00:02:48,671 ERROR [org.pentaho.platform.util.logging.Logger] misc-class org.pentaho.platform.plugin.services.pluginmgr.DefaultPluginManager: PluginManager.ERROR_0011 - Failed to register plugin cgg
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [C:\Pentaho\biserver-ce\pentaho-solutions\system\cgg\plugin.spring.xml]; nested exception is java.lang.IllegalStateException: Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.pentaho.platform.plugin.services.pluginmgr.DefaultPluginManager.getNativeBeanFactory(DefaultPluginManager.java:411)
at org.pentaho.platform.plugin.services.pluginmgr.DefaultPluginManager.initializeBeanFactory(DefaultPluginManager.java:439)
at org.pentaho.platform.plugin.services.pluginmgr.DefaultPluginManager.reload(DefaultPluginManager.java:189)
at org.pentaho.platform.plugin.services.pluginmgr.PluginAdapter.startup(PluginAdapter.java:40)
at org.pentaho.platform.engine.core.system.PentahoSystem$2.call(PentahoSystem.java:398)
at org.pentaho.platform.engine.core.system.PentahoSystem$2.call(PentahoSystem.java:389)
at org.pentaho.platform.engine.core.system.PentahoSystem.runAsSystem(PentahoSystem.java:368)
at org.pentaho.platform.engine.core.system.PentahoSystem.notifySystemListenersOfStartup(PentahoSystem.java:389)
at org.pentaho.platform.engine.core.system.PentahoSystem.access$000(PentahoSystem.java:77)
at org.pentaho.platform.engine.core.system.PentahoSystem$1.call(PentahoSystem.java:326)
at org.pentaho.platform.engine.core.system.PentahoSystem$1.call(PentahoSystem.java:323)
at org.pentaho.platform.engine.core.system.PentahoSystem.runAsSystem(PentahoSystem.java:368)
at org.pentaho.platform.engine.core.system.PentahoSystem.notifySystemListenersOfStartup(PentahoSystem.java:323)
at org.pentaho.platform.engine.core.system.PentahoSystem.init(PentahoSystem.java:294)
at org.pentaho.platform.engine.core.system.PentahoSystem.init(PentahoSystem.java:207)
at org.pentaho.platform.web.http.context.SolutionContextListener.contextInitialized(SolutionContextListener.java:135)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709)
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:583)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
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:822)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.IllegalStateException: Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher
at org.springframework.context.config.ContextNamespaceHandler$1.parse(ContextNamespaceHandler.java:65)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
... 42 more
I've done some research and found that I have to copy the content of the directory biserver-ce/pentaho-solutions/system/cgg/lib into tomcat/ into biserver-ce/tomcat/webapps/pentaho/WEB-INF/lib/. I did all of that, and after re-starting pentaho, I got the following error:
2014-07-21 23:34:13,281 ERROR [org.springframework.web.context.ContextLoader] Context initialization failedorg.springframework.beans.factory.BeanDefinitionStoreException: Parser configuration exception parsing XML from file [C:\Pentaho\biserver-ce\pentaho-solutions\system\pentaho-spring-beans.xml]; nested exception is javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [org.apache.crimson.jaxp.DocumentBuilderFactoryImpl#6e171cd7] does not support XML Schema. Are you running on Java 1.4 with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709)
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:583)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
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:822)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [org.apache.crimson.jaxp.DocumentBuilderFactoryImpl#6e171cd7] does not support XML Schema. Are you running on Java 1.4 with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
at org.springframework.beans.factory.xml.DefaultDocumentLoader.createDocumentBuilderFactory(DefaultDocumentLoader.java:102)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:70)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
... 37 more
Caused by: java.lang.IllegalArgumentException: No attributes are implemented
at org.apache.crimson.jaxp.DocumentBuilderFactoryImpl.setAttribute(DocumentBuilderFactoryImpl.java:93)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.createDocumentBuilderFactory(DefaultDocumentLoader.java:99)
... 39 more
I finally tried to install and run the 5.0 stable version, without being more lucky... got this error now
2014-07-22 00:38:03,701 ERROR [org.springframework.extensions.jcr.JcrSessionFactory] Error registering nodetypes org.apache.jackrabbit.spi.commons.conversion.IllegalNameException: empty name
at org.apache.jackrabbit.spi.commons.conversion.NameParser.parse(NameParser.java:58)
at org.apache.jackrabbit.spi.commons.conversion.ParsingNameResolver.getQName(ParsingNameResolver.java:64)
at org.apache.jackrabbit.spi.commons.conversion.CachingNameResolver.getQName(CachingNameResolver.java:76)
at org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver.getQName(DefaultNamePathResolver.java:74)
at org.apache.jackrabbit.core.SessionImpl.getQName(SessionImpl.java:638)
at org.apache.jackrabbit.core.session.SessionContext.getQName(SessionContext.java:326)
at org.apache.jackrabbit.spi.commons.nodetype.AbstractItemDefinitionTemplate.setName(AbstractItemDefinitionTemplate.java:93)
at org.pentaho.platform.repository2.unified.jcr.sejcr.ntdproviders.LocaleNtdProvider.getLocaleNode(LocaleNtdProvider.java:45)
at org.pentaho.platform.repository2.unified.jcr.sejcr.ntdproviders.LocaleNtdProvider.getNodeTypeDefinition(LocaleNtdProvider.java:37)
at org.pentaho.platform.repository2.unified.jcr.sejcr.CredentialsStrategySessionFactory.registerNodeTypes(CredentialsStrategySessionFactory.java:178)
at org.pentaho.platform.repository2.unified.jcr.sejcr.CredentialsStrategySessionFactory.afterPropertiesSet(CredentialsStrategySessionFactory.java:152)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495)
at
...........
Please guys, help me... Thanks a lot
Pentaho 5.1 was not tested and does not support JDK 1.8.
I'd advise running jdk 1.7.
Remember that you can set the path to java JRE in the enviroment variable PENTAHO_HOME. This way you do not need to change JAVA_HOME.
You have to patch JdkVersion properly - get JdkVersion.java for spring 2.5.6
add couple lines like
if (javaVersion.contains("1.9.")) {
majorJavaVersion = JAVA_19;
}
else if (javaVersion.contains("1.8.")) {
majorJavaVersion = JAVA_18;
}
compile it for java 1.4 (it is worth to use java 1.7 or less):
$ javac -source 1.4 -target 1.4 org/springframework/core/JdkVersion.java
check it has the proper bytecode class version
$ javap -v org/springframework/core/JdkVersion.class | grep "major version"
major version: 48
patch spring-2.5.6.jar and spring-core-2.5.6.jar like
$ jar uvf spring-2.5.6.jar org
check that no other spring-2.5.6.jar or spring-core-2.5.6.jar in classpath (it could be in plugins as well)
I'm not that new to Java. I've done plenty of stuff with it before. But I'm migrating from PHP to Java Servlet/JSP (which I am new to) and I can't figure out this error to save my life. I installed Tomcat6 using Ubuntu 9.04's Synaptic Package Manager and it works like a charm. But when I put struts in my WEB-INF/lib directory and try to make a struts app, I get the below in the log file.
I used the struts-blank.war to start the project, so the web.xml is the same as provided in struts 2.1.8.1.
It appears that there is some issue with reading the struts-default.xml file.
Thanks in advance
SEVERE: Exception starting filter struts2
Unable to load configuration. - Class: java.security.AccessControlContext
File: AccessControlContext.java
Method: checkPermission
Line: 342 - java/security/AccessControlContext.java:342:-1
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:431)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:123)
at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:769)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
Caused by: Unable to load configuration. - Class: java.security.AccessControlContext
File: AccessControlContext.java
Method: checkPermission
Line: 342 - java/security/AccessControlContext.java:342:-1
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
... 36 more
Caused by: Caught exception while loading file struts-default.xml - Class: java.security.AccessControlContext
File: AccessControlContext.java
Method: checkPermission
Line: 342 - java/security/AccessControlContext.java:342:-1
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:902)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
... 38 more
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission xwork.saxParserFactory read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:342)
at java.security.AccessController.checkPermission(AccessController.java:553)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302)
at java.lang.System.getProperty(System.java:669)
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:78)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:893)
... 42 more
I had a brain storm and figured this out myself. Although I don't think this is the most secure solution, but it works for my purposes and I'm not that concerned because it's a local dev server that only listens on the loopback interface (127.0.0.1).
Anyway, the solution is to add this to the bottom of /etc/tomcat6/policy.d/50local.policy
grant codeBase "file:${catalina.base}/webapps/-" {
permission java.security.AllPermission;
};