I have a java war that is being run through Jetty. It has been working on multiple Windows 7 computers for years. But now a new installation on a Windows 7 computer is producing errors and I don't understand the errors. I am posting below the log up until the point of the error:
C:\Users\QT\Desktop\vcctl\scripts>cd ..\src
C:\Users\QT\Desktop\vcctl\src>java -classpath "lib/derby.jar:lib/derbytools.jar" -Dorg.eclipse.jetty.server.Request.maxFormKeys=20000 -jar "VcctlWrapper.jar"
2016-03-21 15:42:11.866:INFO::AWT-EventQueue-0: Logging initialized #204ms
Current relative path is: C:\Users\QT\Desktop\vcctl\src
2016-03-21 15:42:11.969:INFO:oejs.Server:AWT-EventQueue-0: jetty-9.1.3.v20140225
Mar 21, 2016 3:42:13 PM org.apache.struts.action.ActionServlet initChain
INFO: Loading chain catalog from jar:file:/C:/Users/QT/AppData/Local/Temp/jetty-0.0.0.0-8080-vcctl.war-_vcctl-any-7374762875405590280.dir/webapp/WEB-INF/lib/struts-tiles-1.3.8.jar!/org/apache/struts/tiles/chain-config.xml
Mar 21, 2016 3:42:13 PM org.apache.struts.action.ActionServlet initChain
INFO: Loading chain catalog from jar:file:/C:/Users/QT/Desktop/vcctl/src/lib/struts-tiles-1.3.8.jar!/org/apache/struts/tiles/chain-config.xml
Mar 21, 2016 3:42:13 PM org.apache.struts.config.impl.ModuleConfigImpl addAction Config
WARNING: Overriding ActionConfig of path /my-files/viewImage
Mar 21, 2016 3:42:13 PM org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
2016-03-21 15:42:13.626:INFO:oejsh.ContextHandler:AWT-EventQueue-0: Started o.e.j.w.WebAppContext#3c6dee0f{/vcctl,file:/C:/Users/QT/AppData/Local/Temp/jetty-0.0.0.0-8080-vcctl.war-_vcctl-any-7374762875405590280.dir/webapp/,AVAILABLE}{C:\Users\QT\Desktop\vcctl\src/vcctl.war}
2016-03-21 15:42:13.635:WARN:oejuc.AbstractLifeCycle:AWT-EventQueue-0: FAILED ServerConnector#3ba4f2fd{HTTP/1.1}{0.0.0.0:8080}: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:279)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:218)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:337)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at vcctl.webServiceRunner.startJettyServer(webServiceRunner.java:98)
at vcctl.webServiceRunner.<init>(webServiceRunner.java:40)
at vcctl.webServiceRunner$1.run(webServiceRunner.java:107)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$300(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2016-03-21 15:42:13.639:WARN:oejuc.AbstractLifeCycle:AWT-EventQueue-0: FAILED org.eclipse.jetty.server.Server#4a4cdea2: java.net.BindException: Address already
in use: bind
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:279)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:218)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:337)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at vcctl.webServiceRunner.startJettyServer(webServiceRunner.java:98)
at vcctl.webServiceRunner.<init>(webServiceRunner.java:40)
at vcctl.webServiceRunner$1.run(webServiceRunner.java:107)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$300(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
On my other Windows 7 computers, the log message looks like this:
C:\Users\bullard\Desktop\vcctl\scripts>cd ..\src
C:\Users\bullard\Desktop\vcctl\src>java -classpath "lib/derby.jar:lib/derbytools.jar" -Dorg.eclipse.jetty.server.Request.maxFormKeys=20000 -jar "VcctlWrapper.jar"
2016-03-21 17:34:04.520:INFO::AWT-EventQueue-0: Logging initialized #172ms
Current relative path is: C:\Users\bullard\Desktop\vcctl\src
2016-03-21 17:34:04.598:INFO:oejs.Server:AWT-EventQueue-0: jetty-9.1.3.v20140225
Mar 21, 2016 5:34:05 PM org.apache.struts.action.ActionServlet initChain
INFO: Loading chain catalog from jar:file:/C:/Users/bullard/AppData/Local/Temp/jetty-0.0.0.0-8080-vcctl.war-_vcctl-any-9120726856785823814.dir/webapp/WEB-INF/lib/struts-tiles-1.3.8.jar!/org/apache/struts/tiles/chain-config.xml
Mar 21, 2016 5:34:05 PM org.apache.struts.action.ActionServlet initChain
INFO: Loading chain catalog from jar:file:/C:/Users/bullard/Desktop/vcctl/src/lib/struts-tiles-1.3.8.jar!/org/apache/struts/tiles/chain-config.xml
Mar 21, 2016 5:34:05 PM org.apache.struts.config.impl.ModuleConfigImpl addAction Config
WARNING: Overriding ActionConfig of path /my-files/viewImage
Mar 21, 2016 5:34:05 PM org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
2016-03-21 17:34:05.955:INFO:oejsh.ContextHandler:AWT-EventQueue-0: Started o.e.j.w.WebAppContext#1ac6103{/vcctl,file:/C:/Users/bullard/AppData/Local/Temp/jetty-0.0.0.0-8080-vcctl.war-_vcctl-any-9120726856785823814.dir/webapp/,AVAILABLE}{C:
\Users\bullard\Desktop\vcctl\src/vcctl.war}
2016-03-21 17:34:05.971:INFO:oejs.ServerConnector:AWT-EventQueue-0: Started ServerConnector#146eb1b{HTTP/1.1}{0.0.0.0:8080}
2016-03-21 17:34:05.971:INFO:oejs.Server:AWT-EventQueue-0: Started #1623ms
This occurs when another instance of Jetty or another process is running on the same port your Jetty server is attempting to run on. Jetty runs on default port 8080. So either you have another Jetty instance or maybe a Tomcat server running on that server occupying port 8080 (or whatever port you configured).
You can modify the jetty.xml file and update the jetty.port by changing this line:
<Set name="port"><SystemProperty name="jetty.port" default="80"/></Set>
But before doing that, I would check for processes in the taskmgr like jetty or tomcat currently running. You can also check netstat -a -b for running processes and the port they are using.
Related
I started the Derby Network Server like stated in this tutorial - here.
But when i typed:
ij> connect 'jdbc:derby://localhost:1527/sample;create=true',
I get the following error:
ERROR XJ041: DERBY SQL error: ERRORCODE: 40000, SQLSTATE: XJ041,
SQLERRMC: Faile d to create database 'sample', see the next exception
for details.::SQLSTATE: XB M0H
Any ideas how to fix this ?
derby.log contents:
Tue Oct 13 10:56:03 EEST 2015 : Apache Derby Network Server - 10.11.1.2 - (1629631) started and ready to accept connections on port 1527
Tue Oct 13 10:56:10 EEST 2015 Thread[DRDAConnThread_2,5,main] Cleanup action starting
ERROR XBM0H: Directory C:\Program Files\Java\jdk1.8.0_45\db\bin\sample cannot be created.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.services.monitor.StorageFactoryService$10.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown Source)
at org.apache.derby.impl.services.monitor.FileMonitor.createPersistentService(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.EmbeddedDriver.connect(Unknown Source)
at org.apache.derby.impl.drda.Database.makeConnection(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.getConnFromDatabaseName(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.verifyUserIdPassword(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.parseSECCHK(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
Cleanup action completed
Tue Oct 13 10:56:10 EEST 2015 Thread[DRDAConnThread_2,5,main] Cleanup action starting
java.sql.SQLException: Failed to create database 'sample', see the next exception for details.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.EmbeddedDriver.connect(Unknown Source)
at org.apache.derby.impl.drda.Database.makeConnection(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.getConnFromDatabaseName(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.verifyUserIdPassword(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.parseSECCHK(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
Caused by: ERROR XJ041: Failed to create database 'sample', see the next exception for details.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 16 more
Caused by: ERROR XBM0H: Directory C:\Program Files\Java\jdk1.8.0_45\db\bin\sample cannot be created.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.services.monitor.StorageFactoryService$10.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown Source)
at org.apache.derby.impl.services.monitor.FileMonitor.createPersistentService(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Unknown Source)
... 13 more
============= begin nested exception, level (1) ===========
java.sql.SQLException: Directory C:\Program Files\Java\jdk1.8.0_45\db\bin\sample cannot be created.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.EmbeddedDriver.connect(Unknown Source)
at org.apache.derby.impl.drda.Database.makeConnection(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.getConnFromDatabaseName(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.verifyUserIdPassword(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.parseSECCHK(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
Caused by: ERROR XBM0H: Directory C:\Program Files\Java\jdk1.8.0_45\db\bin\sample cannot be created.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.services.monitor.StorageFactoryService$10.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown Source)
at org.apache.derby.impl.services.monitor.FileMonitor.createPersistentService(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Unknown Source)
... 13 more
============= end nested exception, level (1) ===========
============= begin nested exception, level (2) ===========
ERROR XBM0H: Directory C:\Program Files\Java\jdk1.8.0_45\db\bin\sample cannot be created.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.services.monitor.StorageFactoryService$10.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown Source)
at org.apache.derby.impl.services.monitor.FileMonitor.createPersistentService(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.EmbeddedDriver.connect(Unknown Source)
at org.apache.derby.impl.drda.Database.makeConnection(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.getConnFromDatabaseName(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.verifyUserIdPassword(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.parseSECCHK(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
============= end nested exception, level (2) ===========
Cleanup action completed
Tue Oct 13 10:56:10 EEST 2015 Thread[DRDAConnThread_2,5,main] (DATABASE = sample), (DRDAID = {1}), Failed to create database 'sample', see the next exception for details.
Tue Oct 13 10:56:10 EEST 2015 Thread[DRDAConnThread_2,5,main] (DATABASE = sample), (DRDAID = {1}), Directory C:\Program Files\Java\jdk1.8.0_45\db\bin\sample cannot be created.
The log entry states:
Directory C:\Program Files\Java\jdk1.8.0_45\db\bin\sample cannot be created
So as far as I know this could be some permission issue with network server process not having enough rights to create a directory in C:\Program Files\Java\jdk1.8.0_45\db\bin\. You can try to run it as administrator.
From your exception stack trace it looks like your Derby network server process was started in the folder C:\Program Files\Java\jdk1.8.0_45\db\bin\ and the process does not seem to have the privileges to write the (Derby database) files in that folder. Try to find a folder where the Derby server process has the privilege to write files into. You can give specify windows drive letters and paths in the Derby connect URL. Just make sure to convert any back slashes \ to forward slashes / or escape them like this \\. So if for example if you know the Derby server process can write to d:\temp folder, then you can compose your command as
ij> connect jdbc:derby://localhost:1527/d:/temp/sample;create=true
or
ij> connect jdbc:derby://localhost:1527/d:\\temp\\sample;create=true
Beware substituted drives when using Derby - if you put your database on a substituted drive it won't work and you get confusing nio exceptions and class cast errors in the log. So this does not work:
connect 'jdbc:derby://localhost:1527/t:/DerbyDB;create=true';
where t is substituted. The same command pointed at drive c does work:
connect 'jdbc:derby://localhost:1527/c:/DerbyDB;create=true';
There is a discussion of these issues on the Derby site, - but maybe its not fixed for all cases? including where the database itself is on a substituted drive. I'm currently using version 10.10.2.0
I am trying to launch spring application on tomcat,
Getting below exception while launching it on tomcat V7.0:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:804)
at org.apache.catalina.startup.SetNextNamingRule.end(SetNextNamingRule.java:104)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1057)
...............
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1543)
at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:637)
at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:574)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:842)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:335)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
.......
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at org.apache.catalina.deploy.NamingResources.addResource(NamingResources.java:353)
... 45 more
Sep 16, 2014 3:21:20 PM org.apache.catalina.startup.ContextConfig processContextConfig
SEVERE: Parse error in context.xml
I have added JDBC resources in context.xml, thereafter i am getting this exception.
Issue was with Tomcat version installed through eclipse.
Downloaded other tomcat version from apache site, now it's working ok.
I have this project in which I have to use hibernate, this is the first time I use, I don't really know many things about it and I get a bunch of exceptions when I run my program. I have installed the required libraries from hibernate in eclipse. But when I run I get this. I'm sorry that I paste all the errors here but I really have no idea how I could fix them and where to start. Could you please help me
Mar 31, 2014 9:44:05 AM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
Mar 31, 2014 9:44:05 AM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.1.8.Final}
Mar 31, 2014 9:44:05 AM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Mar 31, 2014 9:44:05 AM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Mar 31, 2014 9:44:05 AM org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
Mar 31, 2014 9:44:05 AM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
Mar 31, 2014 9:44:06 AM org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: Book.hbm.xml
Mar 31, 2014 9:44:06 AM org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
Mar 31, 2014 9:44:06 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)
Mar 31, 2014 9:44:06 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20
Mar 31, 2014 9:44:06 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000006: Autocommit mode: false
Mar 31, 2014 9:44:06 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost/Lab1-aop]
Mar 31, 2014 9:44:06 AM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000046: Connection properties: {user=root, password=****}
Mar 31, 2014 9:44:08 AM org.hibernate.engine.jdbc.internal.JdbcServicesImpl configure
WARN: HHH000342: Could not obtain connection to query metadata : Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.ConnectException
MESSAGE: Connection refused: connect
STACKTRACE:
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)
at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:193)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:242)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:117)
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2283)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2279)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1748)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1788)
at library.repository.file.RepositoryFile.<init>(RepositoryFile.java:17)
at controller.Controller.<init>(Controller.java:18)
at view.Library.<init>(Library.java:23)
at Start.createAndShowGUI(Start.java:14)
at Start$1.run(Start.java:28)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
** END NESTED EXCEPTION **
Last packet sent to the server was 1 ms ago.
Mar 31, 2014 9:44:08 AM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
Mar 31, 2014 9:44:08 AM org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000422: Disabling contextual LOB creation as connection was null
Mar 31, 2014 9:44:08 AM org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
Mar 31, 2014 9:44:08 AM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
Exception in thread "AWT-EventQueue-0" org.hibernate.MappingException: entity class not found: model.Book
at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:129)
at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:390)
at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:75)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:145)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:507)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:146)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:163)
at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:135)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:383)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1750)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1788)
at library.repository.file.RepositoryFile.<init>(RepositoryFile.java:17)
at controller.Controller.<init>(Controller.java:18)
at view.Library.<init>(Library.java:23)
at Start.createAndShowGUI(Start.java:14)
at Start$1.run(Start.java:28)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: model.Book
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.hibernate.internal.util.ReflectHelper.classForName(ReflectHelper.java:192)
at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:126)
... 33 more
You are missing mysql-connector jar in your classpath and hence the exception.
Specified JDBC Driver com.mysql.jdbc.Driver class not found
Include it in you classpath.
You are missing mysql-connector jar .. Kindly download appropriate version and put it in your project class path.. this will solve your problem...
Your Exception shows below lines
Exception in thread "AWT-EventQueue-0" org.hibernate.service.classloading.spi.ClassLoadingException: Specified JDBC Driver com.mysql.jdbc.Driver class not found
That means your jdbc driver is not added in library or properly configured.
Please check your config file
You're missing the Mysql Connection JAR on your classpath.
This jar contains the driver: com.mysql.jdbc.Driver
Download it and add,problem will be solved
you can download mysql java driver from http://www.mysql.com/downloads/connector/j/
I gets the following error while openning any MS doccument from WebTop and as the reuslt I nothing can open... :(
Jan 23, 2013 6:26:32 AM com.documentum.ucf.client.logging.impl.UCFLogger warn
WARNING: UCF Client Version 5.3.0.1
Jan 23, 2013 6:26:37 AM com.documentum.ucf.client.logging.impl.UCFLogger fatal
SEVERE: Client sender failed to send response message
com.documentum.ucf.common.transport.TransportStreamException: Client sender failed to send response message
at com.documentum.ucf.client.transport.impl.ClientSender.send(ClientSender.java:74)
at com.documentum.ucf.client.transport.impl.ClientSession.sendAndGetReceiver(ClientSession.java:590)
at com.documentum.ucf.client.transport.impl.ClientSession.handshake(ClientSession.java:673)
at com.documentum.ucf.client.transport.impl.ClientSession.handshake(ClientSession.java:653)
at com.documentum.ucf.client.transport.impl.ClientSession.run(ClientSession.java:270)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at com.documentum.ucf.client.transport.impl.ClientNativeGAIRConnector.sendProlog(ClientNativeGAIRConnector.java:179)
at com.documentum.ucf.client.transport.impl.ClientSender.send(ClientSender.java:46)
... 4 more
Can't understand why the connection is refused.
I uses Windows 7 x64 , ECM Documentum 6.7 for , IE 8(for 32 and 64)/ IE9 (for 32 and 64), java 1.6. Is anybody can help me?
Thanks!
I installed the latest WebLogic version anf the error has gone.
Cheers!
I am trying to deploy a JAX-WS on a Tomcat server. I have looked around the web and followed instructions I found here and here but to no avail. I get the following error and have no idea how to correct the issue.
SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamException java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamException
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
- Error listenerStart
- Context startup failed due to previous errors
Jun 30, 2011 10:04:25 AM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextDestroyed
INFO: WSSERVLET13: JAX-WS context listener destroyed
here is my sun-jaxws.xml file
<?xml version="1.0" encoding="UTF-8"?> <endpoints xmlns="http://java.sun.com/xml.ns/jax-ws/ri/runtime" version="2.0">
<endpoint name="ActionMutatorProxy" implementation="com.hyr.boa.transport.ActionMutatorProxy" url-pattern="/action_mutator_proxy" />
A NoClassDefFoundError thrown at deploy time means that a class definition that was present on the build path (e.g. the Java code compiles) cannot be found at runtime. The compile-time class path is not the same as the deploy-time class path with Tomcat (and other containers).
You need to put jaxp-api.jar into WEB-INF/lib or $CATALINA_HOME/lib.