[teiid-users] FW: Class not found

Reeves, Russell Russell.Reeves at ManTech.com
Thu Mar 1 11:17:31 EST 2012


Thank you.
I added all the jars at that location.

Now getting what looks to be a configuration error, how do I configure this?:

Mar 01, 2012 10:32:24 AM org.teiid.jdbc.TeiidDriver connect
SEVERE: Could not create connection
org.teiid.jdbc.TeiidSQLException: org.teiid.core.TeiidException
        at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:113)
        at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:70)
        at org.teiid.jdbc.EmbeddedProfile.connect(EmbeddedProfile.java:61)
        at org.teiid.jdbc.TeiidDriver.connect(TeiidDriver.java:105)
        at org.teiid.jdbc.TeiidDataSource.getConnection(TeiidDataSource.java:243)
        at org.teiid.jdbc.TeiidDataSource.getConnection(TeiidDataSource.java:224)
        at com.mantech.teiid.Test.execute(Test.java:29)
        at com.mantech.teiid.Test.main(Test.java:58)
Caused by: [TeiidException]
1 [TeiidException]
2 [InvocationTargetException]
3 [TeiidRuntimeException]Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
4 [NoInitialContextException]Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.teiid.core.util.ReflectionHelper.create(ReflectionHelper.java:292)
        at org.teiid.jdbc.EmbeddedProfile.createServerConnection(EmbeddedProfile.java:67)
        at org.teiid.jdbc.EmbeddedProfile.connect(EmbeddedProfile.java:52)
        ... 5 more
Caused by: [TeiidException]
1 [InvocationTargetException]
2 [TeiidRuntimeException]Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
3 [NoInitialContextException]Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.teiid.core.util.ReflectionHelper.create(ReflectionHelper.java:329)
        at org.teiid.core.util.ReflectionHelper.create(ReflectionHelper.java:290)
        ... 7 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.teiid.core.util.ReflectionHelper.create(ReflectionHelper.java:327)
        ... 8 more
Caused by: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initialNeed to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.teiid.transport.LocalServerConnection.getClientServiceRegistry(LocalServerConnection.java:75)
        at org.teiid.transport.LocalServerConnection.<init>(LocalServerConnection.java:63)
        ... 13 more
Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
        at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
        at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at org.teiid.transport.LocalServerConnection.getClientServiceRegistry(LocalServerConnection.java:73)
        ... 14 more

org.teiid.jdbc.TeiidSQLException: org.teiid.core.TeiidException
        at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:113)
        at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:70)
        at org.teiid.jdbc.EmbeddedProfile.connect(EmbeddedProfile.java:61)
        at org.teiid.jdbc.TeiidDriver.connect(TeiidDriver.java:105)
        at org.teiid.jdbc.TeiidDataSource.getConnection(TeiidDataSource.java:243)
        at org.teiid.jdbc.TeiidDataSource.getConnection(TeiidDataSource.java:224)
        at com.mantech.teiid.Test.execute(Test.java:29)
        at com.mantech.teiid.Test.main(Test.java:58)
Caused by: [TeiidException]
1 [TeiidException]
2 [InvocationTargetException]
3 [TeiidRuntimeException]Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
4 [NoInitialContextException]Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.teiid.core.util.ReflectionHelper.create(ReflectionHelper.java:292)
        at org.teiid.jdbc.EmbeddedProfile.createServerConnection(EmbeddedProfile.java:67)
        at org.teiid.jdbc.EmbeddedProfile.connect(EmbeddedProfile.java:52)
        ... 5 more
Caused by: [TeiidException]
1 [InvocationTargetException]
2 [TeiidRuntimeException]Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
3 [NoInitialContextException]Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.teiid.core.util.ReflectionHelper.create(ReflectionHelper.java:329)
        at org.teiid.core.util.ReflectionHelper.create(ReflectionHelper.java:290)
        ... 7 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.teiid.core.util.ReflectionHelper.create(ReflectionHelper.java:327)
        ... 8 more
Caused by: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initialNeed to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at org.teiid.transport.LocalServerConnection.getClientServiceRegistry(LocalServerConnection.java:75)
        at org.teiid.transport.LocalServerConnection.<init>(LocalServerConnection.java:63)
        ... 13 more
Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
        at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
        at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at org.teiid.transport.LocalServerConnection.getClientServiceRegistry(LocalServerConnection.java:73)
        ... 14 more

________________________________________
From: Steven Hawkins [shawkins at redhat.com]
Sent: Thursday, March 01, 2012 10:25 AM
To: Reeves, Russell
Cc: teiid-users at lists.jboss.org
Subject: Re: [teiid-users] Class not found

LocalServerConnection is in the deployers/teiid-deployer/teiid-runtime jar.  To use a local/embedded connection, the client jar must be in the same VM as Teiid.  If you are using a separate process, then you'll need to use a socket connection and specify host:port.

----- Original Message -----
> While trying the getting started code I get a class not found error.
> The class is: org.teiid.transport.LocalServerConnection
> It's in the src but not in the jars.
> I tried 7.7 down thru 7.0
> Using JBOSS AS 5.1.0
> Any ideas?
>
> This e-mail and any attachments are intended only for the use of the
> addressee(s) named herein and may contain proprietary information.
> If you are not the intended recipient of this e-mail or believe that
> you received this email in error, please take immediate action to
> notify the sender of the apparent error by reply e-mail; permanently
> delete the e-mail and any attachments from your computer; and do not
> disseminate, distribute, use, or copy this message and any
> attachments.
>
> _______________________________________________
> teiid-users mailing list
> teiid-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/teiid-users
>

This e-mail and any attachments are intended only for the use of the addressee(s) named herein and may contain proprietary information. If you are not the intended recipient of this e-mail or believe that you received this email in error, please take immediate action to notify the sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments from your computer; and do not disseminate, distribute, use, or copy this message and any attachments.



More information about the teiid-users mailing list