Skip to content

LoanBrokerSharkDetectorDemo.java:48: error: cannot find symbol #352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iajzenszmi opened this issue Jul 10, 2023 · 1 comment
Closed

LoanBrokerSharkDetectorDemo.java:48: error: cannot find symbol #352

iajzenszmi opened this issue Jul 10, 2023 · 1 comment

Comments

@iajzenszmi
Copy link

amples-main/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/demo$ javac LoanBrokerSharkDetectorDemo.java
LoanBrokerSharkDetectorDemo.java:21: error: package org.apache.commons.logging does not exist
import org.apache.commons.logging.Log;
^
LoanBrokerSharkDetectorDemo.java:22: error: package org.apache.commons.logging does not exist
import org.apache.commons.logging.LogFactory;
^
LoanBrokerSharkDetectorDemo.java:24: error: package org.springframework.context does not exist
import org.springframework.context.ConfigurableApplicationContext;
^
LoanBrokerSharkDetectorDemo.java:25: error: package org.springframework.context.support does not exist
import org.springframework.context.support.ClassPathXmlApplicationContext;
^
LoanBrokerSharkDetectorDemo.java:26: error: cannot find symbol
import org.springframework.integration.samples.loanbroker.LoanBrokerGateway;
^
symbol: class LoanBrokerGateway
location: package org.springframework.integration.samples.loanbroker
LoanBrokerSharkDetectorDemo.java:27: error: package org.springframework.integration.samples.loanbroker.domain does not exist
import org.springframework.integration.samples.loanbroker.domain.Customer;
^
LoanBrokerSharkDetectorDemo.java:28: error: package org.springframework.integration.samples.loanbroker.domain does not exist
import org.springframework.integration.samples.loanbroker.domain.LoanQuote;
^
LoanBrokerSharkDetectorDemo.java:29: error: package org.springframework.integration.samples.loanbroker.domain does not exist
import org.springframework.integration.samples.loanbroker.domain.LoanRequest;
^
LoanBrokerSharkDetectorDemo.java:36: error: cannot find symbol
private static final Log logger = LogFactory.getLog(LoanBrokerSharkDetectorDemo.class);
^
symbol: class Log
location: class LoanBrokerSharkDetectorDemo
LoanBrokerSharkDetectorDemo.java:36: error: cannot find symbol
private static final Log logger = LogFactory.getLog(LoanBrokerSharkDetectorDemo.class);
^
symbol: variable LogFactory
location: class LoanBrokerSharkDetectorDemo
LoanBrokerSharkDetectorDemo.java:39: error: cannot find symbol
ConfigurableApplicationContext context =
^
symbol: class ConfigurableApplicationContext
location: class LoanBrokerSharkDetectorDemo
LoanBrokerSharkDetectorDemo.java:40: error: cannot find symbol
new ClassPathXmlApplicationContext("META-INF/spring/integration/bootstrap-config/stubbed-loan-broker-multicast.xml");
^
symbol: class ClassPathXmlApplicationContext
location: class LoanBrokerSharkDetectorDemo
LoanBrokerSharkDetectorDemo.java:41: error: cannot find symbol
LoanBrokerGateway broker = context.getBean("loanBrokerGateway", LoanBrokerGateway.class);
^
symbol: class LoanBrokerGateway
location: class LoanBrokerSharkDetectorDemo
LoanBrokerSharkDetectorDemo.java:41: error: cannot find symbol
LoanBrokerGateway broker = context.getBean("loanBrokerGateway", LoanBrokerGateway.class);
^
symbol: class LoanBrokerGateway
location: class LoanBrokerSharkDetectorDemo
LoanBrokerSharkDetectorDemo.java:42: error: cannot find symbol
LoanRequest loanRequest = new LoanRequest();
^
symbol: class LoanRequest
location: class LoanBrokerSharkDetectorDemo
LoanBrokerSharkDetectorDemo.java:42: error: cannot find symbol
LoanRequest loanRequest = new LoanRequest();
^
symbol: class LoanRequest
location: class LoanBrokerSharkDetectorDemo
LoanBrokerSharkDetectorDemo.java:43: error: cannot find symbol
loanRequest.setCustomer(new Customer());
^
symbol: class Customer
location: class LoanBrokerSharkDetectorDemo
LoanBrokerSharkDetectorDemo.java:44: error: cannot find symbol
LoanQuote loan = broker.getBestLoanQuote(loanRequest);
^
symbol: class LoanQuote
location: class LoanBrokerSharkDetectorDemo
LoanBrokerSharkDetectorDemo.java:46: error: cannot find symbol
List loanQuotes = broker.getAllLoanQuotes(loanRequest);
^
symbol: class LoanQuote
location: class LoanBrokerSharkDetectorDemo
LoanBrokerSharkDetectorDemo.java:48: error: cannot find symbol
for (LoanQuote loanQuote : loanQuotes) {
^
symbol: class LoanQuote
location: class LoanBrokerSharkDetectorDemo
20 errors

@artembilan
Copy link
Member

Sorry, your question is not clear.

That javac LoanBrokerSharkDetectorDemo.java is wrong since we have to compile the whole project and provide for it some specific classpath.
That's why we use Maven or Gradle build tools which let us take care about all of those compilation concerns.

See if ./mvn build in the spring-integration-samples/applications/loan-broker directory does the trick for you to build this sample project.

Closing as Works as Designed

@artembilan artembilan closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants