You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Andre Brito <an...@gmail.com> on 2011/06/17 21:11:07 UTC

OpenEJB deploy doesn't occur when xmlparserv2.jar is in the lib directory

Hey guys.

As you probably know (at least David knows), I'm migrating an app from JBoss
to OpenEJB. In JBoss I have xmlparserv2.jar in the lib directory. When I
paste that jar inside OpenEJB's lib directory, my app isn't deployed.

I tried several things to get a log message or a stacktrace, and here is
what I got. I start openejb using "openejb start" with nothing to deploy.
Just a simple and clean OpenEJB container start. After that, I try to deploy
my app using "openejb deploy my-app.jar". In the openejb start console, a
stacktrace is printed:


> openejb start
> Apache OpenEJB 3.1.4    build: 20101112-03:32
> http://openejb.apache.org/
> log4j:WARN No appenders could be found for logger
> (org.apache.openejb.resource.activemq.ActiveMQResourceAdapter).
> log4j:WARN Please initialize the log4j system properly.
> [init] OpenEJB Remote Server
>   ** Starting Services **
>   NAME                 IP              PORT
>   httpejbd             127.0.0.1       4204
>   admin thread         127.0.0.1       4200
>   ejbd                 127.0.0.1       4201
>   ejbd                 127.0.0.1       4203
>   hsql                 127.0.0.1       9001
>   telnet               127.0.0.1       4202
> -------
> Ready!
> FOO moduleName = C:\OpenEJB\openejb-3.1.4\apps\my-app.jar
> org.apache.openejb.config.ValidationFailedException: Module failed
> validation. AppModule(path=C:\OpenEJB\openejb-3.1.4\apps\my-app.jar)
>         at
> org.apache.openejb.config.ReportValidationResults.deploy(ReportValidationResults.java:82)
>         at
> org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:241)
>         at
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:629)
>         at
> org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:146)
>         at
> org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:81)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:162)
>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:144)
>         at
> org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:164)
>         at
> org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:92)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:162)
>         at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:144)
>         at
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:122)
>         at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:221)
>         at
> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:174)
>         at
> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:136)
>         at
> org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:238)
>         at
> org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:129)
>         at
> org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:196)
>         at
> org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:149)
>         at
> org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:71)
>         at
> org.apache.openejb.server.ejbd.KeepAliveServer$Session.service(KeepAliveServer.java:213)
>         at
> org.apache.openejb.server.ejbd.KeepAliveServer.service(KeepAliveServer.java:233)
>         at
> org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:66)
>         at
> org.apache.openejb.server.ServicePool$2.run(ServicePool.java:91)
>         at
> org.apache.openejb.server.ServicePool$3.run(ServicePool.java:120)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
> 

Next is what was printed out before I write "openejb deploy my-app.jar":


> openejb deploy my-app.jar
> Application did not pass validation: my-app.jar
> ------------------------------------------
> JAR C:\OpenEJB\openejb-3.1.4\apps\my-app.jar
> 
>  FAIL ... MySession: Missing required persistence.xml for
> @PersistenceContext ref "em" to unit ""
> Unable to delete failed deployment file
> "C:\OpenEJB\openejb-3.1.4\apps\my-app.jar"
> 

I removed a lot of the output for privacy, hope you guys undestand.

I concluded that OpeEJB uses some default jar to write some XML validation
or something like that, and when I try to deploy the app using a new jar
(xmlparserv2.jar), it uses the class from the new jar and throws that
exception. Am I right?

Is there any way I can fix this?

Thanks in advance,
Regards,
Andre.

--
View this message in context: http://openejb.979440.n4.nabble.com/OpenEJB-deploy-doesn-t-occur-when-xmlparserv2-jar-is-in-the-lib-directory-tp3606246p3606246.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: OpenEJB deploy doesn't occur when xmlparserv2.jar is in the lib directory

Posted by Andre Brito <an...@gmail.com>.
Hey Jean-Louis.


Jean-Louis MONTEIRO wrote:
> Hi Andre, did it work with previous versions?
Don't know. Tried with the 3.1.4.


Jean-Louis MONTEIRO wrote:
> I guess you already checked that the ejb jar actually contains the
> META-INF/persistence.xml file.
Yes sir!


Jean-Louis MONTEIRO wrote:
> If so, you are may be right. Adding the XML jar probably breaks deployment
> preventing OpenEJB to successfully read the persistence.xml file.
> 
> What is xmlparserv2.jar about?
Actually, is probably about some XML parse thing. Our JBoss lib directory
has like a gazzillion jars about parsing XMLs, don't know why.

We figured it out. The app signs a XML, and, before that the XML is ok;
after, some attribute is removed (it's like this: before is <blabla
property="blabla">. After the signature, becomes <blabla>). We just parse
the XML using OMElement and put that property there, since this property is
constant.

Thanks for the worry!
Regards,
Andre.

--
View this message in context: http://openejb.979440.n4.nabble.com/OpenEJB-deploy-doesn-t-occur-when-xmlparserv2-jar-is-in-the-lib-directory-tp3606246p3633322.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: OpenEJB deploy doesn't occur when xmlparserv2.jar is in the lib directory

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Hi Andre,


did it work with previous versions?
I guess you already checked that the ejb jar actually contains the
META-INF/persistence.xml file.

If so, you are may be right. Adding the XML jar probably breaks deployment
preventing OpenEJB to successfully read the persistence.xml file.

What is xmlparserv2.jar about?
Do you really need it?
If yes, then we can give it a try with some javax.xml.parsers.* properties.

Jean-Louis

--
View this message in context: http://openejb.979440.n4.nabble.com/OpenEJB-deploy-doesn-t-occur-when-xmlparserv2-jar-is-in-the-lib-directory-tp3606246p3627349.html
Sent from the OpenEJB User mailing list archive at Nabble.com.