0 Replies Latest reply on May 19, 2009 10:39 PM by Gerald Mays

    TestNG java.net.MalformedURLException

    Gerald Mays Newbie
      Greetings,

      I am attempting to get a basic TestNG test case working and getting the following error and have hit the wall. Any suggestions would be greatly appreciated.

      FAILED CONFIGURATION: @BeforeSuite startSeam
      java.lang.RuntimeException: java.net.MalformedURLException: no !/ in spec
           at org.jboss.virtual.plugins.context.AbstractURLHandler.initCacheLastModified(AbstractURLHandler.java:76)
           at org.jboss.virtual.plugins.context.AbstractURLHandler.<init>(AbstractURLHandler.java:65)
           at org.jboss.virtual.plugins.context.jar.SynthenticDirEntryHandler.<init>(SynthenticDirEntryHandler.java:72)
           at org.jboss.virtual.plugins.context.jar.AbstractJarHandler.buildParents(AbstractJarHandler.java:244)
           at org.jboss.virtual.plugins.context.jar.AbstractJarHandler.initJarFile(AbstractJarHandler.java:179)
           at org.jboss.virtual.plugins.context.jar.JarHandler.<init>(JarHandler.java:63)
           at org.jboss.virtual.plugins.context.jar.JarContext.createVirtualFileHandler(JarContext.java:85)
           at org.jboss.virtual.plugins.context.jar.JarContext.<init>(JarContext.java:58)
           at org.jboss.virtual.plugins.context.jar.JarContextFactory.getVFS(JarContextFactory.java:51)
           at org.jboss.virtual.VFS.getVFS(VFS.java:132)
           at org.jboss.virtual.VFS.getRoot(VFS.java:146)
           at org.jboss.embedded.DeploymentGroup.getVirtualFile(DeploymentGroup.java:175)
           at org.jboss.embedded.DeploymentGroup.add(DeploymentGroup.java:165)
           at org.jboss.embedded.DeploymentGroup.addBaseResource(DeploymentGroup.java:369)
           at org.jboss.embedded.DeploymentGroup.addResourceBases(DeploymentGroup.java:398)
           at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:288)
           at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:19)
           at org.jboss.seam.mock.AbstractSeamTest.startJbossEmbeddedIfNecessary(AbstractSeamTest.java:1024)
           at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:915)
           at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
      Caused by: java.net.MalformedURLException: no !/ in spec
           at java.net.URL.<init>(URL.java:601)
           at java.net.URL.<init>(URL.java:464)
           at java.net.URL.<init>(URL.java:413)
           at java.net.JarURLConnection.parseSpecs(JarURLConnection.java:161)
           at java.net.JarURLConnection.<init>(JarURLConnection.java:144)
           at sun.net.www.protocol.jar.JarURLConnection.<init>(JarURLConnection.java:63)
           at sun.net.www.protocol.jar.Handler.openConnection(Handler.java:24)
           at java.net.URL.openConnection(URL.java:945)
           at org.jboss.virtual.plugins.context.AbstractURLHandler.initCacheLastModified(AbstractURLHandler.java:72)
           ... 34 more
      ... Removed 15 stack frames
      SKIPPED CONFIGURATION: @BeforeClass setupClass
      SKIPPED CONFIGURATION: @BeforeMethod begin
      SKIPPED CONFIGURATION: @AfterMethod end
      SKIPPED CONFIGURATION: @AfterClass cleanupClass



      My configuration is as follows: Eclipse Ganymede 3.4, Seam 2.1.1GA, Embedded JBoss. My project was created using the JBoss Seam Tools(Seam Web Project).

      I have the following jars in my build path.

      jboss-embedded-api
      thirdparty-all      
      hibernate-all       
      jboss-embedded-all
      el-api
      jboss-seam      
      jboss-el
      jsf-api
      activation
      testng

      The bootstrap directory in my Referenced Libraries.

      I have a -ds.xml in the deploy dir that is as follows:

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

      <!DOCTYPE datasources
          PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
          "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">

      <datasources>
          <local-tx-datasource>
              <jndi-name>DefaultDS</jndi-name>
              <connection-url>jdbc:hsqldb:.</connection-url>
              <driver-class>org.hsqldb.jdbcDriver</driver-class>
              <user-name>sa</user-name>
              <password></password>
          </local-tx-datasource>
      </datasources>

      This is the persistence.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <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_1_0.xsd"
                   version="1.0">
        <persistence-unit name="helloworld">
          <provider>
            org.hibernate.ejb.HibernatePersistence
          </provider>
          <jta-data-source>java:/DefaultDS</jta-data-source>
          <properties>
            <property name="hibernate.dialect"
                value="org.hibernate.dialect.HSQLDialect"/>
            <property name="hibernate.hbm2ddl.auto"
                value="create-drop"/>
            <property name="hibernate.show_sql" value="true"/>
            <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
          </properties>
        </persistence-unit>
      </persistence>

      Regards,
      gm