Currently my application is running on grails 1.1.1 with java 1.6 on web sphere server. My application is working in old server with java 1.6.Recently server team upgrade the websphere server 8.5.5 and they asked us to deploy an ear with java 1.7. I have deployed the ear with java 1.7. now I am getting below error:
Error Page Exception
SRVE0260E: The server cannot use the error page specified for your application to handle the Original Exception printed below.
Original Exception:
Error Message: javax.servlet.ServletException: Filter [charEncodingFilter]: could not be initialized
Error Code: 500
Target Servlet: com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor
Error Stack:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
at java.security.AccessController.doPrivileged(AccessController.java:426)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1704)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:411)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1177)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:776)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1379)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2189)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:435)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:378)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:126)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:653)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5477)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5603)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:667)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:611)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1269)
at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1261)
at java.security.AccessController.doPrivileged(AccessController.java:426)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:92)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1255)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1093)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:832)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:814)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:247)
at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:360)
at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink$IPCConnectorReadCallback.complete(IPCConnectorInboundLink.java:602)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$QueuedWork.run(SSLReadServiceContext.java:1981)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
... 43 more
Caused by: java.lang.reflect.InvocationTargetException
... 43 more
Caused by: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [customer.CustomerController]!
... 43 more
Caused by: java.lang.TypeNotPresentException: Type CustomerSegment not present
at java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:399)
at java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:126)
at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:84)
at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:68)
at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1164)
at java.beans.Introspector.getBeanInfo(Introspector.java:428)
at java.beans.Introspector.getBeanInfo(Introspector.java:175)
at java.security.AccessController.doPrivileged(AccessController.java:456)
at customer.CustomerController.$getStaticMetaClass(CustomerController.groovy)
at base.BdwBaseController.<init>(BdwBaseController.groovy)
at customer.CustomerController.<init>(CustomerController.groovy)
... 43 more
Caused by: java.lang.ClassNotFoundException: CustomerSegment
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:302)
... 54 more
I have a few questions:
Grails 1.1.1 will support java 1.7?
if not do I need to upgrade grails?
What are all the steps to upgrade grails?
web sphere 8.5.5 will not support java 1.6?
to resolve this error what I need to check?
Do I need to update jars?
please find below jars which I am using in my application:
jar files
Going to try to answer as much as I can, but it's a best-effort since you're asking way too many questions in one post!
1 - Probably not. Grails 1.1.1 came out in 2009, and Java 1.7 came out in 2011, and was a major change over 1.6. You might be able to force them to work together, but you're going to struggle to find good information six (plus) years later.
2 - Yes.
3 - You can start here: http://docs.grails.org/1.2.0/ and go from there.
4 - See comment below. (Originally I said, but was wrong: IBM recommends Java 8 with WebSphere 8.)
5 - Probably not important, if you're upgrading everything anyway.
6 - Yes.
Related
I'm trying to deploy a WebSphere Liberty Application via Docker. I'm also using Apache Struts for the UI. When deploying on my local machine I have no problems, but when put on seemingly any other machine, it throws an error saying the struts2 filter cannot be loaded. Classes do not seem to be missing.
Why would this container work on one machine and not another?
Stack Trace:
[ERROR ] SRVE0321E: The [struts2] filter did not load during start up.
Filter [struts2]: could not be initialized
[ERROR ] SRVE0315E: An exception occurred: java.lang.Throwable: javax.servlet.ServletException: Filter [struts2]: could not be initialized
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:5027)
at [internal classes]
Caused by: javax.servlet.ServletException: Filter [struts2]: could not be initialized
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:163)
... 1 more
Caused by: Unable to create SAX parser - Class: com.icl.saxon.aelfred.SAXParserFactoryImpl
File: SAXParserFactoryImpl.java
Method: newSAXParser
Line: 34 - com/icl/saxon/aelfred/SAXParserFactoryImpl.java:34:-1
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:835)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:131)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:100)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:149)
... 1 more
Caused by: Unable to create SAX parser - Class: com.icl.saxon.aelfred.SAXParserFactoryImpl
File: SAXParserFactoryImpl.java
Method: newSAXParser
Line: 34 - com/icl/saxon/aelfred/SAXParserFactoryImpl.java:34:-1
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:111)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:830)
... 9 more
Caused by: javax.xml.parsers.ParserConfigurationException: AElfred parser is non-validating
at com.icl.saxon.aelfred.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:34)
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:109)
... 10 more
Caused by: javax.xml.parsers.ParserConfigurationException: AElfred parser is non-validating
The struts2 requires to have a validating parser. Since this parser is non-validating it should be removed from the classpath.
The affected parser could be found in saxon.jar.
Thanks to Roman I was able to diagnose this problem more correctly as a saxon XML parser issue. I tried just replacing my JAR and this actually worked for a few tests but later broke.
This forum post ultimately solved the problem: http://grokbase.com/t/tomcat/users/031xc9jye7/i-cant-use-saxon-xml-parser-in-my-web-app-please-help
My web server (WebSphere Liberty) was trying to use Saxon as the XML parser, however Saxon is non-validating and thus this was failing, particularly in Docker where I was trying this.
To fix this I had to remove the file javax.xml.parsers.SAXParserFactory from the JAR and then the server ran correctly.
I have a Struts problem. I'm upgrading an application from Struts 1.2.x to 2.5.8. I have a single war and multiple EJBs in a single EAR file deploying to WebSphere 8.5. Every time I try to access a simple hello world jsp via a Struts action, I get this stack trace in my browser:
Error Message: javax.servlet.ServletException: Filter [struts2]: could not be initialized
Error Code: 500
Target Servlet: com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor
Error Stack:
Unable to load configuration. - bean - wsjar:file:/WEB-INF/lib/struts2-core-2.5.8.jar!/struts-default.xml:92:181
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:499)
at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:75)
at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:63)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:145)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:607)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:514)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:319)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:392)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:931)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3928)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1007)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by: Unable to load configuration. - bean - wsjar:file/WEB-INF/lib/struts2-core-2.5.8.jar!/struts-default.xml:92:181
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:906)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:486)
... 28 more
Caused by: Unable to load bean: type:org.apache.struts2.dispatcher.multipart.MultiPartRequest class:org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest - bean - wsjar:file:/WEB-INF/lib/struts2-core-2.5.8.jar!/struts-default.xml:92:181
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:271)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:98)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:165)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
... 31 more
Caused by: java.lang.NoClassDefFoundError: org.apache.commons.fileupload.FileUploadException
at java.lang.J9VMInternals.prepareClassImpl(Native Method)
at java.lang.J9VMInternals.prepare(J9VMInternals.java:283)
at java.lang.Class.getDeclaredConstructors(Class.java:721)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:263)
... 34 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileUploadException
at java.net.URLClassLoader.findClass(URLClassLoader.java:600)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:243)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:786)
at java.lang.ClassLoader.loadClass(ClassLoader.java:764)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:741)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:585)
at java.lang.ClassLoader.loadClass(ClassLoader.java:741)
... 38 more
I've verified that the required commons-fileupload jar is in the war and it's not in a shared library location that would cause namespace conflicts. Classloader setting is set to parent first, and due to the complexity of the project, I can't safely change it.
What do I need to do to get past this?
TIA
Alex
Looks like I spoke too soon. For some reason, my first search failed to turn up an older version of commons-fileupload in the AppServer/plugins folder. It appears this jar is being used by the app server, and with the parent first classloading in use, there's a class collision taking place. So now I have to figure out how to get around that, but the original problem has been solved.
As long as the classes in your commons-fileupload jar have no dependencies on your application or WAR classes, you can deploy this jar as an isolated shared library and associate it to your application or WAR, whichever has the dependency on the jar. The classloading semantics for isolated shared libraries are described in topic "Isolating open source packages" in the WebSphere Application Server Knowledge Center for versions 8.5.5 and 9.0.
Isolating open source packages:
https://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/welc6tech_opensource_isolate.html
If you are using a recent version of 8.5.5, you might also try always-protected packages, which is also described in "Isolating open source packages". Note that always-protected packages can impact every application running on the application server.
I have been trying to run the archetype example and another project I am trying to upgrade from 6.5 to 7.0.0, but I have failed to do so.
The archetype example runs ok on jetty and the project I was trying to upgrade runs ok both in jetty and was 8.5.5.7, but after changing the dependencies I keep getting the exception below and I am not quite sure if it is a problem with configuration (as everything worked ok with 6.5), with wicket 7.0.0 as the exception comes from inside wicket or from WAS8.5.5.7.
[ERROR ] SRVE0271E: Uncaught init() exception created by servlet [wicket-servlet] in application [blahblah]: javax.servlet.ServletException: java.lang.ClassCastException: com.ibm.ws.artifact.url.internal.WSJarURLStreamHandler$WSJarURLConnectionImpl cannot be cast to java.net.JarURLConnection
at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:455)
at org.apache.wicket.protocol.http.WicketServlet.init(WicketServlet.java:271)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:332)
at [internal classes]
Caused by: java.lang.ClassCastException: com.ibm.ws.artifact.url.internal.WSJarURLStreamHandler$WSJarURLConnectionImpl cannot be cast to java.net.JarURLConnection
at org.apache.wicket.Application.collectWicketProperties(Application.java:503)
at org.apache.wicket.Application.initializeComponents(Application.java:593)
at org.apache.wicket.Application.initApplication(Application.java:918)
at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:429)
... 4 more
[ERROR ] SRVE0315E: An exception occurred: java.lang.Throwable: javax.servlet.ServletException: java.lang.ClassCastException: com.ibm.ws.artifact.url.internal.WSJarURLStreamHandler$WSJarURLConnectionImpl cannot be cast to java.net.JarURLConnection
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4900)
at [internal classes]
Caused by: javax.servlet.ServletException: java.lang.ClassCastException: com.ibm.ws.artifact.url.internal.WSJarURLStreamHandler$WSJarURLConnectionImpl cannot be cast to java.net.JarURLConnection
at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:455)
at org.apache.wicket.protocol.http.WicketServlet.init(WicketServlet.java:271)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:332)
... 1 more
Caused by: java.lang.ClassCastException: com.ibm.ws.artifact.url.internal.WSJarURLStreamHandler$WSJarURLConnectionImpl cannot be cast to java.net.JarURLConnection
at org.apache.wicket.Application.collectWicketProperties(Application.java:503)
at org.apache.wicket.Application.initializeComponents(Application.java:593)
at org.apache.wicket.Application.initApplication(Application.java:918)
at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:429)
... 4 more
UPDATE------------ as of wicket 7.1.0 there isn't an issue anymore.
As mentioned in #klopfdreh answer there was a compatibility issue, I am accepting that answer, because I think the discussion in the comments may have helped the wicket team fix/pinpoint the issue in the 7.1.0 release.
It is only an assumption, but it appears that the problem seems to be close to this one:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=430180
As of one comment, can you try to set the following options at your "jvm.options":
-Dcom.ibm.websphere.persistence.DisableJpaFormatUrlProtocol=true
To implement it without disable the "wsjar" protocol we need more input about the implementation of "WSJarURLConnectionImpl" - the only method called from the "JarURLConnection" is "getJarFile()", so the question here is: Does "WSJarURLConnectionImpl" also provide this method and returns it a JarFile? Then we may use reflections at this place.
I have created a large graph using the Neo4j's 2.2M02 import tool.
Now I want to use the same database in embedded version in 2.2RC01. I get the following error in Java, when I initialize the database:
Exception in thread "main" java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, D:\Neo4j\data\test3.db
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:331)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:103)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:90)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:176)
at RCNeo4j.initDB(RCNeo4j.java:419)
at RCNeo4j.main(RCNeo4j.java:46)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.state.DataSourceManager#2c7e0aa0' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:326)
... 6 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource#37b86b14' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:117)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507)
... 8 more
Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UnexpectedUpgradingStoreVersionException: 'neostore.nodestore.db' has a store version number that we cannot upgrade from. Expected 'v0.A.3' but file is version 'NodeStore v0.A.4'.
at org.neo4j.kernel.impl.storemigration.UpgradableDatabase.checkUpgradeable(UpgradableDatabase.java:88)
at org.neo4j.kernel.impl.storemigration.StoreMigrator.needsMigration(StoreMigrator.java:157)
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.getParticipantsEagerToMigrate(StoreUpgrader.java:259)
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:134)
at org.neo4j.kernel.NeoStoreDataSource.upgradeStore(NeoStoreDataSource.java:562)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:471)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507)
... 11 more
message.log inside the database doesn't seem to show any exception either. I get the same error when I try to move from 2.1.7 to RC01.
Also, on a different note I would also like to know if it's possible to use the database generated from 2.2M02 in 2.1.7 (kind of like a downgrade). Because I prefer to have a more stable version to do some analysis.
Neo4j does not provide an upgrade path between milestone releases, so there is no direct way to upgrade 2.2.0-M02 to 2.2.0-RC1. Upgrades are only supported from one stable to another stable version. Downgrades are not supported at all in the product.
However there is a potential way to do it. Use Michael's store-utils (https://github.com/jexp/store-utils) and change the code using classloader separation in a way that the store you're reading from and the one you're writing to are using separate classloaders with different Neo4j versions.
I'm converting a project from running in Netbeans on tomcat to running in jdeveloper on the embedded tomcat. But I've run into this error:
oracle.classloader.util.AnnotatedClassFormatError: Bad version number in .class file
I have read that it'd be something about version, but I've compiled all internal jars to 1.5 and made sure that my project also targets 1.5
Any suggestions for how to resolve, or how to "upgrade" the embedded OC4j
Full stacktrace:
2014-05-21 07:39:32,014 [HTTPThreadGroup-4] ERROR org.apache.commons.digester.Digester - Begin event threw exception
java.lang.reflect.InvocationTargetException
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:585)
at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
at org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at org.apache.commons.digester.SetPropertiesRule.begin(SetPropertiesRule.java:259)
at org.apache.commons.digester.Rule.begin(Rule.java:200)
at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
at oracle.xml.parser.v2.ValidatingParser.parseRootElement(ValidatingParser.java:146)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:206)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1006)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2379)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4830)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4754)
at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4942)
at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1144)
at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:741)
at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:431)
at com.evermind.server.Application.getHttpApplication(Application.java:586)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1987)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1970)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.getHttpApplication(HttpSite.java:1922)
at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:423)
at com.evermind.server.http.HttpRequestHandler.resolveApplication(HttpRequestHandler.java:398)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:439)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
at java.lang.Thread.run(Thread.java:595)
Caused by: oracle.classloader.util.AnnotatedClassFormatError: Bad version number in .class file
Ugyldig klasse: dk.myproject.bII.login.actions.LoginActionForm
Indlæser: current-workspace-app.web.DefaultProject:0.0.0
Kodekilde: /C:/workspace/myproject/test/Return/libs/BUtilities.jar
Konfiguration: <classpath> in C:\workspace\myproject\test\Return\Client\public_html
Afhængig klasse: org.apache.struts.config.FormBeanConfig
Indlæser: current-workspace-app.web.DefaultProject:0.0.0
Kodekilde: /C:/jdevstudio10134/jakarta-struts/lib/struts.jar
Konfiguration: <classpath> in C:\workspace\myproject\test\Return\Client\public_html
at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2285)
at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1462)
at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:167)
at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1674)
at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635)
at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1620)
at org.apache.struts.config.FormBeanConfig.formBeanClass(FormBeanConfig.java:320)
at org.apache.struts.config.FormBeanConfig.setType(FormBeanConfig.java:191)
... 44 more
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2241)
... 52 more
2014-05-21 07:39:32,019 [HTTPThreadGroup-4] ERROR org.apache.struts.action.ActionServlet - Parsing error processing resource path
java.lang.reflect.InvocationTargetException
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
at org.apache.commons.digester.Digester.startElement(Digester.java:1276)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
at oracle.xml.parser.v2.ValidatingParser.parseRootElement(ValidatingParser.java:146)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:206)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1006)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2379)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4830)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4754)
at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4942)
at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1144)
at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:741)
at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:431)
at com.evermind.server.Application.getHttpApplication(Application.java:586)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1987)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1970)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.getHttpApplication(HttpSite.java:1922)
at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:423)
at com.evermind.server.http.HttpRequestHandler.resolveApplication(HttpRequestHandler.java:398)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:439)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
at java.lang.Thread.run(Thread.java:595)
2014-05-21 07:39:32,034 [HTTPThreadGroup-4] ERROR _jsp._generalError - javax.servlet.jsp.JspException: Cannot retrieve mapping for action /AjaxActions
Translation of some of stack trace:
Ugyldig klasse: dk.myproject.bII.login.actions.LoginActionForm
Indlæser: current-workspace-app.web.DefaultProject:0.0.0
Kodekilde: /C:/workspace/myproject/test/Return/libs/BUtilities.jar
Konfiguration: <classpath> in C:\workspace\myproject\test\Return\Client\public_html
Translates into:
Invalid class : ....
loading: ....
sourcecode : ...
configuration : ....
Update :
Have check all jar files, all are version 49 (java 1.5) maximum.
Anyone knows how to check the version that the embedded oc4j can run ?
Generally that error occurs when you have your project on higher version of JAVA as compare to the oc4j. You have to check the JRE version of oc4j and you have build your project with that version.
I am not sure about Netbeans but If you are using eclipse then you have to make two changes in your project: -
1. Goto project properties and select Java Compiler, change the version as per the version on oc4j
Goto project properties and select project facets and change the version of JAVA here as well
Hope this helps