Ljava.lang.String class cannot be resolved in persistence.xml

I am using JBoss Developer Studio. I have a project with persistence.xml file. The file is perfect for me, but I keep getting this error on a tab that lists all the problems of my project.

Class "[Ljava.lang.String;@22ec7158" cannot be resolved 

I include an image for a better context.

enter image description here

When I click on the error, so that it takes me to where the error occurs, it returns me to the end of the file.

persistence.xml

 <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> <persistence-unit name="Persistence"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:jboss/datasources/MemberOfferDS</jta-data-source> <class>com.bbb.memberoffer.model.SycsCoordinator</class> <class>com.bbb.aicweb.memberoffer.model.SycsCoordinatorPhoneNumber</class> <class>com.bbb.memberoffer.model.SycsCoordinatorClub</class> <class>com.bbb.memberoffer.model.SycsCoordinatorSecurityGroup</class> <class>com.bbb.memberoffer.model.SycsCoordinatorClubPk</class> <class>com.bbb.memberoffer.model.PhoneNumberType</class> <class>com.bbb.memberoffer.model.Club</class> <exclude-unlisted-classes>true</exclude-unlisted-classes> <properties> <!-- Not sure if this is the right one to use or not? --> <property name='hibernate.show_sql' value='true' /> <property name='hibernate.format_sql' value='true' /> <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/> </properties> </persistence-unit> </persistence> 
+6
source share
1 answer

You may have solved this already, but in my case the problem was caused by a reference to a class in an element that no longer exists.

EDIT: The exact reason for this error message is because the error generator tries to run toString () in the String array when it generates the error message.

+9
source

Source: https://habr.com/ru/post/983909/


All Articles