Question: I tried to create a spring boot deployable war file and then deployed it to weblogic 12c. Application startup failed with the exception:

```
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
ERROR SpringApplication - Application startup failed
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'graphQLServletRegistrationBean' defined in class path resource
...

```

Nested exception is:

```
java.lang.IllegalStateException: No *.graphqls files found on classpath.  Please add a graphql schema to the classpath or add a SchemaParser bean to your application context.

```

In fact, the above mentioned files `*.graphqls` exist in the war under `WEB-INF/classes/` folder. If the war file was unzipped to the local disk and redeploy the app in exploded format, we won't see this exception.

Do I miss anything?

Thanks.

Answer: 
I wasted 8 hours in this loophole, piecing together various clues I got from other people facing the same problem.

\*\*solution 1 is to deploy your application as exploded WAR in Weblogic.
I assume you already prepared your spring boot application for deployment on Weblogic, there are several tricks on this topic but they are available on the Internet (exclude embedded tomcat and specify WAR packaging in POM.XML, create webapp/WEB-INF folder with weblogic.xml and servlet xml).

Now create a folder on the server, /home/oracle/wars/myapp for example, and just copy the unpacked contents of your WAR to that folder.

Then go to Deployments - Install, navigate to /home/oracle/wars/ and choose myapp folder from the radio button list, and simply follow the default steps to deploy.

Pay attention, you need a plain web.xml file along with weblogic.xml, otherwise Weblogic will not see it as 'Web application'\*\*

Deploying as exploded WAR is a workaround to avoid the creation of \_wl\_cls\_gen.jar which is at the source of this problem.

\*\* Solution 2
By default the lookup location is set to "classpath:graphql/\*\*/"
which is not picked up by PathMatchingResourcePatternResolver.
Set this in your application yaml or properties:

```
spring: graphql: schema: locations: classpath*:graphql/**/

```

Finally, for this particular error, \*\*/\*.graphqls file not found when deploying to weblogic, nothing of the below worked, I am mentioning it so you don't waste your time as well:

1. Adding resource tag in POM

 src/main/resources

 \*\*/\*.properties
 \*\*/\*.graphqls
2. Adding in application.properties
graphql.tools.schema-location-pattern=\*\*/\*.graphqls
3. Adding in application.properties
graphql.servlet.exception-handlers-enabled=true
4. Newer versions of GraphQL libraries, I tried it and everything fails with this error from graphql 7.0.1 onwards
5. Adding spring-boot-starter-parent in POM
I've figured out the cause of this issue. It's a bit odd in weblogic when deploying war file. It creates an internal \_wl\_cls\_gen.jar file to package all files for /WEB-INF/classes folder. 

but the application still looks for resources in match directory like /j2ee/wl12/cp\_domain/servers/cp\_msp01/tmp/\_WL\_user/cpapps-graphql-results/g4qyhf/war/WEB-INF/classes/\*\*/\*.graphqls and find nothing matched.