Announcement Announcement Module
Collapse
No announcement yet.
Object: org.tts.maqraa.data.Daralquran@1e20120 is not a known entity type Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Object: org.tts.maqraa.data.Daralquran@1e20120 is not a known entity type

    Dear Gurus,

    I have the following problem with more than 3 hours without solution.

    My problem summarizes as the following, I'm trying to build web application from those technologies

    - JSF 2.0 (Prime Faces).
    - Spring 3.0.
    - Eclipse Link 2.3.2.
    - Tomcat 7.

    This is My persistence.xml file

    Code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
    	version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">
    	<persistence-unit name="Maqraa">
    		<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    		<class>org.tts.maqraa.data.DarAlquranManager</class>
    		<class>org.tts.maqraa.data.DoorAlquranGM</class>
    		<class>org.tts.maqraa.data.QuranTeacher</class>
    		<class>org.tts.maqraa.data.ScientificOfficer</class>
    		<class>org.tts.maqraa.data.SystemAdmin</class>
    		<class>org.tts.maqraa.data.City</class>
    		<class>org.tts.maqraa.data.Country</class>
    		<class>org.tts.maqraa.data.Daralquran</class>
    		<class>org.tts.maqraa.data.HalaqaAchievement</class>
    		<class>org.tts.maqraa.data.HalaqaAssociation</class>
    		<class>org.tts.maqraa.data.Halaqa</class>
    		<class>org.tts.maqraa.data.MemorizationProgram</class>
    		<class>org.tts.maqraa.data.Permission</class>
    		<class>org.tts.maqraa.data.Phase</class>
    		<class>org.tts.maqraa.data.PhasesAttendance</class>
    		<class>org.tts.maqraa.data.Recitation</class>
    		<class>org.tts.maqraa.data.Role</class>
    		<class>org.tts.maqraa.data.Student</class>
    		<class>org.tts.maqraa.data.User</class>
    		<properties>
    			<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
    			<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/maqraa" />
    			<property name="javax.persistence.jdbc.user" value="root" />
    			<property name="javax.persistence.jdbc.password" value="root" />		
    		</properties>
    	</persistence-unit>
    </persistence>
    This is my spring meta data configuration [maqraa-module-context.xml]
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
    	
    	<context:annotation-config />
    	
    	<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    		<property name="driverClassName" value="com.mysql.jdbc.Driver" />
    		<property name="url" value="jdbc:mysql://localhost:3306/maqraa" />
    		<property name="username" value="root" />
    		<property name="password" value="root" />
    	</bean>
    
    	<bean id="jpaDialect" class="org.springframework.orm.jpa.vendor.EclipseLinkJpaDialect" />
    
    	<bean id="jpaVendorAdapter"
    		class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter">
    		<property name="showSql" value="true" />
    	</bean>
    
    	<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    		<property name="persistenceUnitName" value="Maqraa" />
    		<property name="dataSource" ref="dataSource" />
    		<property name="jpaVendorAdapter" ref="jpaVendorAdapter" />
    		<property name="jpaDialect" ref="jpaDialect" />
    		<property name="loadTimeWeaver">
    			<bean class="org.springframework.instrument.classloading.SimpleLoadTimeWeaver" />
    		</property>
    	</bean>
    	
    	<bean id="darAlquranService" class="org.tts.maqraa.service.DarAlQuranService"></bean>
    	
    	<bean id="configurationChecker" class="org.tts.maqraa.service.test.ConfigurationChecker"></bean>
    
    </beans>
    And this is some of code within the DAO service where entity manager will be injected

    Code:
    public abstract class AbstractMaqraaService implements MaqraaService {
    
    	private Logger logger = LoggerFactory.getLogger(this.getClass());
    
    	private int defaultMaxResults = DEFAULT_MAX_RESULTS;
    
    	@PersistenceContext(type=PersistenceContextType.TRANSACTION)
        private EntityManager em;
    entity manager instance (em) is injected but once i'm trying to persist the object of Daralquran, the exception had been thrown like this

    Code:
    May 8, 2012 4:48:57 PM com.sun.faces.lifecycle.InvokeApplicationPhase execute
    WARNING: #{configurationChecker.check}: java.lang.IllegalArgumentException: Object: org.tts.maqraa.data.Daralquran@1e20120 is not a known entity type.
    javax.faces.FacesException: #{configurationChecker.check}: java.lang.IllegalArgumentException: Object: org.tts.maqraa.data.Daralquran@1e20120 is not a known entity type.
    	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
    	at javax.faces.component.UICommand.broadcast(UICommand.java:315)
    	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
    	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
    	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
    	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
    	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:662)
    Caused by: javax.faces.el.EvaluationException: java.lang.IllegalArgumentException: Object: org.tts.maqraa.data.Daralquran@1e20120 is not a known entity type.
    	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
    	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    	... 23 more
    Caused by: java.lang.IllegalArgumentException: Object: org.tts.maqraa.data.Daralquran@1e20120 is not a known entity type.
    	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeCloneWithReferences(UnitOfWorkImpl.java:3484)
    	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.mergeCloneWithReferences(RepeatableWriteUnitOfWork.java:378)
    	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeCloneWithReferences(UnitOfWorkImpl.java:3455)
    	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.mergeInternal(EntityManagerImpl.java:486)
    	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.merge(EntityManagerImpl.java:463)
    	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:597)
    	at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)
    	at $Proxy8.merge(Unknown Source)
    	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:597)
    	at
    I search on the internet and i read multiple forums about the problem before asking, most of developers talks about TimeLoadingWeaver, and i read the section inside the spring document and i change the loader of tomcat without any progress can anyone help me or guide me to solve this issue and to know what is the problem ?
Working...
X