Re: [Resin-interest] resin-interest Digest, Vol 94, Issue 7

2014-04-17 Thread Sadhana Jain
Hi,

I found the answer to the  Resin 4 - Error using log4j -
ClassNotFoundException for
  RollingFileApender  problem I posted yesterday. I had to
include apache-log4j-extras.jar
in the ${resin.home}/lib directory.
My question now is - is it ok to include this and log4j.jar in the lib
directory or should I put it in a different lib called ext-lib or in
webapp-jars?

Thanks very much for your help!
Sadhana


On Thu, Apr 17, 2014 at 10:00 AM, resin-interest-requ...@caucho.com wrote:

 Send resin-interest mailing list submissions to
 resin-interest@caucho.com

 To subscribe or unsubscribe via the World Wide Web, visit
 http://maillist.caucho.com/mailman/listinfo/resin-interest
 or, via email, send a message with subject or body 'help' to
 resin-interest-requ...@caucho.com

 You can reach the person managing the list at
 resin-interest-ow...@caucho.com

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of resin-interest digest...


 Today's Topics:

1. Resin 4 - Error using log4j - ClassNotFoundException for
   RollingFileApender (Sadhana Jain)


 --

 Message: 1
 Date: Wed, 16 Apr 2014 16:40:07 -0700
 From: Sadhana Jain sadhana.j...@veeva.com
 Subject: [Resin-interest] Resin 4 - Error using log4j -
 ClassNotFoundException for RollingFileApender
 To: resin-interest@caucho.com resin-interest@caucho.com
 Message-ID:
 CAA+27E=
 2ot++-6ej5pkf_frntg-wcsjn2ojuz+qlqnpud2c...@mail.gmail.com
 Content-Type: text/plain; charset=iso-8859-1

 Hi,

 We use log4j.xml with reain 3.1 but when trying to use the same
 configuration with resin 4 I am running into the following error.
 In 3.1, we have log4j.jar in a ext-lib directory and in the config file we
 are loading the jars in the ext-lib like this:
  class-loader
 tree-loader path=${resin.home}/ext-lib/
   /class-loader

 In resin.xml for resin 4 I have it like this:
  class-loader
 tree-loader path=${__DIR__}/ext-lib/
   /class-loader

 And I have log4j.jar in the created ext-lib dir. I still see this error in
 the log file. Can you please help to figure this out?
 Do I need to add the log4j.jar or does it come with resin 4? And if so, it
 didn't work when I didn't add it. If I need to add it,
 is this the right way or it has changed for resin 4?


 [2014-04-16 16:23:39.952] resin-44 log4j:WARN The content of element type
 log4j:configuration must match

 (renderer*,throwableRenderer?,appender*,plugin*,(category|logger)*,root?,(categoryFactory|loggerFactory)?).
 [2014-04-16 16:23:39.996] resin-44 log4j:ERROR Could not create an
 Appender. Reported error follows.
 [2014-04-16 16:23:39.996] resin-44 java.lang.ClassNotFoundException:
 org.apache.log4j.rolling.RollingFileAppender (in

 EnvironmentClassLoader[web-app:production/webapp/default/multichannel,STARTING])
 [2014-04-16 16:23:39.997] resin-44  at

 com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1532)
 [2014-04-16 16:23:39.997] resin-44  at

 com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1502)
 [2014-04-16 16:23:39.997] resin-44  at java.lang.Class.forName0(Native
 Method)
 [2014-04-16 16:23:39.997] resin-44  at
 java.lang.Class.forName(Class.java:190)
 [2014-04-16 16:23:39.997] resin-44  at
 org.apache.log4j.helpers.Loader.loadClass(Loader.java:198)
 [2014-04-16 16:23:39.997] resin-44  at

 org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:247)
 [2014-04-16 16:23:39.998] resin-44  at

 org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176)
 [2014-04-16 16:23:39.998] resin-44  at

 org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191)
 [2014-04-16 16:23:39.998] resin-44  at

 org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523)
 [2014-04-16 16:23:39.998] resin-44  at

 org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:436)
 [2014-04-16 16:23:39.998] resin-44  at
 org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1004)
 [2014-04-16 16:23:39.999] resin-44  at
 org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:872)
 [2014-04-16 16:23:39.999] resin-44  at
 org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:778)
 [2014-04-16 16:23:39.999] resin-44  at

 org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
 [2014-04-16 16:23:39.999] resin-44  at
 org.apache.log4j.LogManager.clinit(LogManager.java:127)
 [2014-04-16 16:23:39.999] resin-44  at
 org.apache.log4j.Logger.getLogger(Logger.java:104)
 [2014-04-16 16:23:40.000] resin-44  at
 org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:289)
 [2014-04-16 16:23:40.000] resin-44  at
 org.apache.commons.logging.impl.Log4JLogger.init

[Resin-interest] Resin 4 - Error using log4j - ClassNotFoundException for RollingFileApender

2014-04-16 Thread Sadhana Jain
Hi,

We use log4j.xml with reain 3.1 but when trying to use the same
configuration with resin 4 I am running into the following error.
In 3.1, we have log4j.jar in a ext-lib directory and in the config file we
are loading the jars in the ext-lib like this:
 class-loader
tree-loader path=${resin.home}/ext-lib/
  /class-loader

In resin.xml for resin 4 I have it like this:
 class-loader
tree-loader path=${__DIR__}/ext-lib/
  /class-loader

And I have log4j.jar in the created ext-lib dir. I still see this error in
the log file. Can you please help to figure this out?
Do I need to add the log4j.jar or does it come with resin 4? And if so, it
didn't work when I didn't add it. If I need to add it,
is this the right way or it has changed for resin 4?


[2014-04-16 16:23:39.952] resin-44 log4j:WARN The content of element type
log4j:configuration must match
(renderer*,throwableRenderer?,appender*,plugin*,(category|logger)*,root?,(categoryFactory|loggerFactory)?).
[2014-04-16 16:23:39.996] resin-44 log4j:ERROR Could not create an
Appender. Reported error follows.
[2014-04-16 16:23:39.996] resin-44 java.lang.ClassNotFoundException:
org.apache.log4j.rolling.RollingFileAppender (in
EnvironmentClassLoader[web-app:production/webapp/default/multichannel,STARTING])
[2014-04-16 16:23:39.997] resin-44  at
com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1532)
[2014-04-16 16:23:39.997] resin-44  at
com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1502)
[2014-04-16 16:23:39.997] resin-44  at java.lang.Class.forName0(Native
Method)
[2014-04-16 16:23:39.997] resin-44  at
java.lang.Class.forName(Class.java:190)
[2014-04-16 16:23:39.997] resin-44  at
org.apache.log4j.helpers.Loader.loadClass(Loader.java:198)
[2014-04-16 16:23:39.997] resin-44  at
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:247)
[2014-04-16 16:23:39.998] resin-44  at
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176)
[2014-04-16 16:23:39.998] resin-44  at
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191)
[2014-04-16 16:23:39.998] resin-44  at
org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523)
[2014-04-16 16:23:39.998] resin-44  at
org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:436)
[2014-04-16 16:23:39.998] resin-44  at
org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1004)
[2014-04-16 16:23:39.999] resin-44  at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:872)
[2014-04-16 16:23:39.999] resin-44  at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:778)
[2014-04-16 16:23:39.999] resin-44  at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
[2014-04-16 16:23:39.999] resin-44  at
org.apache.log4j.LogManager.clinit(LogManager.java:127)
[2014-04-16 16:23:39.999] resin-44  at
org.apache.log4j.Logger.getLogger(Logger.java:104)
[2014-04-16 16:23:40.000] resin-44  at
org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:289)
[2014-04-16 16:23:40.000] resin-44  at
org.apache.commons.logging.impl.Log4JLogger.init(Log4JLogger.java:109)
[2014-04-16 16:23:40.000] resin-44  at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[2014-04-16 16:23:40.000] resin-44  at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[2014-04-16 16:23:40.000] resin-44  at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[2014-04-16 16:23:40.001] resin-44  at
java.lang.reflect.Constructor.newInstance(Constructor.java:526)
[2014-04-16 16:23:40.001] resin-44  at
org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1116)
[2014-04-16 16:23:40.001] resin-44  at
org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:914)
[2014-04-16 16:23:40.002] resin-44  at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)
[2014-04-16 16:23:40.002] resin-44  at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336)
[2014-04-16 16:23:40.002] resin-44  at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:310)
[2014-04-16 16:23:40.002] resin-44  at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
[2014-04-16 16:23:40.002] resin-44  at
org.hibernate.ejb.Ejb3Configuration.clinit(Ejb3Configuration.java:105)
[2014-04-16 16:23:40.003] resin-44  at
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:130)
[2014-04-16 16:23:40.003] resin-44  at
com.caucho.env.jpa.PersistenceUnitManager.createDelegate(PersistenceUnitManager.java:425)
[2014-04-16 

[Resin-interest] Can't find symbol error when deploying a webapp on Resin 4 using JMS

2014-04-15 Thread Sadhana Jain
Hi,

I am running into the following error when deploying a webapp on resin 4
that uses JMS. It has been working well
on resin 3.1 and we are trying to move it to Resin 4.

The error is:
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
[14-04-15 09:38:47.841] {resin-40} Compiling
com/veeva/multichannel/webhook/mailgun/MailGunWebHookAgent__MessageProxy.java
[14-04-15 09:38:48.728] {resin-40}
WebApp[production/webapp/default/multichannel] fail
[14-04-15 09:38:48.729] {main}
/opt/resin-4.0.39/webapps/multichannel/WEB-INF/work/ejb/com/veeva/multichannel/webhook/mailgun/MailGunWebHookAgent__MessageProxy.java:95:
error: cannot find symbol
   } catch
(com.veeva.multichannel.core.job.agent.JobAgentA$JobAgentProcessingException
e) {
 ^
 symbol:   class
JobAgentA$JobAgentProcessingException
 location: package
com.veeva.multichannel.core.job.agent
   1 error

It seems resin is trying to compile the *_MessageProxy.java classes which
refers to JobAgentProcessingException and it is present in WEB-INF/classes
but I don't know why it's not able to find that class in the
WEB-INF/classes. It's seems when compiling those MessageProxy classes, the
compiler's classpath is not set correctly? I am sure it's some
configuration issue that I am not able to figure out. Any help on how to
set the configuration resin.xml or resin-web.xml to overcome this error
will be much appreciated as I have spent almost three days on this issue
trying various things but to no avail.

Thanks a lot,
Sadhana
___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] which version of ActiveMQ works with Resin 3.1?

2013-02-12 Thread Sadhana Jain

Hello,

I was wondering if anyone has tried the latest version of ActiveMQ 5.x with
Resin 3.1? Does Resin support only a particular version of ActiveMQ or will
any version of ActiveMQ work with any version of Resin?

Thank you,
Sadhana
-- 
View this message in context: 
http://old.nabble.com/which-version-of-ActiveMQ-works-with-Resin-3.1--tp35015859p35015859.html
Sent from the Resin mailing list archive at Nabble.com.


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


Re: [Resin-interest] Does Resin 4.0 support integration with ActiveMQ via JCA?

2013-02-11 Thread Sadhana Jain

Hello Scott,

I checked that you have updated the docs:
http://wiki4.caucho.com/Resin_ActiveMQ_How_to
And http://wiki4.caucho.com/Resin_JCA_ActiveMQ_How_to. I followed the
document to change my code 
(I was not using both @Inject and @Named together) but it still didn't work
for me. By this I mean I don't get reference to the injected factory or
Queue in my code. 

One question I have is that I should be able to use these annotations in any
class not just in the servlet, right? I tried both with and without JCA...

Did the code you posted in the document work for you with ActiveMQ? Could
you give me any idea what I could be doing wrong? I will post my code below.

Thank you very much,
Sadhana

resin-web.xml
=

   resource-adapter class=org.apache.activemq.ra.ActiveMQResourceAdapter
init server-url=vm://localhost/
/resource-adapter

 connection-factory
class=org.apache.activemq.ra.ActiveMQManagedConnectionFactory
name=activemq /
 
 jms-queue class=org.apache.activemq.command.ActiveMQQueue 
name=aeQueue
   init physical-name=aeQueue/
 /jms-queue

Class JobManager.java
==

public class JobManager {

@Inject @Named(activemq) QueueConnectionFactory jobQueueFactory;
@Inject @Named(aeQueue) Queue aEmailQueue;

=

I'll need to update the docs (and test with ActiveMQ). The example you 
gave used a very old draft of CDI (before it was called CDI.)

The injection annotation is @javax.inject.Inject.

Do you need JCA? (For example, for XA support.) If you don't, the 
non-JCA configuration would be simpler.

-- Scott

 Thanks a lot,
 Sadhana


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


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


-- 
View this message in context: 
http://old.nabble.com/Does-Resin-4.0-support-integration-with-ActiveMQ-via-JCA--tp34990885p35010225.html
Sent from the Resin mailing list archive at Nabble.com.


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


[Resin-interest] Does Resin 4.0 support integration with ActiveMQ via JCA?

2013-02-06 Thread Sadhana Jain
Hello Resin Developers,

Could you please confirm if the ActiveMQ integration is supported and will
work with Resin 4.0? I don't see any documentation on it and therefore am
unable to figure out how to configure the jms queue in the resin-web.xml
file. The old way (resin 3.x) of configuring it doesn't seem to work. Also,
I am trying to find out how to get the sources for JMSQueue implementation
so I can debug the issue myself. Could someone please help me?

Thanks a lot,
Sadhana
___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] Urgent: Help needed using ActiveMQ with Resin 3.1 and Resin 4.0

2013-02-04 Thread Sadhana Jain
Hi All,

I am trying to make ActiveMQ work with resin 3.1 first and then will be
moving it to resin 4.0.
I am new to Resin, could someone please point me to Resin documentation
showing an example/tutorial to use activeMQ
with resin? I tried with page: http://wiki.caucho.com/ActiveMQ but am
unable to make it work!  I have following issues:

The @In annotation doesn't return me a reference to a connection factory. I
get null pointer. I have declared my connection factory in resin-web.xml as
follows:

resource-adapter class=org.apache.activemq.ra.ActiveMQResourceAdap ter
init server-url=tcp://localhost:61616/
/resource-adapter

connection-factory class=org.apache.activemq.ra.ActiveMQManagedConne
ctionFactory name=activemqFactory /


and in my class called JobManager.java I have am using it as follows:

public class JobManager {

@In ConnectionFactory jobQueueFactory;


Could you please help to see what I am doing wrong? How can I code it
without using the @In annotation?

Thank you so much for your help!
Sadhana
___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest