[Datasource Configuration] New message: "Problem connecting to Oracle using OCI driver"
by Ludovic Lecras
User development,
A new message was posted in the thread "Problem connecting to Oracle using OCI driver":
http://community.jboss.org/message/528212#528212
Author : Ludovic Lecras
Profile : http://community.jboss.org/people/llecras
Message:
--------------------------------------------------------------
Hello,
I would like to connect my datasource using the oracle jdbc oci driver to make some tests on failover modes.
I installed an Oracle 11 client on my server and I change my oracle-ds.xml to something like that:
<local-tx-datasource>
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc:oracle:oci:@(DESCRIPTION=(xxx))</connection-url>
<user-name>xxxx</user-name>
<password>xxxx</password>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<query-timeout>60</query-timeout>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</local-tx-datasource>
Wen I start my jboss server, I have the following error:
Caused by: java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3171)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3167)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:233)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:490)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:133)
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:465)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:207)
... 96 more
I tried to add the path to the oracle .so library by adding the following option to my command line -Djava.library.path=/oracle/product/11.1.0/db_1/lib...
But I still have the error...
Does anybody have an idea?
Many thanks,
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528212#528212
16 years, 1 month
[EJB 3.0] New message: "Re: EJB3 Session Bean Container error"
by Juliano Vidal
User development,
A new message was posted in the thread "EJB3 Session Bean Container error":
http://community.jboss.org/message/528207#528207
Author : Juliano Vidal
Profile : http://community.jboss.org/people/julianovidal
Message:
--------------------------------------------------------------
Hey! Thanks for the quick reply!
The error ocurrs when I try to access a Remote SessionBean.
The weird thing is that I actually get the instance when I do the lookup:
public CategoryRemote getCategory() throws CMSException {
Object obj = CMSServiceLocator.getInstance().getObject(CategoryRemote.REMOTE);
return (CategoryRemote) PortableRemoteObject.narrow(obj, CategoryRemote.class);
}
The getObject method is the lookup and I'm doing it the classic way...
InitialContext... blah, blah,blah...
I get the instance... but when I try to call a method from the SessionBean, I get that error.
Thanks in advance for your help!
Regards,
Juliano Vidal
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528207#528207
16 years, 1 month
[JBoss Microcontainer Development] New message: "Re: JBDEPLOY-226 - DeployerClient change extension"
by Adrian Brock
User development,
A new message was posted in the thread "JBDEPLOY-226 - DeployerClient change extension":
http://community.jboss.org/message/528201#528201
Author : Adrian Brock
Profile : http://community.jboss.org/people/adrian@jboss.org
Message:
--------------------------------------------------------------
> alesj wrote:
>
> I see we're on the same page -- this feature is just a nicer API, done width first.
>
> I was just wondering if you're tackling the circular references problem.
> ((ab)using this thread to check up on you )
Nope. But that probably needs resolving (pun intended) in the jboss-dependency project?
Currently a DependencyItem knows what it wants to resolve against and just checks whether it is in the correct state.
If however this leads to a circular dependency, nothing moves.
e.g.
A depends upon B at CLASSLOADER
B depends upon A at CLASSLOADER
For A,
ControllerContext context = controller.getContext(B, CLASSLOADER);
will return null and the same for B with respect to A.
Instead, what is required is some api within the DependencyInfo/Item to say, well actually I will return a context because
the only thing that is stopping them moving is the circular dependency.
Something like:
RequirementDependencyItem extends AbstractDependencyItem
{
public boolean resolve(Controller)
{
Module module = resolveModule();
// Now we know what we want to resolve to
if (module != null)
{
ControllerContext ctx = module.getControllerContext();
putThisDependencyInASemiResolvedStateOnContext(ctx)
boolean resolved = doesTheOtherContextAndItsTransientsHaveCompletelyUnresolvedDependenies(ctx, getDependentState()); // i.e. not resolved at all rather resolved or semi-resolved
// etc.
}
}
}
I can prototype this in the ClassLoading project, but I think it is a general requirement?
NOTE: This feature is only possible for a dependency where the underlying model can handle circular dependencies.
e.g. constructors on pojos can't do it
But the classloading can, since it can lazily wire the classloaders together using the ClassLoaderPolicyFactory on the DelegateLoader.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528201#528201
16 years, 1 month
[EJB 3.0] New message: "Entity Manager with BMT and Transaction Timeout"
by Alexander Hartner
User development,
A new message was posted in the thread "Entity Manager with BMT and Transaction Timeout":
http://community.jboss.org/message/528190#528190
Author : Alexander Hartner
Profile : http://community.jboss.org/people/ejb3workshop
Message:
--------------------------------------------------------------
When running small loads on our application all is working fine, however under heavy concurrent load we consistently get the following exception.
> 2010-02-09 12:40:56,773 FATAL [com.abc.IndexOutputStream.deliverJob] failed to lazily initialize a collection of role: com.abc.entities.ChannelJob.m_jobProperties, no session or session was closed
> org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.abc.entities.ChannelJob.m_jobProperties, no session or session was closed
My suspicious were that the underlying JTA transaction has timed-out and that the entity manager session was closed, so I tried increasing the global transaction timeout from 300 to 3600.
> <!-- JBoss Transactions JTA -->
> <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
> name="jboss:service=TransactionManager">
> <attribute name="TransactionTimeout">*3600*</attribute>
> <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>
> </mbean>
However this did not resolve my problem. Shortly (between 5 to 10 minutes) after starting the transaction the same exception occured again. I am injecting a UserTransaction as well as an EntityManager into a MessageDrivenBean and then manage the transaction myself. I found some posts that suggest in this case I have to join the EntityManager to the JTA transaction using +entityManger.joinTransaction()+ which I wasn't doing up to this point. It seemed to have had a positive impact, but I am still testing if this was really the cause of the problem.
What I am looking for is some clarification on if this is really the case that I have to join the transaction and if I don't join where the timeout for the entity manager is configured. I had a look at the Hibernate documentation, but didn't find any reference to a timeout, other then on the entity cache.
Ideally I would like to resolve this issue by changing my environment rather then the application.
Thanks in advance
Alex
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528190#528190
16 years, 2 months
[EJB 3.0] New message: "EJB3 Session Bean Container error"
by Juliano Vidal
User development,
A new message was posted in the thread "EJB3 Session Bean Container error":
http://community.jboss.org/message/528189#528189
Author : Juliano Vidal
Profile : http://community.jboss.org/people/julianovidal
Message:
--------------------------------------------------------------
Hi all,
I'm moving my application from App 4.2.3.GA to 5.1.0.GA and whern I try to call any of my SessionBeans I get the error:
java.lang.IllegalStateException: Container null is not registered
org.jboss.ejb3.Ejb3Registry.getContainer(Ejb3Registry.java:167)
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:70)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
$Proxy705.invoke(Unknown Source)
org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:188)
$Proxy704.listByContentId(Unknown Source)
Anyone had the same problem?
Thanks!
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528189#528189
16 years, 2 months