[infinispan-issues] [JBoss JIRA] (ISPN-10651) jars added to the server/lib folder are not adding classes to classpath

Tristan Tarrant (Jira) issues at jboss.org
Thu Nov 7 08:20:00 EST 2019


    [ https://issues.jboss.org/browse/ISPN-10651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13809488#comment-13809488 ] 

Tristan Tarrant commented on ISPN-10651:
----------------------------------------

This works since ISPN-10558 was merged.

> jars added to the server/lib folder are not adding classes to classpath
> -----------------------------------------------------------------------
>
>                 Key: ISPN-10651
>                 URL: https://issues.jboss.org/browse/ISPN-10651
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 10.0.0.CR2
>            Reporter: Gustavo Lira e Silva
>            Assignee: Tristan Tarrant
>            Priority: Critical
>             Fix For: 10.0.0.CR3
>
>         Attachments: h2-1.4.199.jar, ispn10651.zip
>
>
> {code:java}
> GlobalConfigurationBuilder globalConfigurationBuilder = new GlobalConfigurationBuilder().defaultCacheName("default");
>       ConfigurationBuilder builder = new ConfigurationBuilder();
>       Configuration build = builder.persistence().addStore(JdbcStringBasedStoreConfigurationBuilder.class)
>             .table()
>             .dropOnExit(true)
>             .createOnStart(true)
>             .tableNamePrefix("ISPN_STRING_TABLE")
>             .idColumnName("ID_COLUMN").idColumnType("VARCHAR(255)")
>             .dataColumnName("DATA_COLUMN").dataColumnType("VARBINARY(1000)")
>             .timestampColumnName("TIMESTAMP_COLUMN").timestampColumnType("BIGINT")
>             .connectionPool()
>             .connectionUrl("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1")
>             .username("sa")
>             .password("sa")
>             .driverClass("org.h2.Driver")
>             .build();
>       RemoteCache<String, String> cache = new RemoteCacheManager().administration().getOrCreateCache("test", builder.build());
>       cache.put("k1", "v1");
>       System.out.println(cache.get("k1"));
> {code}
> If you place H2 driver inside ISPN_HOME/server/lib start the server and run the code above, you will receive ClassNotFoundException: org.h2.Driver



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the infinispan-issues mailing list