Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001538 [Resin] major always 01-04-07 13:14 02-12-07 10:38
Reporter gzhu View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.0
Summary 0001538: Fail to generate MyCMP__Amber.java for EJB2 CMP
Description Code generation failed on all EJB2 CMPs. With resin log:

[12:45:24.144] com.caucho.config.ConfigException: com.caucho.java.JavaCompileException: /usr/resin-3.1.0/webapp/WEB-INF/work/ejb/_ejb/AddCreditInfo/AddCreditInfoCMP__Amber.java:33: '}' expected
[12:45:24.144] ^
[12:45:24.144] /usr/resin-3.1.0/webapp/WEB-INF/work/ejb/_ejb/Auction/AuctionCMP__Amber.java:33: '}' expected
[12:45:24.144] ^
[12:45:24.144] /usr/resin-3.1.0/webapp/WEB-INF/work/ejb/_ejb/CatalogSale/CatalogSaleCMP__Amber.java:33: '}' expected
[12:45:24.144] ^
[12:45:24.144] /usr/resin-3.1.0/webapp/WEB-INF/work/ejb/_ejb/Contact/ContactCMP__Amber.java:33: '}' expected

Additional Information The generated MyCMP__Amber.java stops half way inside the method __caucho_setPrimaryKey(Object key)

Attached Files

- Relationships

- Notes
(0001705)
gzhu
01-04-07 17:05
edited on: 01-04-07 17:08

More specific, the java for primary key is a class extended from another:

     public MyEjbCMPPK extends MyCommonPK {...};

And this is what ejb-jar.xml looks like:

<entity>
  <description><![CDATA[Some description]]></description>
  <ejb-name>MyEjbCmp</ejb-name>
  <local-home>my.class.path.MyEjbCMPHome</local-home>
  <local>my.class.path.MyEjbCMP</local>

  <ejb-class>my.class.path.MyEjbCMP</ejb-class>
  <persistence-type>Container</persistence-type>
  <prim-key-class>my.class.path.MyEjbCMPPK</prim-key-class>
  <cmp-version>2.x</cmp-version>
  .....
</entity>

And in com/caucho/amber/field/CompositeId.java:
(line 482):
  EmbeddableType embeddable
    = persistenceUnit.getEmbeddable(_keyClass.getName());

  // jpa/0u21 ArrayList<IdField> keys = getKeys();
  ArrayList<AmberField> keys = embeddable.getFields();
                               ^^^^^^^ Null Pointer Exception (embeddable=null)
--------------------------------

My temp fix ( http://backhoe.ironplanet.com/download/resin/fix1538/CompositeId.java [^] ) got me through this, but failed on servlet invocation with following error:

[16:35:24.960] javax.servlet.ServletException: java.lang.NullPointerException
[16:35:24.960] at com.caucho.server.dispatch.ExceptionFilterChain.<init>(ExceptionFilterChain.java:54)
[16:35:24.960] at com.caucho.server.webapp.WebApp.buildInvocation(WebApp.java:1907)
[16:35:24.960] at com.caucho.server.webapp.WebAppContainer.buildInvocation(WebAppContainer.java:727)
[16:35:24.960] at com.caucho.server.host.Host.buildInvocation(Host.java:476)
[16:35:24.960] at com.caucho.server.host.HostContainer.buildInvocation(HostContainer.java:331)
[16:35:24.960] at com.caucho.server.cluster.Server.buildInvocation(Server.java:795)
[16:35:24.960] at com.caucho.server.dispatch.DispatchServer.buildInvocation(DispatchServer.java:200)
[16:35:24.960] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:258)
[16:35:24.960] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:477)
[16:35:24.960] at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:591)
[16:35:24.960] at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:513)
[16:35:24.960] at java.lang.Thread.run(Thread.java:595)
[16:35:24.960] Caused by: java.lang.NullPointerException
[16:35:24.960] at com.caucho.server.dispatch.FilterMapping.isMatch(FilterMapping.java:169)
[16:35:24.960] at com.caucho.server.dispatch.FilterMapper.buildDispatchChain(FilterMapper.java:140)
[16:35:24.960] at com.caucho.server.webapp.WebApp.buildInvocation(WebApp.java:1876)
[16:35:24.960] ... 10 more

 

- Issue History
Date Modified Username Field Change
01-04-07 13:14 gzhu New Issue
01-04-07 17:05 gzhu Note Added: 0001705
01-04-07 17:08 gzhu Note Edited: 0001705
02-12-07 10:38 ferg Assigned To  => ferg
02-12-07 10:38 ferg Status new => closed
02-12-07 10:38 ferg Resolution open => fixed
02-12-07 10:38 ferg Fixed in Version  => 3.1.1


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker