My Oracle Support Banner

MedRec Application is Not Working with WebLogic 12.1.2 when Trying to Login using any Derby Database Username and Password (Doc ID 1662430.1)

Last updated on JULY 26, 2023

Applies to:

Oracle WebLogic Server - Version 12.1.2.0.0 to 12.1.2.0.0 [Release 12c]
Information in this document applies to any platform.

Symptoms

Avitek Medical Records Application (MedRec) and Tutorials

MedRec is an end-to-end sample Java EE application shipped with WebLogic Server that simulates an independent, centralized medical record management system. The MedRec application provides a framework for patients, doctors, and administrators to manage patient data using a variety of different clients.

MedRec demonstrates WebLogic Server and Java EE features, and highlights Oracle-recommended best practices. MedRec is optionally installed in the WebLogic Server installation. You can start MedRec from the ORACLE_HOME\user_projects\domains\medrec directory, where ORACLE_HOME is the directory you specified as the Oracle Home when you installed Oracle WebLogic Server.

Derby Open-Source Database

Derby is an open source relational database management system based on Java, JDBC, and SQL standards. It is bundled with WebLogic Server for use by the sample applications and code examples as a demonstration database. For more information about Derby, see http://db.apache.org/derby

 

Before describing the symptoms, You can refer to the following links in order to have got MedRec installed.
Avitek Medical Records Application (MedRec) and Tutorials
Sample Applications and Code Examples
Avitek Medical Records Sample Domain Template

After installing the Weblogic Server 12c (12.1.2) samples, the instructions are followed to configure and run the sample application (MedRec)

1. The application home page is called using this URL: http://localhost:7011/medrec



2. A seperate window is started

Derby Server for WLS Examples Server
   < a timestamp > : Security manager installed using the Basic server security policy.
   < a timestamp > : Apache Derby Network Server - <HOST> - (1181258)
   started and ready to accept connections on port 1527.


3. Click on Start using MedRec!
4. A new browser is started with this URL: http://localhost:7011/medrec/index.action
5. Click on the Login button under Physician
6. Provide user name user6@oracle.com and password weblogic

When trying to login the following error is returned in the browser:

Error 500--Internal Server Error

On the Weblogic Server side, the following stack trace is present:

javax.faces.FacesException: #{authenticationController.login}:
javax.ejb.EJBException: EJB Exception: :
com.sun.xml.ws.fault.ServerSOAPFaultException: Client received SOAP Fault
from server: EJB Exception:  Please see the server log to find more detail
regarding exact cause of the failure.
at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:193)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:133)
at com.sun.xml.ws.client.sei.StubHandler.readResponse(StubHandler.java:253)
at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:181)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)
Caused by: javax.ejb.EJBTransactionRolledbackException: Client received an
exception from server: EJB Exception:  Please see the server log to find more
detail regarding exact cause of the failure.
at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:457)
at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:252)
at weblogic.ejb.container.internal.BaseLocalObject.__WL_postInvokeTxRetry(BaseLocalObject.java:205)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:238)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3363)
... 11 more
Caused by: javax.persistence.PersistenceException: Client received an exception from server: Exception [EclipseLink-7060] (Eclipse Persistence
Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Cannot acquire data source [jdbc/MedRecGlobalDataSourceXA].
Internal Exception: javax.naming.NameNotFoundException: While trying to lookup 'jdbc.MedRecGlobalDataSourceXA' didn't find subcontext 'jdbc'.
Resolved ''; remaining name 'jdbc/MedRecGlobalDataSourceXA' Please see the server log to find more detail regarding exact cause of the failure.
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:614)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:186)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:278)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:304)
at com.oracle.medrec.repository.impl.BaseUserRepositoryImpl.findByUsernameAndPassword(BaseUserRepositoryImpl.java:23)
at com.oracle.medrec.repository.impl.PhysicianRepositoryImpl_uqhu9s_PhysicianRepositoryImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:33)
... 82 more
Caused by: org.eclipse.persistence.exceptions.ValidationException: Client received an exception from server:
Exception Description: Cannot acquire data source [jdbc/MedRecGlobalDataSourceXA].
Internal Exception: javax.naming.NameNotFoundException: While trying to lookup 'jdbc.MedRecGlobalDataSourceXA' didn't find subcontext 'jdbc'.
Resolved ''; remaining name 'jdbc/MedRecGlobalDataSourceXA' Please see the server log to find more detail regarding exact cause of the failure.
at org.eclipse.persistence.exceptions.ValidationException.cannotAcquireDataSource(ValidationException.java:502)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:109)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:690)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:215)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:554)
... 98 more
Caused by: javax.naming.NameNotFoundException: Client received an exception from server: While trying to lookup 'jdbc.MedRecGlobalDataSourceXA' didn't
find subcontext 'jdbc'. Resolved '' Please see the server log to find more detail regarding exact cause of the failure.
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1180)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:265)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:187)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:210)
...
Caused by: org.eclipse.persistence.exceptions.DatabaseException: Client received an exception from server:
Internal Exception: java.sql.SQLSyntaxErrorException: Column 'PASSWORD' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'PASSWORD' is not a column in the target table.
Error Code: -1
Call: SELECT ID, EMAIL, PASSWORD, PHONE, USERNAME, VERSION, FIRSTNAME, LASTNAME, MIDDLENAME FROM physicians WHERE ((USERNAME = ?) AND (PASSWORD = ?))
bind => [user6@oracle.com, weblogic]

 

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.