geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eduardo (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (GERONIMO-6554) War file deployment
Date Tue, 26 Jul 2016 18:05:20 GMT

    [ https://issues.apache.org/jira/browse/GERONIMO-6554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15394208#comment-15394208
] 

Eduardo edited comment on GERONIMO-6554 at 7/26/16 6:04 PM:
------------------------------------------------------------

Instead of adding .jar to WAR I usually install .jar files in Geronimo using the administrative
console, then adding the reference to the Geronimo Web Plan file (geronimo-web.xml).   Right
now I'm just using OSGi, the approach is a little different, because instead of using geronimo-web.xml
I just need to add the reference to MANIFEST.MF.

As an example (with geronimo-web.xml):

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<web:web-app xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns:bp="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0" xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
xmlns:jaspi="http://geronimo.apache.org/xml/ns/geronimo-jaspi" xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0"
xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:pers="http://java.sun.com/xml/ns/persistence"
xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1" xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
    <dep:environment>
        <dep:moduleId>
            <dep:groupId>com</dep:groupId>
            <dep:artifactId>your-module-id</dep:artifactId>
            <dep:version>1.0</dep:version>
            <dep:type>car</dep:type>
        </dep:moduleId>
        <dep:dependencies>
            <dep:dependency>
                <dep:groupId>javax.ws<dep:groupId>
                <dep:artifactId>javax.ws.rs-api</dep:artifactId>
                <dep:version>2.0.1</dep:version>
                <dep:type>jar</dep:type>
            </dep:dependency>
        </dep:dependencies>
    </dep:environment>
    <web:context-root>/your-app</web:context-root>
</web:web-app>



was (Author: edugarcia):
I usually install .jar files in Geronimo using the administrative console, then adding it
to the Geronimo Web Plan file (geronimo-web.xml) making a reference to the library installed.
 As an example:



> War file deployment 
> --------------------
>
>                 Key: GERONIMO-6554
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6554
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 3.0.1
>         Environment: Windows 10 , Intel core -i74700MQ
>            Reporter: Priyank
>              Labels: windows
>
> We are using jersey framework for the restful web services. When I am trying to deploy
a War file it gives an error as mentioned below :  
> 2016-07-21 02:27:41,496 ERROR [DeploymentPortlet] The application was not deployed.
> javax/ws/rs/core/Configurable
> java.lang.NoClassDefFoundError: javax/ws/rs/core/Configurable
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
>         at org.apache.geronimo.hook.equinox.GeronimoClassLoader.defineClass(GeronimoClassLoader.java:213)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:478)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:458)
>         at org.apache.geronimo.hook.equinox.GeronimoClassLoader.findLocalClass(GeronimoClassLoader.java:237)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
>         at org.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
>         at org.apache.geronimo.hook.equinox.GeronimoClassLoader.defineClass(GeronimoClassLoader.java:213)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:478)
>         at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:458)
>         at org.apache.geronimo.hook.equinox.GeronimoClassLoader.findLocalClass(GeronimoClassLoader.java:237)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
>         at org.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>         at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
>         at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
>         at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
>         at org.apache.geronimo.wink.deployment.WinkModuleBuilderExtension.initContext(WinkModuleBuilderExtension.java:180)
>         at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.postInitContext(TomcatModuleBuilder.java:449)
>         at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.initContext(AbstractWebModuleBuilder.java:437)
>         at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:168)
>         at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:686)
>         at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:281)
>         at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:145)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>         at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
>         at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
>         at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
>         at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.ClassNotFoundException: javax.ws.rs.core.Configurable
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:467)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
>         at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
>         at org.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>         ... 51 more
> the library is present in war file. 
> Lib name : javax.ws.rs-api-2.0.1.jar



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message