2 Replies Latest reply on Oct 17, 2011 11:25 AM by sharma.vijay16

    Jboss 6.1 deployment+Jpa 2.0

    sharma.vijay16

      Hi,

          Im trying to deploy the ear file on jboss default folder, here what i did:

       

      1) Create oracle-ds.xml and put inside default folder.

      2) I put ear file on default folder.

       

      Note: We are using JPA2.0 and hibernate 3.5. All 3rd party jars are bundled inside ear>lib folder.

       

      When I start the application then it throws exception of our custom filter which we have in our web-inf/web.xml

       

      11:03:40,341 ERROR [[/]] Exception starting filter RequestAuthenticationBypassFilter: java.lang.ClassCastException: com.workbrain.server.servlet.filter.BypassFilter cannot be cast to javax.servlet.Filter

                at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:441) [:6.1.0.Final]

                at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3246) [:6.1.0.Final]

                at org.apache.catalina.core.StandardContext.start(StandardContext.java:3843) [:6.1.0.Final]

                at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:294) [:6.1.0.Final]

                at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146) [:6.1.0.Final]

                at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:476) [:6.1.0.Final]

                at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) [:6.1.0.Final]

                at org.jboss.web.deployers.WebModule.start(WebModule.java:95) [:6.1.0.Final]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_18]

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_18]

       

      ------------------------------------

       

      Im wondering what configuration required for deploy the JAP2.0 app on jboss 6.1.

       

      It is quite urgent for us because it is one key things which is stopping us to moving forward with jboss.

       

      Our app properly deploy with Weblogic 10.3, Websphere 7.0 and Glassfish 3.X

       

      Im a key decision maker for this app deployment.

       

      If you think any configuration is missing then please adivse me ASAP.

        • 1. Re: Jboss 6.1 deployment+Jpa 2.0
          meme

          I don't think that's up to the database.

          If the class BypassFilter really extends javax.servlet.Filter there might be any issue with your

          classpath. Maybe you've got another javax.servlet.Filter-Interface deployed with your application.

          (In the ear or in the war)

           

          marc

          • 2. Re: Jboss 6.1 deployment+Jpa 2.0
            sharma.vijay16

            Hi Marc,

                         Thanks for your quick response. Im having many classloading issue also. Let me explain how our application is:

             

            Ear>lib (custom and 3rd party jars)

                    metainf

                    war

             

            I have created jboss-classloading.xml and put inside the war/web-inf folder and I see many classloading issue:

             

            ------------------------------

             

            Deployment "jboss.web.deployment:war=/invoker" is in error due to the following reason(s): java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.catalina.core.ApplicationContext.createServlet(Ljava/lang/Class;)Ljavax/servlet/Servlet;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, org/apache/catalina/core/ApplicationContext, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for interface javax/servlet/ServletContext have different Class objects for the type javax/servlet/Servlet used in the signature

              Deployment "vfs:///D:/jboss/jboss-as-distribution-6.1.0.Final/jboss-6.1.0.Final/server/default/deploy/workbrain.ear" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.jboss.reloaded.naming.deployers.mc.MCJavaEEApplication from BaseClassLoader@1f4b24{vfs:///D:/jboss/jboss-as-distribution-6.1.0.Final/jboss-6.1.0.Final/server/default/deploy/workbrain.ear}

             

             

                      at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.2.GA]

                      at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.2.GA]

                      at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.1.0.Final]

                      at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]

                      at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.1.0.Final]

                      at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]

                      at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]

                      at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]

                      at java.lang.Thread.run(Thread.java:619) [:1.6.0_18]

            ----------------

             

            Here my jboss-classloading.xml looks like

             

            <?xml version="1.0" encoding="UTF-8"?>

            <classloading xmlns="urn:jboss:classloading:1.0"

             

             

            export-all="NON_EMPTY"

            parent-first="false"

            import-all="true">

            </classloading>

            --------------

             

            Im really struglling with this classloading issue because we want to use 3rd party jars which is bundled with our app.

             

            It would be really helpful if you can give me exact scenerio for classloading or proper tag if I have missed anything.