Closed micherlinman closed 3 years ago
The erros indicate that you have 2 copies of 'xmlparserv2.jar' (or similar) on your eclipse classpath (i.e. one other besides the one in the yawl 'build/3rdparty' subfolder). Find and remove one or the other. Note: this jar is used only by the scheduling service.
Please confirm that this fixes the problem.
So, I removed the xmlparserv2 libary from project. But there is one more problem in https://github.com/yawlfoundation/yawl/blob/master/src/org/yawlfoundation/yawl/scheduling/util/XMLUtils.java .
The
import javax.xml.transform.stream.StreamSource;
has still an error "package javax.xml.transform.stream is accessible from more than one module:
Yes, everything is built through Ant scripts. See build/build.xml for details
Now I set the databse to mysql and I get an
by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider] as strategy [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]
I updated the c3p0 jar to 0.9.5.5 but its still broke
D:\yawl\output>java -jar YAWL_Standalone_4.3.1.jar
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
Exception in thread "main" org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:261)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:225)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)
at org.yawlfoundation.yawl.util.HibernateEngine.initialise(HibernateEngine.java:99)
at org.yawlfoundation.yawl.util.HibernateEngine.<init>(HibernateEngine.java:72)
at org.yawlfoundation.yawl.util.HibernateEngine.<init>(HibernateEngine.java:77)
at org.yawlfoundation.yawl.authentication.YSessionCache.initDb(YSessionCache.java:272)
at org.yawlfoundation.yawl.authentication.YSessionCache.<init>(YSessionCache.java:50)
at org.yawlfoundation.yawl.engine.YEngine.<init>(YEngine.java:117)
at org.yawlfoundation.yawl.engine.YEngine.getInstance(YEngine.java:141)
at org.yawlfoundation.yawl.engine.YEngine.getInstance(YEngine.java:155)
at org.yawlfoundation.yawl.engine.YEngine.getInstance(YEngine.java:149)
at org.yawlfoundation.yawl.engine.gui.YAdminGUI.<init>(YAdminGUI.java:303)
at org.yawlfoundation.yawl.engine.gui.TabbedEngineGUI.makeAdminPanel(TabbedEngineGUI.java:77)
at org.yawlfoundation.yawl.engine.gui.TabbedEngineGUI.<init>(TabbedEngineGUI.java:60)
at org.yawlfoundation.yawl.engine.gui.TabbedEngineGUI.createAndShowGUI(TabbedEngineGUI.java:120)
at org.yawlfoundation.yawl.engine.gui.TabbedEngineGUI.main(TabbedEngineGUI.java:156)
Caused by: org.hibernate.HibernateException: Could not instantiate connection provider [org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider]
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:197)
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:120)
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:55)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:105)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:251)
... 23 more
Caused by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider] as strategy [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:128)
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:194)
... 27 more
My build.properties :
# The installation path is only used if there is no CATALINA_HOME environment variable
# defined.
catalina.home=C\:xampp\tomcat
tomcat.treatAsDedicated=false
# Database information:
# Type must match the suffix to one of the available hibernate.properties.* files:
# [postgres, derby, hypersonic, mysql, oracle, h2]
# Path is as follows the jdbc:<driver>: part of the URL (examples in properties files)
# User and password as required (for example, not needed for Derby or H2)
database.type=mysql
database.path=localhost\:3306
database.user=root
database.password=mypw
if you locate and look in 'hibernate.properties' (depending on how you've built it, the file will be in either the tomcat/yawllib dir or the tomcat/webapps/
In my Spring Boot Java applicantions I use "spring.datasource.url = jdbc:mysql:///tableName" to connect to database and it works. For yawl I cloned the project, added my mysql data to build.properties and ran "ant buildAll". After that I started my local xampp mysql server and ran "java -jar YAWL_Standalone_4.3.1.jar" and I get this problem. In the standalone.jar the hibernate.properties file looks like
## MySQL
hibernate.dialect org.hibernate.dialect.MySQL57Dialect
hibernate.connection.driver_class com.mysql.jdbc.Driver
hibernate.connection.url jdbc:mysql:///yawl
hibernate.connection.username root
hibernate.connection.password mypw
# URL example:
# jdbc:mysql:///yawl
It matches the pattern and my connection string in other projects. But the file is in the root of the jar and not in tomcat/... . So is my build method wrong?
In my clone I get following error ( in src\org\yawlfoundation\yawl\scheduling\util\XMLUtils.java) : The package org.w3c.dom.ls is accessible from more than one module:, java.xml in line 31
and same error for "import javax.xml.XMLConstants;"
I am using Java jdk 14.2 and Eclipse 2020-06. Anyone knows how to fix that?