4 Replies Latest reply on Apr 23, 2014 6:33 PM by Ganesh Kanagavel

    [solved] How can i tell JBossEntityResolver not to fetch from internet

    altoo2 Newbie

      Hello,

       

      i use JBoss-5.1.0.GA, and it tries to download the XSD definition used from an persistance.xml file.

       

       

      The persistance.xml looks like:

       

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

      <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

        <persistence-unit .....

       

      The Output in JBoss filelog looks like:

       

       

       

      2011-04-19 15:16:12,903 WARN  [org.hibernate.ejb.packaging.PersistenceXmlLoader] (main) Warning parsing XML: XML InputStream(2) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

      2011-04-19 15:16:17,122 ERROR [org.apache.juddi.config.PersistenceManager] (main) entityManagerFactory creation failed

      javax.persistence.PersistenceException: Unable to configure EntityManagerFactory

       

      ^^ here it seemed that java.sun.com delivered a non-XSD file.

      2011-04-19 15:07:38,049 WARN  [org.jboss.util.xml.JBossEntityResolver] (main) Trying to resolve systemId as a non-file URL: http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd

      2011-04-19 15:08:30,323 WARN  [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (JBoss Shutdown Hook) Error deactivating profile:

       

      ^^ here i killed jboss (kill <jboss-pid>)

       

      I would appreciate help for fixing this, because jboss should work without internet and the application should always startup even if java.sun.com delevires a non-XSD file from the same url.

       

       

      Thanks in advance

        • 1. How can i tell JBossEntityResolver not to fetch from internet
          altoo2 Newbie

          Sorry here the full stacktrace

           

           

          2011-04-19 15:16:12,903 WARN  [org.hibernate.ejb.packaging.PersistenceXmlLoader] (main) Warning parsing XML: XML InputStream(2) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

          2011-04-19 15:16:17,122 ERROR [org.apache.juddi.config.PersistenceManager] (main) entityManagerFactory creation failed

          javax.persistence.PersistenceException: Unable to configure EntityManagerFactory

              at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:265)

              at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125)

              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)

              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)

              at org.apache.juddi.config.PersistenceManager.initializeEntityManagerFactory(PersistenceManager.java:56)

              at org.apache.juddi.config.AppConfig.loadConfiguration(AppConfig.java:94)

              at org.apache.juddi.config.AppConfig.<init>(AppConfig.java:62)

              at org.apache.juddi.config.AppConfig.getInstance(AppConfig.java:183)

              at org.apache.juddi.config.AppConfig.getConfiguration(AppConfig.java:205)

              at org.apache.juddi.Registry.start(Registry.java:55)

              at org.jboss.internal.soa.esb.dependencies.JuddiRMIService.startService(JuddiRMIService.java:144)

              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)

              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)

              at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

              at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)

              at $Proxy38.start(Unknown Source)

              at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

              at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

              at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

              at org.jboss.system.ServiceController.start(ServiceController.java:460)

              at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

              at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

              at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

              at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

              at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

              at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

              at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

              at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

              at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

              at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

              at org.jboss.Main.boot(Main.java:221)

              at org.jboss.Main$1.run(Main.java:556)

              at java.lang.Thread.run(Thread.java:662)

          Caused by: java.lang.IllegalStateException: BaseClassLoader@342c502a{vfsfile:/home/owe/java/jboss-5.1.0.GA-garuda/server/default/conf/jboss-service.xml} classLoader is not connected to a domain (probably undeployed?) for class java.util.jar.JarInputStream

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:793)

              at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

              at org.hibernate.ejb.packaging.JarVisitorFactory.getVisitor(JarVisitorFactory.java:135)

              at org.hibernate.ejb.packaging.JarVisitorFactory.getVisitor(JarVisitorFactory.java:100)

              at org.hibernate.ejb.Ejb3Configuration.getMainJarVisitor(Ejb3Configuration.java:274)

              at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:246)

              ... 73 more

          • 2. How can i tell JBossEntityResolver not to fetch from internet
            altoo2 Newbie

            Alright i solved it, JBoss 5 does not support JPA2, i changed back to JPA1.

            • 3. Re: How can i tell JBossEntityResolver not to fetch from internet
              dhanaraja rajendiran Newbie

              Hi

               

              I am facing one issue with jBoss server,

              This is the problem i am getting in my console while starting my jboss server

               

              09:57:36,500 WARN  [PersistenceXmlLoader] Warning parsing XML: XML InputStream(14) schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

               

               

              if i am removing the internet connection from my pc means it is working(Starting successfully)

               

              this is part of my persistence.xml file

               

              <persistence xmlns="http://java.sun.com/xml/ns/persistence"

                           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                           xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"

                           version="2.0">

               

              ..........................

               

              Kindly tel me how to solve this issue

               

              Thanks in Advance !!!!!!!!!!

              • 4. Re: [solved] How can i tell JBossEntityResolver not to fetch from internet
                Ganesh Kanagavel Newbie

                Any Update on this issue, How do we solve this issue?