Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • zatix
    replied
    Originally posted by Isomorphic View Post
    The complete log for the request means all server logs that are generated while the HTTP request is being processed by the server.

    What you have posted is a subset of this.

    There's nothing obviously wrong with your use of the embedded if property. That's why we're asking for logs - to troubleshoot.
    Ok, I'm on my way to provide you those logs.
    But I still miss the documentation, I'd really appreciate that if you could give me some useful links.

    Leave a comment:


  • Isomorphic
    replied
    The complete log for the request means all server logs that are generated while the HTTP request is being processed by the server.

    What you have posted is a subset of this.

    There's nothing obviously wrong with your use of the embedded if property. That's why we're asking for logs - to troubleshoot.

    Leave a comment:


  • zatix
    replied
    Originally posted by Isomorphic View Post
    So again, we need the complete log for the request - not just the exception. The complete log for the request.
    Could you please explain what that log would be?
    I didn't get it yet.
    Please, give an example of a complete log for the request, so I can fulfill this.

    Meanwhile, can you please provide-me more information about how to make a correct datasource mapping with an embedded key? As I said, I am not finding a proper documentation.

    Leave a comment:


  • Isomorphic
    replied
    So again, we need the complete log for the request - not just the exception. The complete log for the request.

    Leave a comment:


  • zatix
    replied
    The mapped entity and embeddedId:
    Code:
    @Entity
    @Table(name = "VW_USER_VEHICLE_HISTORY")
    public class VwUserVehicleHistory implements Serializable {
    	private static final long serialVersionUID = 1L;
    
    	@EmbeddedId
    	private VwUserVehicleHistoryPK vwUserVehicleHistoryPk = new VwUserVehicleHistoryPK();
    
    	@ManyToOne
    	@JoinColumn(name = "DRIV_SQ_DRIVER")
    	private Driver driver;
    
    //many attributes above
    }
    
    
    @Embeddable
    public class VwUserVehicleHistoryPK {
    	
    	@Column(name = "VEHS_SQ_VEHICLE_HISTORY")
    	private Long historyId;
    	
    	@Column(name = "USPO_SQ_USER_PORTAL_ORION")
    	private Long user;
    
    	@Column(name = "CLIE_SQ_CLIENT_PARTNER")
    	private Long clientPartner;
    
    }
    And the datasource ds.xml:

    Code:
    <DataSource  
    		ID="vwUserVehicleHistory"  
    		serverConstructor="com.isomorphic.jpa.JPA2DataSource"
    		beanClassName="entity.VwUserVehicleHistory"
    		idClassName="entity.VwUserVehicleHistoryPK"  
    		schemaBean="entity.VwUserVehicleHistory"
    		dropExtraFields="true">   
        <fields>     
           	<field name="directionIcon"/>
           	<field name="eventStatus"/>
           	<field name="vehicleNamePlate"/>
           	
           	<field name="driverNickname"  type="text"     hidden="true"   valueXPath="driver/nickname"/>
    
           	<field name="driver" title="driver"	canEdit="false" displayField="driverId" foreignKey="driver.id"/>
        </fields>      
    </DataSource>
    Also, it is important to say that there another datasource named "driver".

    I hope the info showed can help us to find a solution.

    Thank you!

    Leave a comment:


  • zatix
    replied
    I'm getting the following exception:

    === 2013-01-21 22:30:38,549 [ng)'] DEBUG JPADataSource - [builtinApplication.vwUserVehicleHistory_fetch] Query string: select _VwUserVehicleHistory, driver1 from VwUserVehicleHistory _VwUserVehicleHistory left outer join _VwUserVehicleHistory.driver driver1 order by _VwUserVehicleHistory.serverDate desc
    === 2013-01-21 22:30:38,550 [ng)'] DEBUG JPADataSource - [builtinApplication.vwUserVehicleHistory_fetch] Marking transaction for roll back.
    === 2013-01-21 22:30:38,550 [ng)'] DEBUG JPADataSource - [builtinApplication.vwUserVehicleHistory_fetch] Got exception while executing. Transaction will be rolled back.
    java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
    Exception Description: Syntax error parsing the query [select count(*) from VwUserVehicleHistory _VwUserVehicleHistory left outer join _VwUserVehicleHistory.driver driver1], line 1, column 7: unexpected token [count].
    Internal Exception: NoViableAltException(17!=[364:1: selectExpression returns [Object node] : (n= aggregateExpression | n= scalarExpression | OBJECT LEFT_ROUND_BRACKET n= variableAccessOrTypeConstant RIGHT_ROUND_BRACKET | n= constructorExpression | n= mapEntryExpression );])
    at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1375)
    at sun.reflect.GeneratedMethodAccessor682.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:106)
    at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:77)
    at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:87)
    at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:18)
    at $Proxy280.createQuery(Unknown Source)
    at com.isomorphic.jpa.JPADataSource.createQuery(JPADataSource.java:1253)
    at com.isomorphic.jpa.JPADataSource.executeFetch(JPADataSource.java:612)
    at com.isomorphic.datasource.DataSource.execute(DataSource.java:1367)
    at com.isomorphic.jpa.JPADataSource.execute(JPADataSource.java:571)
    at br.com.cp.pj.common.datasource.BaseJPA2DataSource.execute0(BaseJPA2DataSource.java:98)
    at br.com.cp.pj.common.datasource.BaseJPA2DataSource.execute(BaseJPA2DataSource.java:40)
    at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:726)
    at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
    at com.isomorphic.application.AppBase.execute(AppBase.java:491)
    at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2027)
    at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:216)
    at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:173)
    at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:138)
    at com.isomorphic.servlet.IDACall.doPost(IDACall.java:75)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at br.com.cp.pj.gateway.servlet.GWTCacheControlFilter.doFilter(GWTCacheControlFilter.java:41)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: Exception [EclipseLink-8025] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.JPQLException
    Exception Description: Syntax error parsing the query [select count(*) from VwUserVehicleHistory _VwUserVehicleHistory left outer join _VwUserVehicleHistory.driver driver1], line 1, column 7: unexpected token [count].
    Internal Exception: NoViableAltException(17!=[364:1: selectExpression returns [Object node] : (n= aggregateExpression | n= scalarExpression | OBJECT LEFT_ROUND_BRACKET n= variableAccessOrTypeConstant RIGHT_ROUND_BRACKET | n= constructorExpression | n= mapEntryExpression );])
    Last edited by zatix; 22 Jan 2013, 07:51.

    Leave a comment:


  • Isomorphic
    replied
    Start by posting the complete server log for the request. We always need this, not just the exception message.

    Leave a comment:


  • zatix
    started a topic DataSource with @embeddedId giving some exceptions

    DataSource with @embeddedId giving some exceptions

    Using:

    SmartGWT-power-3.1.p20130111
    GWT 2.5

    Hi, I'm trying to make a ListGrid with a JPA2DataSource pointing to a table using an @embeddedId.
    I've already configured the idClass using this method:

    http://www.smartclient.com/smartgwtee-latest/javadoc/com/smartgwt/client/docs/serverds/DataSource.html#idClassName

    But the server continues to launch the following exception:

    Exception Description: Syntax error parsing the query [select count(*) from VwUserVehicleHistory _VwUserVehicleHistory left outer join _VwUserVehicleHistory.driver driver1], line 1, column 7: unexpected token [count].

    Also, the documentation (QuickStart.pdf) is not helping at all, not even google..

    What am I missing here?

    Thank you very much for your help.
Working...
X