Rob - I restarted and tried much of the below , but same behavior - Ramesh has 
just responded with a question here at the bottom of the thread:

https://developer.jboss.org/thread/272656

-----Original Message-----
From: Rob Vesse [mailto:rve...@dotnetrdf.org] 
Sent: Wednesday, November 02, 2016 11:16 AM
To: users@jena.apache.org
Subject: Re: JDBC in Teiid/JBoss NodeValue / ClassNotFounderror

One possibility is that there is JAR/class caching going on. You may need to 
completely remove your application from JBoss and then redeploy it as the fact 
that you still see this behaviour implies that you still aren’t getting the 
correct services files from the JAR files. Restart of the container/JVM may 
also be necessary

 Note that if you choose to use the individual driver JAR files then you would 
need to also add all the dependencies explicitly as that could also lead to 
missing classes and initialisations

Rob

On 02/11/2016 13:19, "omar.k...@wellsfargo.com" <omar.k...@wellsfargo.com> 
wrote:

    Rob/Andy - thanks!
    
    I'm not sure if I made this clear ... My query does work fine as long as I 
don't include "FILTER"; I'm able to get back a select ?s ?p ?o {?s ?p ?o} with 
no issues from the driver
    
    I did just try the latest snapshot bundle jar, unfortunately...  If I 
include FILTER regex(?var,"value")
    I still get:
    Caused by: java.lang.NoClassDefFoundError: Could not initialize class 
org.apache.jena.sparql.expr.NodeValue
    
    I don't believe Teiid is doing any repackaging, and I'm also confused if I 
include the individual jar files it won't work .. 
    
     Anything else I could try to troubleshoot this?  I'm at a loss
    
    
    -----Original Message-----
    From: Rob Vesse [mailto:rve...@dotnetrdf.org] 
    Sent: Wednesday, November 02, 2016 6:00 AM
    To: users@jena.apache.org
    Subject: Re: JDBC in Teiid/JBoss NodeValue / ClassNotFounderror
    
    They seem to be conflating two different things here
    
     We do use and support Standard JDBC Driver initialisation. We also use the 
same underlying Java mechanism i.e. ServiceLoader to initialise Jena itself. 
Our JDBC driver initialisation invokes our Jena initialisation. So as far as 
we’re concerned we are not doing anything wrong:
    
    
https://github.com/apache/jena/blob/master/jena-jdbc/jena-jdbc-driver-remote/src/main/java/org/apache/jena/jdbc/remote/RemoteEndpointDriver.java#L178
    
    
https://github.com/apache/jena/blob/master/jena-jdbc/jena-jdbc-driver-tdb/src/main/java/org/apache/jena/jdbc/tdb/TDBDriver.java#L95
    
    
https://github.com/apache/jena/blob/master/jena-jdbc/jena-jdbc-driver-mem/src/main/java/org/apache/jena/jdbc/mem/MemDriver.java#L90
    
    As Andy has pointed out there was a bug in how the bundle JAR with all the 
drivers was being created which meant that Jena initialisation wasn’t happening 
properly because the composites services file for Jena initialisers wasn’t 
being created properly. If you use the latest 3.1.1-SNAPSHOT builds then this 
is resolved.
    
    lists.apache.org provides a much more modern interface to our mailing lists
    
    Rob
    
    On 02/11/2016 03:10, "omar.k...@wellsfargo.com" <omar.k...@wellsfargo.com> 
wrote:
    
        Hi Andy - further info from Ramesh ; thanks for your patience  - he was 
having access accessing /reading MarkMail - so I'm relaying (original from 
bottom of https://developer.jboss.org/thread/272656) :
        
        "Basically what they need to do, replace their ServiceLoader mechanism 
with standard JDBC4 ServiceLoader mechanism like 
        
https://github.com/rareddy/teiid/tree/master/client/src/main/resources/META-INF/services
         That will register their Driver class, and in their driver class 
possibly in a "static block" call ARQ.init() that will initialize every time 
one uses their JDBC driver. "
         
        -----Original Message-----
        From: Andy Seaborne [mailto:a...@apache.org] 
        Sent: Tuesday, November 01, 2016 12:10 PM
        To: users@jena.apache.org
        Subject: Re: JDBC in Teiid/JBoss NodeValue / ClassNotFounderror
        
        
        
        On 01/11/16 14:54, omar.k...@wellsfargo.com wrote:
        > Thanks Andy!
        >
        > Question - who is responsible for loading the JDBC driver, and how 
does one load it?
        >
        > I'm not clear on exact details on how to get it to work. I reached 
out to the Teiid team, and Ramesh has a question for you .
        >
        > Can you look at the bottom of this thread for the question from 
Ramesh?
        >
        > https://developer.jboss.org/thread/272656
        
        Firstly - I didn't write and don't use jena-jdbc so my level of 
expertise is limited.  The initialization of Jena in shaded jars is something 
that has come up before.
        
        It looks like the problem is at the Jena initialization step, not the 
loading the JDBC driver. That's supposed to be automatic and is - the crash 
happens because the initialization is incomplete or is happening in the wrong 
order because the normal sequence isn't happening.
        
        In yoru code, if you can, call ARQ.init() before anything else.  
Calling it repeatedly is safe and cheap.
        
        Hopefully RobV can give a better answer for the JDBC aspects.
        
        There is a services/java.sql.Driver - that should cause the JDBC driver 
to load.  Standard way for Java.
        
                Andy
        
        
        >
        >
        > -----Original Message-----
        > From: Andy Seaborne [mailto:a...@apache.org]
        > Sent: Tuesday, November 01, 2016 5:49 AM
        > To: users@jena.apache.org
        > Subject: Re: JDBC in Teiid/JBoss NodeValue / ClassNotFounderror
        >
        >
        >> I checked and the jena-jdbc-driver-bundle does not set up the 
        >> ServiceLoader services correctly.  We'll fix that.
        >
        > jena-jdbc-driver-bundle should be fixed (JENA-1255) now. There is a 
development with it in.
        >
        >      Andy
        >
        >>
        >> But I don't immediately see why using the jars directly does not 
        >> work, but that's due to my lack of knowledge about Teiid and JBoss.
        >>
        >> Is there any repackaging going on?
        >>
        >>     Andy
        >
        
    
    
    
    
    




Reply via email to