Re: [Resin-interest] How to make this simplest CanDI work ?

2010-03-21 Thread smallufo
After a whole day work (but in vain) , I modified my code :

I take off all hibernate-related settings/libraries from persistence.xml and
maven dependencies , I just want to first use resin's Amber to test whether
CanDI works...

This is database settings in resin-web.xml :

  database jndi-name=jdbc/mining
driver type=com.mysql.jdbc.Driver

 urljdbc:mysql://db/mining?useUnicode=trueamp;characterEncoding=UTF8/url
  useradm/user
  passwordpwd/password
/driver
max-connections100/max-connections
  /database


This is persistence.xml :

persistence xmlns=http://java.sun.com/xml/ns/persistence; version=1.0
  persistence-unit name=mining transaction-type=RESOURCE_LOCAL
non-jta-data-sourcejdbc/mining/non-jta-data-source
classfoo.Person/class
/properties
  /persistence-unit
/persistence

When resin inits , I can see Amber successfully get the connection , and
build the connection pool (ManagedPoolItem) .

But I still cannot get PersonDao's implementation , it seems resin cannot
successfully create the PersistenceContext , here is the FINER log dump :



WebApp[http://test.smallufo.com/testapp-1] map (uri:/hello - hello)
Dispatch '/hello' to AccessLogFilterChain[http://test.smallufo.com/testapp-1,
next=WebAppFilterChain[http://test.smallufo.com/testapp-1,
next=ServletFilterChain[hello]]]
com.caucho.config.ConfigException: foo.HelloServlet.personDao:
foo.PersonDaoImpl.entityManager java.lang.NullPointerException
  at com.caucho.config.ConfigException.create(ConfigException.java:99)
  at com.caucho.config.ConfigException.create(ConfigException.java:125)
  at
com.caucho.config.inject.InjectionTargetImpl$FieldInjectProgram.inject(InjectionTargetImpl.java:811)
  at
com.caucho.config.inject.InjectionTargetImpl.inject(InjectionTargetImpl.java:266)
  at
com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:1260)
  at
com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:1142)
  at
com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:98)
  at
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:183)
  at
com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:103)
  at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:286)
  at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:775)
  at
com.caucho.server.connection.TcpConnection.dispatchRequest(TcpConnection.java:600)
  at
com.caucho.server.connection.TcpConnection.handleRequestsImpl(TcpConnection.java:566)
  at
com.caucho.server.connection.TcpConnection.handleRequests(TcpConnection.java:519)
  at
com.caucho.server.connection.TcpConnection$AcceptTask.doTask(TcpConnection.java:1100)
  at
com.caucho.server.connection.TcpConnection$ConnectionReadTask.runThread(TcpConnection.java:1037)
  at
com.caucho.server.connection.TcpConnection$AcceptTask.run(TcpConnection.java:1068)
  at com.caucho.util.ThreadPool$PoolThread.runTasks(ThreadPool.java:901)
  at com.caucho.util.ThreadPool$PoolThread.run(ThreadPool.java:866)
Caused by: com.caucho.config.ConfigException:
foo.PersonDaoImpl.entityManager java.lang.NullPointerException
  at com.caucho.config.ConfigException.create(ConfigException.java:102)
  at
com.caucho.config.j2ee.PersistenceContextGenerator.create(PersistenceContextGenerator.java:121)
  at
com.caucho.config.program.FieldGeneratorProgram.inject(FieldGeneratorProgram.java:84)
  at
com.caucho.config.inject.InjectionTargetImpl$FieldHandlerProgram.inject(InjectionTargetImpl.java:860)
  at
com.caucho.config.inject.InjectionTargetImpl.inject(InjectionTargetImpl.java:266)
  at
com.caucho.config.inject.ManagedBeanImpl.create(ManagedBeanImpl.java:149)
  at
com.caucho.config.inject.InjectManager.getInstanceRec(InjectManager.java:1347)
  at
com.caucho.config.inject.InjectManager.getReference(InjectManager.java:1311)
  at
com.caucho.config.inject.InjectManager.getInjectableReference(InjectManager.java:1509)
  at
com.caucho.config.inject.InjectionTargetImpl$FieldInjectProgram.inject(InjectionTargetImpl.java:807)
  ... 16 more
Caused by: java.lang.NullPointerException
  at
com.caucho.config.inject.InjectManager.getInstanceRec(InjectManager.java:1337)
  at
com.caucho.config.inject.InjectManager.getReference(InjectManager.java:1311)
  at
com.caucho.config.j2ee.WebBeanGenerator.create(WebBeanGenerator.java:66)
  at
com.caucho.config.j2ee.PersistenceContextGenerator.create(PersistenceContextGenerator.java:108)
  ... 24 more
Http[5] HTTP/1.1 500 Internal Server Error


I've stuck with this problem for days , but cannot find an answer ...
I'm very appreciated if somebody helps me... thanks.

I am using Resin (non-Pro) 4.0.5
___
resin-interest mailing list
resin-interest@caucho.com

[Resin-interest] Conditionalizing rewrite rules based on file/directory?

2010-03-21 Thread Rick Mann
With my WordPress installation, I need to redirect some kinds of posts to 
/index.php. I currently have these two rules:

forward regexp=[0-9]+/.* target=/index.php/
forward regexp=^/about/? target=/index.php/


The first redirects URIs that match /year/month/post-name

The second redirects the one and only page I have currently, the about page.

Under Apache, the rewrite rules can be conditionalized to say, redirect 
according to this rule only if the resource pointed to by they URI is not an 
actual file or directory.

Is there any way to do that in Resin?

TIA,

-- 
Rick




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] More Quercus problems (Resin 4.0.4)

2010-03-21 Thread Rick Mann
While Resin 4.0.5 choked on this particular PHP construct everywhere, 4.0.4 
chokes on it a bit differently only here (so far). Resin 4.0.5 would get a 
StackOverflowError trying to parse it, 4.0.4 gets this 
java.lang.UnsupportedOperationException. The PHP causing the error is:

do {
foreach ( (array) current($wp_filter[$tag]) as $the_ )
if ( !is_null($the_['function']) )
call_user_func_array($the_['function'], 
array_slice($args, 0, (int) $the_['accepted_args']));

} while ( next($wp_filter[$tag]) !== false );


In previous investigations, I determined that it is the while clause that 
triggers the problem.


[03-21 13:17:14.478] {http://*:80-8}  WARNING 
(com.caucho.server.webapp.ErrorPageManager) 
java.lang.UnsupportedOperationException: com.caucho.quercus.env.ArgGetValue
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.env.Value.serialize(Value.java:2759)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.env.Value.serialize(Value.java:2741)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.env.ArrayValue.serialize(ArrayValue.java:1294)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.lib.VariableModule.serialize(VariableModule.java:631)
[03-21 13:17:14.478] {http://*:80-8}at 
sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source)
[03-21 13:17:14.478] {http://*:80-8}at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[03-21 13:17:14.478] {http://*:80-8}at 
java.lang.reflect.Method.invoke(Method.java:597)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.module.StaticFunction.invoke(StaticFunction.java:135)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.env.JavaInvoker.callMethod(JavaInvoker.java:727)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.env.JavaInvoker.call(JavaInvoker.java:641)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.expr.CallExpr.evalImpl(CallExpr.java:238)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.expr.CallExpr.eval(CallExpr.java:151)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.expr.Expr.evalValue(Expr.java:469)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.statement.ReturnStatement.execute(ReturnStatement.java:69)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.statement.IfStatement.execute(IfStatement.java:81)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.statement.BlockStatement.execute(BlockStatement.java:105)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.program.Function.callImpl(Function.java:431)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.program.Function.call(Function.java:349)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.expr.CallExpr.evalImpl(CallExpr.java:236)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.expr.CallExpr.evalCopy(CallExpr.java:164)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.expr.BinaryAssignExpr.eval(BinaryAssignExpr.java:88)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.expr.Expr.evalTop(Expr.java:523)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.statement.ExprStatement.execute(ExprStatement.java:67)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.statement.BlockStatement.execute(BlockStatement.java:105)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.program.Function.callImpl(Function.java:431)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.program.Function.call(Function.java:349)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.expr.CallExpr.evalImpl(CallExpr.java:238)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.expr.CallExpr.eval(CallExpr.java:151)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.expr.Expr.evalTop(Expr.java:523)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.statement.ExprStatement.execute(ExprStatement.java:67)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.statement.IfStatement.execute(IfStatement.java:84)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.statement.BlockStatement.execute(BlockStatement.java:105)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.statement.IfStatement.execute(IfStatement.java:81)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.statement.BlockStatement.execute(BlockStatement.java:105)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.program.Function.callImpl(Function.java:431)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.program.Function.call(Function.java:349)
[03-21 13:17:14.478] {http://*:80-8}at 
com.caucho.quercus.env.CallbackFunction.call(CallbackFunction.java:171)
[03-21 13:17:14.478] {http://*:80-8}at 

Re: [Resin-interest] 4.0.0 on osx deploy problem

2010-03-21 Thread Jeff Schnitzer
FWIW, Resin on OSX seems to work fine despite the error messages.

Jeff

On Sat, Mar 20, 2010 at 6:12 AM, Jon Stevens latch...@gmail.com wrote:
 Yes, I can't remember what the solution was. =( Sorry!
 jon

 On Sat, Mar 20, 2010 at 2:16 AM, Rick Mann rm...@latencyzero.com wrote:

 John, did you ever find an answer to this? I'm getting it, too.


 On Jun 29, 2009, at 22:50:52, Jon Stevens wrote:

  Here is another problem. When deploying subetha on osx using the apple
  jdk 6, I get the stack trace below. When deplying subetha on osx using the
  landon fuller soylatte jdk, things work fine. I get a different set of
  errors using jdk5 which relate to the resin servlets apparently being
  compiled with jdk6.
 
  [16][ ~/checkout/resin-4.0.0 ]% ./bin/resin.sh
  Intentionally suppressing recursive invocation exception!
  java.lang.IllegalStateException: recursive invocation
        at
  java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1394)
        at
  java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1377)
        at sun.security.jca.ProviderConfig$1.run(ProviderConfig.java:64)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.security.jca.ProviderConfig.getLock(ProviderConfig.java:62)
        at
  sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
        at
  sun.security.jca.ProviderList.getProvider(ProviderList.java:215)
        at sun.security.jca.ProviderList.getService(ProviderList.java:313)
        at sun.security.jca.GetInstance.getInstance(GetInstance.java:140)
        at
  java.security.cert.CertificateFactory.getInstance(CertificateFactory.java:148)
        at sun.security.pkcs.PKCS7.parseSignedData(PKCS7.java:244)
        at sun.security.pkcs.PKCS7.parse(PKCS7.java:141)
        at sun.security.pkcs.PKCS7.parse(PKCS7.java:110)
        at sun.security.pkcs.PKCS7.init(PKCS7.java:92)
        at
  sun.security.util.SignatureFileVerifier.init(SignatureFileVerifier.java:80)
        at java.util.jar.JarVerifier.processEntry(JarVerifier.java:256)
        at java.util.jar.JarVerifier.update(JarVerifier.java:188)
        at java.util.jar.JarFile.initializeVerifier(JarFile.java:321)
        at java.util.jar.JarFile.getInputStream(JarFile.java:386)
        at sun.misc.JarIndex.getJarIndex(JarIndex.java:99)
        at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:606)
        at java.security.AccessController.doPrivileged(Native Method)
        at
  sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:597)
        at sun.misc.URLClassPath$JarLoader.init(URLClassPath.java:581)
        at sun.misc.URLClassPath$3.run(URLClassPath.java:331)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.misc.URLClassPath.getLoader(URLClassPath.java:320)
        at sun.misc.URLClassPath.getLoader(URLClassPath.java:297)
        at sun.misc.URLClassPath.getResource(URLClassPath.java:167)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:244)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:309)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:402)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at java.lang.SystemClassLoaderAction.run(ClassLoader.java:2150)
        at java.security.AccessController.doPrivileged(Native Method)
        at
  java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1407)
        at
  java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1377)
  Intentionally suppressing recursive invocation exception!
  java.lang.IllegalStateException: recursive invocation
        at
  java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1394)
        at
  java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1377)
        at sun.security.jca.ProviderConfig$3.run(ProviderConfig.java:231)
        at java.security.AccessController.doPrivileged(Native Method)
        at
  sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:225)
        at
  sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:205)
        at
  sun.security.jca.ProviderList.getProvider(ProviderList.java:215)
        at sun.security.jca.ProviderList.getService(ProviderList.java:313)
        at sun.security.jca.GetInstance.getInstance(GetInstance.java:140)
        at
  java.security.cert.CertificateFactory.getInstance(CertificateFactory.java:148)
        at sun.security.pkcs.PKCS7.parseSignedData(PKCS7.java:244)
        at sun.security.pkcs.PKCS7.parse(PKCS7.java:141)
     

Re: [Resin-interest] 4.0.0 on osx deploy problem

2010-03-21 Thread Rick Mann
Hmm, not for me. It seems to keep restarting (I think, I'm not sure now). I've 
tried so many resin versions on so many platforms in the last week, it's all a 
blur.

On Mar 21, 2010, at 17:39:13, Jeff Schnitzer wrote:

 FWIW, Resin on OSX seems to work fine despite the error messages.
 
 Jeff
 
 On Sat, Mar 20, 2010 at 6:12 AM, Jon Stevens latch...@gmail.com wrote:
 Yes, I can't remember what the solution was. =( Sorry!
 jon
 
 On Sat, Mar 20, 2010 at 2:16 AM, Rick Mann rm...@latencyzero.com wrote:
 
 John, did you ever find an answer to this? I'm getting it, too.
 
 
 On Jun 29, 2009, at 22:50:52, Jon Stevens wrote:
 
 Here is another problem. When deploying subetha on osx using the apple
 jdk 6, I get the stack trace below. When deplying subetha on osx using the
 landon fuller soylatte jdk, things work fine. I get a different set of
 errors using jdk5 which relate to the resin servlets apparently being
 compiled with jdk6.
 
 [16][ ~/checkout/resin-4.0.0 ]% ./bin/resin.sh
 Intentionally suppressing recursive invocation exception!
 java.lang.IllegalStateException: recursive invocation
   at
 java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1394)
   at
 java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1377)
   at sun.security.jca.ProviderConfig$1.run(ProviderConfig.java:64)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.security.jca.ProviderConfig.getLock(ProviderConfig.java:62)
   at
 sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
   at
 sun.security.jca.ProviderList.getProvider(ProviderList.java:215)
   at sun.security.jca.ProviderList.getService(ProviderList.java:313)
   at sun.security.jca.GetInstance.getInstance(GetInstance.java:140)
   at
 java.security.cert.CertificateFactory.getInstance(CertificateFactory.java:148)
   at sun.security.pkcs.PKCS7.parseSignedData(PKCS7.java:244)
   at sun.security.pkcs.PKCS7.parse(PKCS7.java:141)
   at sun.security.pkcs.PKCS7.parse(PKCS7.java:110)
   at sun.security.pkcs.PKCS7.init(PKCS7.java:92)
   at
 sun.security.util.SignatureFileVerifier.init(SignatureFileVerifier.java:80)
   at java.util.jar.JarVerifier.processEntry(JarVerifier.java:256)
   at java.util.jar.JarVerifier.update(JarVerifier.java:188)
   at java.util.jar.JarFile.initializeVerifier(JarFile.java:321)
   at java.util.jar.JarFile.getInputStream(JarFile.java:386)
   at sun.misc.JarIndex.getJarIndex(JarIndex.java:99)
   at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:606)
   at java.security.AccessController.doPrivileged(Native Method)
   at
 sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:597)
   at sun.misc.URLClassPath$JarLoader.init(URLClassPath.java:581)
   at sun.misc.URLClassPath$3.run(URLClassPath.java:331)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.misc.URLClassPath.getLoader(URLClassPath.java:320)
   at sun.misc.URLClassPath.getLoader(URLClassPath.java:297)
   at sun.misc.URLClassPath.getResource(URLClassPath.java:167)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:244)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:309)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:402)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at java.lang.SystemClassLoaderAction.run(ClassLoader.java:2150)
   at java.security.AccessController.doPrivileged(Native Method)
   at
 java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1407)
   at
 java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1377)
 Intentionally suppressing recursive invocation exception!
 java.lang.IllegalStateException: recursive invocation
   at
 java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1394)
   at
 java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1377)
   at sun.security.jca.ProviderConfig$3.run(ProviderConfig.java:231)
   at java.security.AccessController.doPrivileged(Native Method)
   at
 sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:225)
   at
 sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:205)
   at
 sun.security.jca.ProviderList.getProvider(ProviderList.java:215)
   at sun.security.jca.ProviderList.getService(ProviderList.java:313)
   at sun.security.jca.GetInstance.getInstance(GetInstance.java:140)
   at
 

Re: [Resin-interest] How to make this simplest CanDI work ?

2010-03-21 Thread smallufo
I can now pinpoint the error ,
It's because I declare the PersistenceContextType
to PersistenceContextType.EXTENDED !!!
I don't know why resin cannot initialize EXTENDED  PersistenceContext

Maybe caucho should look into the PersistenceContextGenerator.java  ,
create() method

try {
  if (PersistenceContextType.EXTENDED.equals(_type)) {
_manager = create(EntityManager.class,
  new AnnotationLiteralJpaPersistenceContext() {
public String value() { return _unitName; }
public boolean extended() { return true; }
  });
  }


2010/3/22 smallufo small...@gmail.com

 After a whole day work (but in vain) , I modified my code :

 I take off all hibernate-related settings/libraries from persistence.xml
 and maven dependencies , I just want to first use resin's Amber to test
 whether CanDI works...

 This is database settings in resin-web.xml :

   database jndi-name=jdbc/mining
 driver type=com.mysql.jdbc.Driver

  urljdbc:mysql://db/mining?useUnicode=trueamp;characterEncoding=UTF8/url
   useradm/user
   passwordpwd/password
 /driver
 max-connections100/max-connections
   /database


 This is persistence.xml :

 persistence xmlns=http://java.sun.com/xml/ns/persistence; version=1.0
   persistence-unit name=mining transaction-type=RESOURCE_LOCAL
 non-jta-data-sourcejdbc/mining/non-jta-data-source
 classfoo.Person/class
 /properties
   /persistence-unit
 /persistence

 When resin inits , I can see Amber successfully get the connection , and
 build the connection pool (ManagedPoolItem) .

 But I still cannot get PersonDao's implementation , it seems resin cannot
 successfully create the PersistenceContext , here is the FINER log dump :



 WebApp[http://test.smallufo.com/testapp-1] map (uri:/hello - hello)
 Dispatch '/hello' to AccessLogFilterChain[
 http://test.smallufo.com/testapp-1, next=WebAppFilterChain[
 http://test.smallufo.com/testapp-1, next=ServletFilterChain[hello]]]
 com.caucho.config.ConfigException: foo.HelloServlet.personDao:
 foo.PersonDaoImpl.entityManager java.lang.NullPointerException
   at com.caucho.config.ConfigException.create(ConfigException.java:99)
   at com.caucho.config.ConfigException.create(ConfigException.java:125)
   at
 com.caucho.config.inject.InjectionTargetImpl$FieldInjectProgram.inject(InjectionTargetImpl.java:811)
   at
 com.caucho.config.inject.InjectionTargetImpl.inject(InjectionTargetImpl.java:266)
   at
 com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:1260)
   at
 com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:1142)
   at
 com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:98)
   at
 com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:183)
   at
 com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:103)
   at
 com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:286)
   at
 com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:775)
   at
 com.caucho.server.connection.TcpConnection.dispatchRequest(TcpConnection.java:600)
   at
 com.caucho.server.connection.TcpConnection.handleRequestsImpl(TcpConnection.java:566)
   at
 com.caucho.server.connection.TcpConnection.handleRequests(TcpConnection.java:519)
   at
 com.caucho.server.connection.TcpConnection$AcceptTask.doTask(TcpConnection.java:1100)
   at
 com.caucho.server.connection.TcpConnection$ConnectionReadTask.runThread(TcpConnection.java:1037)
   at
 com.caucho.server.connection.TcpConnection$AcceptTask.run(TcpConnection.java:1068)
at
 com.caucho.util.ThreadPool$PoolThread.runTasks(ThreadPool.java:901)
   at com.caucho.util.ThreadPool$PoolThread.run(ThreadPool.java:866)
 Caused by: com.caucho.config.ConfigException:
 foo.PersonDaoImpl.entityManager java.lang.NullPointerException
   at com.caucho.config.ConfigException.create(ConfigException.java:102)
   at
 com.caucho.config.j2ee.PersistenceContextGenerator.create(PersistenceContextGenerator.java:121)
   at
 com.caucho.config.program.FieldGeneratorProgram.inject(FieldGeneratorProgram.java:84)
   at
 com.caucho.config.inject.InjectionTargetImpl$FieldHandlerProgram.inject(InjectionTargetImpl.java:860)
   at
 com.caucho.config.inject.InjectionTargetImpl.inject(InjectionTargetImpl.java:266)
   at
 com.caucho.config.inject.ManagedBeanImpl.create(ManagedBeanImpl.java:149)
   at
 com.caucho.config.inject.InjectManager.getInstanceRec(InjectManager.java:1347)
   at
 com.caucho.config.inject.InjectManager.getReference(InjectManager.java:1311)
   at
 com.caucho.config.inject.InjectManager.getInjectableReference(InjectManager.java:1509)
   at
 com.caucho.config.inject.InjectionTargetImpl$FieldInjectProgram.inject(InjectionTargetImpl.java:807)
   ...