Closed brhsasa closed 6 years ago
That will happen when datasource is already configured in server. You should then remove one of the both configurations.
The new <data-source>
entry in web.xml
is intented to remove the need to create server-specific datasource configurations for every different server.
I have already remove it, the tables has been created, but not completed, issues in entites, espacialy the token, also that is not the main issue, the main issue is that the apps is not deployed, it show errors like this one:
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."java-ee-kickoff-app.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."java-ee-kickoff-app.war".WeldStartService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.MalformedParameterizedTypeException
You said the new <data-source>
entry in web.xml
is intented to remove the need to create server-specific datasource configurations for every different server. I know that, but you should know that is not compatible with other databases, like MySQL
, oracle
... you should create other classes instead of using SwitchableXADataSource
because will raise error of casting
I used MySQL as database, but it does not deployed at all, it show cant not start services... like .WeldStartService
and .Install
example:
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service
jboss.deployment.unit."java-ee-kickoff-app.war".WeldStartService: org.jboss.msc.service.StartException
in service jboss.deployment.unit."java-ee-kickoff-app.war".WeldStartService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
also these errors:
Unable to execute JPA schema generation create command [alter table loginToken add constraint ....]
BLOB/TEXT column 'tokenHash' used in key specification without a key length.
WFLYCT0412: required services that are not installed: jboss.persistenceunit \ java-eekickoff-
app.war#kickoff
WFLYCT0180: Services with missing/unvailable dependencies => undefined
WFLYCT018: servce which failed to start service.jboss.persistenceunit
Caused by: java.lang.reflect.MalformedParameterizedTypeException
Already reported in #17.
You said the new
entry in web.xml is intented to remove the need to create server-specific datasource configurations for every different server. I know that, but you should know that is not compatible with other databases, like MySQL, oracle... you should create other classes instead of using SwitchableXADataSource because will raise error of casting
You just need to install JDBC driver yourself and edit driver class/url/username/password in datasource-settings.xml
.
Unable to execute JPA schema generation create command [alter table loginToken add constraint ....]
Already reported in #20.
The tables are being generated as I alrready mentioned which means nothing to do with database configurations: driver, url, username, or password
or with MySQL JDBC Driver
, that I have also already added in pom.xm,, if it is, tables won't be generated. the problem is in your entities that are not coded well, alter table
adding some constraints
, tokenHash used without key length...
Besides that I get errors related to starting services
, that I have mentioned above.
As commented on #20, it's a Hibernate bug.
Frankly, if you continue to behave angry and rude to me about your own mistakes and misunderstandings when using this project, which is written and open sourced for completely free and nothing, then I honestly don't really feel the urge to hint a solution to your specific problem with Hibernate.
Try again later.
That is a misunderstanding of my way of speaking, and those are not my mistakes, I think it is your project, and your code there?, I only mentioned your bugs no more so at the end to get solutions for them. and get the chance for others to use your own project with no misktakes. and I apologize for the misunderstanding.
After changing Hibernate version to either older or newer version, same errors occured, so I think that has nothing to do with Hibernate. what hibernate version did you used, and what version of WF also did you used?
Service jboss.data-source is already registered web.xml:
persistence.xml